MCPcopy
hub / github.com/hashicorp/go-memdb / testObj

Function testObj

index_test.go:50–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48}
49
50func testObj() *TestObject {
51 b := true
52 obj := &TestObject{
53 ID: "my-cool-obj",
54 Foo: "Testing",
55 Fu: String("Fu"),
56 Boo: nil,
57 Bar: 42,
58 Baz: "yep",
59 Bam: &b,
60 Qux: []string{"Test", "Test2"},
61 Zod: map[string]string{
62 "Role": "Server",
63 "instance_type": "m3.medium",
64 "": "asdf",
65 },
66 Int: int(1),
67 Int8: int8(-1 << 7),
68 Int16: int16(-1 << 15),
69 Int32: int32(-1 << 31),
70 Int64: int64(-1 << 63),
71 Uint: uint(1),
72 Uint8: uint8(1<<8 - 1),
73 Uint16: uint16(1<<16 - 1),
74 Uint32: uint32(1<<32 - 1),
75 Uint64: uint64(1<<64 - 1),
76 Bool: false,
77 }
78 return obj
79}
80
81func TestStringFieldIndex_FromObject(t *testing.T) {
82 obj := testObj()

Calls 1

StringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…