зеркало из https://github.com/github/vitess-gh.git
sqlparser: add tests to improve coverage
This commit is contained in:
Родитель
f9824de263
Коммит
bd0e43c139
|
@ -82,7 +82,9 @@ select /* is not null */ 1 from t where a is not null
|
|||
select /* < */ 1 from t where a < b
|
||||
select /* <= */ 1 from t where a <= b
|
||||
select /* >= */ 1 from t where a >= b
|
||||
select /* <> */ 1 from t where a != b
|
||||
select /* > */ 1 from t where a > b
|
||||
select /* != */ 1 from t where a != b
|
||||
select /* <> */ 1 from t where a <> b#select /* <> */ 1 from t where a != b
|
||||
select /* <=> */ 1 from t where a <=> b
|
||||
select /* != */ 1 from t where a != b
|
||||
select /* single value expre list */ 1 from t where a in (b)
|
||||
|
|
|
@ -94,3 +94,15 @@ func TestLimits(t *testing.T) {
|
|||
t.Errorf("got %v, want %s", err, wantErr)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsAggregate(t *testing.T) {
|
||||
f := FuncExpr{Name: "avg"}
|
||||
if !f.IsAggregate() {
|
||||
t.Error("IsAggregate: false, want true")
|
||||
}
|
||||
|
||||
f = FuncExpr{Name: "foo"}
|
||||
if f.IsAggregate() {
|
||||
t.Error("IsAggregate: true, want false")
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче