TsByteArray Class Reference

Test suite for the ByteArray Class. More...

#include <TsByteArray.h>

Inheritance diagram for TsByteArray:

Public Member Functions

void setUp ()
 
void tearDown ()
 

Protected Member Functions

void tcByteArray ()
 Test Case: Constructs an empty byte array. More...
 
void tcByteArrayConstructor ()
 Test Case: Copy Constructor with size bigger than data. More...
 
void tcByteArraySize ()
 Test Case: Creates a new byte array and allocate size bytes. More...
 
void tcClear ()
 Test Case: Clear the byte array. More...
 
void tcClone ()
 Test Case: Clone ByteArray. More...
 
void tcCopy ()
 Test Case: It copies the data from the given pointer to the byte array. More...
 
void tcCopy1 ()
 Test Case: It copies the data from the given pointer to the byte array and will expand the internal buffer if its capacity is less than offset + size bytes. More...
 
void tcGetData ()
 Test Case: Returns the array data after constructor. More...
 
void tcGetTypeCode ()
 Test Case: Get Type code of ByteArray. More...
 
void tcInit ()
 Test Case: Creates a new byte array initializing it with data using all capacity. More...
 
void tcInit1 ()
 Test Case: Creates a new byte array initializing it with data less than capacity. More...
 
void tcOperator ()
 Test Case: Test operator << (writes simple data types (int,double, float) to bytearray. More...
 
void tcSetBytesUsed ()
 Test Case: Set bytes used by ByteArray. More...
 
void tcTake ()
 Test Case: It takes the ownership of the external data buffer. More...
 
void tcTake1 ()
 Test Case: It takes the ownership of the external data buffer. More...
 
void tcToString ()
 Test Case: It return an string representation of ByteArray. More...
 

Private Member Functions

 CPPUNIT_TEST (tcByteArray)
 
 CPPUNIT_TEST (tcByteArraySize)
 
 CPPUNIT_TEST (tcInit)
 
 CPPUNIT_TEST (tcInit1)
 
 CPPUNIT_TEST (tcByteArrayConstructor)
 
 CPPUNIT_TEST (tcTake)
 
 CPPUNIT_TEST (tcTake1)
 
 CPPUNIT_TEST (tcCopy)
 
 CPPUNIT_TEST (tcCopy1)
 
 CPPUNIT_TEST (tcClone)
 
 CPPUNIT_TEST (tcGetTypeCode)
 
 CPPUNIT_TEST (tcToString)
 
 CPPUNIT_TEST (tcClear)
 
 CPPUNIT_TEST (tcSetBytesUsed)
 
 CPPUNIT_TEST (tcOperator)
 
 CPPUNIT_TEST_SUITE (TsByteArray)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Test suite for the ByteArray Class.

This test suite will check the following:

Definition at line 60 of file TsByteArray.h.

Member Function Documentation

TsByteArray::CPPUNIT_TEST ( tcByteArray  )
private
TsByteArray::CPPUNIT_TEST ( tcByteArraySize  )
private
TsByteArray::CPPUNIT_TEST ( tcInit  )
private
TsByteArray::CPPUNIT_TEST ( tcInit1  )
private
TsByteArray::CPPUNIT_TEST ( tcByteArrayConstructor  )
private
TsByteArray::CPPUNIT_TEST ( tcTake  )
private
TsByteArray::CPPUNIT_TEST ( tcTake1  )
private
TsByteArray::CPPUNIT_TEST ( tcCopy  )
private
TsByteArray::CPPUNIT_TEST ( tcCopy1  )
private
TsByteArray::CPPUNIT_TEST ( tcClone  )
private
TsByteArray::CPPUNIT_TEST ( tcGetTypeCode  )
private
TsByteArray::CPPUNIT_TEST ( tcToString  )
private
TsByteArray::CPPUNIT_TEST ( tcClear  )
private
TsByteArray::CPPUNIT_TEST ( tcSetBytesUsed  )
private
TsByteArray::CPPUNIT_TEST ( tcOperator  )
private
TsByteArray::CPPUNIT_TEST_SUITE ( TsByteArray  )
private
TsByteArray::CPPUNIT_TEST_SUITE_END ( )
private
void TsByteArray::setUp ( )

Definition at line 25 of file TsByteArray.cpp.

void TsByteArray::tcByteArray ( )
protected

Test Case: Constructs an empty byte array.

Definition at line 33 of file TsByteArray.cpp.

References b, te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), and te::dt::ByteArray::getData().

