[libsigcplusplus] test_retype: Add test of R(Args...) syntax.



commit 28d0d6ca71c85281274388379792c2cf13c8da4b
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 16 12:35:55 2016 +0100

    test_retype: Add test of R(Args...) syntax.

 tests/test_retype.cc |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_retype.cc b/tests/test_retype.cc
index 647afe0..95de57c 100644
--- a/tests/test_retype.cc
+++ b/tests/test_retype.cc
@@ -86,6 +86,14 @@ void test_retype_slot()
   util->check_result(result_stream, "foo::test_int(int 5) 7.5");
 }
 
+void test_std_function_style_syntax()
+{
+  foo foo_;
+  sigc::slot<float(float)> s1 = sigc::retype(sigc::mem_fun(foo_, &foo::test_int));
+  result_stream << s1(1.234f);
+  util->check_result(result_stream, "foo::test_int(int 1) 1.5");
+}
+
 } // end anonymous namespace
 
 int main(int argc, char* argv[])
@@ -105,5 +113,7 @@ int main(int argc, char* argv[])
 
   test_retype_slot();
 
+  test_std_function_style_syntax();
+
   return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]