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

Function TestWrappedRecordIs

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

Source from the content-addressed store, hash-verified

33}
34
35func TestWrappedRecordIs(t *testing.T) {
36 a := WrapRecord(&testRecord)
37 b := WrapRecord(&testRecord)
38 c := WrapRecord(nil)
39
40 if !a.Is(b) {
41 t.Fatal("records should match")
42 } else if !b.Is(a) {
43 t.Fatal("records should match")
44 } else if a.Is(c) {
45 t.Fatal("records should not match")
46 } else if b.Is(c) {
47 t.Fatal("records should not match")
48 } else if c.Is(b) {
49 t.Fatal("records should not match")
50 }
51}
52
53func TestWrappedRecordGet(t *testing.T) {
54 r := WrapRecord(&testRecord)

Callers

nothing calls this directly

Calls 2

WrapRecordFunction · 0.85
IsMethod · 0.45

Tested by

no test coverage detected