summaryrefslogtreecommitdiff
path: root/examples/10-transient-0/output/java/src
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-24 14:56:52 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-24 14:56:52 +0100
commitd9374240857b256f66e9d3f84e1bf4747761ed1f (patch)
tree6d09858d0a1b47800e4fb7020ac92247218577dc /examples/10-transient-0/output/java/src
parent726791a4d40ffdf940c5882e2700e60dff594de3 (diff)
Replace OuterStruct with StructWithStruct
Diffstat (limited to 'examples/10-transient-0/output/java/src')
-rw-r--r--examples/10-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/examples/10-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java b/examples/10-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java
index e28e926..2ab3934 100644
--- a/examples/10-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java
+++ b/examples/10-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java
@@ -11,14 +11,13 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.zwobble.example.types.data.EnumWithVariants;
import org.zwobble.example.types.data.HobgoblinTransient0Data;
-import org.zwobble.example.types.data.InnerStruct;
-import org.zwobble.example.types.data.OuterStruct;
import org.zwobble.example.types.data.StructWithBool;
import org.zwobble.example.types.data.StructWithInt32;
import org.zwobble.example.types.data.StructWithInt64;
import org.zwobble.example.types.data.StructWithList;
import org.zwobble.example.types.data.StructWithOption;
import org.zwobble.example.types.data.StructWithString;
+import org.zwobble.example.types.data.StructWithStruct;
import org.zwobble.example.types.data.VariantOne;
import org.zwobble.example.types.data.VariantTwo;
@@ -68,13 +67,13 @@ public class Transient0Tests {
}
@Test
- public void nestedStruct() throws IOException {
- var value = new OuterStruct(new InnerStruct(10, 25), 42);
+ public void structWithStruct() throws IOException {
+ var value = new StructWithStruct(new StructWithInt32(10, 25), 42);
assertRoundTripEncoding(
value,
- HobgoblinTransient0Data::encodeOuterStruct,
- HobgoblinTransient0Data::decodeOuterStruct
+ HobgoblinTransient0Data::encodeStructWithStruct,
+ HobgoblinTransient0Data::decodeStructWithStruct
);
}
@@ -83,9 +82,9 @@ public class Transient0Tests {
var value = new StructWithList(
List.of(10L, 25L),
List.of(
- new InnerStruct(42, 47),
- new InnerStruct(52, 57),
- new InnerStruct(62, 67)
+ new StructWithInt32(42, 47),
+ new StructWithInt32(52, 57),
+ new StructWithInt32(62, 67)
)
);
@@ -114,7 +113,7 @@ public class Transient0Tests {
public void structWithOptionSome() throws IOException {
var value = new StructWithOption(
Optional.of(10L),
- Optional.of(new InnerStruct(42, 47))
+ Optional.of(new StructWithInt32(42, 47))
);
assertRoundTripEncoding(