package anyreader import ( "fmt" "testing" ) func TestReader(t *testing.T) { r := NewReaderFromSlice([]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) fmt.Println(r.Read()) fmt.Println(r.Read()) r.Push() fmt.Println(r.Unread()) fmt.Println(r.Unread()) fmt.Println(r.Pop()) fmt.Println(r.Read()) }