(t *testing.T)
| 109 | } |
| 110 | |
| 111 | func TestRenderSelect_Distinct(t *testing.T) { |
| 112 | stmt := &ast.SelectStatement{ |
| 113 | Distinct: true, |
| 114 | Columns: []ast.Expression{&ast.Identifier{Name: "a"}}, |
| 115 | From: []ast.TableReference{{Name: "t"}}, |
| 116 | } |
| 117 | result := fmtStmt(stmt, ast.CompactStyle()) |
| 118 | if !strings.Contains(result, "DISTINCT") { |
| 119 | t.Errorf("expected DISTINCT, got: %s", result) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func TestRenderSelect_AllClauses(t *testing.T) { |
| 124 | lim := 10 |
nothing calls this directly
no test coverage detected