(t *testing.T)
| 2644 | } |
| 2645 | |
| 2646 | func TestFindFrame(t *testing.T) { |
| 2647 | frame := mustNewExecutionFrame(t, EmptyActivation()) |
| 2648 | defer frame.Close() |
| 2649 | |
| 2650 | tests := []struct { |
| 2651 | name string |
| 2652 | act Activation |
| 2653 | }{ |
| 2654 | { |
| 2655 | name: "nested wrapper", |
| 2656 | act: &testActivationWrapper{Activation: &testActivationWrapper{Activation: frame, name: "w1"}, name: "w2"}, |
| 2657 | }, |
| 2658 | { |
| 2659 | name: "parent hierarchy", |
| 2660 | act: &parentActivationWrapper{parent: frame}, |
| 2661 | }, |
| 2662 | } |
| 2663 | for _, tc := range tests { |
| 2664 | t.Run(tc.name, func(t *testing.T) { |
| 2665 | found := findFrame(tc.act) |
| 2666 | if found != frame { |
| 2667 | t.Errorf("findFrame() = %v, wanted %v", found, frame) |
| 2668 | } |
| 2669 | }) |
| 2670 | } |
| 2671 | } |
| 2672 | |
| 2673 | func TestObservableInterpretable(t *testing.T) { |
| 2674 | obsInt := &ObservableInterpretable{InterpretableV2: NewConstValue(12, types.True)} |
nothing calls this directly
no test coverage detected