(t *testing.T)
| 489 | } |
| 490 | |
| 491 | func TestLoadWithStandalone(t *testing.T) { |
| 492 | reg := NewRegistry() |
| 493 | reg.SetStandalone(true) |
| 494 | loadFile(t, reg, ` |
| 495 | name: 'example.proto' |
| 496 | package: 'example' |
| 497 | options < go_package: 'example.com/xyz;pb' > |
| 498 | `) |
| 499 | file := reg.files["example.proto"] |
| 500 | if file == nil { |
| 501 | t.Errorf("reg.files[%q] = nil; want non-nil", "example.proto") |
| 502 | return |
| 503 | } |
| 504 | wantPkg := GoPackage{Path: "example.com/xyz", Name: "pb", Alias: "extPb"} |
| 505 | if got, want := file.GoPkg, wantPkg; got != want { |
| 506 | t.Errorf("file.GoPkg = %#v; want %#v", got, want) |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | func TestUnboundExternalHTTPRules(t *testing.T) { |
| 511 | reg := NewRegistry() |
nothing calls this directly
no test coverage detected