anyreader/reader_test.go

22 lines
301 B
Go
Raw Permalink Normal View History

2023-06-30 20:43:23 +02:00
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())
2023-07-27 22:09:41 +02:00
fmt.Println(r.Read())
r.Push()
fmt.Println(r.Unread())
fmt.Println(r.Unread())
fmt.Println(r.Pop())
2023-06-30 20:43:23 +02:00
fmt.Println(r.Read())
}