MCPcopy Create free account
hub / github.com/koding/kite / TestKitesShuffle

Function TestKitesShuffle

kontrol/kites_test.go:12–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestKitesShuffle(t *testing.T) {
13 kites := kontrol.Kites{
14 {KeyID: "1"},
15 {KeyID: "2"},
16 {KeyID: "3"},
17 {KeyID: "4"},
18 {KeyID: "5"},
19 {KeyID: "6"},
20 {KeyID: "7"},
21 {KeyID: "8"},
22 {KeyID: "9"},
23 }
24
25 kitesCopy := make(kontrol.Kites, len(kites))
26 copy(kitesCopy, kites)
27
28 kites.Shuffle()
29
30 if reflect.DeepEqual(kites, kitesCopy) {
31 t.Fatal("wanted kites to be shuffled")
32 }
33}
34
35func TestKitesFilter(t *testing.T) {
36 kites := kontrol.Kites{

Callers

nothing calls this directly

Calls 2

ShuffleMethod · 0.95
FatalMethod · 0.80

Tested by

no test coverage detected