| 201 | // 19. Polymorphic — base unique_ptr managing derived |
| 202 | TEST_F(UniquePtrTest, Polymorphic) { |
| 203 | struct Base { |
| 204 | virtual ~Base() = default; |
| 205 | virtual auto GetValue() -> int { return 0; } |
| 206 | }; |
| 207 | struct Derived : Base { |
| 208 | int val; |
| 209 | explicit Derived(int v) : val(v) {} |
nothing calls this directly
no outgoing calls
no test coverage detected