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

Function TestWrappedRecordGet

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

Source from the content-addressed store, hash-verified

51}
52
53func TestWrappedRecordGet(t *testing.T) {
54 r := WrapRecord(&testRecord)
55 for idx, v := range testRecord.Data {
56 if r.Get(idx) != v {
57 t.Fatalf("expected value %f at index %d, got %f", v, idx, r.Get(idx))
58 }
59 }
60}
61
62func TestWrappedRecordGetWithInvalidIndex(t *testing.T) {
63 assertPanic(t, "access to an invalid index should panic", func() {

Callers

nothing calls this directly

Calls 2

WrapRecordFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected