diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-05 10:56:48 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-05 10:58:53 +0100 |
| commit | 727b09bf8fe6c0b9085d2b61d1f8ed5c81b2fdce (patch) | |
| tree | fea6b1f5ed8d79b71227714d4f93c1b22511c818 /examples/10-transient-0/output/java | |
| parent | ddc251ace30b4ca694a006e3cca2375bb2255aed (diff) | |
Use JUnit in Java transient-0 example
Diffstat (limited to 'examples/10-transient-0/output/java')
3 files changed, 0 insertions, 77 deletions
diff --git a/examples/10-transient-0/output/java/.gitignore b/examples/10-transient-0/output/java/.gitignore deleted file mode 100644 index ff511d4..0000000 --- a/examples/10-transient-0/output/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/src/gen/ -/target/ diff --git a/examples/10-transient-0/output/java/pom.xml b/examples/10-transient-0/output/java/pom.xml deleted file mode 100644 index 7f892e1..0000000 --- a/examples/10-transient-0/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/10-transient-0/output/java/src/main/java/org/zwobble/example/Main.java b/examples/10-transient-0/output/java/src/main/java/org/zwobble/example/Main.java deleted file mode 100644 index 155b2a0..0000000 --- a/examples/10-transient-0/output/java/src/main/java/org/zwobble/example/Main.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.zwobble.example; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import org.zwobble.example.types.point.Point; -import org.zwobble.example.types.point.HobgoblinTransient0Point; - -public class Main { - public static void main() throws java.io.IOException { - var point = new Point(10, 25); - - var outputStream = new ByteArrayOutputStream(); - HobgoblinTransient0Point.encode(point, outputStream); - var bytes = outputStream.toByteArray(); - - var inputStream = new ByteArrayInputStream(bytes); - var decodedPoint = HobgoblinTransient0Point.decode(inputStream); - - if (!point.equals(decodedPoint)) { - throw new RuntimeException(String.format( - "encode-decode did not produce identical data\nexpected: %s\nbut was: %s", - point, - decodedPoint - )); - } - } -} |
