17 lines
300 B
Go
17 lines
300 B
Go
package map_set
|
|
|
|
import "testing"
|
|
|
|
func TestMapSet(t *testing.T) {
|
|
mapSet := New(2, 3, 1, 5, 4)
|
|
res := In(3, mapSet)
|
|
if !res {
|
|
t.Error("In() error")
|
|
}
|
|
|
|
slice := Sort(mapSet)
|
|
if slice[0] != 1 || slice[1] != 2 || slice[2] != 3 || slice[3] != 4 || slice[4] != 5 {
|
|
t.Error("Sort() error")
|
|
}
|
|
}
|