13 template<
typename T,
typename U>
15 std::string fileName(
"value_test_map.data");
16 std::map<T, U> vecRef;
17 for(
size_t i(0lu); i < nbValue; ++i){vecRef[i] = (U)(2lu*i > nbValue/2lu);}
19 std::map<T, U> vecValue;
30 testSimpleMapValue<T, long unsigned int>(
"std::map<"+firstTypeName+
", long unsigned int>", nbValue);
31 testSimpleMapValue<T, unsigned int>(
"std::map<"+firstTypeName+
", unsigned int>", nbValue);
32 testSimpleMapValue<T, unsigned short>(
"std::map<"+firstTypeName+
", unsigned short>", nbValue);
33 testSimpleMapValue<T, unsigned char>(
"std::map<"+firstTypeName+
", unsigned char>", nbValue);
34 testSimpleMapValue<T, long int>(
"std::map<"+firstTypeName+
", long int>", nbValue);
35 testSimpleMapValue<T, int>(
"std::map<"+firstTypeName+
", int>", nbValue);
36 testSimpleMapValue<T, short>(
"std::map<"+firstTypeName+
", short>", nbValue);
37 testSimpleMapValue<T, char>(
"std::map<"+firstTypeName+
", char>", nbValue);
38 testSimpleMapValue<T, int8_t>(
"std::map<"+firstTypeName+
", int8_t>", nbValue);
39 testSimpleMapValue<T, float>(
"std::map<"+firstTypeName+
", float>", nbValue);
40 testSimpleMapValue<T, double>(
"std::map<"+firstTypeName+
", double>", nbValue);
41 testSimpleMapValue<T, bool>(
"std::map<"+firstTypeName+
", bool>", nbValue);
48 testSetMapValue<long unsigned int>(
"long unsigned int", nbValue);
49 testSetMapValue<unsigned int>(
"unsigned int", nbValue);
50 testSetMapValue<unsigned short>(
"unsigned short", nbValue);
51 testSetMapValue<unsigned char>(
"unsigned char", nbValue);
52 testSetMapValue<long int>(
"long int", nbValue);
53 testSetMapValue<int>(
"int", nbValue);
54 testSetMapValue<short>(
"short", nbValue);
55 testSetMapValue<char>(
"char", nbValue);
56 testSetMapValue<int8_t>(
"int8_t", nbValue);
57 testSetMapValue<float>(
"float", nbValue);
58 testSetMapValue<double>(
"double", nbValue);
59 testSetMapValue<bool>(
"bool", nbValue);
63 int main(
int argc,
char** argv){
int main(int argc, char **argv)
void testMapDataFile()
Test if data size is Ok.
void testSetMapValue(const std::string &firstTypeName, size_t nbValue)
Abstract check of values stored in a file.
void testSimpleMapValue(const std::string &testName, size_t nbValue)
Abstract check of values stored in a file.
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.