@with_both_exception_handling
def test_bad_typeid(self):
    self.do_run('\n// exception example\n#include <iostream>       // std::cerr\n#include <typeinfo>       // operator typeid\n#include <exception>      // std::exception\n\nclass Polymorphic {virtual void member(){}};\n\nint main () {\n  try\n  {\n    Polymorphic * pb = 0;\n    const std::type_info& ti = typeid(*pb);  // throws a bad_typeid exception\n  }\n  catch (std::exception& e)\n  {\n    std::cerr << "exception caught: " << e.what() << \'\\n\';\n  }\n  return 0;\n}\n', 'exception caught: std::bad_typeid')
@with_both_exception_handling
def test_bad_typeid(self):
    self.do_run('\n// exception example\n#include <iostream>       // std::cerr\n#include <typeinfo>       // operator typeid\n#include <exception>      // std::exception\n\nclass Polymorphic {virtual void member(){}};\n\nint main () {\n  try\n  {\n    Polymorphic * pb = 0;\n    const std::type_info& ti = typeid(*pb);  // throws a bad_typeid exception\n  }\n  catch (std::exception& e)\n  {\n    std::cerr << "exception caught: " << e.what() << \'\\n\';\n  }\n  return 0;\n}\n', 'exception caught: std::bad_typeid')