Skip to content

Commit

Permalink
Add error test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkn committed Jan 21, 2025
1 parent ffcab2c commit 036af25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ end
s, p, ctx = translate_simple_proto("""syntax = "proto3"; option julia_package = "Foo.Bar.Baz";""", Options(always_use_modules=false))
@test "Foo.Bar.Baz" == p.preamble.options["julia_package"]
@test ["Foo", "Bar", "Baz"] == namespace(p)

@test_throws ErrorException begin
translate_simple_proto("""syntax = "proto3"; option julia_package = "Foo/Bar/Baz";""", Options(always_use_modules=false))
end
end

@testset "`force_required` option makes optional fields required" begin
Expand Down

0 comments on commit 036af25

Please sign in to comment.