예제 #1
0
func TestSubsetSlice_NestedSlice_Fail(t *testing.T) {

	super := []interface{}{
		[]interface{}{
			"1", "2", "3",
		},
		[]interface{}{
			"4", "5", "6",
		},
		[]interface{}{
			"7", "8", "9",
		},
	}
	sub := []interface{}{
		[]interface{}{
			"3",
		},
		[]interface{}{
			"3",
		},
		[]interface{}{
			"9",
		},
	}
	if !testutil.ContainSubsetSlice(super, sub) {
		t.Fatalf("expected slice to be subset of super, got false")
	}
}
예제 #2
0
func TestSubsetSlice_Simple(t *testing.T) {

	super := []interface{}{
		"1", "2", "3",
	}
	sub := []interface{}{
		"3",
	}
	if !testutil.ContainSubsetSlice(super, sub) {
		t.Fatalf("expected slice to be subset of super, got false")
	}
}
예제 #3
0
func TestSubsetSlice_Simple_Fail(t *testing.T) {

	super := []interface{}{
		"1", "2", "3",
	}
	sub := []interface{}{
		"4",
	}
	if testutil.ContainSubsetSlice(super, sub) {
		t.Fatalf("expected slice to not be subset of super, got true")
	}
}