[libsigc++2] Enable test_lambda in 'make check'.



commit 50911ffcadaf483d3fe14078ed5153e55fc5985b
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Mon Mar 19 15:45:55 2012 +0100

    Enable test_lambda in 'make check'.
    
    * tests/Makefile.am: Enable test_lambda in 'make check'.
    * tests/test_lambda.cc: Comment out the tests with sigc::ref() in lambda
    functions' parameter lists. See Bug #669128.

 ChangeLog            |    8 ++++++++
 tests/Makefile.am    |   14 ++++++++++----
 tests/test_lambda.cc |   11 +++++++----
 3 files changed, 25 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e6baa0f..f8d6870 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-03-19  Kjell Ahlstedt  <kjell ahlstedt bredband net>
+
+	Enable test_lambda in 'make check'.
+
+	* tests/Makefile.am: Enable test_lambda in 'make check'.
+	* tests/test_lambda.cc: Comment out the tests with sigc::ref() in lambda
+	functions' parameter lists. See Bug #669128.
+
 2.2.10:
 
 2011-07-21  Thomas Rydzynski  <qsorix rydznet pl>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0680ba1..af20d84 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -24,7 +24,7 @@ check_PROGRAMS =			\
 	test_accumulated		\
 	test_bind			\
 	test_bind_ref			\
-	test_bind_refptr \
+	test_bind_refptr 		\
 	test_bind_return		\
 	test_compose			\
 	test_copy_invalid_slot		\
@@ -35,6 +35,7 @@ check_PROGRAMS =			\
 	test_exception_catch		\
 	test_functor_trait		\
 	test_hide			\
+	test_lambda			\
 	test_limit_reference		\
 	test_mem_fun			\
 	test_ptr_fun			\
@@ -49,10 +50,10 @@ check_PROGRAMS =			\
 TESTS = $(check_PROGRAMS)
 
 test_accum_iter_SOURCES			= test_accum_iter.cc
-test_accumulated_SOURCES = test_accumulated.cc
+test_accumulated_SOURCES 		= test_accumulated.cc
 test_bind_SOURCES			= test_bind.cc
 test_bind_ref_SOURCES			= test_bind_ref.cc
-test_bind_refptr_SOURCES			= test_bind_refptr.cc
+test_bind_refptr_SOURCES		= test_bind_refptr.cc
 test_bind_return_SOURCES		= test_bind_return.cc
 test_compose_SOURCES			= test_compose.cc
 test_copy_invalid_slot_SOURCES		= test_copy_invalid_slot.cc
@@ -63,6 +64,7 @@ test_disconnect_during_emit_SOURCES	= test_disconnect_during_emit.cc
 test_exception_catch_SOURCES		= test_exception_catch.cc
 test_functor_trait_SOURCES		= test_functor_trait.cc
 test_hide_SOURCES			= test_hide.cc
+test_lambda_SOURCES			= test_lambda.cc
 test_limit_reference_SOURCES		= test_limit_reference.cc
 test_mem_fun_SOURCES			= test_mem_fun.cc
 test_ptr_fun_SOURCES			= test_ptr_fun.cc
@@ -74,7 +76,11 @@ test_slot_SOURCES			= test_slot.cc
 test_slot_disconnect_SOURCES		= test_slot_disconnect.cc
 test_trackable_SOURCES			= test_trackable.cc
 
+# 2005-01-19
 # Disabled: test_lambda - The Tru64 compiler can't build this when not using
 #  -std strict_ansi -model ansi, so let's not worry about it.
+# 2012-03-19
+# Enabled test_lambda. See https://bugzilla.gnome.org/show_bug.cgi?id=669128
+# TODO: Disable once again, if some compiler still can't build it (tested with gcc 4.6.1)
 
-dist_noinst_DATA = test_lambda.cc
+#dist_noinst_DATA = test_lambda.cc
diff --git a/tests/test_lambda.cc b/tests/test_lambda.cc
index 93fe083..c8a7e72 100644
--- a/tests/test_lambda.cc
+++ b/tests/test_lambda.cc
@@ -71,12 +71,15 @@ int main()
   std::cout << "((++_1)*2)(1):      " << ((++_1)*2)(1)        << std::endl;
   std::cout << "((++_1)*2)(a):      " << ((++_1)*2)(a);
   std::cout << "; a: "                << a                    << std::endl;
-  std::cout << "((++_1)*2)(ref(a)): " << ((++_1)*2)(sigc::ref(a));
-  std::cout << "; a: "                << a                    << std::endl;
+// gcc can't compile lambda functions with sigc::ref() parameters.
+// See https://bugzilla.gnome.org/show_bug.cgi?id=669128
+// TODO: Can the compilation problems be fixed?
+//  std::cout << "((++_1)*2)(ref(a)): " << ((++_1)*2)(sigc::ref(a));
+//  std::cout << "; a: "                << a                    << std::endl;
   std::cout << "((++(*_1))*2)(&a):  " << ((++(*_1))*2)(&a);
   std::cout << "; a: "                << a                    << std::endl;
-  std::cout << "((--(*(&_1)))*2)(ref(a)): " << ((--(*(&_1)))*2)(sigc::ref(a));
-  std::cout << "; a: "                << a                    << std::endl;
+//  std::cout << "((--(*(&_1)))*2)(ref(a)): " << ((--(*(&_1)))*2)(sigc::ref(a));
+//  std::cout << "; a: "                << a                    << std::endl;
   std::cout << "(-_1)     (-5):     " << (-_1)     (-5)       << std::endl;
   std::cout << "(var(&a)[0])():     " << (sigc::var(&a)[0])() << std::endl;
   std::cout << "(_1[_2])    (&a,0): " << (_1[_2])    (&a,0)   << std::endl;



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