13 template<
typename T,
typename U>
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;
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);
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);
64 int main(
int argc,
char** argv){
int main(int argc, char **argv)
void testSimpleVectorPairValue(const std::string &testName, size_t nbValue)
Abstract check of values stored in a file.
void testSetVectorPairValue(const std::string &firstTypeName, size_t nbValue)
Abstract check of values stored in a file.
void testVectorPairDataFile()
Test if data size is Ok.
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.