(t *testing.T)
| 30 | } |
| 31 | |
| 32 | func TestLowerBound(t *testing.T) { |
| 33 | for _, test := range lowerBoundTests { |
| 34 | actualValue, actualError := LowerBound(test.data, test.key) |
| 35 | if actualValue != test.expected { |
| 36 | t.Errorf("test '%s' failed: input array '%v' with key '%d', expected '%d', get '%d'", test.name, test.data, test.key, test.expected, actualValue) |
| 37 | } |
| 38 | if !errors.Is(test.expectedError, actualError) { |
| 39 | t.Errorf("test '%s' failed: input array '%v' with key '%d', expected error '%s', get error '%s'", test.name, test.data, test.key, test.expectedError, actualError) |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | func TestUpperBound(t *testing.T) { |
| 45 | for _, test := range upperBoundTests { |
nothing calls this directly
no test coverage detected