コード例 #1
0
func TestPostgresLike(t *testing.T) {
	like := nodes.Like(1, 2)
	expected := "1 ILIKE 2"
	if got, _ := postgres.Accept(like); expected != got {
		t.Errorf("TestLike was expected to return %s, got %s", expected, got)
	}
}
コード例 #2
0
ファイル: comparison_test.go プロジェクト: smillaedler/codex
func TestLike(t *testing.T) {
	like := nodes.Like(1, 2)

	// The following struct members should exist.
	_ = like.Left
	_ = like.Right

	// The following receiver methods should exist.
	_ = like.Or(1)
	_ = like.And(1)
	_ = like.Not()
}