Skip to content

Commit

Permalink
add benchmark of hex parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjnixon authored and benjamin-weiss committed Aug 14, 2019
1 parent ecb447b commit 023b0ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/hex_values_tests.cpp
Expand Up @@ -12,6 +12,10 @@ TEST_CASE("parseHexValue") {
REQUIRE_THROWS_AS(detail::parseHexValue("ffff0"), std::runtime_error);
REQUIRE_THROWS_AS(detail::parseHexValue("fff "), std::runtime_error);
REQUIRE(detail::parseHexValue("ffff0", 8) == 1048560);

BENCHMARK("parse 4 digits") {
return detail::parseHexValue("FFFF");
};
}

TEST_CASE("formatHexValue") {
Expand Down

0 comments on commit 023b0ce

Please sign in to comment.