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 Jun 8, 2024
1 parent b9ab640 commit 8c7df45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ 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 "Invalid value for julia_package option:" translate_simple_proto("""syntax = "proto3"; option julia_package = "Foo/Bar/Baz";""", Options(always_use_modules=false))
end

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

0 comments on commit 8c7df45

Please sign in to comment.