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

Unified Diff: test/compiled/Filter.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 | « compiled/subscription/UserDefinedSubscription.cpp ('k') | test/compiled/RegExp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/compiled/Filter.cpp
diff --git a/test/compiled/Filter.cpp b/test/compiled/Filter.cpp
index 6e77992ecca3b1ade4ded143c6651d11a60d0f0f..1b21e40d0c6e0320938a76163e3546874c1186c0 100644
--- a/test/compiled/Filter.cpp
+++ b/test/compiled/Filter.cpp
@@ -24,74 +24,74 @@ ABP_NS_USING
TEST(TestFilter, testFromText)
{
- OwnedString t(u"www.example.com#?#:-abp-properties(foo)"_str);
+ OwnedString t(ABP_TEXT("www.example.com#?#:-abp-properties(foo)"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
- EXPECT_EQ(filter->GetText(), u"www.example.com#?#:-abp-properties(foo)"_str);
+ EXPECT_EQ(filter->GetText(), ABP_TEXT("www.example.com#?#:-abp-properties(foo)"_str));
}
TEST(TestFilter, testFilterConversionText)
{
{
- OwnedString t(u"www.example.com##[-abp-properties='foo']"_str);
+ OwnedString t(ABP_TEXT("www.example.com##[-abp-properties='foo']"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
- EXPECT_EQ(filter->GetText(), u"www.example.com#?#:-abp-properties(foo)"_str);
+ EXPECT_EQ(filter->GetText(), ABP_TEXT("www.example.com#?#:-abp-properties(foo)"_str));
}
{
- OwnedString t(u"example.com##foo[-abp-properties='something']bar"_str);
+ OwnedString t(ABP_TEXT("example.com##foo[-abp-properties='something']bar"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
- EXPECT_EQ(filter->GetText(), u"example.com#?#foo:-abp-properties(something)bar"_str);
+ EXPECT_EQ(filter->GetText(), ABP_TEXT("example.com#?#foo:-abp-properties(something)bar"_str));
}
{
- OwnedString t(u"foo.com##[-abp-properties='/margin: [3-4]{2}/']"_str);
+ OwnedString t(ABP_TEXT("foo.com##[-abp-properties='/margin: [3-4]{2}/']"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
- EXPECT_EQ(filter->GetText(), u"foo.com#?#:-abp-properties(/margin: [3-4]{2}/)"_str);
+ EXPECT_EQ(filter->GetText(), ABP_TEXT("foo.com#?#:-abp-properties(/margin: [3-4]{2}/)"_str));
ASSERT_TRUE(filter->As<ElemHideBase>());
- EXPECT_EQ(filter->As<ElemHideBase>()->GetSelector(), u":-abp-properties(/margin: [3-4]\\7B 2\\7D /)"_str);
+ EXPECT_EQ(filter->As<ElemHideBase>()->GetSelector(), ABP_TEXT(":-abp-properties(/margin: [3-4]\\7B 2\\7D /)"_str));
}
}
TEST(TestFilter, testFilterExceptionConversionText)
{
- OwnedString t(u"www.example.com#@#[-abp-properties='foo']"_str);
+ OwnedString t(ABP_TEXT("www.example.com#@#[-abp-properties='foo']"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
- EXPECT_EQ(filter->GetText(), u"www.example.com#@#:-abp-properties(foo)"_str);
+ EXPECT_EQ(filter->GetText(), ABP_TEXT("www.example.com#@#:-abp-properties(foo)"_str));
}
TEST(TestFilter, testFilterSyntaxErrorConversion)
{
{
- OwnedString t(u"www.example.com#@#[-abp-properties='foo'bar'baz']"_str);
+ OwnedString t(ABP_TEXT("www.example.com#@#[-abp-properties='foo'bar'baz']"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
EXPECT_FALSE(filter);
}
{
- OwnedString t(u"www.example.com#@#[-abp-properties='foo'bar']"_str);
+ OwnedString t(ABP_TEXT("www.example.com#@#[-abp-properties='foo'bar']"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
EXPECT_FALSE(filter);
}
{
- OwnedString t(u"www.example.com#@#[-abp-properties='foo'bar]"_str);
+ OwnedString t(ABP_TEXT("www.example.com#@#[-abp-properties='foo'bar]"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
EXPECT_FALSE(filter);
}
{
- OwnedString t(u"www.example.com#@#[-abp-properties=bar'foo']"_str);
+ OwnedString t(ABP_TEXT("www.example.com#@#[-abp-properties=bar'foo']"_str));
DependentString text(t);
FilterPtr filter(Filter::FromText(text), false);
« no previous file with comments | « compiled/subscription/UserDefinedSubscription.cpp ('k') | test/compiled/RegExp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld