(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func 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 | |
| 35 | func TestKitesFilter(t *testing.T) { |
| 36 | kites := kontrol.Kites{ |