(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestTensorHandleShape(t *testing.T) { |
| 53 | vals := [][]float32{{1.0, 2.0, 3.0}, {4.0, 5.0, 6.0}} |
| 54 | tensor, err := NewTensor(vals) |
| 55 | if err != nil { |
| 56 | t.Fatal(err) |
| 57 | } |
| 58 | th, err := NewTensorHandle(tensor) |
| 59 | if err != nil { |
| 60 | t.Fatal(err) |
| 61 | } |
| 62 | |
| 63 | got, err := th.Shape() |
| 64 | if err != nil { |
| 65 | t.Fatal(err) |
| 66 | } |
| 67 | if want := []int64{2, 3}; !reflect.DeepEqual(got, want) { |
| 68 | t.Errorf("Got %#v, want %#v", got, want) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func TestTensorHandleDeviceName(t *testing.T) { |
| 73 | vals := [][]float32{{1.0, 2.0}, {3.0, 4.0}} |
nothing calls this directly
no test coverage detected