|
@ -30,5 +30,12 @@ class testProgramm { |
|
|
int result = ProgrammMain.calculate("1010", "1011", '+'); |
|
|
int result = ProgrammMain.calculate("1010", "1011", '+'); |
|
|
assertEquals(10101, result); |
|
|
assertEquals(10101, result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void testSubtraction() { |
|
|
|
|
|
int result = ProgrammMain.calculate("1010", "1011", '-'); |
|
|
|
|
|
result++; |
|
|
|
|
|
if (result <0 || result >0) { |
|
|
|
|
|
assertTrue(true); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |