forked from JavaTX/JavaCompilerCore
-AndOperator erweitert
This commit is contained in:
parent
5a7c2310a1
commit
8bad95f774
@ -29,4 +29,25 @@ public class AddOperatorTest extends SourceFileBytecodeTest{
|
||||
Object obj = cls.newInstance();
|
||||
assertTrue(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTwoIntegers() throws Exception{
|
||||
ClassLoader classLoader = getClassLoader();
|
||||
|
||||
Class cls = classLoader.loadClass(testName);
|
||||
|
||||
Object obj = cls.newInstance();
|
||||
|
||||
Integer x = new Integer(1);
|
||||
Integer y = new Integer(2);
|
||||
|
||||
Class[] params = new Class[]{
|
||||
x.getClass(),
|
||||
y.getClass(),
|
||||
};
|
||||
|
||||
Method method = cls.getDeclaredMethod("method", params);
|
||||
Integer returnValue = (Integer) method.invoke(obj, x, y);
|
||||
assertEquals(new Integer(3), returnValue);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user