This commit is contained in:
JonathanFleischmann 2024-07-04 19:22:07 +02:00
parent 83942b2c05
commit de19d19108
3 changed files with 7 additions and 7 deletions

View File

@ -167,7 +167,7 @@ public class E2E_Main {
Assertions.assertNull(returnValue);
Assertions.assertEquals(3, byteArrayOutputStream.toString().length());
// durch die newline wird die Ausgabe um 2 Zeichen länger
Assertions.assertEquals("3", byteArrayOutputStream.toString().substring(0, byteArrayOutputStream.toString().length() - 2));
Assertions.assertEquals("3", byteArrayOutputStream.toString().substring(0, 1));
System.setOut(originalOut);
} catch (Exception e) {
Assertions.fail();

View File

@ -143,7 +143,7 @@ public class E2E_Print {
Assertions.assertNull(returnValue);
Assertions.assertEquals(3, byteArrayOutputStream.toString().length());
// durch die newline wird die Ausgabe um 2 Zeichen länger
Assertions.assertEquals("a", byteArrayOutputStream.toString().substring(0, byteArrayOutputStream.toString().length() - 2));
Assertions.assertEquals("a", byteArrayOutputStream.toString().substring(0, 1));
System.setOut(originalOut);
} catch (Exception e) {
Assertions.fail();
@ -165,7 +165,7 @@ public class E2E_Print {
Assertions.assertNull(returnValue);
Assertions.assertEquals(6, byteArrayOutputStream.toString().length());
// durch die newline wird die Ausgabe um 2 Zeichen länger
Assertions.assertEquals("true", byteArrayOutputStream.toString().substring(0, byteArrayOutputStream.toString().length() - 2));
Assertions.assertEquals("true", byteArrayOutputStream.toString().substring(0, 4));
System.setOut(originalOut);
} catch (Exception e) {
Assertions.fail();

View File

@ -64,7 +64,7 @@ public class AllFeaturesInOne {
}
}
if (withSpaceBetweenSteps) {
print(' ');
print('L');
}
numberOfLetter = (numberOfLetter + 1) % 3;
int sum = number1 + number2;
@ -89,7 +89,7 @@ public class AllFeaturesInOne {
print(this.letter3);
}
}
print(' ');
print('L');
numberOfLetter = (numberOfLetter + 1) % 3;
int number2OldValue = number2;
number2 *= number1;
@ -115,7 +115,7 @@ public class AllFeaturesInOne {
while (numberOfRepititions > 0) {
numberOfRepetitionsWithoutSkip++;
if (numberOfRepetitionsWithoutSkip == y) {
System.out.println(" ");
print('');
numberOfRepetitionsWithoutSkip = 0;
} else {
if (numberOfLetter == 0) {
@ -139,7 +139,7 @@ public class AllFeaturesInOne {
for (int i = 0; i < x; i++) {
repititionsAbs++;
if (repititionsAbs % y == 0) {
print(' ');
print('L');
continue;
}
if (numberOfLetter == 0) {