1 #include "testutilities.h"
2 #include <sigc++/sigc++.h>
8 std::ostringstream result_stream;
11 : virtual public sigc::trackable
23 : virtual public Base,
29 result_stream << "method()";
33 } // end anonymous namespace
35 int main(int argc, char* argv[])
37 auto util = TestUtilities::get_instance();
39 if (!util->check_command_args(argc, argv))
40 return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
42 auto instance = new Derived();
43 sigc::slot<void> handler = sigc::mem_fun(*instance, &Derived::method);
45 util->check_result(result_stream, "method()");
48 sigc::bind(sigc::slot<void, Derived&>(), std::ref(*instance));
50 util->check_result(result_stream, "");
53 sigc::bind_return(sigc::slot<void>(), std::ref(*instance));
55 util->check_result(result_stream, "");
62 util->check_result(result_stream, "");
64 return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;