diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-03-21 12:45:59 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-03-21 12:45:59 +0000 |
| commit | f0e1c8c32732ea37e508fae3ff5d5cf085042733 (patch) | |
| tree | 4d858208ee4ad8d269de0be9f5a1da7bfbd027c8 /src/test/java | |
| parent | bef5f2a093007b4554c1746d1af550b64272dd34 (diff) | |
Serialize Patio mutable data element declaration
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/patio/protobuf/PatioToProtobufTests.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/java/org/shedlang/compiler/patio/protobuf/PatioToProtobufTests.java b/src/test/java/org/shedlang/compiler/patio/protobuf/PatioToProtobufTests.java index ceb14468..6aac1e0e 100644 --- a/src/test/java/org/shedlang/compiler/patio/protobuf/PatioToProtobufTests.java +++ b/src/test/java/org/shedlang/compiler/patio/protobuf/PatioToProtobufTests.java @@ -34,6 +34,21 @@ public class PatioToProtobufTests { assertThat(deserializedElement, equalTo(element)); } + @Test + public void canSerializeDataElementMutableDeclaration() { + var element = Patio.dataElementMutableDeclaration( + "x", + PatioDataLayouts.INT + ); + + var deserializedElement = PatioToProtobuf.deserializeCompilationUnitElement( + PatioToProtobuf.serializeCompilationUnitElement(element, Sources.NULL), + Sources.NULL + ); + + assertThat(deserializedElement, equalTo(element)); + } + // == Data ptr values == @Test |
