File: optimizations_test.go

package info (click to toggle)
golang-github-gorgonia-tensor 0.9.24-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,696 kB
  • sloc: sh: 18; asm: 18; makefile: 8
file content (15 lines) | stat: -rw-r--r-- 366 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package tensor

import (
	"testing"
)

// this file contains tests to make sure certain algorithms/optimizations aren't crazy

func TestRequiresIterator(t *testing.T) {
	T := New(Of(Int), WithBacking([]int{1, 2, 3, 4}))
	sliced, _ := T.Slice(makeRS(1, 3))
	if sliced.RequiresIterator() {
		t.Errorf("Slicing on rows should not require Iterator")
	}
}