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

Function TestEval_EmptyString

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

Source from the content-addressed store, hash-verified

53}
54
55func TestEval_StringInterpolation(t *testing.T) {
56 resolve := mockResolver{
57 "node1:out-0": FloatVal(23.5),
58 }
59
60 v, err := Eval(workflowapi.Expression{
61 Expression: "Temperature is ${} degrees",
62 DataType: workflowapi.String,
63 References: []workflowapi.Reference{{SrcId: "node1", VarId: "out-0"}},
64 }, resolve)
65 require.NoError(t, err)
66 assert.Equal(t, "Temperature is 23.5 degrees", v.AsString())

Callers

nothing calls this directly

Calls 2

EvalFunction · 0.85
StringValFunction · 0.85

Tested by

no test coverage detected