diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2021-02-18 14:05:58 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2021-02-18 14:05:58 -0500 |
| commit | 906a62c6b269bb6adea45fc444efa4ee5e848a69 (patch) | |
| tree | 2a9e96a4d0d8daeaccc8b6836579249e1575a35c /tests/unit_tests/wipeable_string.cpp | |
| parent | 8cb63658f0717a4e2e4107b810d942a0731b5856 (diff) | |
| parent | a60d3d8ff79d83670555044d061ed02a1d078fc0 (diff) | |
| download | monzero-core-906a62c6b269bb6adea45fc444efa4ee5e848a69.tar.gz monzero-core-906a62c6b269bb6adea45fc444efa4ee5e848a69.tar.xz monzero-core-906a62c6b269bb6adea45fc444efa4ee5e848a69.zip | |
Merge pull request #7352
a60d3d8 unit_tests: fix wipeable_string parse_hexstr test with latest gtest (xiphon)
Diffstat (limited to 'tests/unit_tests/wipeable_string.cpp')
| -rw-r--r-- | tests/unit_tests/wipeable_string.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/unit_tests/wipeable_string.cpp b/tests/unit_tests/wipeable_string.cpp index 9911bd6f4..0e0bf8906 100644 --- a/tests/unit_tests/wipeable_string.cpp +++ b/tests/unit_tests/wipeable_string.cpp @@ -189,20 +189,20 @@ TEST(wipeable_string, parse_hexstr) { boost::optional<epee::wipeable_string> s; - ASSERT_EQ(boost::none, epee::wipeable_string("x").parse_hexstr()); - ASSERT_EQ(boost::none, epee::wipeable_string("x0000000000000000").parse_hexstr()); - ASSERT_EQ(boost::none, epee::wipeable_string("0000000000000000x").parse_hexstr()); - ASSERT_EQ(boost::none, epee::wipeable_string("0").parse_hexstr()); - ASSERT_EQ(boost::none, epee::wipeable_string("000").parse_hexstr()); + ASSERT_TRUE(boost::none == epee::wipeable_string("x").parse_hexstr()); + ASSERT_TRUE(boost::none == epee::wipeable_string("x0000000000000000").parse_hexstr()); + ASSERT_TRUE(boost::none == epee::wipeable_string("0000000000000000x").parse_hexstr()); + ASSERT_TRUE(boost::none == epee::wipeable_string("0").parse_hexstr()); + ASSERT_TRUE(boost::none == epee::wipeable_string("000").parse_hexstr()); ASSERT_TRUE((s = epee::wipeable_string("").parse_hexstr()) != boost::none); - ASSERT_EQ(*s, ""); + ASSERT_TRUE(*s == ""); ASSERT_TRUE((s = epee::wipeable_string("00").parse_hexstr()) != boost::none); - ASSERT_EQ(*s, epee::wipeable_string("", 1)); + ASSERT_TRUE(*s == epee::wipeable_string("", 1)); ASSERT_TRUE((s = epee::wipeable_string("41").parse_hexstr()) != boost::none); - ASSERT_EQ(*s, epee::wipeable_string("A")); + ASSERT_TRUE(*s == epee::wipeable_string("A")); ASSERT_TRUE((s = epee::wipeable_string("414243").parse_hexstr()) != boost::none); - ASSERT_EQ(*s, epee::wipeable_string("ABC")); + ASSERT_TRUE(*s == epee::wipeable_string("ABC")); } TEST(wipeable_string, to_hex) |
