File tree 1 file changed +1
-19
lines changed
1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -1035,24 +1035,6 @@ TEST(BlackboardTest, Upcasting_Issue943)
1035
1035
factory.registerNodeType <ShowGreetMessage>(" ShowGreetMessage" );
1036
1036
factory.registerNodeType <ShowFancyGreetMessage>(" ShowFancyGreetMessage" );
1037
1037
1038
- try
1039
- {
1040
- auto tree = factory.createTreeFromText (xml_txt);
1041
- FAIL () << " Expected BT::RuntimeError to be thrown" ;
1042
- }
1043
- catch (const BT::RuntimeError& e)
1044
- {
1045
- std::string expected_msg = " The creation of the tree failed because the port "
1046
- " [hello_greeter] was initially "
1047
- " created with type [std::shared_ptr<HelloGreeter>] and, "
1048
- " later type "
1049
- " [std::shared_ptr<FancyHelloGreeter>] was used "
1050
- " somewhere else." ;
1051
- ASSERT_EQ (e.what (), expected_msg);
1052
- }
1053
- catch (...)
1054
- {
1055
- FAIL () << " Expected BT::RuntimeError but caught a different exception" ;
1056
- }
1038
+ ASSERT_ANY_THROW (auto tree = factory.createTreeFromText (xml_txt));
1057
1039
}
1058
1040
}
You can’t perform that action at this time.
0 commit comments