(t *testing.T)
| 247 | } |
| 248 | |
| 249 | func TestFrameUnwrap(t *testing.T) { |
| 250 | baseAct, err := NewActivation(map[string]any{"x": 1}) |
| 251 | if err != nil { |
| 252 | t.Fatalf("NewActivation(x) failed: %v", err) |
| 253 | } |
| 254 | frame := mustNewExecutionFrame(t, baseAct) |
| 255 | defer frame.Close() |
| 256 | |
| 257 | if got := frame.Unwrap(); got != baseAct { |
| 258 | t.Errorf("Unwrap() got %v, want %v", got, baseAct) |
| 259 | } |
| 260 | |
| 261 | childAct, err := NewActivation(map[string]any{"y": 2}) |
| 262 | if err != nil { |
| 263 | t.Fatalf("NewActivation(y) failed: %v", err) |
| 264 | } |
| 265 | childFrame := frame.Push(childAct) |
| 266 | defer childFrame.Pop() |
| 267 | |
| 268 | if got := childFrame.Unwrap(); got != childFrame.Activation { |
| 269 | t.Errorf("Unwrap() got %v, want %v", got, childFrame.Activation) |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | func TestFrameAsPartialActivation(t *testing.T) { |
| 274 | baseAct, err := NewActivation(map[string]any{"x": 1}) |
nothing calls this directly
no test coverage detected