/hg/rhino-tests: Renamed all test scripts so its names are now m...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Mon Jul 30 06:31:10 PDT 2012
changeset 50619c42d67c in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=50619c42d67c
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Jul 30 15:33:41 2012 +0200
Renamed all test scripts so its names are now more descriptive.
Mention problems with JDK7 in BUGS file.
diffstat:
BUGS | 4 ++
ChangeLog | 24 ++++++++++++
Makefile | 13 +++---
scripts/test1.js | 1 -
scripts/test2.js | 1 -
scripts/test3.js | 1 -
scripts/test4.js | 1 -
scripts/test5.js | 1 -
scripts/test6.js | 3 -
scripts/test7.js | 4 --
scripts/test_empty_script_1.js | 1 +
scripts/test_hello_world.js | 1 +
scripts/test_invalid_command_1.js | 1 +
scripts/test_invalid_command_2.js | 3 +
scripts/test_invalid_command_3.js | 4 ++
scripts/test_invalid_parameter.js | 1 +
scripts/test_unknown_function.js | 1 +
src/org/RhinoTests/JavaScriptsTest.java | 54 ++++++++++++----------------
src/org/RhinoTests/ScriptExceptionTest.java | 18 ++++----
19 files changed, 80 insertions(+), 57 deletions(-)
diffs (328 lines):
diff -r 60e68ea5a35f -r 50619c42d67c BUGS
--- a/BUGS Thu Jul 26 14:39:16 2012 +0200
+++ b/BUGS Mon Jul 30 15:33:41 2012 +0200
@@ -0,0 +1,4 @@
+List of known bugs and limitations:
+
+- some tests need to be updated to run correctly under JDK7 (OpenJDK7 etc.)
+
diff -r 60e68ea5a35f -r 50619c42d67c ChangeLog
--- a/ChangeLog Thu Jul 26 14:39:16 2012 +0200
+++ b/ChangeLog Mon Jul 30 15:33:41 2012 +0200
@@ -1,3 +1,27 @@
+2012-07-30 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * BUGS:
+ Mention problems with JDK7.
+ * scripts/test1.js:
+ * scripts/test2.js:
+ * scripts/test3.js:
+ * scripts/test4.js:
+ * scripts/test5.js:
+ * scripts/test6.js:
+ * scripts/test7.js:
+ * scripts/test_empty_script_1.js:
+ * scripts/test_hello_world.js:
+ * scripts/test_invalid_command_1.js:
+ * scripts/test_invalid_command_2.js:
+ * scripts/test_invalid_command_3.js:
+ * scripts/test_invalid_parameter.js:
+ * scripts/test_unknown_function.js:
+ * src/org/RhinoTests/JavaScriptsTest.java:
+ * src/org/RhinoTests/ScriptExceptionTest.java:
+ * Makefile:
+ Renamed test scripts so its names are now more
+ descriptive.
+
2012-07-26 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/CompiledScriptTest.java:
diff -r 60e68ea5a35f -r 50619c42d67c Makefile
--- a/Makefile Thu Jul 26 14:39:16 2012 +0200
+++ b/Makefile Mon Jul 30 15:33:41 2012 +0200
@@ -95,12 +95,13 @@
$(BUILD_DIR)/$(TEST_PACKAGE)/SimpleScriptContextClassTest.class
ALL_SCRIPTS = \
- $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test1.js \
- $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test2.js \
- $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test3.js \
- $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test4.js \
- $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test5.js \
- $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test6.js
+ $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test_hello_world.js \
+ $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test_empty_script_1.js \
+ $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test_invalid_command_1.js \
+ $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test_invalid_command_2.js \
+ $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test_invalid_command_3.js \
+ $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test_invalid_parameter.js \
+ $(BUILD_DIR)/$(TEST_PACKAGE)/$(SCRIPTS)/test_unknown_function.js
all: build runtests
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test1.js
--- a/scripts/test1.js Thu Jul 26 14:39:16 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-println('\tHello world');
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test2.js
--- a/scripts/test2.js Thu Jul 26 14:39:16 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test3.js
--- a/scripts/test3.js Thu Jul 26 14:39:16 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-_unknown_function_('\tHello world!')
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test4.js
--- a/scripts/test4.js Thu Jul 26 14:39:16 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-println(bflmpsvz)
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test5.js
--- a/scripts/test5.js Thu Jul 26 14:39:16 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-xyzzy
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test6.js
--- a/scripts/test6.js Thu Jul 26 14:39:16 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-println('\t1st line');
-println('\t2nd line');
-xyzzy
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test7.js
--- a/scripts/test7.js Thu Jul 26 14:39:16 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-println('\t1st line');
-println('\t2nd line');
-xyzzy
-println('\t4th line');
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test_empty_script_1.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/test_empty_script_1.js Mon Jul 30 15:33:41 2012 +0200
@@ -0,0 +1,1 @@
+
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test_hello_world.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/test_hello_world.js Mon Jul 30 15:33:41 2012 +0200
@@ -0,0 +1,1 @@
+println('\tHello world');
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test_invalid_command_1.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/test_invalid_command_1.js Mon Jul 30 15:33:41 2012 +0200
@@ -0,0 +1,1 @@
+xyzzy
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test_invalid_command_2.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/test_invalid_command_2.js Mon Jul 30 15:33:41 2012 +0200
@@ -0,0 +1,3 @@
+println('\t1st line');
+println('\t2nd line');
+xyzzy
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test_invalid_command_3.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/test_invalid_command_3.js Mon Jul 30 15:33:41 2012 +0200
@@ -0,0 +1,4 @@
+println('\t1st line');
+println('\t2nd line');
+xyzzy
+println('\t4th line');
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test_invalid_parameter.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/test_invalid_parameter.js Mon Jul 30 15:33:41 2012 +0200
@@ -0,0 +1,1 @@
+println(bflmpsvz)
diff -r 60e68ea5a35f -r 50619c42d67c scripts/test_unknown_function.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/test_unknown_function.js Mon Jul 30 15:33:41 2012 +0200
@@ -0,0 +1,1 @@
+_unknown_function_('\tHello world!')
diff -r 60e68ea5a35f -r 50619c42d67c src/org/RhinoTests/JavaScriptsTest.java
--- a/src/org/RhinoTests/JavaScriptsTest.java Thu Jul 26 14:39:16 2012 +0200
+++ b/src/org/RhinoTests/JavaScriptsTest.java Mon Jul 30 15:33:41 2012 +0200
@@ -334,26 +334,38 @@
/**
* Test if script can be run from external file.
- * @see scripts/test1.js
+ * @see scripts/test_hello_world.js
*
* @throws ScriptException
* this exception is thrown when this test case failed.
*/
- protected void testRunSimpleScriptFromStoredInFile() throws ScriptException {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test1.js");
+ protected void testRunSimpleScriptStoredInFile() throws ScriptException {
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_hello_world.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
/**
- * Test if exception is thrown when external script is empty.
- * @see scripts/test2.js
+ * Test if empty script can be run from external file.
+ * @see scripts/test_empty_script_1.js
*
* @throws Exception
* this exception is thrown when this test case failed.
*/
- protected void testRunSimpleScriptFromStoredInFileNegative() throws Exception {
+ protected void testRunEmptyScript1StoredInFile() throws Exception {
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_empty_script_1.js");
+ this.scriptEngine.eval(new InputStreamReader(inputStream));
+ }
+
+ /**
+ * Test if exception is thrown when external script contains error.
+ * @see scripts/test_unknown_function.js
+ *
+ * @throws Exception
+ * this exception is thrown when this test case failed.
+ */
+ protected void testRunScriptContainingUnknownFunctionFromFile() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test2.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_unknown_function.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -364,14 +376,14 @@
/**
* Test if exception is thrown when external script contains error.
- * @see scripts/test3.js
+ * @see scripts/test_invalid_parameter.js
*
* @throws Exception
* this exception is thrown when this test case failed.
*/
- protected void testRunScriptContainingUnknownFunctionFromFile() throws Exception {
+ protected void testRunScriptContainingError1FromFile() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test3.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_parameter.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -382,32 +394,14 @@
/**
* Test if exception is thrown when external script contains error.
- * @see scripts/test4.js
- *
- * @throws Exception
- * this exception is thrown when this test case failed.
- */
- protected void testRunScriptContainingError1FromFile() throws Exception {
- try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test4.js");
- this.scriptEngine.eval(new InputStreamReader(inputStream));
- }
- catch (ScriptException e) {
- return; // ok, it's correct if this exception is thrown
- }
- throw new Exception("ScriptException not thrown as expected");
- }
-
- /**
- * Test if exception is thrown when external script contains error.
- * @see scripts/test5.js
+ * @see scripts/test_invalid_command_1.js
*
* @throws Exception
* this exception is thrown when this test case failed.
*/
protected void testRunScriptContainingError2FromFile() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test5.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_1.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
diff -r 60e68ea5a35f -r 50619c42d67c src/org/RhinoTests/ScriptExceptionTest.java
--- a/src/org/RhinoTests/ScriptExceptionTest.java Thu Jul 26 14:39:16 2012 +0200
+++ b/src/org/RhinoTests/ScriptExceptionTest.java Mon Jul 30 15:33:41 2012 +0200
@@ -243,7 +243,7 @@
*/
protected void testBasicScriptExceptionTestErrorInExternalScript1() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test3.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_unknown_function.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -262,7 +262,7 @@
*/
protected void testBasicScriptExceptionTestErrorInExternalScript2() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test4.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_parameter.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -281,7 +281,7 @@
*/
protected void testBasicScriptExceptionTestErrorInExternalScript3() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test5.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_1.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -300,7 +300,7 @@
*/
protected void testBasicScriptExceptionTestErrorInExternalScript4() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test4.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_parameter.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -361,7 +361,7 @@
*/
protected void testScriptExceptionTestLineNumber3() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test3.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_unknown_function.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -381,7 +381,7 @@
*/
protected void testScriptExceptionTestLineNumber4() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test4.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_parameter.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -401,7 +401,7 @@
*/
protected void testScriptExceptionTestLineNumber5() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test5.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_1.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -421,7 +421,7 @@
*/
protected void testScriptExceptionTestLineNumber6() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test6.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_2.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
@@ -441,7 +441,7 @@
*/
protected void testScriptExceptionTestLineNumber7() throws Exception {
try {
- InputStream inputStream = this.getClass().getResourceAsStream("scripts/test7.js");
+ InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_3.js");
this.scriptEngine.eval(new InputStreamReader(inputStream));
}
catch (ScriptException e) {
More information about the distro-pkg-dev
mailing list