diff options
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp')
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp index 168de84db4..e8149ebfaf 100644 --- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp +++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp @@ -17,14 +17,14 @@ TEST(FMCallExpressionTest, more_than_32_arguments) { // Use sign as it has 3 object parameters at positions 0, 5, and 6. - auto exp = pdfium::MakeUnique<CXFA_FMIdentifierExpression>(0, L"sign"); + auto exp = pdfium::MakeUnique<CXFA_FMIdentifierExpression>(L"sign"); std::vector<std::unique_ptr<CXFA_FMSimpleExpression>> args; for (size_t i = 0; i < 50; i++) - args.push_back(pdfium::MakeUnique<CXFA_FMNullExpression>(0)); + args.push_back(pdfium::MakeUnique<CXFA_FMNullExpression>()); CXFA_FMToJavaScriptDepth::Reset(); - CXFA_FMCallExpression callExp(0, std::move(exp), std::move(args), true); + CXFA_FMCallExpression callExp(std::move(exp), std::move(args), true); CFX_WideTextBuf js; callExp.ToJavaScript(js, ReturnType::kInfered); @@ -49,7 +49,7 @@ TEST(FMCallExpressionTest, more_than_32_arguments) { TEST(FMStringExpressionTest, Empty) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf accumulator; - CXFA_FMStringExpression(1, WideStringView()) + CXFA_FMStringExpression(WideStringView()) .ToJavaScript(accumulator, ReturnType::kInfered); EXPECT_EQ(L"", accumulator.AsStringView()); } @@ -57,16 +57,15 @@ TEST(FMStringExpressionTest, Empty) { TEST(FMStringExpressionTest, Short) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf accumulator; - CXFA_FMStringExpression(1, L"a").ToJavaScript(accumulator, - ReturnType::kInfered); + CXFA_FMStringExpression(L"a").ToJavaScript(accumulator, ReturnType::kInfered); EXPECT_EQ(L"a", accumulator.AsStringView()); } TEST(FMStringExpressionTest, Medium) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf accumulator; - CXFA_FMStringExpression(1, L".abcd.") - .ToJavaScript(accumulator, ReturnType::kInfered); + CXFA_FMStringExpression(L".abcd.").ToJavaScript(accumulator, + ReturnType::kInfered); EXPECT_EQ(L"\"abcd\"", accumulator.AsStringView()); } @@ -74,7 +73,7 @@ TEST(FMStringExpressionTest, Long) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf accumulator; std::vector<WideStringView::UnsignedType> vec(140000, L'A'); - CXFA_FMStringExpression(1, WideStringView(vec)) + CXFA_FMStringExpression(WideStringView(vec)) .ToJavaScript(accumulator, ReturnType::kInfered); EXPECT_EQ(140000u, accumulator.GetLength()); } @@ -82,7 +81,7 @@ TEST(FMStringExpressionTest, Long) { TEST(FMStringExpressionTest, Quoted) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf accumulator; - CXFA_FMStringExpression(1, L".Simon says \"\"run\"\".") + CXFA_FMStringExpression(L".Simon says \"\"run\"\".") .ToJavaScript(accumulator, ReturnType::kInfered); EXPECT_EQ(L"\"Simon says \\\"run\\\"\"", accumulator.AsStringView()); } |