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

Function TestWrappedRecordMagnitude

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

Source from the content-addressed store, hash-verified

114}
115
116func TestWrappedRecordMagnitude(t *testing.T) {
117 testRecord.Data = []float32{0, 0, 2}
118 shouldBe := 2.0
119 a := WrapRecord(&testRecord)
120 if mag := a.Magnitude(); mag != shouldBe {
121 t.Fatalf("magnitude should be %f, got %f", shouldBe, mag)
122 }
123}
124
125func TestWrappedRecordMagnitudeWithNull(t *testing.T) {
126 assertPanic(t, "magnitude product should panic with null wrapped record", func() {

Callers

nothing calls this directly

Calls 2

WrapRecordFunction · 0.85
MagnitudeMethod · 0.80

Tested by

no test coverage detected