aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/shedlang/compiler/backends/ExampleTests.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/java/org/shedlang/compiler/backends/ExampleTests.java b/src/test/java/org/shedlang/compiler/backends/ExampleTests.java
index 551e553b..f3903746 100644
--- a/src/test/java/org/shedlang/compiler/backends/ExampleTests.java
+++ b/src/test/java/org/shedlang/compiler/backends/ExampleTests.java
@@ -5,6 +5,7 @@ import org.junit.jupiter.api.TestFactory;
import org.shedlang.compiler.ShedCompiler;
import org.shedlang.compiler.backends.llvm.ExecutionResult;
import org.shedlang.compiler.config.ProjectConfig;
+import org.shedlang.compiler.errors.SourceError;
import org.shedlang.compiler.filesystem.ShedCompilerFiles;
import org.shedlang.compiler.testing.TestProcessRunner;
import org.shedlang.compiler.util.P;
@@ -29,7 +30,14 @@ public abstract class ExampleTests {
() -> {
var backend = backend();
var compiler = new ShedCompiler();
- compiler.compile(exampleDirectory.toPath(), backend);
+
+ try {
+ compiler.compile(exampleDirectory.toPath(), backend);
+ } catch (SourceError error) {
+ System.err.println(error.getSource().describe());
+ throw error;
+ }
+
var config = ProjectConfig.read(exampleDirectory.toPath());
for (var example : config.examples()) {