mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-26 17:18:04 +00:00
fixed some more tests
This commit is contained in:
parent
82f62667ec
commit
04a84806b1
@ -15,11 +15,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
*/
|
||||
public class CallVariableOutsideScope {
|
||||
|
||||
@BeforeEach
|
||||
public void dontPrintAnything() {
|
||||
System.setOut(null);
|
||||
}
|
||||
|
||||
// Having a variable declared inside an Else-block and trying to call it outside the block.
|
||||
@Test
|
||||
public void CallVariableOutsideScopeOfElse() {
|
||||
@ -55,9 +50,4 @@ public class CallVariableOutsideScope {
|
||||
public void CallVariableOutsideScopeOfWhile() {
|
||||
assertThrows(Exception.class, () -> Compiler.generateByteCodeArrayFromFiles(List.of("src/test/testFiles/Negative/CallVariableOutsideScope/OfWhile.java")));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void printNormal() {
|
||||
System.setOut(System.out);
|
||||
}
|
||||
}
|
||||
|
@ -15,11 +15,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
*/
|
||||
public class ForbiddenParticularitiesInImplementation {
|
||||
|
||||
@BeforeEach
|
||||
public void dontPrintAnything() {
|
||||
System.setOut(null);
|
||||
}
|
||||
|
||||
// Using any access modifier other than public
|
||||
@Test
|
||||
public void ForbiddenParticularitiesInImplementationAccessModifier() {
|
||||
@ -75,9 +70,4 @@ public class ForbiddenParticularitiesInImplementation {
|
||||
"src/test/testFiles/Negative/ForbiddenParticularitiesInImplementation/" +
|
||||
"UsingSystemOut.java")));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void printNormal() {
|
||||
System.setOut(System.out);
|
||||
}
|
||||
}
|
||||
|
@ -16,11 +16,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
*/
|
||||
public class MissingComponents {
|
||||
|
||||
@BeforeEach
|
||||
public void dontPrintAnything() {
|
||||
System.setOut(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void MissingComponentsBraceInClass() {
|
||||
assertThrows(Exception.class, () -> {
|
||||
@ -308,9 +303,4 @@ public class MissingComponents {
|
||||
"src/test/testFiles/Negative/MissingComponents/Return.java"));
|
||||
});
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void printNormal() {
|
||||
System.setOut(System.out);
|
||||
}
|
||||
}
|
||||
|
@ -11,11 +11,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class UsingSameName {
|
||||
|
||||
@BeforeEach
|
||||
public void dontPrintAnything() {
|
||||
System.setOut(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void UsingSameNameForParameterAndVariable() {
|
||||
assertThrows(Exception.class, () -> Compiler.generateByteCodeArrayFromFiles(List.of(
|
||||
@ -33,9 +28,4 @@ public class UsingSameName {
|
||||
assertThrows(Exception.class, () -> Compiler.generateByteCodeArrayFromFiles(List.of(
|
||||
"src/test/testFiles/Negative/UsingSameName/ForTwoVariables.java")));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void printNormal() {
|
||||
System.setOut(System.out);
|
||||
}
|
||||
}
|
||||
|
@ -11,11 +11,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class WrongType {
|
||||
|
||||
@BeforeEach
|
||||
public void dontPrintAnything() {
|
||||
System.setOut(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void WrongTypeCheckTypeDifferencesBetweenBoolAndChar() {
|
||||
assertThrows(Exception.class, () -> Compiler.generateByteCodeArrayFromFiles(List.of(
|
||||
@ -304,9 +299,4 @@ public class WrongType {
|
||||
assertThrows(Exception.class, () -> Compiler.generateByteCodeArrayFromFiles(List.of(
|
||||
"src/test/testFiles/Negative/WrongType/InReturnStatementWithinVoidMethod.java")));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void printNormal() {
|
||||
System.setOut(System.out);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user