Source: tests/utility/Number.cpp
12 #include <tests/myratest.h> 19 template<
class N1,
class N2>
class Match {
public:
static const bool match =
false; };
20 template<>
class Match<
NumberS,
NumberS> {
public:
static const bool match =
true; };
21 template<>
class Match<NumberD,NumberD> {
public:
static const bool match =
true; };
22 template<>
class Match<NumberC,NumberC> {
public:
static const bool match =
true; };
23 template<>
class Match<NumberZ,NumberZ> {
public:
static const bool match =
true; };
28 ADD_TEST(
"ReflectPrecision",
"[utility]")
30 bool s = Match<float ,ReflectPrecision<NumberS>::type>::match;
31 bool d = Match<double,ReflectPrecision<NumberD>::type>::match;
32 bool c = Match<float ,ReflectPrecision<NumberC>::type>::match;
33 bool z = Match<double,ReflectPrecision<NumberZ>::type>::match;
41 ADD_TEST(
"RaisePrecision",
"[utility]")
43 bool s = Match<NumberD,RaisePrecision<NumberS>::type>::match;
44 bool c = Match<NumberZ,RaisePrecision<NumberC>::type>::match;
50 ADD_TEST(
"LowerPrecision",
"[utility]")
52 bool d = Match<NumberS,LowerPrecision<NumberD>::type>::match;
53 bool z = Match<NumberC,LowerPrecision<NumberZ>::type>::match;
Various utility functions/classes related to scalar Number types.
float NumberS
Useful typedefs.
Definition: Number.h:21
Results: [PASS]
Go back to Summary of /test
programs.