Skip to content

Commit

Permalink
Update PreparsedScriptTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
jmetertea authored and nickl- committed Jan 7, 2019
1 parent 6a3fd49 commit 7bbd88f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/bsh/PreparsedScriptTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,10 @@ public void testZero() throws Exception {
final PreparsedScript f = new PreparsedScript("return 0 * 2;",_classLoader);
assertEquals(0, f.invoke(Collections.emptyMap()));
}

@Test
public void testZeroFloat() throws Exception {
final PreparsedScript f = new PreparsedScript("double d = 0.0;float f = (float) d; return f * 2;",_classLoader);
assertEquals(0, f.invoke(Collections.emptyMap()));
}
}

0 comments on commit 7bbd88f

Please sign in to comment.