FileDescriptorSet creates a Test Runner Option which adds a file descriptor set to the test runner. The file descriptor set is used to register proto messages in the global proto registry.
(path string)
| 471 | // FileDescriptorSet creates a Test Runner Option which adds a file descriptor set to the test |
| 472 | // runner. The file descriptor set is used to register proto messages in the global proto registry. |
| 473 | func FileDescriptorSet(path string) TestRunnerOption { |
| 474 | return func(tr *TestRunner) (*TestRunner, error) { |
| 475 | if path != "" { |
| 476 | fds, err := fileDescriptorSet(path) |
| 477 | if err != nil { |
| 478 | return nil, err |
| 479 | } |
| 480 | tr.FileDescriptorSet = fds |
| 481 | } |
| 482 | return tr, nil |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | // AddFileDescriptorSetProto creates a Test Runner Option which adds a file descriptor set proto to |
| 487 | // the test runner. The file descriptor set is used to register proto messages in the global proto |