MCPcopy Create free account
hub / github.com/MikeLankamp/fpm / TEST

Function TEST

tests/classification.cpp:4–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <fpm/math.hpp>
3
4TEST(classification, fpclassify)
5{
6 using P = fpm::fixed<std::int32_t, std::int64_t, 12>;
7 EXPECT_EQ(FP_NORMAL, fpclassify(P(1.0)));
8 EXPECT_EQ(FP_NORMAL, fpclassify(P(-1.0)));
9 EXPECT_EQ(FP_NORMAL, fpclassify(P(0.5)));
10 EXPECT_EQ(FP_ZERO, fpclassify(P(0)));
11}
12
13TEST(classification, isfinite)
14{

Callers

nothing calls this directly

Calls 12

fpclassifyFunction · 0.85
isfiniteFunction · 0.85
isinfFunction · 0.85
isnanFunction · 0.85
isnormalFunction · 0.85
signbitFunction · 0.85
isgreaterFunction · 0.85
isgreaterequalFunction · 0.85
islessFunction · 0.85
islessequalFunction · 0.85
islessgreaterFunction · 0.85
isunorderedFunction · 0.85

Tested by

no test coverage detected