TestIsValidDialect covers the IsValidDialect helper.
(t *testing.T)
| 168 | |
| 169 | // TestIsValidDialect covers the IsValidDialect helper. |
| 170 | func TestIsValidDialect(t *testing.T) { |
| 171 | validDialects := []string{ |
| 172 | "postgresql", "mysql", "sqlserver", "oracle", "sqlite", |
| 173 | "snowflake", "bigquery", "redshift", "generic", "mariadb", "", |
| 174 | } |
| 175 | for _, d := range validDialects { |
| 176 | if !keywords.IsValidDialect(d) { |
| 177 | t.Errorf("IsValidDialect(%q) should return true", d) |
| 178 | } |
| 179 | } |
| 180 | invalidDialects := []string{"fakesql", "postgres", "mssql", "pg", "db2"} |
| 181 | for _, d := range invalidDialects { |
| 182 | if keywords.IsValidDialect(d) { |
| 183 | t.Errorf("IsValidDialect(%q) should return false", d) |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | // --------------------------------------------------------------------------- |
| 189 | // LIMIT dialect gate |
nothing calls this directly
no test coverage detected