(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func TestNoOptionalPrimitiveCleanup(t *testing.T) { |
| 69 | fac, err := NewBasicFactory(t.Context(), SlogLogger{}, Utils{}) |
| 70 | if err != nil { |
| 71 | t.Fatal(err) |
| 72 | } |
| 73 | defer fac.Close(t.Context()) |
| 74 | |
| 75 | ins, err := fac.Instantiate(t.Context()) |
| 76 | if err != nil { |
| 77 | t.Fatal(err) |
| 78 | } |
| 79 | defer ins.Close(t.Context()) |
| 80 | |
| 81 | in := true |
| 82 | actual := ins.OptionalPrimitive(t.Context(), &in) |
| 83 | if actual == nil { |
| 84 | t.Fatal("expected non-nil option result") |
| 85 | } |
| 86 | |
| 87 | const expected = true |
| 88 | if *actual != expected { |
| 89 | t.Errorf("expected: %t, but got: %t", expected, *actual) |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | func TestResultPrimitiveCleanup(t *testing.T) { |
| 94 | fac, err := NewBasicFactory(t.Context(), SlogLogger{}, Utils{}) |
nothing calls this directly
no outgoing calls
no test coverage detected