summaryrefslogtreecommitdiff
path: root/tests/test_fixed_point.cpp
blob: 8cb12d2b228c01cd67604203187088146672a02b (plain)
1
2
3
4
5
6
7
8
9
#include <catch2/catch_test_macros.hpp>
#include "fixed_point.h"

TEST_CASE("fp_t addition is commutative") {
    fp_t a = fp_t::from_int(1);
    fp_t b = fp_t::from_int(2);
    CHECK(a + b == b + a);
    REQUIRE(a.raw != 0);
}