From 9f6c9b42073373b18c8a92a9428f35986effc77b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 26 Apr 2026 18:03:39 +0100 Subject: Hack together basic Java types generator --- .../java/org/zwobble/hobgoblin/compiler/ExampleTests.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/test/java/org') diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/ExampleTests.java b/src/test/java/org/zwobble/hobgoblin/compiler/ExampleTests.java index 8e68c09..fb5cc55 100644 --- a/src/test/java/org/zwobble/hobgoblin/compiler/ExampleTests.java +++ b/src/test/java/org/zwobble/hobgoblin/compiler/ExampleTests.java @@ -2,6 +2,7 @@ package org.zwobble.hobgoblin.compiler; import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.TestFactory; +import org.zwobble.hobgoblin.compiler.output.generators.javatypes.JavaTypesGenerator; import org.zwobble.hobgoblin.compiler.testing.TestProcessRunner; import java.io.IOException; @@ -19,9 +20,15 @@ public class ExampleTests { } private void runTest(ExampleSet exampleSet) throws IOException, InterruptedException { - HobgoblinCompiler.compile(exampleSet.path(), List.of()); - var javaProjectPath = exampleSet.path().resolve("output/java"); + + var javaTypesGenerator = new JavaTypesGenerator( + javaProjectPath.resolve("src/gen/java"), + "org.zwobble.example.types" + ); + var generators = List.of(javaTypesGenerator); + HobgoblinCompiler.compile(exampleSet.path(), generators); + TestProcessRunner.command(List.of("mvn", "compile")) .cwd(javaProjectPath) .runCaptureOutput() -- cgit v1.2.3