Skip to content

Commit

Permalink
add tests for roundUpToMultiple
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Feb 28, 2022
1 parent 3d2cc5a commit 9ec85ac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,15 @@ TEST_CASE("BoxedValue.Constant")
STATIC_REQUIRE(vc() == 1);
}

TEST_CASE("roundUpToMultiple")
{
STATIC_REQUIRE(llama::roundUpToMultiple(0, 16) == 0);
STATIC_REQUIRE(llama::roundUpToMultiple(5, 16) == 16);
STATIC_REQUIRE(llama::roundUpToMultiple(16, 16) == 16);
STATIC_REQUIRE(llama::roundUpToMultiple(17, 16) == 32);
STATIC_REQUIRE(llama::roundUpToMultiple(300, 16) == 304);
}

TEST_CASE("divCeil")
{
STATIC_REQUIRE(llama::divCeil(0, 16) == 0);
Expand Down

0 comments on commit 9ec85ac

Please sign in to comment.