Skip to content

Commit 931d226

Browse files
committed
test_signal: Add test_simple().
1 parent 109409f commit 931d226

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_signal.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ void test_empty_signal()
4848
util->check_result(result_stream, "");
4949
}
5050

51+
void test_simple()
52+
{
53+
sigc::signal<int, int> sig;
54+
sig.connect(sigc::ptr_fun(&foo));
55+
56+
sig(1);
57+
util->check_result(result_stream, "foo(int 1) ");
58+
}
59+
5160
int bar(float i)
5261
{
5362
result_stream << "bar(float " << i << ") ";
@@ -112,6 +121,7 @@ int main(int argc, char* argv[])
112121
return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
113122

114123
test_empty_signal();
124+
test_simple();
115125
test_auto_disconnection();
116126
test_reference();
117127
test_make_slot();

0 commit comments

Comments
 (0)