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

Function TEST

tests/basic_math.cpp:4–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <fpm/math.hpp>
3
4TEST(basic_math, abs)
5{
6 using P = fpm::fixed_24_8;
7
8 EXPECT_EQ(P(13.125), abs(P(-13.125)));
9 EXPECT_EQ(P(13.125), abs(P(13.125)));
10 EXPECT_EQ(P(1), abs(P(-1)));
11 EXPECT_EQ(P(1), abs(P(1)));
12}
13
14TEST(basic_math, fmod)
15{

Callers

nothing calls this directly

Calls 4

absFunction · 0.85
fmodFunction · 0.85
remainderFunction · 0.85
remquoFunction · 0.85

Tested by

no test coverage detected