summaryrefslogtreecommitdiff
path: root/examples/10-transient-0/output/java-junit/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/10-transient-0/output/java-junit/src')
-rw-r--r--examples/10-transient-0/output/java-junit/src/test/java/org/zwobble/example/Transient0Tests.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/10-transient-0/output/java-junit/src/test/java/org/zwobble/example/Transient0Tests.java b/examples/10-transient-0/output/java-junit/src/test/java/org/zwobble/example/Transient0Tests.java
index 232ecf1..09a23a3 100644
--- a/examples/10-transient-0/output/java-junit/src/test/java/org/zwobble/example/Transient0Tests.java
+++ b/examples/10-transient-0/output/java-junit/src/test/java/org/zwobble/example/Transient0Tests.java
@@ -7,6 +7,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.zwobble.example.types.data.HobgoblinTransient0Data;
import org.zwobble.example.types.data.StructWithInt32;
+import org.zwobble.example.types.data.StructWithInt64;
public class Transient0Tests {
@Test
@@ -22,4 +23,18 @@ public class Transient0Tests {
Assertions.assertEquals(value, decodedValue);
}
+
+ @Test
+ public void structWithInt64() throws IOException {
+ var value = new StructWithInt64(10, 25);
+
+ var outputStream = new ByteArrayOutputStream();
+ HobgoblinTransient0Data.encodeStructWithInt64(value, outputStream);
+ var bytes = outputStream.toByteArray();
+
+ var inputStream = new ByteArrayInputStream(bytes);
+ var decodedValue = HobgoblinTransient0Data.decodeStructWithInt64(inputStream);
+
+ Assertions.assertEquals(value, decodedValue);
+ }
}