Mercurial > hg > rhino-tests
changeset 288:3acd83bfaf58 draft
Added new testGetResourceNPETest case into CompilableClassTest.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Wed, 11 Dec 2013 10:50:25 +0100 |
parents | 78d18ecc53b9 |
children | 5b5d51120f71 |
files | ChangeLog src/org/RhinoTests/CompilableClassTest.java |
diffstat | 2 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Dec 10 12:05:00 2013 +0100 +++ b/ChangeLog Wed Dec 11 10:50:25 2013 +0100 @@ -1,3 +1,9 @@ +2013-12-11 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/CompilableClassTest.java: + Added new testGetResourceNPETest case into + CompilableClassTest. + 2013-12-10 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/ScriptContextClassTest.java:
--- a/src/org/RhinoTests/CompilableClassTest.java Tue Dec 10 12:05:00 2013 +0100 +++ b/src/org/RhinoTests/CompilableClassTest.java Wed Dec 11 10:50:25 2013 +0100 @@ -1495,6 +1495,19 @@ } /** + * Test for method javax.script.Compilable.getClass().getResourceAsStreamNPETest() + */ + protected void testGetResourceAsStreamNPETest() { + try { + Object resource = this.compilableClass.getResourceAsStream(null); + throw new AssertionError("NullPointerException expected!"); + } + catch (NullPointerException e) { + //This is OK OK + } + } + + /** * Test for instanceof operator applied to a class javax.script.Compilable */ @SuppressWarnings("cast")