Skip to content

Commit

Permalink
test: migrate LoopSniperJavaPrettyPrinterTest to JUnit 5 (#4500)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored Jan 16, 2022
1 parent f31e40e commit fbbc88a
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
package spoon.test.prettyprinter;

import static org.junit.Assert.assertThat;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

import org.apache.commons.io.FileUtils;
import org.hamcrest.CoreMatchers;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import spoon.Launcher;
import spoon.compiler.Environment;
import spoon.processing.AbstractProcessor;
import spoon.reflect.code.CtBlock;
import spoon.reflect.code.CtLoop;
import spoon.support.sniper.SniperJavaPrettyPrinter;

import static org.hamcrest.MatcherAssert.assertThat;

public class LoopSniperJavaPrettyPrinterTest {

private static final Path INPUT_PATH = Paths.get("src/test/java/");
private static final Path OUTPUT_PATH = Paths.get("target/test-output");

@BeforeClass
@BeforeAll
public static void setup() throws IOException {
FileUtils.deleteDirectory(OUTPUT_PATH.toFile());
}
Expand All @@ -43,8 +45,9 @@ public void whileNoBraces() throws IOException {
runSniperJavaPrettyPrinter("spoon/test/prettyprinter/testclasses/loop/WhileNoBraces.java");
}

@Ignore

@Test
@Disabled
public void whileWithBraces() throws IOException {
runSniperJavaPrettyPrinter("spoon/test/prettyprinter/testclasses/loop/WhileWithBraces.java");
}
Expand Down

0 comments on commit fbbc88a

Please sign in to comment.