Skip to content

Commit

Permalink
Coverage improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescarni committed Nov 2, 2023
1 parent 14ceee3 commit c2b0e94
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/relu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ TEST_CASE("def ctor")
}
}

TEST_CASE("normalise")
{
{
auto ex = relu(fix(.1_dbl));
ex = normalise(unfix(ex));
REQUIRE(ex == .1_dbl);
}

{
auto ex = relup(fix(-.1_dbl));
ex = normalise(unfix(ex));
REQUIRE(ex == 0_dbl);
}
}

TEST_CASE("diff")
{
auto [x, y] = make_vars("x", "y");
Expand Down

0 comments on commit c2b0e94

Please sign in to comment.