(t *testing.T, table []testCase, enableWindowFunc bool)
| 404 | } |
| 405 | |
| 406 | func RunTestInRealAsFloatMode(t *testing.T, table []testCase, enableWindowFunc bool) { |
| 407 | p := parser.New() |
| 408 | p.EnableWindowFunc(enableWindowFunc) |
| 409 | p.SetSQLMode(mysql.ModeRealAsFloat) |
| 410 | for _, tbl := range table { |
| 411 | _, _, err := p.Parse(tbl.src, "", "") |
| 412 | comment := fmt.Sprintf("source %v", tbl.src) |
| 413 | if !tbl.ok { |
| 414 | require.Error(t, err, comment) |
| 415 | continue |
| 416 | } |
| 417 | require.NoError(t, err, comment) |
| 418 | // restore correctness test |
| 419 | if tbl.ok { |
| 420 | RunRestoreTestInRealAsFloatMode(t, tbl.src, tbl.restore, enableWindowFunc) |
| 421 | } |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | func RunRestoreTestInRealAsFloatMode(t *testing.T, sourceSQLs, expectSQLs string, enableWindowFunc bool) { |
| 426 | var sb strings.Builder |
no test coverage detected