MCPcopy Create free account
hub / github.com/evilsocket/sum / TestWrappedRecordDot

Function TestWrappedRecordDot

wrapper/record_test.go:84–94  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestWrappedRecordDot(t *testing.T) {
85 testRecord.Data = []float32{3, 6, 9}
86 shouldBe := 126.0
87
88 a := WrapRecord(&testRecord)
89 b := WrapRecord(&testRecord)
90
91 if dot := a.Dot(b); dot != shouldBe {
92 t.Fatalf("dot product should be %f, got %f", shouldBe, dot)
93 }
94}
95
96func TestWrappedRecordDotWithNull(t *testing.T) {
97 assertPanic(t, "dot product should panic with null wrapped record", func() {

Callers

nothing calls this directly

Calls 2

WrapRecordFunction · 0.85
DotMethod · 0.65

Tested by

no test coverage detected