MCPcopy Index your code
hub / github.com/DoNewsCode/core / TestAs

Function TestAs

di/optional_provider_test.go:50–58  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func TestAs(t *testing.T) {
51 g := core.New()
52 g.Provide(di.Deps{di.As(ctor, new(Fooer))})
53 g.Invoke(func(injected struct {
54 dig.In
55 Stub Fooer
56 }) {
57 })
58}
59
60func TestLocationForPC(t *testing.T) {
61 g := core.New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.92
AsFunction · 0.92
ProvideMethod · 0.80
InvokeMethod · 0.80

Tested by

no test coverage detected