diff options
author | dan sinclair <dsinclair@chromium.org> | 2017-05-24 21:50:42 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-25 13:51:22 +0000 |
commit | 151c14f7c7100420670133c18abb94cfa9324745 (patch) | |
tree | 12614ac37531b43cb07885b95cae330d421ed2b9 | |
parent | 0fafb4fc5009418bff9578f8da940a980ee5b28d (diff) | |
download | pdfium-151c14f7c7100420670133c18abb94cfa9324745.tar.xz |
Enable most FM2JSContext boolean tests
This CL enables most of the FM2JSContext boolean tests. The return type is
updated to Integer from Boolean.
Change-Id: Ie3f665bd23a86e843cadb2ae8963767466bd1714
Reviewed-on: https://pdfium-review.googlesource.com/5892
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp index a9ce54d6a6..8fe5199dee 100644 --- a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp @@ -334,7 +334,7 @@ const FXJSE_FUNCTION_DESCRIPTOR formcalc_fm2js_functions[] = { {"lt_op", CXFA_FM2JSContext::less_operator}, {"le_op", CXFA_FM2JSContext::lessequal_operator}, {"gt_op", CXFA_FM2JSContext::greater_operator}, - {"gteq_op", CXFA_FM2JSContext::greaterequal_operator}, + {"ge_op", CXFA_FM2JSContext::greaterequal_operator}, {"plus_op", CXFA_FM2JSContext::plus_operator}, {"minus_op", CXFA_FM2JSContext::minus_operator}, {"mul_op", CXFA_FM2JSContext::multiple_operator}, diff --git a/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp b/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp index bc9584bb53..e9120dc3a0 100644 --- a/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp +++ b/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp @@ -92,7 +92,7 @@ TEST_F(FM2JSContextEmbedderTest, Strings) { } } -TEST_F(FM2JSContextEmbedderTest, DISABLED_Booleans) { +TEST_F(FM2JSContextEmbedderTest, Booleans) { ASSERT_TRUE(OpenDocument("simple_xfa.pdf")); struct { @@ -105,7 +105,7 @@ TEST_F(FM2JSContextEmbedderTest, DISABLED_Booleans) { {"0 | 0", false}, {"0 or 1 | 0 or 0", true}, {"1 and 0", false}, - {"0 & 0", true}, // TODO(dsinclair) Confirm with Reader. + // {"0 & 0", true}, // TODO(dsinclair) Confirm with Reader. {"0 and 1 & 0 and 0", false}, {"not(\"true\")", true}, {"not(1)", false}, @@ -126,7 +126,7 @@ TEST_F(FM2JSContextEmbedderTest, DISABLED_Booleans) { EXPECT_TRUE(Execute(tests[i].program)); CFXJSE_Value* value = GetValue(); - EXPECT_TRUE(value->IsBoolean()) << "Program: " << tests[i].program; + EXPECT_TRUE(value->IsInteger()) << "Program: " << tests[i].program; EXPECT_EQ(tests[i].result, value->ToBoolean()) << "Program: " << tests[i].program; } |