[libsigcplusplus/libsigc++-2-8] test_signal: Add test_simple().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus/libsigc++-2-8] test_signal: Add test_simple().
- Date: Fri, 11 Mar 2016 10:26:37 +0000 (UTC)
commit 931d2265e85d808cc8a454184443b78726b1c83c
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Mar 11 10:55:03 2016 +0100
test_signal: Add test_simple().
tests/test_signal.cc | 10 ++++++++++
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();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]