![]() |
ChimeraTK-DeviceAccess 03.27.00
|
#include <boost/test/unit_test.hpp>#include "Exception.h"#include "RawConverter.h"#include <cfloat>#include <sstream>
Include dependency graph for testRawConverter.cpp:Go to the source code of this file.
Classes | |
| class | FixedPointConverter< RawType > |
| class | IEEE754_SingleConverter |
Namespaces | |
| namespace | ChimeraTK |
Macros | |
| #define | BOOST_TEST_DYN_LINK |
| #define | BOOST_TEST_MODULE RawConverterTest |
| #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) |
Typedefs | |
| using | DEPRECATED_FIXEDPOINT_DEFAULT = int32_t |
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 (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 (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 (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 (testBoolean0) | |
| BOOST_AUTO_TEST_CASE (testVoid) | |
| BOOST_AUTO_TEST_CASE (TestString) | |
| BOOST_AUTO_TEST_CASE (test_toCooked_3_25) | |
| BOOST_AUTO_TEST_CASE (test_toCooked_60k) | |
| BOOST_AUTO_TEST_CASE (test_toCooked_minus240) | |
| void | checkAsRaw (int32_t rawValue, float expectedValue) |
| BOOST_AUTO_TEST_CASE (test_from_3_25) | |
| BOOST_AUTO_TEST_CASE (TestCornerCases) | |
| BOOST_AUTO_TEST_CASE (test_toCooked_00) | |
| #define BOOST_TEST_DYN_LINK |
Definition at line 4 of file testRawConverter.cpp.
| #define BOOST_TEST_MODULE RawConverterTest |
Definition at line 5 of file testRawConverter.cpp.
| #define CHECK_SIGNED_FIXED_POINT_NO_FRACTIONAL |
Definition at line 28 of file testRawConverter.cpp.
| #define DEF_TYPENAME | ( | name | ) |
Definition at line 53 of file testRawConverter.cpp.
| #define HEX_TO_DOUBLE | ( | INPUT | ) | static_cast<double>(INPUT) |
Definition at line 24 of file testRawConverter.cpp.
| #define SIGNED_HEX_TO_DOUBLE | ( | INPUT | ) | static_cast<double>(static_cast<int32_t>(INPUT)) |
Definition at line 25 of file testRawConverter.cpp.
| #define SIGNED_HEX_TO_INT64 | ( | INPUT | ) | static_cast<int64_t>(static_cast<int32_t>(INPUT)) |
Definition at line 26 of file testRawConverter.cpp.
| using DEPRECATED_FIXEDPOINT_DEFAULT = int32_t |
Definition at line 71 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_from_3_25 | ) |
Definition at line 1819 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_toCooked_00 | ) |
Definition at line 1847 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_toCooked_3_25 | ) |
Definition at line 1747 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_toCooked_60k | ) |
Definition at line 1768 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_toCooked_minus240 | ) |
Definition at line 1791 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testBoolean0 | ) |
Definition at line 1672 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | TestCornerCases | ) |
Definition at line 1836 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt16 | ) |
Definition at line 273 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt16_fractionMinus1 | ) |
Definition at line 612 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt17SignedToInt16Unsigned | ) |
Definition at line 1564 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction0 | ) |
Definition at line 1173 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction17 | ) |
Definition at line 1317 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction18 | ) |
Definition at line 1361 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fraction7 | ) |
Definition at line 1248 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18_fractionMinus12 | ) |
Definition at line 1105 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt18ToInt32 | ) |
Definition at line 1515 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32 | ) |
Definition at line 176 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction1 | ) |
Definition at line 686 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction31 | ) |
Definition at line 857 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction32 | ) |
Definition at line 946 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fraction7 | ) |
Definition at line 772 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fractionMinus1 | ) |
Definition at line 538 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32_fractionMinus12 | ) |
Definition at line 452 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32ToInt16 | ) |
Definition at line 1490 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt32ToInt32 | ) |
Definition at line 1468 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testInt8 | ) |
Definition at line 363 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testIntSignedToUnsigned | ) |
Definition at line 1542 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | TestString | ) |
Definition at line 1687 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt16 | ) |
Definition at line 319 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt16_fractionMinus1 | ) |
Definition at line 653 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction0 | ) |
Definition at line 1214 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction17 | ) |
Definition at line 1339 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction18 | ) |
Definition at line 1388 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fraction7 | ) |
Definition at line 1280 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt18_fractionMinus12 | ) |
Definition at line 1138 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32 | ) |
Definition at line 225 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction1 | ) |
Definition at line 731 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction31 | ) |
Definition at line 901 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction32 | ) |
Definition at line 987 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fraction7 | ) |
Definition at line 820 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fractionMinus1 | ) |
Definition at line 579 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt32_fractionMinus12 | ) |
Definition at line 496 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testUInt8 | ) |
Definition at line 408 of file testRawConverter.cpp.
| BOOST_AUTO_TEST_CASE | ( | testVoid | ) |
Definition at line 1679 of file testRawConverter.cpp.
| void checkAsRaw | ( | int32_t | rawValue, |
| float | expectedValue | ||
| ) |
Definition at line 1812 of file testRawConverter.cpp.
| void checkToCooked | ( | FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const & | converter, |
| uint32_t | input, | ||
| T | expectedValue, | ||
| const std::string & | msg = std::string("") |
||
| ) |
Definition at line 118 of file testRawConverter.cpp.
| void checkToCookedOverflowNeg | ( | FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const & | converter, |
| uint32_t | input | ||
| ) |
Definition at line 108 of file testRawConverter.cpp.
| void checkToCookedOverflowPos | ( | FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const & | converter, |
| uint32_t | input | ||
| ) |
Definition at line 113 of file testRawConverter.cpp.
| void checkToRaw | ( | FixedPointConverter< DEPRECATED_FIXEDPOINT_DEFAULT > const & | converter, |
| T | input, | ||
| uint32_t | expectedValue, | ||
| const std::string & | msg = std::string("") |
||
| ) |
Definition at line 138 of file testRawConverter.cpp.
|
inline |
Definition at line 50 of file testRawConverter.cpp.