From 6a5b1c96e23bd684d9fec2c59e0d4bc5d883650c Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Mon, 19 Feb 2018 18:10:34 +0000 Subject: Merge FormCalc to JavaScript methods This CL merges the ToJavaScript and the ToImpliedJS methods in the FormCalc expressions. The type of return is passed as a paramter to ToJavaScript. Change-Id: Idff83677bc70b964d95aa6ff6b0e2c1bf8c603ea Reviewed-on: https://pdfium-review.googlesource.com/27210 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp') diff --git a/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp b/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp index 8582649fec..233fb8633b 100644 --- a/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp +++ b/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp @@ -20,7 +20,7 @@ TEST(CXFA_FMParserTest, Empty) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf buf; - EXPECT_TRUE(ast->ToJavaScript(buf)); + EXPECT_TRUE(ast->ToJavaScript(buf, ReturnType::kInfered)); // TODO(dsinclair): This is a little weird ..... EXPECT_EQ(L"// comments only", buf.AsStringView()); } @@ -35,7 +35,7 @@ TEST(CXFA_FMParserTest, CommentOnlyIsError) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf buf; - EXPECT_TRUE(ast->ToJavaScript(buf)); + EXPECT_TRUE(ast->ToJavaScript(buf, ReturnType::kInfered)); EXPECT_EQ(L"// comments only", buf.AsStringView()); } @@ -54,7 +54,7 @@ TEST(CXFA_FMParserTest, CommentThenValue) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf buf; - EXPECT_TRUE(ast->ToJavaScript(buf)); + EXPECT_TRUE(ast->ToJavaScript(buf, ReturnType::kInfered)); EXPECT_EQ(ret, buf.AsStringView()); } @@ -110,7 +110,7 @@ TEST(CXFA_FMParserTest, Parse) { CXFA_FMToJavaScriptDepth::Reset(); CFX_WideTextBuf buf; - EXPECT_TRUE(ast->ToJavaScript(buf)); + EXPECT_TRUE(ast->ToJavaScript(buf, ReturnType::kInfered)); EXPECT_EQ(ret, buf.AsStringView()); } -- cgit v1.2.3