(t *testing.T)
| 179 | } |
| 180 | |
| 181 | func TestIncompleteStatementError(t *testing.T) { |
| 182 | sql := "SELECT * FROM" |
| 183 | location := models.Location{Line: 1, Column: 14} |
| 184 | |
| 185 | err := IncompleteStatementError(location, sql) |
| 186 | |
| 187 | if err.Code != ErrCodeIncompleteStatement { |
| 188 | t.Errorf("IncompleteStatementError() code = %v, want %v", err.Code, ErrCodeIncompleteStatement) |
| 189 | } |
| 190 | |
| 191 | output := err.Error() |
| 192 | if !strings.Contains(output, "incomplete SQL statement") { |
| 193 | t.Errorf("Error should mention incomplete statement, got: %s", output) |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | func TestWrapError(t *testing.T) { |
| 198 | sql := "SELECT * FROM users" |
nothing calls this directly
no test coverage detected