diff options
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 |
