/hg/rhino-tests: Added new code snippets into JavaScriptSnippets.
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Dec 6 02:16:10 PST 2012
changeset 78f32c582232 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=78f32c582232
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Dec 06 11:19:13 2012 +0100
Added new code snippets into JavaScriptSnippets.
Added new tests into JavaScriptsTest.java.
diffstat:
ChangeLog | 7 +
src/org/RhinoTests/JavaScriptSnippets.java | 2 +-
src/org/RhinoTests/JavaScriptsTest.java | 110 ++++++++++++++++++++++++++--
3 files changed, 108 insertions(+), 11 deletions(-)
diffs (209 lines):
diff -r dea9193daa78 -r 78f32c582232 ChangeLog
--- a/ChangeLog Wed Dec 05 10:49:56 2012 +0100
+++ b/ChangeLog Thu Dec 06 11:19:13 2012 +0100
@@ -1,3 +1,10 @@
+2012-12-06 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/JavaScriptSnippets.java:
+ Added new code snippets.
+ * src/org/RhinoTests/JavaScriptsTest.java:
+ Added new tests.
+
2012-12-05 Pavel Tisnovsky <ptisnovs at redhat.com>
* Makefile:
diff -r dea9193daa78 -r 78f32c582232 src/org/RhinoTests/JavaScriptSnippets.java
--- a/src/org/RhinoTests/JavaScriptSnippets.java Wed Dec 05 10:49:56 2012 +0100
+++ b/src/org/RhinoTests/JavaScriptSnippets.java Thu Dec 06 11:19:13 2012 +0100
@@ -158,7 +158,7 @@
protected static final String STRING_EXPRESSION_2 = "'Hello' + ' ' + 'world'";
/**
- * Classical hello world program.
+ * Classical hello world program.
*/
protected static final String HELLO_WORLD_1 = "println('\tHello world!')";
diff -r dea9193daa78 -r 78f32c582232 src/org/RhinoTests/JavaScriptsTest.java
--- a/src/org/RhinoTests/JavaScriptsTest.java Wed Dec 05 10:49:56 2012 +0100
+++ b/src/org/RhinoTests/JavaScriptsTest.java Thu Dec 06 11:19:13 2012 +0100
@@ -170,7 +170,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunEmptyScriptStoredInString() throws ScriptException {
- this.scriptEngine.eval("");
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_1);
}
/**
@@ -180,7 +180,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunAlmostEmptyScriptStoredInString1() throws ScriptException {
- this.scriptEngine.eval(" ");
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_2);
}
/**
@@ -190,7 +190,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunAlmostEmptyScriptStoredInString2() throws ScriptException {
- this.scriptEngine.eval("\t");
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_3);
}
/**
@@ -200,7 +200,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunAlmostEmptyScriptStoredInString3() throws ScriptException {
- this.scriptEngine.eval(" \t ");
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_4);
}
/**
@@ -210,7 +210,97 @@
* this exception is thrown when this test case failed.
*/
protected void testRunAlmostEmptyScriptStoredInString4() throws ScriptException {
- this.scriptEngine.eval("\t \t");
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_5);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString5() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_6);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString6() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_7);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString7() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_8);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString8() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_9);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString9() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_10);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString10() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_11);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString11() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_12);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString12() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_13);
+ }
+
+ /**
+ * Test script consisting only of tabs and space.
+ *
+ * @throws ScriptException
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunAlmostEmptyScriptStoredInString13() throws ScriptException {
+ this.scriptEngine.eval(JavaScriptSnippets.EMPTY_SCRIPT_14);
}
/**
@@ -247,7 +337,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunEmptyScriptFromReader() throws ScriptException {
- StringReader stringReader = new StringReader("");
+ StringReader stringReader = new StringReader(JavaScriptSnippets.EMPTY_SCRIPT_1);
this.scriptEngine.eval(stringReader);
}
@@ -258,7 +348,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunAlmostEmptyScriptFromReader1() throws ScriptException {
- StringReader stringReader = new StringReader(" ");
+ StringReader stringReader = new StringReader(JavaScriptSnippets.EMPTY_SCRIPT_2);
this.scriptEngine.eval(stringReader);
}
@@ -269,7 +359,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunAlmostEmptyScriptFromReader2() throws ScriptException {
- StringReader stringReader = new StringReader("\t");
+ StringReader stringReader = new StringReader(JavaScriptSnippets.EMPTY_SCRIPT_3);
this.scriptEngine.eval(stringReader);
}
@@ -280,7 +370,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunAlmostEmptyScriptFromReader3() throws ScriptException {
- StringReader stringReader = new StringReader(" \t ");
+ StringReader stringReader = new StringReader(JavaScriptSnippets.EMPTY_SCRIPT_4);
this.scriptEngine.eval(stringReader);
}
@@ -291,7 +381,7 @@
* this exception is thrown when this test case failed.
*/
protected void testRunAlmostEmptyScriptFromReader4() throws ScriptException {
- StringReader stringReader = new StringReader("\t \t");
+ StringReader stringReader = new StringReader(JavaScriptSnippets.EMPTY_SCRIPT_5);
this.scriptEngine.eval(stringReader);
}
More information about the distro-pkg-dev
mailing list