@@ -124,6 +124,7 @@ private void assertContainsNumericEnum(final String generatedRust)
124
124
"pub enum ENUM {\n " +
125
125
" Value1 = 1u8,\n " +
126
126
" Value10 = 10u8,\n " +
127
+ " NullVal = 255u8,\n " +
127
128
"}\n " ;
128
129
assertTrue (generatedRust .contains (expectedDeclaration ));
129
130
}
@@ -144,6 +145,7 @@ public void fullGenerateBroadUseCase() throws IOException, InterruptedException
144
145
"pub enum BooleanType {\n " +
145
146
" F = 0u8,\n " +
146
147
" T = 1u8,\n " +
148
+ " NullVal = 255u8,\n " +
147
149
"}\n " ;
148
150
assertTrue (generatedRust .contains (expectedBooleanTypeDeclaration ));
149
151
final String expectedCharTypeDeclaration =
@@ -153,6 +155,7 @@ public void fullGenerateBroadUseCase() throws IOException, InterruptedException
153
155
" A = 65i8,\n " +
154
156
" B = 66i8,\n " +
155
157
" C = 67i8,\n " +
158
+ " NullVal = 0i8,\n " +
156
159
"}\n " ;
157
160
assertTrue (generatedRust .contains (expectedCharTypeDeclaration ));
158
161
assertRustBuildable (generatedRust , Optional .of ("example-schema" ));
@@ -283,6 +286,7 @@ public void constantEnumFields() throws IOException, InterruptedException
283
286
" A = 65i8,\n " +
284
287
" B = 66i8,\n " +
285
288
" C = 67i8,\n " +
289
+ " NullVal = 0i8,\n " +
286
290
"}\n " ;
287
291
assertContains (rust , expectedCharTypeDeclaration );
288
292
assertContains (rust , "pub struct ConstantEnumsFields {\n }" );
@@ -313,6 +317,7 @@ public void constantFieldsCase() throws IOException, InterruptedException
313
317
" A = 65i8,\n " +
314
318
" B = 66i8,\n " +
315
319
" C = 67i8,\n " +
320
+ " NullVal = 0i8,\n " +
316
321
"}\n " ;
317
322
assertContains (rust , expectedCharTypeDeclaration );
318
323
final String expectedComposite =
0 commit comments