Operatoren + und * hinzugefügt in Aufgabe1_Kellerautomat
This commit is contained in:
@@ -6,12 +6,12 @@ class Aufgabe1_KellerautomatTest {
|
||||
|
||||
@Test
|
||||
void calculate() {
|
||||
String[] acceptableWords = {"ZZO", "ZZOZZOO", "ZZZOO"};
|
||||
String[] acceptableWords = {"ZZ+", "ZZ*ZZ+*", "ZZZ*+"};
|
||||
for (String word : acceptableWords) {
|
||||
assertTrue(Aufgabe1_Kellerautomat.calculate(word));
|
||||
}
|
||||
|
||||
String[] notAcceptableWords = {"ZZOO", "ZZOZZO", "ZOZ"};
|
||||
String[] notAcceptableWords = {"ZZ*+", "ZZ+ZZ*", "Z*Z"};
|
||||
for (String word : notAcceptableWords) {
|
||||
assertFalse(Aufgabe1_Kellerautomat.calculate(word));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user