MCPcopy
hub / github.com/golang/geo / TestRow

Function TestRow

s2/matrix3x3_test.go:58–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func 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
92func TestSetCol(t *testing.T) {
93 tests := []struct {

Callers

nothing calls this directly

Calls 3

OriginPointFunction · 0.85
rowMethod · 0.80
ApproxEqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…