/hg/rhino-tests: Enhancements of various tests in ScriptContextC...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Fri Mar 14 12:14:24 UTC 2014


changeset 39b90cb1bd47 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=39b90cb1bd47
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Mar 14 13:14:58 2014 +0100

	Enhancements of various tests in ScriptContextClassTest.


diffstat:

 ChangeLog                                      |   5 ++++
 src/org/RhinoTests/ScriptContextClassTest.java |  32 ++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 0 deletions(-)

diffs (61 lines):

diff -r 7a653bbdeeec -r 39b90cb1bd47 ChangeLog
--- a/ChangeLog	Thu Mar 13 09:50:36 2014 +0100
+++ b/ChangeLog	Fri Mar 14 13:14:58 2014 +0100
@@ -1,3 +1,8 @@
+2014-03-14  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/RhinoTests/ScriptContextClassTest.java:
+	Enhancements of various tests in ScriptContextClassTest.
+
 2014-03-13  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/RhinoTests/ScriptEngineFactoryClassTest.java:
diff -r 7a653bbdeeec -r 39b90cb1bd47 src/org/RhinoTests/ScriptContextClassTest.java
--- a/src/org/RhinoTests/ScriptContextClassTest.java	Thu Mar 13 09:50:36 2014 +0100
+++ b/src/org/RhinoTests/ScriptContextClassTest.java	Fri Mar 14 13:14:58 2014 +0100
@@ -1832,6 +1832,30 @@
         }
 
         try {
+            this.scriptContextClass.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.scriptContextClass.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.scriptContextClass.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.scriptContextClass.cast(new javax.swing.JLabel());
             throw new AssertionError("Class.cast(new javax.swing.JLabel()) does not throw any exception");
         }
@@ -1848,6 +1872,14 @@
         }
 
         try {
+            this.scriptContextClass.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.scriptContextClass.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