Exemple #1
0
func TestExistsInDescendingInt64Set(t *testing.T) {
	s := set.Int64Set{}
	s = s.Add(100)
	s = s.Add(10)
	s = s.Add(1)

	for _, v := range []int64{100, 10, 1} {
		if !s.Exists(v) {
			t.Errorf("expecting value %v to exist in the set", v)
		}
	}
	if !reflect.DeepEqual([]int64(s), []int64{1, 10, 100}) {
		t.Error("invalid set")
	}

}