Skip to content

Commit

Permalink
one more test
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
  • Loading branch information
timvaillancourt committed Jun 19, 2024
1 parent 92cd529 commit 7a5457e
Showing 1 changed file with 29 additions and 0 deletions.
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))
}
}

0 comments on commit 7a5457e

Please sign in to comment.