MCPcopy
hub / github.com/arnauddri/algorithms / TestSetElm

Function TestSetElm

data-structures/matrix/matrix_test.go:41–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39}
40
41func TestSetElm(t *testing.T) {
42 a := []float64{1, 2, 3, 4, 5, 6}
43 A := MakeMatrix(a, 3, 2)
44
45 A.SetElm(0, 0, 10)
46
47 if A.GetElm(0, 0) != 10 {
48 t.Error()
49 }
50}
51
52func TestTrace(t *testing.T) {
53 a := []float64{1, 2, 3, 4}

Callers

nothing calls this directly

Calls 3

MakeMatrixFunction · 0.85
SetElmMethod · 0.80
GetElmMethod · 0.80

Tested by

no test coverage detected