(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func TestRow(t *testing.T) { |
| 59 | tests := []struct { |
| 60 | have *matrix3x3 |
| 61 | row int |
| 62 | want Point |
| 63 | }{ |
| 64 | {&matrix3x3{}, 0, OriginPoint()}, |
| 65 | { |
| 66 | &matrix3x3{ |
| 67 | {1, 2, 3}, |
| 68 | {4, 5, 6}, |
| 69 | {7, 8, 9}, |
| 70 | }, |
| 71 | 0, |
| 72 | Point{r3.Vector{X: 1, Y: 2, Z: 3}}, |
| 73 | }, |
| 74 | { |
| 75 | &matrix3x3{ |
| 76 | {1, 2, 3}, |
| 77 | {4, 5, 6}, |
| 78 | {7, 8, 9}, |
| 79 | }, |
| 80 | 2, |
| 81 | Point{r3.Vector{X: 7, Y: 8, Z: 9}}, |
| 82 | }, |
| 83 | } |
| 84 | |
| 85 | for _, test := range tests { |
| 86 | if got := test.have.row(test.row); !got.ApproxEqual(test.want) { |
| 87 | t.Errorf("%v.row(%d) = %v, want %v", test.have, test.row, got, test.want) |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | func TestSetCol(t *testing.T) { |
| 93 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…