Browse Source

Negativ Test für Binärrechner hinzugefügt

remotes/origin/JaFi
jannisfingerhut 2 years ago
parent
commit
5a7125fecb
  1. 9
      LernProgramm/testProgramm.java
  2. BIN
      bin/LernProgramm/testProgramm.class

9
LernProgramm/testProgramm.java

@ -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);
}
}
} }

BIN
bin/LernProgramm/testProgramm.class

Loading…
Cancel
Save