Skip to content

Commit 9e5e38c

Browse files
committed
test_retype: Add test of R(Args...) syntax.
1 parent 9f6ecb3 commit 9e5e38c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_retype.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ void test_retype_slot()
8686
util->check_result(result_stream, "foo::test_int(int 5) 7.5");
8787
}
8888

89+
void test_std_function_style_syntax()
90+
{
91+
foo foo_;
92+
sigc::slot<float(float)> s1 = sigc::retype(sigc::mem_fun(foo_, &foo::test_int));
93+
result_stream << s1(1.234f);
94+
util->check_result(result_stream, "foo::test_int(int 1) 1.5");
95+
}
96+
8997
} // end anonymous namespace
9098

9199
int main(int argc, char* argv[])
@@ -105,5 +113,7 @@ int main(int argc, char* argv[])
105113

106114
test_retype_slot();
107115

116+
test_std_function_style_syntax();
117+
108118
return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
109119
}

0 commit comments

Comments
 (0)