#include <typeinfo>
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <vector>
#include <float.h>
#include "build_config.h"
#include "StringUtils.hpp"
#include "Matrix.hpp"
Go to the source code of this file.
|
#define | TUASSERT(EXPR) |
|
#define | TUASSERTE(TYPE, EXP, GOT) |
|
#define | TUASSERTFE(EXP, GOT) |
|
#define | TUASSERTFEPS(EXP, GOT, EPS) |
|
#define | TUASSERTFESMRT(EXP, GOT) |
|
#define | TUCATCH(STATEMENT) |
|
#define | TUCMPFILE(F1, F2, SKIP) |
|
#define | TUCSM(METHOD) testFramework.changeSourceMethod(METHOD) |
|
#define | TUDEF(CLASS, METHOD) gnsstk::TestUtil testFramework(CLASS, METHOD, __FILE__, __LINE__) |
|
#define | TUFAIL(MSG) testFramework.assert(false, MSG, __LINE__) |
|
#define | TUPASS(MSG) testFramework.assert(true, MSG, __LINE__) |
|
#define | TURETURN() return testFramework.countFails() |
|
#define | TUTHROW(STATEMENT) |
|
◆ TUASSERT
Value: try \
{ \
testFramework.assert(EXPR, "Assertion failure: "#EXPR, __LINE__); \
} \
{ \
std::cerr << exc << std::endl; \
testFramework.assert(false, "Exception during "#EXPR, __LINE__); \
} \
catch (...) \
{ \
testFramework.assert(false, "Exception during "#EXPR, __LINE__); \
}
Definition at line 63 of file TestUtil.hpp.
◆ TUASSERTE
#define TUASSERTE |
( |
|
TYPE, |
|
|
|
EXP, |
|
|
|
GOT |
|
) |
| |
Value: try \
{ \
testFramework.assert_equals<TYPE>(EXP, GOT, __LINE__); \
} \
{ \
std::cerr << exc << std::endl; \
testFramework.assert(false, \
"Exception evaluating " #EXP " or " #GOT, \
__LINE__); \
} \
catch (...) \
{ \
testFramework.assert(false, \
"Exception evaluating " #EXP " or " #GOT, \
__LINE__); \
}
Definition at line 81 of file TestUtil.hpp.
◆ TUASSERTFE
#define TUASSERTFE |
( |
|
EXP, |
|
|
|
GOT |
|
) |
| |
Value: try \
{ \
testFramework.assert_equals(EXP, GOT, __LINE__); \
} \
{ \
std::cerr << exc << std::endl; \
testFramework.assert(false, \
"Exception evaluating " #EXP " or " #GOT, \
__LINE__); \
} \
catch (...) \
{ \
testFramework.assert(false, \
"Exception evaluating " #EXP " or " #GOT, \
__LINE__); \
}
Definition at line 103 of file TestUtil.hpp.
◆ TUASSERTFEPS
#define TUASSERTFEPS |
( |
|
EXP, |
|
|
|
GOT, |
|
|
|
EPS |
|
) |
| |
Value: try \
{ \
testFramework.assert_equals(EXP, GOT, __LINE__, "", EPS); \
} \
{ \
std::cerr << exc << std::endl; \
testFramework.assert(false, \
"Exception evaluating " #EXP " or " #GOT, \
__LINE__); \
} \
catch (...) \
{ \
testFramework.assert(false, \
"Exception evaluating " #EXP " or " #GOT, \
__LINE__); \
}
Definition at line 126 of file TestUtil.hpp.
◆ TUASSERTFESMRT
#define TUASSERTFESMRT |
( |
|
EXP, |
|
|
|
GOT |
|
) |
| |
Value: try \
{ \
testFramework.assert_equals_fps(EXP, GOT, __LINE__, ""); \
} \
{ \
std::cerr << exc << std::endl; \
testFramework.assert(false, \
"Exception evaluating " #EXP " or " #GOT, \
__LINE__); \
} \
catch (...) \
{ \
testFramework.assert(false, \
"Exception evaluating " #EXP " or " #GOT, \
__LINE__); \
}
Definition at line 150 of file TestUtil.hpp.
◆ TUCATCH
#define TUCATCH |
( |
|
STATEMENT | ) |
|
Value: try \
{ \
STATEMENT; \
TUPASS(#STATEMENT); \
} \
{ \
std::cerr << exc << std::endl; \
TUFAIL("Exception"); \
} \
catch (...) \
{ \
TUFAIL("Exception"); \
}
Definition at line 193 of file TestUtil.hpp.
◆ TUCMPFILE
#define TUCMPFILE |
( |
|
F1, |
|
|
|
F2, |
|
|
|
SKIP |
|
) |
| |
Value: try \
{ \
testFramework.assert_files_equal(__LINE__, F1, F2, \
"File mismatch: "+F1+" "+F2, \
SKIP); \
} \
{ \
std::cerr << exc << std::endl; \
testFramework.assert(false, \
"Exception comparing " #F1 " and " #F2, \
__LINE__); \
} \
catch (...) \
{ \
testFramework.assert(false, \
"Exception comparing " #F1 " and " #F2, \
__LINE__); \
}
Definition at line 170 of file TestUtil.hpp.
◆ TUCSM
#define TUCSM |
( |
|
METHOD | ) |
testFramework.changeSourceMethod(METHOD) |
◆ TUDEF
#define TUDEF |
( |
|
CLASS, |
|
|
|
METHOD |
|
) |
| gnsstk::TestUtil testFramework(CLASS, METHOD, __FILE__, __LINE__) |
◆ TUFAIL
#define TUFAIL |
( |
|
MSG | ) |
testFramework.assert(false, MSG, __LINE__) |
◆ TUPASS
#define TUPASS |
( |
|
MSG | ) |
testFramework.assert(true, MSG, __LINE__) |
◆ TURETURN
#define TURETURN |
( |
| ) |
return testFramework.countFails() |
◆ TUTHROW
#define TUTHROW |
( |
|
STATEMENT | ) |
|
Value: try \
{ \
STATEMENT; \
TUFAIL("Did not throw Exception"); \
} \
{ \
TUPASS(#STATEMENT); \
} \
catch (...) \
{ \
TUPASS(#STATEMENT); \
}
Definition at line 211 of file TestUtil.hpp.