aboutsummaryrefslogtreecommitdiffstats
path: root/test/TestIcu.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-06-25 22:43:55 +0200
committerMax Kellermann <max@duempel.org>2015-06-25 23:44:16 +0200
commit8d11577ff2b7caf846a31cbb57b2cf9eb3515961 (patch)
tree8e1173e9bdb131ddba5e5166b96ee4681bc00d53 /test/TestIcu.cxx
parent037d1d9ad14969947b1a9456dc716b6a22021d29 (diff)
downloadmpd-8d11577ff2b7caf846a31cbb57b2cf9eb3515961.tar.gz
mpd-8d11577ff2b7caf846a31cbb57b2cf9eb3515961.tar.xz
mpd-8d11577ff2b7caf846a31cbb57b2cf9eb3515961.zip
lib/icu/{Converter,Collate}: return AllocatedString
Diffstat (limited to 'test/TestIcu.cxx')
-rw-r--r--test/TestIcu.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/TestIcu.cxx b/test/TestIcu.cxx
index 9d525d698..484af4f22 100644
--- a/test/TestIcu.cxx
+++ b/test/TestIcu.cxx
@@ -4,6 +4,8 @@
#include "config.h"
#include "lib/icu/Converter.hxx"
+#include "util/AllocatedString.hxx"
+#include "util/StringAPI.hxx"
#include "util/Error.hxx"
#include <cppunit/TestFixture.h>
@@ -49,15 +51,17 @@ public:
for (const auto i : invalid_utf8) {
auto f = converter->FromUTF8(i);
- CPPUNIT_ASSERT_EQUAL(true, f.empty());
+ CPPUNIT_ASSERT_EQUAL(true, f.IsNull());
}
for (const auto i : latin1_tests) {
auto f = converter->FromUTF8(i.utf8);
- CPPUNIT_ASSERT_EQUAL(true, f == i.other);
+ CPPUNIT_ASSERT_EQUAL(true, StringIsEqual(f.c_str(),
+ i.other));
auto t = converter->ToUTF8(i.other);
- CPPUNIT_ASSERT_EQUAL(true, t == i.utf8);
+ CPPUNIT_ASSERT_EQUAL(true, StringIsEqual(t.c_str(),
+ i.utf8));
}
delete converter;