Пример #1
0
func TestJoinSource(t *testing.T) {
	relation := nodes.Relation("table")
	source := nodes.JoinSource(relation)
	expected := `"table"`
	if got, _ := sql.Accept(source); expected != got {
		t.Errorf("TestJoinSource was expected to return %s, got %s", expected, got)
	}
}
Пример #2
0
func TestExtensiveJoinSource(t *testing.T) {
	relation := nodes.Relation("table")
	source := nodes.JoinSource(relation)
	source.Right = append(source.Right, []interface{}{1, 2, 3}...)
	expected := `"table" 1 2 3`
	if got, _ := sql.Accept(source); expected != got {
		t.Errorf("TestExtensiveJoinSource was expected to return %s, got %s", expected, got)
	}
}