diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-02-20 21:57:59 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-20 21:57:59 +0000 |
commit | 676658cfccf3f8cf820dfa63a7b6e2f9a76c2e18 (patch) | |
tree | 0ce81b0a8d51a6ec8e1dfce2c5119c7fcb73049f /xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp | |
parent | 4102f7b86e415b2a254521a1fc52e11bdc932864 (diff) | |
download | pdfium-676658cfccf3f8cf820dfa63a7b6e2f9a76c2e18.tar.xz |
[formcalc] Remove unused line parameter
The recorded line number from the formcalc parse is never used. This Cl
removes the parameter and removes the need to pass it through all of the
constructors.
Change-Id: Ice716cc4880dd17dc05bffcdce1dc1e4745108ea
Reviewed-on: https://pdfium-review.googlesource.com/27412
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
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()); } |