summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz
Convert string class names
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
index 58ddbac806..5f4d83c327 100644
--- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
@@ -27,7 +27,7 @@ TEST(FMCallExpressionTest, more_than_32_arguments) {
callExp.ToJavaScript(js);
// Generate the result javascript string.
- CFX_WideString result = L"sign(";
+ WideString result = L"sign(";
for (size_t i = 0; i < 50; i++) {
if (i > 0)
result += L", ";
@@ -41,31 +41,31 @@ TEST(FMCallExpressionTest, more_than_32_arguments) {
}
result += L")";
- EXPECT_EQ(result.AsStringC(), js.AsStringC());
+ EXPECT_EQ(result.AsStringView(), js.AsStringView());
}
TEST(FMStringExpressionTest, Empty) {
CFX_WideTextBuf accumulator;
- CXFA_FMStringExpression(1, CFX_WideStringC()).ToJavaScript(accumulator);
- EXPECT_EQ(L"", accumulator.AsStringC());
+ CXFA_FMStringExpression(1, WideStringView()).ToJavaScript(accumulator);
+ EXPECT_EQ(L"", accumulator.AsStringView());
}
TEST(FMStringExpressionTest, Short) {
CFX_WideTextBuf accumulator;
CXFA_FMStringExpression(1, L"a").ToJavaScript(accumulator);
- EXPECT_EQ(L"a", accumulator.AsStringC());
+ EXPECT_EQ(L"a", accumulator.AsStringView());
}
TEST(FMStringExpressionTest, Medium) {
CFX_WideTextBuf accumulator;
CXFA_FMStringExpression(1, L".abcd.").ToJavaScript(accumulator);
- EXPECT_EQ(L"\"abcd\"", accumulator.AsStringC());
+ EXPECT_EQ(L"\"abcd\"", accumulator.AsStringView());
}
TEST(FMStringExpressionTest, Long) {
CFX_WideTextBuf accumulator;
- std::vector<CFX_WideStringC::UnsignedType> vec(140000, L'A');
- CXFA_FMStringExpression(1, CFX_WideStringC(vec)).ToJavaScript(accumulator);
+ std::vector<WideStringView::UnsignedType> vec(140000, L'A');
+ CXFA_FMStringExpression(1, WideStringView(vec)).ToJavaScript(accumulator);
EXPECT_EQ(140000u, accumulator.GetLength());
}
@@ -73,5 +73,5 @@ TEST(FMStringExpressionTest, Quoted) {
CFX_WideTextBuf accumulator;
CXFA_FMStringExpression(1, L".Simon says \"\"run\"\".")
.ToJavaScript(accumulator);
- EXPECT_EQ(L"\"Simon says \\\"run\\\"\"", accumulator.AsStringC());
+ EXPECT_EQ(L"\"Simon says \\\"run\\\"\"", accumulator.AsStringView());
}