aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2021-01-27 13:04:08 +0000
committerselsta <selsta@sent.at>2021-08-01 15:47:11 +0200
commit67ba733de173008a94e6fcb1b4bf8549acbe81ec (patch)
tree4364b58bca4fc71e034180aa012519b8efb48da0 /tests
parentcmake: use CMAKE_CURRENT_LIST_DIR in FindLibUSB (diff)
downloadmonero-67ba733de173008a94e6fcb1b4bf8549acbe81ec.tar.xz
unit_tests: fix wipeable_string parse_hexstr test with latest gtest
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973196
Diffstat (limited to '')
-rw-r--r--tests/unit_tests/wipeable_string.cpp18
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)