// Code generated by genlib2. DO NOT EDIT.

package native

import (
	"testing"

	"github.com/stretchr/testify/assert"
	. "gorgonia.org/tensor"
)

func TestSelectB(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]bool
	T = New(Of(Bool), WithShape(2, 3, 4, 5))
	if x, err = SelectB(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Bool), WithShape(2, 3, 4, 5))
	if x, err = SelectB(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Bool), WithShape(2, 3, 4, 5))
	if x, err = SelectB(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Bool), WithShape(2, 3))
	if x, err = SelectB(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Bool), WithShape(2, 3))
	if x, err = SelectB(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(false))
	if x, err = SelectB(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectB(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectI(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]int
	T = New(Of(Int), WithShape(2, 3, 4, 5))
	if x, err = SelectI(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Int), WithShape(2, 3, 4, 5))
	if x, err = SelectI(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Int), WithShape(2, 3, 4, 5))
	if x, err = SelectI(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Int), WithShape(2, 3))
	if x, err = SelectI(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Int), WithShape(2, 3))
	if x, err = SelectI(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(int(0)))
	if x, err = SelectI(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectI(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectI8(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]int8
	T = New(Of(Int8), WithShape(2, 3, 4, 5))
	if x, err = SelectI8(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Int8), WithShape(2, 3, 4, 5))
	if x, err = SelectI8(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Int8), WithShape(2, 3, 4, 5))
	if x, err = SelectI8(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Int8), WithShape(2, 3))
	if x, err = SelectI8(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Int8), WithShape(2, 3))
	if x, err = SelectI8(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(int8(0)))
	if x, err = SelectI8(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectI8(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectI16(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]int16
	T = New(Of(Int16), WithShape(2, 3, 4, 5))
	if x, err = SelectI16(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Int16), WithShape(2, 3, 4, 5))
	if x, err = SelectI16(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Int16), WithShape(2, 3, 4, 5))
	if x, err = SelectI16(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Int16), WithShape(2, 3))
	if x, err = SelectI16(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Int16), WithShape(2, 3))
	if x, err = SelectI16(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(int16(0)))
	if x, err = SelectI16(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectI16(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectI32(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]int32
	T = New(Of(Int32), WithShape(2, 3, 4, 5))
	if x, err = SelectI32(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Int32), WithShape(2, 3, 4, 5))
	if x, err = SelectI32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Int32), WithShape(2, 3, 4, 5))
	if x, err = SelectI32(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Int32), WithShape(2, 3))
	if x, err = SelectI32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Int32), WithShape(2, 3))
	if x, err = SelectI32(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(int32(0)))
	if x, err = SelectI32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectI32(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectI64(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]int64
	T = New(Of(Int64), WithShape(2, 3, 4, 5))
	if x, err = SelectI64(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Int64), WithShape(2, 3, 4, 5))
	if x, err = SelectI64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Int64), WithShape(2, 3, 4, 5))
	if x, err = SelectI64(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Int64), WithShape(2, 3))
	if x, err = SelectI64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Int64), WithShape(2, 3))
	if x, err = SelectI64(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(int64(0)))
	if x, err = SelectI64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectI64(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectU(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]uint
	T = New(Of(Uint), WithShape(2, 3, 4, 5))
	if x, err = SelectU(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Uint), WithShape(2, 3, 4, 5))
	if x, err = SelectU(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Uint), WithShape(2, 3, 4, 5))
	if x, err = SelectU(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Uint), WithShape(2, 3))
	if x, err = SelectU(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Uint), WithShape(2, 3))
	if x, err = SelectU(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(uint(0)))
	if x, err = SelectU(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectU(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectU8(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]uint8
	T = New(Of(Uint8), WithShape(2, 3, 4, 5))
	if x, err = SelectU8(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Uint8), WithShape(2, 3, 4, 5))
	if x, err = SelectU8(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Uint8), WithShape(2, 3, 4, 5))
	if x, err = SelectU8(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Uint8), WithShape(2, 3))
	if x, err = SelectU8(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Uint8), WithShape(2, 3))
	if x, err = SelectU8(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(uint8(0)))
	if x, err = SelectU8(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectU8(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectU16(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]uint16
	T = New(Of(Uint16), WithShape(2, 3, 4, 5))
	if x, err = SelectU16(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Uint16), WithShape(2, 3, 4, 5))
	if x, err = SelectU16(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Uint16), WithShape(2, 3, 4, 5))
	if x, err = SelectU16(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Uint16), WithShape(2, 3))
	if x, err = SelectU16(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Uint16), WithShape(2, 3))
	if x, err = SelectU16(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(uint16(0)))
	if x, err = SelectU16(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectU16(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectU32(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]uint32
	T = New(Of(Uint32), WithShape(2, 3, 4, 5))
	if x, err = SelectU32(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Uint32), WithShape(2, 3, 4, 5))
	if x, err = SelectU32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Uint32), WithShape(2, 3, 4, 5))
	if x, err = SelectU32(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Uint32), WithShape(2, 3))
	if x, err = SelectU32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Uint32), WithShape(2, 3))
	if x, err = SelectU32(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(uint32(0)))
	if x, err = SelectU32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectU32(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectU64(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]uint64
	T = New(Of(Uint64), WithShape(2, 3, 4, 5))
	if x, err = SelectU64(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Uint64), WithShape(2, 3, 4, 5))
	if x, err = SelectU64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Uint64), WithShape(2, 3, 4, 5))
	if x, err = SelectU64(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Uint64), WithShape(2, 3))
	if x, err = SelectU64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Uint64), WithShape(2, 3))
	if x, err = SelectU64(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(uint64(0)))
	if x, err = SelectU64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectU64(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectF32(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]float32
	T = New(Of(Float32), WithShape(2, 3, 4, 5))
	if x, err = SelectF32(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Float32), WithShape(2, 3, 4, 5))
	if x, err = SelectF32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Float32), WithShape(2, 3, 4, 5))
	if x, err = SelectF32(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Float32), WithShape(2, 3))
	if x, err = SelectF32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Float32), WithShape(2, 3))
	if x, err = SelectF32(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(float32(0)))
	if x, err = SelectF32(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectF32(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectF64(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]float64
	T = New(Of(Float64), WithShape(2, 3, 4, 5))
	if x, err = SelectF64(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Float64), WithShape(2, 3, 4, 5))
	if x, err = SelectF64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Float64), WithShape(2, 3, 4, 5))
	if x, err = SelectF64(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Float64), WithShape(2, 3))
	if x, err = SelectF64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Float64), WithShape(2, 3))
	if x, err = SelectF64(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(float64(0)))
	if x, err = SelectF64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectF64(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectC64(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]complex64
	T = New(Of(Complex64), WithShape(2, 3, 4, 5))
	if x, err = SelectC64(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Complex64), WithShape(2, 3, 4, 5))
	if x, err = SelectC64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Complex64), WithShape(2, 3, 4, 5))
	if x, err = SelectC64(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Complex64), WithShape(2, 3))
	if x, err = SelectC64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Complex64), WithShape(2, 3))
	if x, err = SelectC64(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(complex64(0)))
	if x, err = SelectC64(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectC64(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectC128(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]complex128
	T = New(Of(Complex128), WithShape(2, 3, 4, 5))
	if x, err = SelectC128(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(Complex128), WithShape(2, 3, 4, 5))
	if x, err = SelectC128(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(Complex128), WithShape(2, 3, 4, 5))
	if x, err = SelectC128(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(Complex128), WithShape(2, 3))
	if x, err = SelectC128(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(Complex128), WithShape(2, 3))
	if x, err = SelectC128(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(complex128(0)))
	if x, err = SelectC128(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectC128(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}

func TestSelectStr(t *testing.T) {
	assert := assert.New(t)
	var T *Dense
	var err error
	var x [][]string
	T = New(Of(String), WithShape(2, 3, 4, 5))
	if x, err = SelectStr(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(20, len(x[0]))

	T = New(Of(String), WithShape(2, 3, 4, 5))
	if x, err = SelectStr(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(60, len(x[0]))

	T = New(Of(String), WithShape(2, 3, 4, 5))
	if x, err = SelectStr(T, 3); err != nil {
		t.Fatal(err)
	}
	assert.Equal(120, len(x))
	assert.Equal(1, len(x[0]))

	T = New(Of(String), WithShape(2, 3))
	if x, err = SelectStr(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(2, len(x))
	assert.Equal(3, len(x[0]))

	T = New(Of(String), WithShape(2, 3))
	if x, err = SelectStr(T, 1); err != nil {
		t.Fatal(err)
	}
	assert.Equal(6, len(x))
	assert.Equal(1, len(x[0]))

	T = New(FromScalar(""))
	if x, err = SelectStr(T, 0); err != nil {
		t.Fatal(err)
	}
	assert.Equal(1, len(x))
	assert.Equal(1, len(x[0]))

	if _, err = SelectStr(T, 10); err == nil {
		t.Fatal("Expected errors")
	}
}
