(expectedUnknownIDs, actualUnknownIDs []int64)
| 811 | } |
| 812 | |
| 813 | func compareUnknownIDs(expectedUnknownIDs, actualUnknownIDs []int64) TestResult { |
| 814 | sortOption := cmp.Transformer("Sort", func(in []int64) []int64 { |
| 815 | out := append([]int64{}, in...) |
| 816 | slices.Sort(out) |
| 817 | return out |
| 818 | }) |
| 819 | if diff := cmp.Diff(expectedUnknownIDs, actualUnknownIDs, sortOption); diff != "" { |
| 820 | return TestResult{ |
| 821 | Success: false, |
| 822 | Wanted: fmt.Sprintf("unknown value %v", expectedUnknownIDs), |
| 823 | Error: fmt.Errorf("mismatched test output with diff (-got +want):\n%s", diff)} |
| 824 | } |
| 825 | return TestResult{Success: true} |
| 826 | } |
| 827 | |
| 828 | func refValueToExprValue(refVal ref.Val) (*exprpb.ExprValue, error) { |
| 829 | if types.IsUnknown(refVal) { |
no test coverage detected