/hg/rhino-tests: Added new tests testGetResourceAsStreamPositive...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Wed Apr 2 07:38:58 UTC 2014
changeset 071f5098ba66 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=071f5098ba66
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Apr 02 09:39:43 2014 +0200
Added new tests testGetResourceAsStreamPositiveTest
into ScriptEngineManagerClassTest.
diffstat:
ChangeLog | 6 +
src/org/RhinoTests/ScriptEngineManagerClassTest.java | 72 ++++++++++++++++++++
2 files changed, 78 insertions(+), 0 deletions(-)
diffs (130 lines):
diff -r e08cdeaa1aee -r 071f5098ba66 ChangeLog
--- a/ChangeLog Tue Apr 01 11:44:02 2014 +0200
+++ b/ChangeLog Wed Apr 02 09:39:43 2014 +0200
@@ -1,3 +1,9 @@
+2014-04-02 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/ScriptEngineManagerClassTest.java:
+ Added new tests testGetResourceAsStreamPositiveTest
+ into ScriptEngineManagerClassTest.
+
2014-04-01 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/ScriptEngineFactoryClassTest.java:
diff -r e08cdeaa1aee -r 071f5098ba66 src/org/RhinoTests/ScriptEngineManagerClassTest.java
--- a/src/org/RhinoTests/ScriptEngineManagerClassTest.java Tue Apr 01 11:44:02 2014 +0200
+++ b/src/org/RhinoTests/ScriptEngineManagerClassTest.java Wed Apr 02 09:39:43 2014 +0200
@@ -1790,6 +1790,14 @@
}
try {
+ this.scriptEngineManagerClass.cast(Character.valueOf('a'));
+ throw new AssertionError("Class.cast(Character.valueOf('a')) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineManagerClass.cast(Byte.valueOf((byte)42));
throw new AssertionError("Class.cast(Byte.valueOf((byte)42)) does not throw any exception");
}
@@ -1846,6 +1854,14 @@
}
try {
+ this.scriptEngineManagerClass.cast(new Throwable("xyzzy"));
+ throw new AssertionError("Class.cast(new Throwable(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineManagerClass.cast(new RuntimeException());
throw new AssertionError("Class.cast(new RuntimeException()) does not throw any exception");
}
@@ -1854,6 +1870,14 @@
}
try {
+ this.scriptEngineManagerClass.cast(new RuntimeException("xyzzy"));
+ throw new AssertionError("Class.cast(new RuntimeException(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineManagerClass.cast(new Error());
throw new AssertionError("Class.cast(new Error()) does not throw any exception");
}
@@ -1862,6 +1886,22 @@
}
try {
+ this.scriptEngineManagerClass.cast(new Error("xyzzy"));
+ throw new AssertionError("Class.cast(new Error(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.scriptEngineManagerClass.cast(new java.io.File("xyzzy"));
+ throw new AssertionError("Class.cast(new java.io.File(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineManagerClass.cast(new java.lang.String());
throw new AssertionError("Class.cast(new java.lang.String()) does not throw any exception");
}
@@ -1910,6 +1950,30 @@
}
try {
+ this.scriptEngineManagerClass.cast(new java.awt.Label());
+ throw new AssertionError("Class.cast(new java.awt.Label()) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.scriptEngineManagerClass.cast(new java.awt.Label(new String()));
+ throw new AssertionError("Class.cast(new java.awt.Label(new String())) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.scriptEngineManagerClass.cast(new java.awt.Label("xyzzy"));
+ throw new AssertionError("Class.cast(new java.awt.Label(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineManagerClass.cast(new javax.swing.JLabel());
throw new AssertionError("Class.cast(new javax.swing.JLabel()) does not throw any exception");
}
@@ -1926,6 +1990,14 @@
}
try {
+ this.scriptEngineManagerClass.cast(new javax.swing.JLabel("xyzzy"));
+ throw new AssertionError("Class.cast(new javax.swing.JLabel(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineManagerClass.cast(new javax.swing.JPanel());
throw new AssertionError("Class.cast(new javax.swing.JPanel()) does not throw any exception");
}
More information about the distro-pkg-dev
mailing list