(t *testing.T)
| 82 | } |
| 83 | |
| 84 | func 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 | |
| 96 | func TestWrappedRecordDotWithNull(t *testing.T) { |
| 97 | assertPanic(t, "dot product should panic with null wrapped record", func() { |
nothing calls this directly
no test coverage detected