Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/compiled/StringMap.cpp

Issue 29721753: Issue 6180 - use ABP_TEXT everywhere in order to let String be a UTF-8 string (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git@adb2678354813ce5b6de095072954c5a784a7bc4
Patch Set: rebase Created March 15, 2018, 1:53 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/compiled/String.cpp ('k') | test/compiled/user-config-test-abp-utf8-string.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/compiled/StringMap.cpp
diff --git a/test/compiled/StringMap.cpp b/test/compiled/StringMap.cpp
index f8a4a7b2e34bf1307729b78dc91aedbd35134a06..71db0d4eda6157a0469d5001df957335eda8217b 100644
--- a/test/compiled/StringMap.cpp
+++ b/test/compiled/StringMap.cpp
@@ -28,42 +28,42 @@ void testStringMap()
EXPECT_EQ(map.begin(), map.end());
- auto key = u"Foobar"_str;
+ auto key = ABP_TEXT("Foobar"_str);
EXPECT_EQ(6u, key.length());
EXPECT_EQ(0u, map.size());
- map[u"Foobar"_str] = "one";
+ map[ABP_TEXT("Foobar"_str)] = "one";
EXPECT_EQ(1u, map.size());
EXPECT_NE(map.begin(), map.end());
- map[u""_str] = "null";
+ map[ABP_TEXT(""_str)] = "null";
EXPECT_EQ(2u, map.size());
- auto entry = map.find(u"Foobar"_str);
+ auto entry = map.find(ABP_TEXT("Foobar"_str));
EXPECT_TRUE(entry);
- entry = map.find(u"Foobar2"_str);
+ entry = map.find(ABP_TEXT("Foobar2"_str));
EXPECT_FALSE(entry);
- map[u"Foobar2"_str] = "two";
- entry = map.find(u"Foobar2"_str);
+ map[ABP_TEXT("Foobar2"_str)] = "two";
+ entry = map.find(ABP_TEXT("Foobar2"_str));
EXPECT_TRUE(entry);
- map[u"Foobar3"_str] = "three";
- entry = map.find(u"Foobar3"_str);
+ map[ABP_TEXT("Foobar3"_str)] = "three";
+ entry = map.find(ABP_TEXT("Foobar3"_str));
EXPECT_TRUE(entry);
EXPECT_EQ(4u, map.size());
- EXPECT_TRUE(map.erase(u"Foobar2"_str));
+ EXPECT_TRUE(map.erase(ABP_TEXT("Foobar2"_str)));
// already deleted. Returns false.
- EXPECT_FALSE(map.erase(u"Foobar2"_str));
+ EXPECT_FALSE(map.erase(ABP_TEXT("Foobar2"_str)));
// invalid. Returns false.
- EXPECT_FALSE(map.erase(u"Foobar42"_str));
+ EXPECT_FALSE(map.erase(ABP_TEXT("Foobar42"_str)));
EXPECT_EQ(4u, map.size());
- entry = map.find(u"Foobar2"_str);
+ entry = map.find(ABP_TEXT("Foobar2"_str));
EXPECT_FALSE(entry);
uint32_t i = 0;
« no previous file with comments | « test/compiled/String.cpp ('k') | test/compiled/user-config-test-abp-utf8-string.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld