diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-03 10:27:09 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-04 06:58:11 +0100 |
commit | 9ffc768ae012f1cfae39ef7aa93c1ed1dfa52dc7 (patch) | |
tree | be57a7575a4d4e11212d067837eaa7c8f6ad7d42 /src/timer-test.cpp | |
parent | 93c4202c75cfed2a6e6697c45d50b25ebc00ebcf (diff) |
tests?
Diffstat (limited to 'src/timer-test.cpp')
-rw-r--r-- | src/timer-test.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/timer-test.cpp b/src/timer-test.cpp index e23443b7..36d31b30 100644 --- a/src/timer-test.cpp +++ b/src/timer-test.cpp @@ -2,6 +2,18 @@ namespace floormat { +namespace { +constexpr auto MAX = 18446744073709551615u, HALF = 9223372036854775808u; +static_assert(std::is_same_v<uint64_t, std::decay_t<decltype(MAX)>>); +static_assert(std::is_same_v<uint64_t, std::decay_t<decltype(HALF)>>); +static_assert(MAX == (uint64_t)-1); +static_assert(HALF + (HALF - 1) == MAX); +static_assert(MAX - HALF == HALF - 1); +static_assert((HALF-1)*2 == MAX - 1); + +// todo! + +} // namespace } // namespace floormat |