/hg/rhino-tests: Enhancements of various tests in ScriptEngineFa...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Mar 13 08:49:58 UTC 2014
changeset 7a653bbdeeec in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=7a653bbdeeec
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Mar 13 09:50:36 2014 +0100
Enhancements of various tests in ScriptEngineFactoryClassTest.
diffstat:
ChangeLog | 5 +
src/org/RhinoTests/ScriptEngineFactoryClassTest.java | 72 ++++++++++++++++++++
2 files changed, 77 insertions(+), 0 deletions(-)
diffs (129 lines):
diff -r bdfcaa390fb9 -r 7a653bbdeeec ChangeLog
--- a/ChangeLog Wed Mar 12 12:42:16 2014 +0100
+++ b/ChangeLog Thu Mar 13 09:50:36 2014 +0100
@@ -1,3 +1,8 @@
+2014-03-13 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/ScriptEngineFactoryClassTest.java:
+ Enhancements of various tests in ScriptEngineFactoryClassTest.
+
2014-03-12 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/InvocableClassTest.java:
diff -r bdfcaa390fb9 -r 7a653bbdeeec src/org/RhinoTests/ScriptEngineFactoryClassTest.java
--- a/src/org/RhinoTests/ScriptEngineFactoryClassTest.java Wed Mar 12 12:42:16 2014 +0100
+++ b/src/org/RhinoTests/ScriptEngineFactoryClassTest.java Thu Mar 13 09:50:36 2014 +0100
@@ -1624,6 +1624,14 @@
}
try {
+ this.scriptEngineFactoryClass.cast(Character.valueOf('a'));
+ throw new AssertionError("Class.cast(Character.valueOf('a')) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineFactoryClass.cast(Byte.valueOf((byte)42));
throw new AssertionError("Class.cast(Byte.valueOf((byte)42)) does not throw any exception");
}
@@ -1680,6 +1688,14 @@
}
try {
+ this.scriptEngineFactoryClass.cast(new Throwable("xyzzy"));
+ throw new AssertionError("Class.cast(new Throwable(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineFactoryClass.cast(new RuntimeException());
throw new AssertionError("Class.cast(new RuntimeException()) does not throw any exception");
}
@@ -1688,6 +1704,14 @@
}
try {
+ this.scriptEngineFactoryClass.cast(new RuntimeException("xyzzy"));
+ throw new AssertionError("Class.cast(new RuntimeException(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
this.scriptEngineFactoryClass.cast(new Error());
throw new AssertionError("Class.cast(new Error()) does not throw any exception");
}
@@ -1696,6 +1720,22 @@
}
try {
+ this.scriptEngineFactoryClass.cast(new Error("xyzzy"));
+ throw new AssertionError("Class.cast(new Error(\"xyzzy\")) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.scriptEngineFactoryClass.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.scriptEngineFactoryClass.cast(new java.lang.String());
throw new AssertionError("Class.cast(new java.lang.String()) does not throw any exception");
}
@@ -1744,6 +1784,30 @@
}
try {
+ this.scriptEngineFactoryClass.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.scriptEngineFactoryClass.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.scriptEngineFactoryClass.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.scriptEngineFactoryClass.cast(new javax.swing.JLabel());
throw new AssertionError("Class.cast(new javax.swing.JLabel()) does not throw any exception");
}
@@ -1760,6 +1824,14 @@
}
try {
+ this.scriptEngineFactoryClass.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.scriptEngineFactoryClass.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