summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
index 96ccb71ca9..e97df41ad7 100644
--- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
@@ -26,7 +26,7 @@ TEST(FMCallExpressionTest, more_than_32_arguments) {
CXFA_FMToJavaScriptDepth::Reset();
CXFA_FMCallExpression callExp(0, std::move(exp), std::move(args), true);
CFX_WideTextBuf js;
- callExp.ToJavaScript(js);
+ callExp.ToJavaScript(js, ReturnType::kInfered);
// Generate the result javascript string.
WideString result = L"sign(";
@@ -49,21 +49,24 @@ TEST(FMCallExpressionTest, more_than_32_arguments) {
TEST(FMStringExpressionTest, Empty) {
CXFA_FMToJavaScriptDepth::Reset();
CFX_WideTextBuf accumulator;
- CXFA_FMStringExpression(1, WideStringView()).ToJavaScript(accumulator);
+ CXFA_FMStringExpression(1, WideStringView())
+ .ToJavaScript(accumulator, ReturnType::kInfered);
EXPECT_EQ(L"", accumulator.AsStringView());
}
TEST(FMStringExpressionTest, Short) {
CXFA_FMToJavaScriptDepth::Reset();
CFX_WideTextBuf accumulator;
- CXFA_FMStringExpression(1, L"a").ToJavaScript(accumulator);
+ CXFA_FMStringExpression(1, 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);
+ CXFA_FMStringExpression(1, L".abcd.")
+ .ToJavaScript(accumulator, ReturnType::kInfered);
EXPECT_EQ(L"\"abcd\"", accumulator.AsStringView());
}
@@ -71,7 +74,8 @@ TEST(FMStringExpressionTest, Long) {
CXFA_FMToJavaScriptDepth::Reset();
CFX_WideTextBuf accumulator;
std::vector<WideStringView::UnsignedType> vec(140000, L'A');
- CXFA_FMStringExpression(1, WideStringView(vec)).ToJavaScript(accumulator);
+ CXFA_FMStringExpression(1, WideStringView(vec))
+ .ToJavaScript(accumulator, ReturnType::kInfered);
EXPECT_EQ(140000u, accumulator.GetLength());
}
@@ -79,6 +83,6 @@ TEST(FMStringExpressionTest, Quoted) {
CXFA_FMToJavaScriptDepth::Reset();
CFX_WideTextBuf accumulator;
CXFA_FMStringExpression(1, L".Simon says \"\"run\"\".")
- .ToJavaScript(accumulator);
+ .ToJavaScript(accumulator, ReturnType::kInfered);
EXPECT_EQ(L"\"Simon says \\\"run\\\"\"", accumulator.AsStringView());
}