(t *testing.T)
| 58 | } |
| 59 | |
| 60 | func TestLocationForPC(t *testing.T) { |
| 61 | g := core.New() |
| 62 | inlineCtor := func(f Fooer) Stub { |
| 63 | return Stub{} |
| 64 | } |
| 65 | g.Provide(di.Deps{di.LocationForPC(inlineCtor, reflect.ValueOf(badConstructor).Pointer())}) |
| 66 | |
| 67 | defer func() { |
| 68 | if r := recover(); r != nil { |
| 69 | assert.Contains(t, r.(error).Error(), "badConstructor") |
| 70 | return |
| 71 | } |
| 72 | t.Fatal("test should panic") |
| 73 | }() |
| 74 | |
| 75 | g.Invoke(func(injected struct { |
| 76 | dig.In |
| 77 | Stub Stub |
| 78 | }) { |
| 79 | }) |
| 80 | } |
| 81 | |
| 82 | func TestChainedOptions(t *testing.T) { |
| 83 | g := core.New() |
nothing calls this directly
no test coverage detected