2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-22 03:42:19 +00:00
test/test_coordinate_matrix_sort.cpp: fixed wrong index in check
test/utils.hpp: fixed wrong exit code on failure
This commit is contained in:
Gunter Winkler
2010-03-15 19:59:11 +00:00
parent 780490a0be
commit 70ca83702d
2 changed files with 6 additions and 3 deletions

View File

@@ -1,4 +1,6 @@
#define BOOST_UBLAS_NO_ELEMENT_PROXIES
#ifndef BOOST_UBLAS_NO_ELEMENT_PROXIES
# define BOOST_UBLAS_NO_ELEMENT_PROXIES
#endif
#include<boost/numeric/ublas/matrix_sparse.hpp>
#include<boost/numeric/ublas/io.hpp>
@@ -51,7 +53,7 @@ BOOST_UBLAS_TEST_DEF( test_coordinate_matrix_sort )
BOOST_UBLAS_TEST_CHECK( matrix_mask(1,1) == 2.1 );
BOOST_UBLAS_DEBUG_TRACE( "Displaying matrix(0,1)" << matrix_mask(0,1) );
BOOST_UBLAS_TEST_CHECK( matrix_mask(1,1) == 1.1 );
BOOST_UBLAS_TEST_CHECK( matrix_mask(0,1) == 1.1 );
}

View File

@@ -25,7 +25,8 @@
#define BOOST_UBLAS_TEST_DO(x) EXPAND_(x)(test_fails_)
#define BOOST_UBLAS_TEST_END() if (test_fails_ > 0) { std::cerr << "Number of failed tests: " << test_fails_ << std::endl; } else { std::cerr << "No failed test" << std::endl; }
#define 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; }
#define BOOST_UBLAS_TEST_CHECK(x) if (!(x)) { std::cerr << "Failed assertion: " << STRINGIFY_(x) << std::endl; ++test_fails_; }