Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: testing/resources/javascript/bug_361.in

Issue 1582383002: Additional test cases for bug_361 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Empty string is most obvious test case. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | testing/resources/javascript/bug_361_expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/resources/javascript/bug_361.in
diff --git a/testing/resources/javascript/bug_361.in b/testing/resources/javascript/bug_361.in
index 34fde70fe26dc5fe3feea1f82ab54349c9ed0d49..f98ef829f28e3b21afedde0c045594dea9ef9ead 100644
--- a/testing/resources/javascript/bug_361.in
+++ b/testing/resources/javascript/bug_361.in
@@ -50,11 +50,13 @@ function testField(x) {
var y = field.value;
app.alert("Answer for \"" + x + "\" is: " + typeof(y) + " " + y);
}
+testField("");
testField("goats");
testField("b4");
testField("b4.5");
testField("4x");
testField("4.5x");
+testField(4);
testField("4");
testField(" 4");
testField("4 ");
@@ -63,15 +65,25 @@ testField("4 3 2 1");
testField("-4");
testField("23.00000001");
testField("23.00000000000000001");
+testField(40000000000000000000000000);
+testField("40000000000000000000000000");
testField("25,5");
testField("1e+5");
testField("1e5");
testField("1e-5");
testField("-1e-5");
testField("1.2e5");
-testField("NAN");
+testField(Infinity);
+testField("Infinity");
+testField("INFINITY");
testField("INF");
+testField(NaN);
+testField("NaN");
+testField("NAN");
testField("0x100");
+testField("0x100.1");
+testField("0x100,1");
+testField("0x100x1");
testField("123x6");
testField("123xy6");
testField("123.y6");
@@ -81,6 +93,12 @@ testField("1-3");
testField("1+3");
testField("1.-3");
testField("1.+3");
+testField([1, 2, 3, 4]);
+testField("[1, 2, 3, 4]");
+testField({a: 1, b: 2});
+testField("{a: 1, b: 2}");
+testField(function(x) { return x+1; });
+testField("function(x) { return x+1; }");
endstream
endobj
{{xref}}
« no previous file with comments | « no previous file | testing/resources/javascript/bug_361_expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698