Move test resources

This commit is contained in:
Mike Cifelli 2018-03-17 14:37:02 -04:00
parent 60e348449b
commit b67071a7f2
12 changed files with 10 additions and 10 deletions

View File

@ -99,7 +99,7 @@ public class MainTest extends SymbolAndFunctionCleaner {
@Test
public void runWithBadFile() {
String expectedMessage = "[critical] src/test/application/test-files/bad.lisp (No such file or directory)";
String expectedMessage = "[critical] src/test/resources/application/bad.lisp (No such file or directory)";
exit.expectSystemExitWithStatus(1);
exit.checkAssertionAfterwards(() -> {
@ -107,12 +107,12 @@ public class MainTest extends SymbolAndFunctionCleaner {
assertEquals("", getSystemOutLog());
});
runInterpreterWithFile("src/test/application/test-files/bad.lisp");
runInterpreterWithFile("src/test/resources/application/bad.lisp");
}
@Test
public void runWithFile_PrintsDecoratedLastValueOnly() {
runInterpreterWithFile("src/test/application/test-files/file.lisp");
runInterpreterWithFile("src/test/resources/application/file.lisp");
assertEquals("", getSystemErrLog());
assertEquals(format("{0}{1}{2}\n\n", ANSI_GREEN, "RADISH", ANSI_RESET), getSystemOutLog());
@ -136,7 +136,7 @@ public class MainTest extends SymbolAndFunctionCleaner {
@Test
public void runMain() {
LispMain.main(new String[] { "src/test/application/test-files/file.lisp" });
LispMain.main(new String[] { "src/test/resources/application/file.lisp" });
assertEquals("", getSystemErrLog());
assertEquals(format("{0}{1}{2}\n\n", ANSI_GREEN, "RADISH", ANSI_RESET), getSystemOutLog());

View File

@ -70,7 +70,7 @@ public class LOADTest extends SymbolAndFunctionCleaner {
@Test
public void loadGoodFile_ReturnsTAndPrintsNothing() {
String input = "(load \"src/test/function/builtin/test-files/load-good.lisp\")";
String input = "(load \"src/test/resources/function/builtin/load-good.lisp\")";
assertT(evaluateString(input));
assertNothingPrinted();
@ -78,7 +78,7 @@ public class LOADTest extends SymbolAndFunctionCleaner {
@Test
public void loadBadFile_ReturnsNilAndPrintsError() {
String input = "(load \"src/test/function/builtin/test-files/load-bad.lisp\")";
String input = "(load \"src/test/resources/function/builtin/load-bad.lisp\")";
assertNil(evaluateString(input));
assertErrorMessagePrinted();
@ -94,7 +94,7 @@ public class LOADTest extends SymbolAndFunctionCleaner {
@Test
public void nestedLoadsInTheSameDirectory() {
String input = "(load \"src/test/function/builtin/test-files/nested/nested.lisp\")";
String input = "(load \"src/test/resources/function/builtin/nested/nested.lisp\")";
assertT(evaluateString(input));
assertNothingPrinted();
@ -102,7 +102,7 @@ public class LOADTest extends SymbolAndFunctionCleaner {
@Test
public void nestedLoadsInDifferentDirectories() {
String input = "(load \"src/test/function/builtin/test-files/nested/one/load-one.lisp\")";
String input = "(load \"src/test/resources/function/builtin/nested/one/load-one.lisp\")";
assertT(evaluateString(input));
assertNothingPrinted();
@ -125,7 +125,7 @@ public class LOADTest extends SymbolAndFunctionCleaner {
@Test
public void loadUsesRuntimePath() {
environment.setPath("src/test/function/builtin/test-files/nested/one/");
environment.setPath("src/test/resources/function/builtin/nested/one/");
String input = "(load \"load-one.lisp\")";
assertT(evaluateString(input));

View File

@ -165,7 +165,7 @@ public class LispInterpreterTest {
@Test
public void fileBasedInterpreterWorks_PrintsLastValueOnly() {
setCommonFeatures();
builder.useFile("src/test/interpreter/test-files/file.lisp");
builder.useFile("src/test/resources/interpreter/file.lisp");
builder.build().interpret();
assertEquals("PICKLE\n\n", outputStream.toString());