(t *testing.T, cases []compareTest)
| 13 | } |
| 14 | |
| 15 | func testCompare(t *testing.T, cases []compareTest) { |
| 16 | for _, testCase := range cases { |
| 17 | actual := compareValues(testCase.old, testCase.new) |
| 18 | |
| 19 | if actual.Mode() != testCase.mode { |
| 20 | t.Errorf("Unexpected mode: '%s' (want '%s')", actual.Mode(), testCase.mode) |
| 21 | } |
| 22 | |
| 23 | if !reflect.DeepEqual(actual.String(), testCase.expected) { |
| 24 | t.Errorf("%#v\n!=\n%#v", actual.String(), testCase.expected) |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | func TestCompareScalar(t *testing.T) { |
| 30 | testCompare(t, []compareTest{ |
no test coverage detected