diff options
author | kaiwu <kaiwu2004@gmail.com> | 2022-03-15 18:14:07 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2022-03-15 18:14:07 +0800 |
commit | 035a612de50f7d36fdbef0d1aee3b31f5fef4596 (patch) | |
tree | 89c0ecdb3c2e6eb5fb71582c2e8a31628d26818b /test/test_2015.cpp | |
parent | 39fa6df7d0d95c21c7eea7ca7a424468abbf6a2c (diff) | |
download | advent-of-code-035a612de50f7d36fdbef0d1aee3b31f5fef4596.tar.gz advent-of-code-035a612de50f7d36fdbef0d1aee3b31f5fef4596.zip |
lead zeros
Diffstat (limited to 'test/test_2015.cpp')
-rw-r--r-- | test/test_2015.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_2015.cpp b/test/test_2015.cpp index 2aef880..a7c68a6 100644 --- a/test/test_2015.cpp +++ b/test/test_2015.cpp @@ -37,9 +37,9 @@ TEST_CASE("Perfectly Spherical Houses in a Vacuum", "[day3]") { } TEST_CASE("The Ideal Stocking Stuffer", "[day4]") { - char s[] = "abcdef609043"; - uint8_t* md5 = md5String(s); - for (auto i = 0; i < 16; i++) { - printf("%x", md5[i]); - } + char s1[] = "abcdef609043"; + char s2[] = "pqrstuv1048970"; + + REQUIRE(aoc2015::lead_zeros(aoc2015::md5sum(s1)) >= 5); + REQUIRE(aoc2015::lead_zeros(aoc2015::md5sum(s2)) >= 5); } |