コード例 #1
0
ファイル: postgres_visitor_test.go プロジェクト: phanle/codex
func TestPostgresBinding(t *testing.T) {
	binding := nodes.Binding()
	expected := "$1"
	if got, _ := postgres.Accept(binding); expected != got {
		t.Errorf("TestPostgresBinding was expected to return %s, got %s", expected, got)
	}
}
コード例 #2
0
ファイル: to_sql_visitors_test.go プロジェクト: phanle/codex
func TestBinding(t *testing.T) {
	binding := nodes.Binding()
	result, _ := sql.Accept(binding)
	if "?" != result {
		t.Errorf("TestStar was expected to return ?, got %s", result)
	}
}