summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2016-03-11 10:55:03 +0100
committerMurray Cumming <murrayc@murrayc.com>2016-03-11 11:25:10 +0100
commit931d2265e85d808cc8a454184443b78726b1c83c (patch)
tree1cdfa914f29a9ff19f8b8c7f55e95ada33a170bc
parent109409f3087ae6e2bd446554be53b1faea43bc40 (diff)
downloadsigc++-931d2265e85d808cc8a454184443b78726b1c83c.tar.gz
test_signal: Add test_simple().
-rw-r--r--tests/test_signal.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_signal.cc b/tests/test_signal.cc
index c407cf7..744acbe 100644
--- a/tests/test_signal.cc
+++ b/tests/test_signal.cc
@@ -48,6 +48,15 @@ void test_empty_signal()
util->check_result(result_stream, "");
}
+void test_simple()
+{
+ sigc::signal<int, int> sig;
+ sig.connect(sigc::ptr_fun(&foo));
+
+ sig(1);
+ util->check_result(result_stream, "foo(int 1) ");
+}
+
int bar(float i)
{
result_stream << "bar(float " << i << ") ";
@@ -112,6 +121,7 @@ int main(int argc, char* argv[])
return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
test_empty_signal();
+ test_simple();
test_auto_disconnection();
test_reference();
test_make_slot();