Test suite for the ByteArray Class. More...
#include <TsByteArray.h>
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... | |
Test suite for the ByteArray Class.
This test suite will check the following:
Definition at line 60 of file TsByteArray.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void TsByteArray::setUp | ( | ) |
Definition at line 25 of file TsByteArray.cpp.
|
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().
|
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().
|
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().
|
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().
|
protected |
Test Case: Clone ByteArray.
Definition at line 234 of file TsByteArray.cpp.
References b, te::dt::ByteArray::bytesUsed(), te::dt::ByteArray::capacity(), te::dt::ByteArray::clone(), and te::dt::ByteArray::getData().
|
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().
|
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().
|
protected |
Test Case: Returns the array data after constructor.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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.