From b4fe04f8e035ce7e29c9926915d7420f1c5b7a17 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 1 Aug 2023 15:18:57 -0700 Subject: [PATCH] tests: fix compilation on MSYS2 Something about a deleted operator<<. Signed-off-by: Rosen Penev --- tests/test_string.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_string.cpp b/tests/test_string.cpp index 9638c769..8689c819 100644 --- a/tests/test_string.cpp +++ b/tests/test_string.cpp @@ -281,10 +281,10 @@ public: CPPUNIT_ASSERT_EQUAL(static_cast(7), String(lf).size()); CPPUNIT_ASSERT_EQUAL(static_cast(8), String(crlf).size()); - CPPUNIT_ASSERT_EQUAL(L'\x0d', String(cr)[3]); - CPPUNIT_ASSERT_EQUAL(L'\x0a', String(lf)[3]); - CPPUNIT_ASSERT_EQUAL(L'\x0d', String(crlf)[3]); - CPPUNIT_ASSERT_EQUAL(L'\x0a', String(crlf)[4]); + CPPUNIT_ASSERT(L'\x0d' == String(cr)[3]); + CPPUNIT_ASSERT(L'\x0a' == String(lf)[3]); + CPPUNIT_ASSERT(L'\x0d' == String(crlf)[3]); + CPPUNIT_ASSERT(L'\x0a' == String(crlf)[4]); } void testUpper() @@ -334,14 +334,14 @@ public: String::Iterator it1 = s1.begin(); String::Iterator it2 = s2.begin(); - CPPUNIT_ASSERT_EQUAL(L't', *it1); - CPPUNIT_ASSERT_EQUAL(L't', *it2); + CPPUNIT_ASSERT(L't' == *it1); + CPPUNIT_ASSERT(L't' == *it2); std::advance(it1, 4); std::advance(it2, 4); *it2 = L'I'; - CPPUNIT_ASSERT_EQUAL(L'i', *it1); - CPPUNIT_ASSERT_EQUAL(L'I', *it2); + CPPUNIT_ASSERT(L'i' == *it1); + CPPUNIT_ASSERT(L'I' == *it2); } void testInvalidUTF8()