| | 1 | #include "minimalistic-stub.hxx" |
| | 2 | #include <boost/serialization/export.hpp> |
| | 3 | |
| | 4 | /* register types with boost serialization */ |
| | 5 | |
| | 6 | BOOST_CLASS_EXPORT(cmd_group_example) |
| | 7 | BOOST_CLASS_EXPORT(testfunc_cmd) |
| | 8 | BOOST_CLASS_EXPORT(testfunc_res) |
| | 9 | |
| | 10 | void |
| | 11 | extended_type_info_test() { |
| | 12 | cmd_group_example* t=new testfunc_cmd(); |
| | 13 | const boost::serialization::extended_type_info * true_type |
| | 14 | = boost::serialization::type_info_implementation<libt2n::command>::type::get_const_instance().get_derived_extended_type_info(*t); |
| | 15 | // note:if this exception is thrown, be sure that derived pointer |
| | 16 | // is either regsitered or exported. |
| | 17 | assert(NULL != true_type); |
| | 18 | assert(std::string("testfunc_cmd")==true_type->get_key()); |
| | 19 | } |