(t *testing.T, testSuite *conformancepb.TestSuite)
| 637 | } |
| 638 | |
| 639 | func (tr *TestRunner) createTestsFromTextproto(t *testing.T, testSuite *conformancepb.TestSuite) ([]*Test, error) { |
| 640 | var tests []*Test |
| 641 | for _, section := range testSuite.GetSections() { |
| 642 | sectionName := section.GetName() |
| 643 | for _, testCase := range section.GetTests() { |
| 644 | testName := fmt.Sprintf("%s/%s", sectionName, testCase.GetName()) |
| 645 | testInput, err := tr.createTestInputFromPB(t, testCase) |
| 646 | if err != nil { |
| 647 | return nil, err |
| 648 | } |
| 649 | testResultMatcher, err := tr.createResultMatcherFromPB(t, testCase) |
| 650 | if err != nil { |
| 651 | return nil, err |
| 652 | } |
| 653 | tests = append(tests, NewTest(testName, testInput, testResultMatcher)) |
| 654 | } |
| 655 | } |
| 656 | return tests, nil |
| 657 | } |
| 658 | |
| 659 | func (tr *TestRunner) createTestInputFromPB(t *testing.T, testCase *conformancepb.TestCase) (cel.PartialActivation, error) { |
| 660 | t.Helper() |
no test coverage detected