This commit is contained in:
Will Charczuk 2017-04-18 20:18:28 -07:00
parent 59ccf693bf
commit f741e0f95b

View file

@ -212,12 +212,12 @@ func TestMatrixSwapRows(t *testing.T) {
{4, 5, 6}, {4, 5, 6},
{7, 8, 9}, {7, 8, 9},
}) })
m.SwapRows(0,1)
assert.Equal([]float64{4,5,6}, m.Row(0)) m.SwapRows(0, 1)
assert.Equal([]float64{1,2,3}, m.Row(1))
assert.Equal([]float64{7,8,9}, m.Row(2)) assert.Equal([]float64{4, 5, 6}, m.Row(0))
assert.Equal([]float64{1, 2, 3}, m.Row(1))
assert.Equal([]float64{7, 8, 9}, m.Row(2))
} }
func TestMatrixCopy(t *testing.T) { func TestMatrixCopy(t *testing.T) {
@ -390,7 +390,7 @@ func TestMatrixTranspose(t *testing.T) {
assert.Equal(3, rows) assert.Equal(3, rows)
assert.Equal(4, cols) assert.Equal(4, cols)
assert.Equal(1, m2.Get(0,0)) assert.Equal(1, m2.Get(0, 0))
assert.Equal(10, m2.Get(0,3)) assert.Equal(10, m2.Get(0, 3))
assert.Equal(3, m2.Get(2,0)) assert.Equal(3, m2.Get(2, 0))
) }