summaryrefslogtreecommitdiff
path: root/examples/01-struct/output
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-14 18:16:29 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-14 18:16:29 +0100
commitc6a36e1b4a999a84b681eb0c53cadb2057e37f08 (patch)
treea3852338daa9b40d0f4631385b29fa3e8d1b0198 /examples/01-struct/output
parent3ef6836c6f18ac46b1e42e356ef75417577b36c7 (diff)
Convert example 01-struct to use java-junit
Diffstat (limited to 'examples/01-struct/output')
-rw-r--r--examples/01-struct/output/java-junit/.gitignore (renamed from examples/01-struct/output/java/.gitignore)0
l---------examples/01-struct/output/java-junit/pom.xml1
-rw-r--r--examples/01-struct/output/java-junit/src/test/java/org/zwobble/example/PointTests.java16
-rw-r--r--examples/01-struct/output/java/pom.xml48
-rw-r--r--examples/01-struct/output/java/src/main/java/org/zwobble/example/Main.java11
5 files changed, 17 insertions, 59 deletions
diff --git a/examples/01-struct/output/java/.gitignore b/examples/01-struct/output/java-junit/.gitignore
index ff511d4..ff511d4 100644
--- a/examples/01-struct/output/java/.gitignore
+++ b/examples/01-struct/output/java-junit/.gitignore
diff --git a/examples/01-struct/output/java-junit/pom.xml b/examples/01-struct/output/java-junit/pom.xml
new file mode 120000
index 0000000..445fa65
--- /dev/null
+++ b/examples/01-struct/output/java-junit/pom.xml
@@ -0,0 +1 @@
+../../../templates/java-junit/pom.xml \ No newline at end of file
diff --git a/examples/01-struct/output/java-junit/src/test/java/org/zwobble/example/PointTests.java b/examples/01-struct/output/java-junit/src/test/java/org/zwobble/example/PointTests.java
new file mode 100644
index 0000000..18a1961
--- /dev/null
+++ b/examples/01-struct/output/java-junit/src/test/java/org/zwobble/example/PointTests.java
@@ -0,0 +1,16 @@
+package org.zwobble.example;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import org.junit.jupiter.api.Test;
+import org.zwobble.example.types.point.Point;
+
+public class PointTests {
+ @Test
+ public void pointFields() {
+ Point point = new Point(10, 25);
+ int x = point.x();
+ int y = point.y();
+ assertEquals(x, 10);
+ assertEquals(y, 25);
+ }
+}
diff --git a/examples/01-struct/output/java/pom.xml b/examples/01-struct/output/java/pom.xml
deleted file mode 100644
index 7f892e1..0000000
--- a/examples/01-struct/output/java/pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.zwobble.hobgoblin.examples</groupId>
- <artifactId>example</artifactId>
- <version>1.0-SNAPSHOT</version>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>25</maven.compiler.source>
- <maven.compiler.target>25</maven.compiler.target>
- <exec.mainClass>org.zwobble.example.Main</exec.mainClass>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.zwobble.precisely</groupId>
- <artifactId>precisely</artifactId>
- <version>0.1.5</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>3.6.1</version>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src/gen/java</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/examples/01-struct/output/java/src/main/java/org/zwobble/example/Main.java b/examples/01-struct/output/java/src/main/java/org/zwobble/example/Main.java
deleted file mode 100644
index 5a48480..0000000
--- a/examples/01-struct/output/java/src/main/java/org/zwobble/example/Main.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.zwobble.example;
-
-import org.zwobble.example.types.point.Point;
-
-public class Main {
- public static void main() {
- Point point = new Point(10, 25);
- int x = point.x();
- int y = point.y();
- }
-}