prevent compiler warning for missing virtual destructor

This adds a `virtual` destructor to a base class in a C++ test. It doesn't change the test result, but it prevents the compiler from emitting a warning.