MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / TestEval_CastInCode

Function TestEval_CastInCode

go/engine/expr/expression_test.go:236–248  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

234}
235
236func TestEval_SingleRefPassthrough(t *testing.T) {
237 resolve := mockResolver{
238 "n1:out-0": IntVal(42),
239 }
240
241 v, err := Eval(workflowapi.Expression{
242 Expression: "${}",
243 DataType: workflowapi.Int,
244 References: []workflowapi.Reference{{SrcId: "n1", VarId: "out-0"}},
245 }, resolve)
246 require.NoError(t, err)
247 assert.Equal(t, IntVal(42), v)
248}
249
250func TestEval_CastInString(t *testing.T) {
251 resolve := mockResolver{

Callers

nothing calls this directly

Calls 3

StringValFunction · 0.85
EvalFunction · 0.85
IntValFunction · 0.85

Tested by

no test coverage detected