Add dynamic_cast test.