From 5071406b3f746a0452d37efb500e8449103996df Mon Sep 17 00:00:00 2001 From: Etienne Zink Date: Thu, 12 May 2022 08:47:46 +0200 Subject: [PATCH] Verbesserung des Tests OLFun2. --- src/test/java/bytecode/OLFun2Test.java | 8 ++++---- src/test/resources/testBytecode/manually/OLFunTest.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/bytecode/OLFun2Test.java b/src/test/java/bytecode/OLFun2Test.java index a38f405b..cf6a38d3 100644 --- a/src/test/java/bytecode/OLFun2Test.java +++ b/src/test/java/bytecode/OLFun2Test.java @@ -47,29 +47,29 @@ public class OLFun2Test { @Test public void mExistsWithIntegerInteger() throws Exception{ Method m = classToTest.getDeclaredMethod("m", classFun1IntInt); - assertEquals(Integer.class, m.getReturnType()); assertNotNull(m); + assertEquals(Integer.class, m.getReturnType()); } @Test public void mExistsWithIntegerDouble() throws Exception{ Method m = classToTest.getDeclaredMethod("m", classFun1IntDouble); - assertEquals(Double.class, m.getReturnType()); assertNotNull(m); + assertEquals(Double.class, m.getReturnType()); } @Test public void mExistsWithDoubleInteger() throws Exception{ Method m = classToTest.getDeclaredMethod("m", classFun1DoubleInt); - assertEquals(Integer.class, m.getReturnType()); assertNotNull(m); + assertEquals(Integer.class, m.getReturnType()); } @Test public void mExistsWithDoubleDouble() throws Exception{ Method m = classToTest.getDeclaredMethod("m", classFun1DoubleDouble); - assertEquals(Double.class, m.getReturnType()); assertNotNull(m); + assertEquals(Double.class, m.getReturnType()); } @AfterClass diff --git a/src/test/resources/testBytecode/manually/OLFunTest.java b/src/test/resources/testBytecode/manually/OLFunTest.java index 6a4f09dd..3e58381e 100644 --- a/src/test/resources/testBytecode/manually/OLFunTest.java +++ b/src/test/resources/testBytecode/manually/OLFunTest.java @@ -4,7 +4,7 @@ public class OLFunTest{ Integer i = olFun2.m((Integer x) -> x); i = olFun2.m((Double x) -> x.intValue()); - Double d = olFun2.m((Integer x) -> (Double) Double.valueOf(x)); + Double d = olFun2.m((Integer x) -> Double.valueOf(x)); d = olFun2.m((Double x) -> x); } } \ No newline at end of file