diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-03-21 13:01:34 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-03-21 13:01:34 +0000 |
| commit | f1aa04299d193826643bf6b3da37901b7de4b4b2 (patch) | |
| tree | d02e6386cd2cd8b5caf97610d2389968e6b4a7e4 /src/test/java | |
| parent | 99d37eb1f20e0c7fdcbc4bf42a25b94b33b5f793 (diff) | |
Serialize Patio exception type definition to protobuf
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/patio/protobuf/PatioToProtobufTests.java | 12 |
1 files changed, 12 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 30ee7f56..25054ae2 100644 --- a/src/test/java/org/shedlang/compiler/patio/protobuf/PatioToProtobufTests.java +++ b/src/test/java/org/shedlang/compiler/patio/protobuf/PatioToProtobufTests.java @@ -66,6 +66,18 @@ public class PatioToProtobufTests { assertThat(deserializedElement, equalTo(element)); } + @Test + public void canSerializeExceptionTypeDefinition() { + var element = Patio.exceptionTypeDefinition("Error", PatioTypes.INT); + + var deserializedElement = PatioToProtobuf.deserializeCompilationUnitElement( + PatioToProtobuf.serializeCompilationUnitElement(element, Sources.NULL), + Sources.NULL + ); + + assertThat(deserializedElement, equalTo(element)); + } + // == Data ptr values == @Test |
