PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
main.cpp File Reference
+ Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 
template<typename T >
bool testMultiTableSize (size_t nbElementMin, size_t nbElementMax)
 Check size of a table of data. More...
 
void testSimpleTableDataSize ()
 Test if data size is Ok. More...
 
template<typename T >
bool testTableSize (size_t nbElement)
 Check size of a table of data. More...
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 53 of file main.cpp.

53  {
55  return 0;
56 }
void testSimpleTableDataSize()
Test if data size is Ok.
Definition: main.cpp:38

References testSimpleTableDataSize().

+ Here is the call graph for this function:

◆ testMultiTableSize()

template<typename T >
bool testMultiTableSize ( size_t  nbElementMin,
size_t  nbElementMax 
)

Check size of a table of data.

Parameters
nbElementMin: minimum number of elements of the table of data
nbElementMax: maximum number of elements of the table of data
Returns
true on success, false otherwise

Definition at line 29 of file main.cpp.

29  {
30  bool b(true);
31  for(size_t i(nbElementMin); i < nbElementMax && b; ++i){
32  b &= testTableSize<T>(i);
33  }
34  return b;
35 }

◆ testSimpleTableDataSize()

void testSimpleTableDataSize ( )

Test if data size is Ok.

Definition at line 38 of file main.cpp.

38  {
39  data_stream_assert(testMultiTableSize<bool>(2lu, 42lu));
40  data_stream_assert(testMultiTableSize<char>(2lu, 42lu));
41  data_stream_assert(testMultiTableSize<int8_t>(2lu, 42lu));
42  data_stream_assert(testMultiTableSize<short>(2lu, 42lu));
43  data_stream_assert(testMultiTableSize<int>(2lu, 42lu));
44  data_stream_assert(testMultiTableSize<long int>(2lu, 42lu));
45  data_stream_assert(testMultiTableSize<unsigned char>(2lu, 42lu));
46  data_stream_assert(testMultiTableSize<unsigned short>(2lu, 42lu));
47  data_stream_assert(testMultiTableSize<unsigned int>(2lu, 42lu));
48  data_stream_assert(testMultiTableSize<unsigned long int>(2lu, 42lu));
49  data_stream_assert(testMultiTableSize<float>(2lu, 42lu));
50  data_stream_assert(testMultiTableSize<double>(2lu, 42lu));
51 }
#define data_stream_assert(isOk)

References data_stream_assert.

Referenced by main().

+ Here is the caller graph for this function:

◆ testTableSize()

template<typename T >
bool testTableSize ( size_t  nbElement)

Check size of a table of data.

Parameters
nbElement: number of elements of the table of data
Returns
true on success, false otherwise

Definition at line 16 of file main.cpp.

16  {
17  T * tabData = new T[nbElement];
18  size_t sizeTabData = data_size(tabData, nbElement);
19  size_t expectedSize(nbElement*sizeof(T));
20  return checkValue("testTableSize :", sizeTabData, expectedSize);
21 }
size_t data_size(T &data)
Get size of data.
Definition: data_size.h:17
bool checkValue(const std::string &testName, const T &givenSize, const T &referenceSize)
Check given value compare to the reference value.

References checkValue(), and data_size().

+ Here is the call graph for this function: