Go to the source code of this file.
◆ checkListDataMessage()
template<typename T >
void checkListDataMessage |
( |
const std::string & |
nameOfType | ) |
|
Check the list of data with message of a given type.
- Parameters
-
nameOfType | : name of the type to be checked assert on fail |
Definition at line 17 of file main.cpp.
21 for(
size_t i(0lu); i < nbValue; ++i){vecData.push_back(i);}
27 std::list<T> outVec(0lu);
bool data_message_save(DataStreamIter &iter, T &data)
Save data in a message.
bool data_message_load(DataStreamIter &iter, T &data)
Load data from a message.
size_t data_size(T &data)
Get size of data.
#define data_stream_assert(isOk)
bool checkValue(const std::string &testName, const T &givenSize, const T &referenceSize)
Check given value compare to the reference value.
std::vector< DataStreamType > DataStreamMsg
DataStreamType * DataStreamIter
References checkValue(), data_message_load(), data_message_save(), data_size(), and data_stream_assert.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ testListDataMessage()
void testListDataMessage |
( |
| ) |
|
Test if data size is Ok.
Definition at line 33 of file main.cpp.
34 checkListDataMessage<long unsigned int>(
"long unsigned int");
35 checkListDataMessage<unsigned int>(
"unsigned int");
36 checkListDataMessage<unsigned short>(
"unsigned short");
37 checkListDataMessage<unsigned int>(
"unsigned int");
38 checkListDataMessage<unsigned char>(
"unsigned char");
39 checkListDataMessage<long int>(
"long int");
40 checkListDataMessage<int>(
"int");
41 checkListDataMessage<short>(
"short");
42 checkListDataMessage<int>(
"int");
43 checkListDataMessage<char>(
"char");
44 checkListDataMessage<float>(
"float");
45 checkListDataMessage<double>(
"double");
46 checkListDataMessage<int8_t>(
"int8_t");
Referenced by main().