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

Function TestTrace

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

Source from the content-addressed store, hash-verified

50}
51
52func TestTrace(t *testing.T) {
53 a := []float64{1, 2, 3, 4}
54 A := MakeMatrix(a, 2, 2)
55
56 if A.trace() != 5 {
57 t.Error()
58 }
59}
60
61func TestAdd(t *testing.T) {
62 a := []float64{1, 1, 1, 1}

Callers

nothing calls this directly

Calls 2

MakeMatrixFunction · 0.85
traceMethod · 0.80

Tested by

no test coverage detected