diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-02-21 21:45:46 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-21 21:45:46 +0000 |
commit | 00c1d0b07542611d295dc666ff55d46b0d3f712b (patch) | |
tree | a6b92e2b30b3e8127241be749ac554e302657214 /xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp | |
parent | f93767ae9b9a5adea4d0b1c46a96d4816446dc3b (diff) | |
download | pdfium-00c1d0b07542611d295dc666ff55d46b0d3f712b.tar.xz |
[formcalc] Add elseif expression to parser test
This extends the test case for slightly more coverage.
Change-Id: I97613c2d8df416b37718ff747d218dd61ea02b37
Reviewed-on: https://pdfium-review.googlesource.com/27570
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp')
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp b/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp index 458213a4a0..53ad0ee02b 100644 --- a/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp +++ b/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp @@ -65,6 +65,8 @@ TEST(CXFA_FMParserTest, Parse) { L"\n" L"if ($ ne -1)then\n" L" border.fill.color.value = \"255,64,64\";\n" + L"elseif ($ ne -2) then\n" + L" border.fill.color.value = \"128,128,128\";\n" L"else\n" L" border.fill.color.value = \"20,170,13\";\n" L"endif\n" @@ -90,7 +92,19 @@ TEST(CXFA_FMParserTest, Parse) { L"pfm_rt.dot_acc(border, \"border\", \"fill\", 0, 0), \"\", " L"\"color\", 0, 0), \"\", \"value\", 0, 0), \"255,64,64\");\n" L"}\n" - L"}\nelse\n{\n{\n" + L"}\nelse\n{\n" + L"if (pfm_rt.get_val(pfm_rt.neq_op(this, pfm_rt.neg_op(2))))\n" + L"{\n" + L"if (pfm_rt.is_obj(pfm_rt.dot_acc(pfm_rt.dot_acc(pfm_rt.dot_acc(border, " + L"\"border\", \"fill\", 0, 0), \"\", \"color\", 0, 0), \"\", \"value\", " + L"0, 0)))\n" + L"{\n" + L"pfm_rt.asgn_val_op(pfm_rt.dot_acc(pfm_rt.dot_acc(pfm_rt.dot_acc(border," + L" \"border\", \"fill\", 0, 0), \"\", \"color\", 0, 0), \"\", \"value\", " + L"0, 0), \"128,128,128\");\n" + L"}\n" + L"}\n" + L"else\n{\n{\n" L"if (pfm_rt.is_obj(pfm_rt.dot_acc(pfm_rt.dot_acc(pfm_rt.dot_acc(" L"border, \"border\", \"fill\", 0, 0), \"\", \"color\", 0, 0), \"\", " L"\"value\", 0, 0)))\n{\n" @@ -100,6 +114,7 @@ TEST(CXFA_FMParserTest, Parse) { L"}\n" L"}\n" L"}\n" + L"}\n" L"pfm_ret = this;\n" L"return pfm_rt.get_val(pfm_ret);\n" L"}\n).call(this);\n"; |