Go to the source code of this file.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ testSetVectorPairValue()
template<typename T >
void testSetVectorPairValue |
( |
const std::string & |
firstTypeName, |
|
|
size_t |
nbValue |
|
) |
| |
Abstract check of values stored in a file.
- Parameters
-
firstTypeName | : name of the first type |
nbValue | : number of values to put in the reference vector |
Definition at line 30 of file main_vector_pair.cpp.
31 testSimpleVectorPairValue<T, long unsigned int>(
"std::vector<std::pair<"+firstTypeName+
", long unsigned int> >", nbValue);
32 testSimpleVectorPairValue<T, unsigned int>(
"std::vector<std::pair<"+firstTypeName+
", unsigned int> >", nbValue);
33 testSimpleVectorPairValue<T, unsigned short>(
"std::vector<std::pair<"+firstTypeName+
", unsigned short> >", nbValue);
34 testSimpleVectorPairValue<T, unsigned char>(
"std::vector<std::pair<"+firstTypeName+
", unsigned char> >", nbValue);
36 testSimpleVectorPairValue<T, long int>(
"std::vector<std::pair<"+firstTypeName+
", long int> >", nbValue);
37 testSimpleVectorPairValue<T, int>(
"std::vector<std::pair<"+firstTypeName+
", int> >", nbValue);
38 testSimpleVectorPairValue<T, short>(
"std::vector<std::pair<"+firstTypeName+
", short> >", nbValue);
39 testSimpleVectorPairValue<T, char>(
"std::vector<std::pair<"+firstTypeName+
", char> >", nbValue);
40 testSimpleVectorPairValue<T, int8_t>(
"std::vector<std::pair<"+firstTypeName+
", int8_t> >", nbValue);
41 testSimpleVectorPairValue<T, float>(
"std::vector<std::pair<"+firstTypeName+
", float> >", nbValue);
42 testSimpleVectorPairValue<T, double>(
"std::vector<std::pair<"+firstTypeName+
", double> >", nbValue);
43 testSimpleVectorPairValue<T, bool>(
"std::vector<std::pair<"+firstTypeName+
", bool> >", nbValue);
◆ testSimpleVectorPairValue()
template<typename T , typename U >
void testSimpleVectorPairValue |
( |
const std::string & |
testName, |
|
|
size_t |
nbValue |
|
) |
| |
Abstract check of values stored in a file.
- Parameters
-
testName | : name of the test |
nbValue | : number of values to put in the reference vector |
Definition at line 14 of file main_vector_pair.cpp.
15 std::string fileName(
"value_test_vector_pair.data");
17 std::vector<std::pair<T, U> > vecRef;
18 for(
size_t i(0lu); i < nbValue; ++i){vecRef.push_back(std::pair<T, U>(i,2lu*i));}
20 std::vector<std::pair<T, U> > vecValue;
bool data_load(FILE *iter, T &data)
Load data from a message.
bool data_save(FILE *iter, const T &data)
Save data in a message.
#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.
References checkValue(), data_load(), data_save(), and data_stream_assert.
◆ testVectorPairDataFile()
void testVectorPairDataFile |
( |
| ) |
|
Test if data size is Ok.
Definition at line 47 of file main_vector_pair.cpp.
49 testSetVectorPairValue<long unsigned int>(
"long unsigned int", nbValue);
50 testSetVectorPairValue<unsigned int>(
"unsigned int", nbValue);
51 testSetVectorPairValue<unsigned short>(
"unsigned short", nbValue);
52 testSetVectorPairValue<unsigned char>(
"unsigned char", nbValue);
53 testSetVectorPairValue<long int>(
"long int", nbValue);
54 testSetVectorPairValue<int>(
"int", nbValue);
55 testSetVectorPairValue<short>(
"short", nbValue);
56 testSetVectorPairValue<char>(
"char", nbValue);
57 testSetVectorPairValue<int8_t>(
"int8_t", nbValue);
58 testSetVectorPairValue<float>(
"float", nbValue);
59 testSetVectorPairValue<double>(
"double", nbValue);
60 testSetVectorPairValue<bool>(
"bool", nbValue);
Referenced by main().