![]() |
ChimeraTK-DeviceAccess 03.25.00
|
#include <boost/test/unit_test.hpp>#include "Exception.h"#include "FixedPointConverter.h"#include <sstream>
Include dependency graph for testFixedPointConverter.cpp:Go to the source code of this file.
Namespaces | |
| namespace | ChimeraTK |
Macros | |
| #define | BOOST_TEST_DYN_LINK |
| #define | BOOST_TEST_MODULE FixedPointConverterTest |
| #define | HEX_TO_DOUBLE(INPUT) static_cast<double>(INPUT) |
| #define | SIGNED_HEX_TO_DOUBLE(INPUT) static_cast<double>(static_cast<int32_t>(INPUT)) |
| #define | SIGNED_HEX_TO_INT64(INPUT) static_cast<int64_t>(static_cast<int32_t>(INPUT)) |
| #define | CHECK_SIGNED_FIXED_POINT_NO_FRACTIONAL |
| #define | DEF_TYPENAME(name) |
Functions | |
| template<typename T > | |
| const char * | typeName (void) |
| template<typename T > | |
| void | checkToCookedOverflowNeg (FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const &converter, uint32_t input) |
| template<typename T > | |
| void | checkToCookedOverflowPos (FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const &converter, uint32_t input) |
| template<typename T > | |
| void | checkToCooked (FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const &converter, uint32_t input, T expectedValue, const std::string &msg=std::string("")) |
| template<typename T > | |
| void | checkToRaw (FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const &converter, T input, uint32_t expectedValue, const std::string &msg=std::string("")) |
| BOOST_AUTO_TEST_CASE (testConstructor) | |
| BOOST_AUTO_TEST_CASE (testInt32) | |
| BOOST_AUTO_TEST_CASE (testUInt32) | |
| BOOST_AUTO_TEST_CASE (testInt16) | |
| BOOST_AUTO_TEST_CASE (testUInt16) | |
| BOOST_AUTO_TEST_CASE (testInt8) | |
| BOOST_AUTO_TEST_CASE (testUInt8) | |
| BOOST_AUTO_TEST_CASE (testInt32_fractionMinus12) | |
| BOOST_AUTO_TEST_CASE (testUInt32_fractionMinus12) | |
| BOOST_AUTO_TEST_CASE (testInt32_fractionMinus1) | |
| BOOST_AUTO_TEST_CASE (testUInt32_fractionMinus1) | |
| BOOST_AUTO_TEST_CASE (testInt16_fractionMinus1) | |
| BOOST_AUTO_TEST_CASE (testUInt16_fractionMinus1) | |
| BOOST_AUTO_TEST_CASE (testInt32_fraction1) | |
| BOOST_AUTO_TEST_CASE (testUInt32_fraction1) | |
| BOOST_AUTO_TEST_CASE (testInt32_fraction7) | |
| BOOST_AUTO_TEST_CASE (testUInt32_fraction7) | |
| BOOST_AUTO_TEST_CASE (testInt32_fraction31) | |
| BOOST_AUTO_TEST_CASE (testUInt32_fraction31) | |
| BOOST_AUTO_TEST_CASE (testInt32_fraction32) | |
| BOOST_AUTO_TEST_CASE (testUInt32_fraction32) | |
| BOOST_AUTO_TEST_CASE (testInt32_fraction43) | |
| BOOST_AUTO_TEST_CASE (testUInt32_fraction43) | |
| BOOST_AUTO_TEST_CASE (testInt18_fractionMinus12) | |
| BOOST_AUTO_TEST_CASE (testUInt18_fractionMinus12) | |
| BOOST_AUTO_TEST_CASE (testInt18_fraction0) | |
| BOOST_AUTO_TEST_CASE (testUInt18_fraction0) | |
| BOOST_AUTO_TEST_CASE (testInt18_fraction7) | |
| BOOST_AUTO_TEST_CASE (testUInt18_fraction7) | |
| BOOST_AUTO_TEST_CASE (testInt18_fraction17) | |
| BOOST_AUTO_TEST_CASE (testUInt18_fraction17) | |
| BOOST_AUTO_TEST_CASE (testInt18_fraction18) | |
| BOOST_AUTO_TEST_CASE (testUInt18_fraction18) | |
| BOOST_AUTO_TEST_CASE (testInt18_fraction43) | |
| BOOST_AUTO_TEST_CASE (testUInt18_fraction43) | |
| BOOST_AUTO_TEST_CASE (testGetters) | |
| BOOST_AUTO_TEST_CASE (testInt32ToInt32) | |
| BOOST_AUTO_TEST_CASE (testInt32ToInt16) | |
| BOOST_AUTO_TEST_CASE (testInt18ToInt32) | |
| BOOST_AUTO_TEST_CASE (testIntSignedToUnsigned) | |
| BOOST_AUTO_TEST_CASE (testInt17SignedToInt16Unsigned) | |
| BOOST_AUTO_TEST_CASE (testInt0unsigned) | |
| BOOST_AUTO_TEST_CASE (testInt0signed) | |
| BOOST_AUTO_TEST_CASE (testInt0unsignedFractional) | |
| BOOST_AUTO_TEST_CASE (testInt0signedFractional) | |
| BOOST_AUTO_TEST_CASE (testDynamicRangePos) | |
| BOOST_AUTO_TEST_CASE (testDynamicRangeNeg) | |
| BOOST_AUTO_TEST_CASE (testBoolean0) | |
| BOOST_AUTO_TEST_CASE (testVoid) | |
| #define BOOST_TEST_DYN_LINK |
Definition at line 4 of file testFixedPointConverter.cpp.
| #define BOOST_TEST_MODULE FixedPointConverterTest |
Definition at line 5 of file testFixedPointConverter.cpp.
| #define CHECK_SIGNED_FIXED_POINT_NO_FRACTIONAL |
Definition at line 28 of file testFixedPointConverter.cpp.
| #define DEF_TYPENAME | ( | name | ) |
Definition at line 52 of file testFixedPointConverter.cpp.
| #define HEX_TO_DOUBLE | ( | INPUT | ) | static_cast<double>(INPUT) |
Definition at line 24 of file testFixedPointConverter.cpp.
| #define SIGNED_HEX_TO_DOUBLE | ( | INPUT | ) | static_cast<double>(static_cast<int32_t>(INPUT)) |
Definition at line 25 of file testFixedPointConverter.cpp.
| #define SIGNED_HEX_TO_INT64 | ( | INPUT | ) | static_cast<int64_t>(static_cast<int32_t>(INPUT)) |
Definition at line 26 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testBoolean0 | ) |
Definition at line 1634 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testConstructor | ) |
Definition at line 122 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testDynamicRangeNeg | ) |
Definition at line 1622 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testDynamicRangePos | ) |
Definition at line 1610 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testGetters | ) |
Definition at line 1418 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt0signed | ) |
Definition at line 1562 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt0signedFractional | ) |
Definition at line 1594 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt0unsigned | ) |
Definition at line 1546 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt0unsignedFractional | ) |
Definition at line 1578 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt16 | ) |
Definition at line 236 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt16_fractionMinus1 | ) |
Definition at line 574 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt17SignedToInt16Unsigned | ) |
Definition at line 1526 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction0 | ) |
Definition at line 1135 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction17 | ) |
Definition at line 1279 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction18 | ) |
Definition at line 1323 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction43 | ) |
Definition at line 1374 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction7 | ) |
Definition at line 1210 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fractionMinus12 | ) |
Definition at line 1067 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18ToInt32 | ) |
Definition at line 1477 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32 | ) |
Definition at line 139 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction1 | ) |
Definition at line 648 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction31 | ) |
Definition at line 819 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction32 | ) |
Definition at line 908 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction43 | ) |
Definition at line 989 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction7 | ) |
Definition at line 734 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fractionMinus1 | ) |
Definition at line 500 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fractionMinus12 | ) |
Definition at line 415 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32ToInt16 | ) |
Definition at line 1452 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32ToInt32 | ) |
Definition at line 1430 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt8 | ) |
Definition at line 326 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testIntSignedToUnsigned | ) |
Definition at line 1504 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt16 | ) |
Definition at line 282 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt16_fractionMinus1 | ) |
Definition at line 615 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction0 | ) |
Definition at line 1176 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction17 | ) |
Definition at line 1301 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction18 | ) |
Definition at line 1350 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction43 | ) |
Definition at line 1396 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction7 | ) |
Definition at line 1242 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fractionMinus12 | ) |
Definition at line 1100 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32 | ) |
Definition at line 188 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction1 | ) |
Definition at line 693 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction31 | ) |
Definition at line 863 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction32 | ) |
Definition at line 949 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction43 | ) |
Definition at line 1030 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction7 | ) |
Definition at line 782 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fractionMinus1 | ) |
Definition at line 541 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fractionMinus12 | ) |
Definition at line 458 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt8 | ) |
Definition at line 371 of file testFixedPointConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testVoid | ) |
Definition at line 1641 of file testFixedPointConverter.cpp.
| void checkToCooked | ( | FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const & | converter, |
| uint32_t | input, | ||
| T | expectedValue, | ||
| const std::string & | msg = std::string("") |
||
| ) |
Definition at line 81 of file testFixedPointConverter.cpp.
| void checkToCookedOverflowNeg | ( | FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const & | converter, |
| uint32_t | input | ||
| ) |
Definition at line 71 of file testFixedPointConverter.cpp.
| void checkToCookedOverflowPos | ( | FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const & | converter, |
| uint32_t | input | ||
| ) |
Definition at line 76 of file testFixedPointConverter.cpp.
| void checkToRaw | ( | FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const & | converter, |
| T | input, | ||
| uint32_t | expectedValue, | ||
| const std::string & | msg = std::string("") |
||
| ) |
Definition at line 101 of file testFixedPointConverter.cpp.
|
inline |
Definition at line 49 of file testFixedPointConverter.cpp.