MCPcopy Index your code
hub / github.com/dagger/dagger / TestModuleFunctionCacheImplicitInputsNilSafe

Function TestModuleFunctionCacheImplicitInputsNilSafe

core/modfunc_test.go:114–132  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

112}
113
114func TestModuleFunctionCacheImplicitInputsNilSafe(t *testing.T) {
115 require.Nil(t, (*ModuleFunction)(nil).cacheImplicitInputs())
116 require.Nil(t, (&ModuleFunction{}).cacheImplicitInputs())
117 dag := newCoreDagqlServerForTest(t, &Query{})
118 dag.InstallObject(dagql.NewClass(dag, dagql.ClassOpts[*Module]{Typed: &Module{}}))
119 modRes, err := dagql.NewObjectResultForCall(
120 &Module{},
121 dag,
122 &dagql.ResultCall{
123 Kind: dagql.ResultCallKindSynthetic,
124 SyntheticOp: "modfunc_test_nil_safe_module",
125 Type: dagql.NewResultCallType((&Module{}).Type()),
126 },
127 )
128 require.NoError(t, err)
129 require.Nil(t, (&ModuleFunction{
130 mod: modRes,
131 }).cacheImplicitInputs())
132}
133
134func mapImplicitInputsByName(inputs []dagql.ImplicitInput) map[string]dagql.ImplicitInput {
135 byName := make(map[string]dagql.ImplicitInput, len(inputs))

Callers

nothing calls this directly

Calls 7

NewClassFunction · 0.92
NewObjectResultForCallFunction · 0.92
NewResultCallTypeFunction · 0.92
cacheImplicitInputsMethod · 0.80
InstallObjectMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected