From 20678c69aa2ba6c8a6be052f2ea359efce95bd65 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Mon, 10 Sep 2012 22:22:23 +0000 Subject: [PATCH] * libs/numeric/ublas/test/utils.hpp: test suite should return non-zero status if any test failed svn path=/trunk/libs/numeric/ublas/; revision=80489 --- test/utils.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/utils.hpp b/test/utils.hpp index 27c17444..25d0ab4a 100644 --- a/test/utils.hpp +++ b/test/utils.hpp @@ -203,15 +203,17 @@ bool rel_close_to(::std::complex const& x, ::std::complex const& y, T3 t /* [/BOOST_UBLAS_TEST_DO] */ -/// Define the end of a test suite. +/// Define the end of a test suite and return non-zero value if any test failed. #define BOOST_UBLAS_TEST_END() /* [BOOST_UBLAS_TEST_END] */ \ if (test_fails__ > 0) \ { \ ::std::cerr << "Number of failed tests: " << test_fails__ << ::std::endl; \ + return 1; \ } \ else \ { \ ::std::cerr << "No failed test" << ::std::endl; \ + return 0; \ } \ } /* End of test suite */ \ /* [/BOOST_UBLAS_TEST_END] */