From f0e1c8c32732ea37e508fae3ff5d5cf085042733 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 21 Mar 2026 12:45:59 +0000 Subject: Serialize Patio mutable data element declaration --- .../compiler/patio/protobuf/PatioToProtobufTests.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/test/java') 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 -- cgit v1.2.3