void TsByteArray::tcByteArrayConstructor ( )
protected

Test Case: Copy Constructor with size bigger than data.

Definition at line 257 of file TsByteArray.cpp.

References b, and te::dt::ByteArray::getData().

void TsByteArray::tcByteArraySize ( )
protected

Test Case: Creates a new byte array and allocate size bytes.

Definition at line 51 of file TsByteArray.cpp.

References b, te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), and te::dt::ByteArray::getData().

void TsByteArray::tcClear ( )
protected

Test Case: Clear the byte array.

Definition at line 215 of file TsByteArray.cpp.

References b, te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), and te::dt::ByteArray::clear().

void TsByteArray::tcClone ( )
protected
void TsByteArray::tcCopy ( )
protected

Test Case: It copies the data from the given pointer to the byte array.

Definition at line 161 of file TsByteArray.cpp.

References b, te::dt::ByteArray::capacity(), te::dt::ByteArray::copy(), and te::dt::ByteArray::getData().

void TsByteArray::tcCopy1 ( )
protected

Test Case: It copies the data from the given pointer to the byte array and will expand the internal buffer if its capacity is less than offset + size bytes.

Definition at line 181 of file TsByteArray.cpp.

References b, te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), and te::dt::ByteArray::copy().

void TsByteArray::tcGetData ( )
protected

Test Case: Returns the array data after constructor.

void TsByteArray::tcGetTypeCode ( )
protected

Test Case: Get Type code of ByteArray.

Definition at line 296 of file TsByteArray.cpp.

References b, te::dt::BYTE_ARRAY_TYPE, and te::dt::ByteArray::getTypeCode().

void TsByteArray::tcInit ( )
protected

Test Case: Creates a new byte array initializing it with data using all capacity.

Definition at line 69 of file TsByteArray.cpp.

References b, te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), and te::dt::ByteArray::getData().

void TsByteArray::tcInit1 ( )
protected

Test Case: Creates a new byte array initializing it with data less than capacity.

Definition at line 92 of file TsByteArray.cpp.

References te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), and te::dt::ByteArray::getData().

void TsByteArray::tcOperator ( )
protected

Test Case: Test operator << (writes simple data types (int,double, float) to bytearray.

Definition at line 320 of file TsByteArray.cpp.

References te::dt::ByteArray::clear(), d, te::dt::ByteArray::getData(), te::common::uri::operator<<(), and te::dt::ByteArray::toString().

void TsByteArray::tcSetBytesUsed ( )
protected

Test Case: Set bytes used by ByteArray.

Definition at line 310 of file TsByteArray.cpp.

References b, te::dt::ByteArray::bytesUsed(), and te::dt::ByteArray::setBytesUsed().

void TsByteArray::tcTake ( )
protected

Test Case: It takes the ownership of the external data buffer.

Definition at line 113 of file TsByteArray.cpp.

References b, te::dt::ByteArray::capacity(), te::dt::ByteArray::getData(), and te::dt::ByteArray::take().

void TsByteArray::tcTake1 ( )
protected

Test Case: It takes the ownership of the external data buffer.

Definition at line 135 of file TsByteArray.cpp.

References te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), te::dt::ByteArray::getData(), and te::dt::ByteArray::take().

void TsByteArray::tcToString ( )
protected

Test Case: It return an string representation of ByteArray.

Definition at line 277 of file TsByteArray.cpp.

References b, te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), and te::dt::ByteArray::toString().

void TsByteArray::tearDown ( )

Definition at line 29 of file TsByteArray.cpp.


The documentation for this class was generated from the following files: