(t *testing.T)
| 83 | } |
| 84 | |
| 85 | func TestComputeResultWithoutContext(t *testing.T) { |
| 86 | frame, err := NewExecutionFrame(EmptyActivation()) |
| 87 | if err != nil { |
| 88 | t.Fatalf("NewExecutionFrame() failed: %v", err) |
| 89 | } |
| 90 | defer frame.Close() |
| 91 | // No SetContext call, so async tracking is uninitialized. |
| 92 | res := frame.ComputeResult(1, "fn", "fn_overload", asyncReturning(types.Int(1), nil), nil) |
| 93 | if !types.IsError(res) { |
| 94 | t.Errorf("ComputeResult() got %v, wanted error when tracking uninitialized", res) |
| 95 | } |
| 96 | if frame.ActiveAsyncCalls() != 0 { |
| 97 | t.Errorf("ActiveAsyncCalls() = %d, wanted 0", frame.ActiveAsyncCalls()) |
| 98 | } |
| 99 | if call := frame.AsyncCall(1); call != nil { |
| 100 | t.Errorf("AsyncCall() = %v, wanted nil", call) |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | func TestComputeResultResolves(t *testing.T) { |
| 105 | ctx, cancel := context.WithCancel(context.Background()) |
nothing calls this directly
no test coverage detected