/hg/rhino-tests: Added 12 more tests for the method
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Aug 9 01:09:03 PDT 2012
changeset d1c40cccd80e in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=d1c40cccd80e
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Aug 09 10:11:05 2012 +0200
Added 12 more tests for the method
ScriptEngineManager.getEngineByExtension().
diffstat:
ChangeLog | 6 +
src/org/RhinoTests/ScriptEngineTest.java | 133 ++++++++++++++++++++++++++++++-
2 files changed, 138 insertions(+), 1 deletions(-)
diffs (156 lines):
diff -r 625ff78f80c7 -r d1c40cccd80e ChangeLog
--- a/ChangeLog Tue Aug 07 11:30:47 2012 +0200
+++ b/ChangeLog Thu Aug 09 10:11:05 2012 +0200
@@ -1,3 +1,9 @@
+2012-08-09 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/ScriptEngineTest.java:
+ Added 12 more tests for the method
+ ScriptEngineManager.getEngineByExtension().
+
2012-08-07 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/ScriptEngineTest.java:
diff -r 625ff78f80c7 -r d1c40cccd80e src/org/RhinoTests/ScriptEngineTest.java
--- a/src/org/RhinoTests/ScriptEngineTest.java Tue Aug 07 11:30:47 2012 +0200
+++ b/src/org/RhinoTests/ScriptEngineTest.java Thu Aug 09 10:11:05 2012 +0200
@@ -339,7 +339,138 @@
* @throws Exception if this test case fails.
*/
protected void testGetEngineByExtensionNegative3() throws Exception {
- ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("foo");
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension(" ");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative4() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension(" ");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative5() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("\t");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative6() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension(" \t");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative7() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("\b");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative8() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("\b\b");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative9() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension(" \b\b");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative10() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("\000");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative11() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("\u0000");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative12() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("js ");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative13() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("\tjs");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative14() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("js\t");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative15() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension(" js");
+ assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
+ }
+
+ /**
+ * Test if none script engine is found using wrong extension.
+ * @throws Exception if this test case fails.
+ */
+ protected void testGetEngineByExtensionNegative16() throws Exception {
+ assertNotNull(engineManager, "Script engine manager was not created");
+ ScriptEngine scriptEngine = this.engineManager.getEngineByExtension("\bjs");
assertNull(scriptEngine, "JavaScript engine manager was found but it's not expected");
}
More information about the distro-pkg-dev
mailing list