MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_subtraction_impl

Function test_subtraction_impl

tests/fl/math/fixed_point.cpp:422–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420
421template<typename T>
422void test_subtraction_impl() {
423 T a(3.0f), b(1.0f);
424 T c = a - b;
425 FL_CHECK_EQ(c.raw(), (a.raw() - b.raw()));
426 FL_CHECK_EQ(c.to_int(), 2);
427
428 // Self subtraction
429 T zero;
430 FL_CHECK_EQ((a - a).raw(), zero.raw());
431}
432
433template<typename T>
434void test_unary_negation_impl() {

Callers

nothing calls this directly

Calls 2

rawMethod · 0.45
to_intMethod · 0.45

Tested by

no test coverage detected