(t *testing.T, dbval interface{}, expected Decimal)
| 2417 | } |
| 2418 | |
| 2419 | func scanHelper(t *testing.T, dbval interface{}, expected Decimal) { |
| 2420 | t.Helper() |
| 2421 | |
| 2422 | a := Decimal{} |
| 2423 | if err := a.Scan(dbval); err != nil { |
| 2424 | // Scan failed... no need to test result value |
| 2425 | t.Errorf("a.Scan(%v) failed with message: %s", dbval, err) |
| 2426 | } else if !a.Equal(expected) { |
| 2427 | // Scan succeeded... test resulting values |
| 2428 | t.Errorf("%s does not equal to %s", a, expected) |
| 2429 | } |
| 2430 | } |
| 2431 | |
| 2432 | func TestDecimal_Scan(t *testing.T) { |
| 2433 | // test the Scan method that implements the sql.Scanner interface |
no test coverage detected
searching dependent graphs…