optimizations_test.go
raw| 1 | package tensor |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | ) |
| 6 | |
| 7 | // this file contains tests to make sure certain algorithms/optimizations aren't crazy |
| 8 | |
| 9 | func TestRequiresIterator(t *testing.T) { |
| 10 | T := New(Of(Int), WithBacking([]int{1, 2, 3, 4})) |
| 11 | sliced, _ := T.Slice(makeRS(1, 3)) |
| 12 | if sliced.RequiresIterator() { |
| 13 | t.Errorf("Slicing on rows should not require Iterator") |
| 14 | } |
| 15 | } |