()
| 48 | } |
| 49 | |
| 50 | func 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 | |
| 81 | func TestStringFieldIndex_FromObject(t *testing.T) { |
| 82 | obj := testObj() |
no test coverage detected
searching dependent graphs…