TestParseTopClause_Percent checks TOP n PERCENT.
(t *testing.T)
| 147 | |
| 148 | // TestParseTopClause_Percent checks TOP n PERCENT. |
| 149 | func TestParseTopClause_Percent(t *testing.T) { |
| 150 | stmt := parseSQLWithDialect(t, |
| 151 | "SELECT TOP 25 PERCENT salary FROM employees", |
| 152 | keywords.DialectSQLServer, |
| 153 | ) |
| 154 | if stmt.Top == nil { |
| 155 | t.Fatal("expected non-nil TopClause") |
| 156 | } |
| 157 | if !stmt.Top.IsPercent { |
| 158 | t.Error("expected IsPercent=true for TOP PERCENT") |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | // TestParseTopClause_WithTies checks TOP n WITH TIES. |
| 163 | func TestParseTopClause_WithTies(t *testing.T) { |
nothing calls this directly
no test coverage detected