(t *testing.T)
| 43 | } |
| 44 | |
| 45 | func TestWherePartMap(t *testing.T) { |
| 46 | test := func(pred interface{}) { |
| 47 | sql, _, _ := newWherePart(pred).ToSql() |
| 48 | expect := []string{"x = ? AND y = ?", "y = ? AND x = ?"} |
| 49 | if sql != expect[0] && sql != expect[1] { |
| 50 | t.Errorf("expected one of %#v, got %#v", expect, sql) |
| 51 | } |
| 52 | } |
| 53 | m := map[string]interface{}{"x": 1, "y": 2} |
| 54 | test(m) |
| 55 | test(Eq(m)) |
| 56 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…