# HG changeset patch # User Pavel Tisnovsky # Date 1390996137 -3600 # Node ID a0ecef720764a978805bdd4208393dd4c2803008 # Parent 73503cadcb15f676a9b410de1d1fb05b0481faaf Enhancement of the test testGetResourceAsStreamNegativeTest. diff -r 73503cadcb15 -r a0ecef720764 ChangeLog --- a/ChangeLog Tue Jan 28 10:47:26 2014 +0100 +++ b/ChangeLog Wed Jan 29 12:48:57 2014 +0100 @@ -1,3 +1,8 @@ +2014-01-29 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleBindingsClassTest.java: + Enhancement of the test testGetResourceAsStreamNegativeTest. + 2014-01-28 Pavel Tisnovsky * src/org/RhinoTests/ScriptEngineManagerClassTest.java: diff -r 73503cadcb15 -r a0ecef720764 src/org/RhinoTests/SimpleBindingsClassTest.java --- a/src/org/RhinoTests/SimpleBindingsClassTest.java Tue Jan 28 10:47:26 2014 +0100 +++ b/src/org/RhinoTests/SimpleBindingsClassTest.java Wed Jan 29 12:48:57 2014 +0100 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011, 2012, 2013 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. @@ -1468,6 +1468,214 @@ } try { + this.simpleBindingsClass.asSubclass(java.awt.Label.class); + throw new AssertionError("Class.asSubclass(java.awt.Label.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.awt.List.class); + throw new AssertionError("Class.asSubclass(java.awt.List.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.awt.Menu.class); + throw new AssertionError("Class.asSubclass(java.awt.Menu.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.File.class); + throw new AssertionError("Class.asSubclass(java.io.File.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.Reader.class); + throw new AssertionError("Class.asSubclass(java.io.Reader.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.Writer.class); + throw new AssertionError("Class.asSubclass(java.io.Writer.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.StringReader.class); + throw new AssertionError("Class.asSubclass(java.io.StringReader.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.StringWriter.class); + throw new AssertionError("Class.asSubclass(java.io.StringWriter.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.InputStream.class); + throw new AssertionError("Class.asSubclass(java.io.InputStream.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.OutputStream.class); + throw new AssertionError("Class.asSubclass(java.io.OutputStream.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.ObjectInputStream.class); + throw new AssertionError("Class.asSubclass(java.io.ObjectInputStream.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.io.ObjectOutputStream.class); + throw new AssertionError("Class.asSubclass(java.io.ObjectOutputStream.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.math.BigDecimal.class); + throw new AssertionError("Class.asSubclass(java.math.BigDecimal.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.math.BigInteger.class); + throw new AssertionError("Class.asSubclass(java.math.BigInteger.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.ArrayList.class); + throw new AssertionError("Class.asSubclass(java.util.ArrayList.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.LinkedList.class); + throw new AssertionError("Class.asSubclass(java.util.LinkedList.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.HashMap.class); + throw new AssertionError("Class.asSubclass(java.util.HashMap.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.TreeMap.class); + throw new AssertionError("Class.asSubclass(java.util.TreeMap.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.HashSet.class); + throw new AssertionError("Class.asSubclass(java.util.HashSet.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.TreeSet.class); + throw new AssertionError("Class.asSubclass(java.util.TreeSet.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.Stack.class); + throw new AssertionError("Class.asSubclass(java.util.Stack.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.Vector.class); + throw new AssertionError("Class.asSubclass(java.util.Vector.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.Hashtable.class); + throw new AssertionError("Class.asSubclass(java.util.Hashtable.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.Calendar.class); + throw new AssertionError("Class.asSubclass(java.util.Calendar.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.Arrays.class); + throw new AssertionError("Class.asSubclass(java.util.Arrays.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.simpleBindingsClass.asSubclass(java.util.Collections.class); + throw new AssertionError("Class.asSubclass(java.util.Collections.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"); } @@ -1554,6 +1762,14 @@ } try { + this.simpleBindingsClass.cast(Character.valueOf('a')); + throw new AssertionError("Class.cast(Character.valueOf('a')) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { this.simpleBindingsClass.cast(Byte.valueOf((byte)42)); throw new AssertionError("Class.cast(Byte.valueOf((byte)42)) does not throw any exception"); }