Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slack-15.0: backport vitessio/vitess#16154 #420

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
one more test
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
  • Loading branch information
timvaillancourt committed Jun 19, 2024
commit 7a5457e3aa14bed31f04cff56a3741576b71266c
29 changes: 29 additions & 0 deletions go/vt/sqlparser/ast_equals_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package sqlparser

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestCountStarEqualsRefOfCountStar(t *testing.T) {
{
a := &CountStar{}
b := &CountStar{}
assert.True(t, EqualsRefOfCountStar(a, b))
}
{
a := &CountStar{Name: "a"}
b := &CountStar{Name: "a"}
assert.True(t, EqualsRefOfCountStar(a, b))
}
{
a := &CountStar{Name: "a"}
b := &CountStar{Name: "b"}
assert.False(t, EqualsRefOfCountStar(a, b))
}
{
a := &CountStar{Name: "a"}
assert.False(t, EqualsRefOfCountStar(a, nil))
}
}
Loading