/hg/rhino-tests: Added new test testAsSubclass into the test sui...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Mon Sep 9 05:27:58 PDT 2013
changeset ae49fa6139e3 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=ae49fa6139e3
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Sep 09 14:31:44 2013 +0200
Added new test testAsSubclass into the test suite SimpleBindingsClassTest.
diffstat:
ChangeLog | 5 +
src/org/RhinoTests/SimpleBindingsClassTest.java | 166 ++++++++++++++++++++++++
2 files changed, 171 insertions(+), 0 deletions(-)
diffs (188 lines):
diff -r c42e7838e219 -r ae49fa6139e3 ChangeLog
--- a/ChangeLog Fri Sep 06 15:15:25 2013 +0200
+++ b/ChangeLog Mon Sep 09 14:31:44 2013 +0200
@@ -1,3 +1,8 @@
+2013-09-09 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/SimpleBindingsClassTest.java:
+ Added new test testAsSubclass into the test suite SimpleBindingsClassTest.
+
2013-09-06 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/CompiledScriptClassTest.java:
diff -r c42e7838e219 -r ae49fa6139e3 src/org/RhinoTests/SimpleBindingsClassTest.java
--- a/src/org/RhinoTests/SimpleBindingsClassTest.java Fri Sep 06 15:15:25 2013 +0200
+++ b/src/org/RhinoTests/SimpleBindingsClassTest.java Mon Sep 09 14:31:44 2013 +0200
@@ -1288,6 +1288,172 @@
}
/**
+ * Test for method javax.script.SimpleBindings.getClass().asSubclass()
+ */
+ protected void testAsSubclass() {
+ try {
+ this.simpleBindingsClass.asSubclass(simpleBindingsClass);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ throw new AssertionError(e.getMessage());
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(Object.class);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ throw new AssertionError(e.getMessage());
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.Void.class);
+ throw new AssertionError("Class.asSubclass(java.lang.Void.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.Number.class);
+ throw new AssertionError("Class.asSubclass(java.lang.Number.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.Byte.class);
+ throw new AssertionError("Class.asSubclass(java.lang.Byte.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.Double.class);
+ throw new AssertionError("Class.asSubclass(java.lang.Double.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.Float.class);
+ throw new AssertionError("Class.asSubclass(java.lang.Float.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.Integer.class);
+ throw new AssertionError("Class.asSubclass(java.lang.Integer.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.Long.class);
+ throw new AssertionError("Class.asSubclass(java.lang.Long.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.Short.class);
+ throw new AssertionError("Class.asSubclass(java.lang.Short.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.String.class);
+ throw new AssertionError("Class.asSubclass(java.lang.String.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.StringBuffer.class);
+ throw new AssertionError("Class.asSubclass(java.lang.StringBuffer.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.lang.StringBuilder.class);
+ throw new AssertionError("Class.asSubclass(java.lang.StringBuilder.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.awt.Color.class);
+ throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.awt.Font.class);
+ throw new AssertionError("Class.asSubclass(java.awt.Font.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(java.awt.Image.class);
+ throw new AssertionError("Class.asSubclass(java.awt.Image.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(javax.swing.JPanel.class);
+ throw new AssertionError("Class.asSubclass(javax.swing.JPanel.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(javax.swing.JColorChooser.class);
+ throw new AssertionError("Class.asSubclass(javax.swing.JColorChooser.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(javax.swing.JScrollBar.class);
+ throw new AssertionError("Class.asSubclass(javax.swing.JScrollBar.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ try {
+ this.simpleBindingsClass.asSubclass(javax.swing.JSlider.class);
+ throw new AssertionError("Class.asSubclass(javax.swing.JSlider.class) does not throw any exception");
+ }
+ catch (Exception e) {
+ // expected exception
+ }
+
+ }
+
+ /**
* Test for method javax.script.SimpleBindings.getClass().cast()
*/
protected void testCast() {
More information about the distro-pkg-dev
mailing list