Skip to content

Commit a6577ca

Browse files
committed
add test for empty struct with common type
1 parent 4fc230d commit a6577ca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test_codegen.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,13 @@ end
312312
"""
313313
end
314314

315+
@testset "Empty struct with common abstract type" begin
316+
s, p, ctx = translate_simple_proto("message A { }", Options(always_use_modules=false, common_abstract_type=true))
317+
@test generate_struct_str(p.definitions["A"], ctx) == """
318+
struct A <: AbstractProtoBufMessage end
319+
"""
320+
end
321+
315322
@testset "OneOf field codegen" begin
316323
s, p, ctx = translate_simple_proto("message A { oneof a { int32 b = 1; } }", Options(parametrize_oneofs=true))
317324
@test occursin("""

0 commit comments

Comments
 (0)