Skip to content

Commit fdc9ec7

Browse files
Kojoleystefanseefeld
authored andcommitted
Fixed module tests fail
Since recently lightweight_test introduced a sanitation to ensure that `boost::report_errors()` is called, and it does not in module tests. The problem could be fixed by exporting the function and calling it from these python tests, but as it already done in other module tests I just turned those usages lightweight_test to a regular assertation.
1 parent 0b0c053 commit fdc9ec7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_class.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
// http://www.boost.org/LICENSE_1_0.txt)
55
#ifndef TEST_CLASS_DWA2002326_HPP
66
# define TEST_CLASS_DWA2002326_HPP
7-
# include <boost/detail/lightweight_test.hpp>
7+
# include <boost/assert.hpp>
88

99
template <int n = 0>
1010
struct test_class
1111
{
1212
explicit test_class(int x) : x(x), magic(7654321 + n) { ++counter; }
1313
test_class(test_class const& rhs) : x(rhs.x), magic(7654321 + n) { ++counter; }
14-
virtual ~test_class() { BOOST_TEST(magic == 7654321 + n); magic = 6666666; x = 9999; --counter; }
14+
virtual ~test_class() { BOOST_ASSERT(magic == 7654321 + n); magic = 6666666; x = 9999; --counter; }
1515

16-
void set(int _x) { BOOST_TEST(magic == 7654321 + n); this->x = _x; }
17-
int value() const { BOOST_TEST(magic == 7654321 + n); return x; }
16+
void set(int _x) { BOOST_ASSERT(magic == 7654321 + n); this->x = _x; }
17+
int value() const { BOOST_ASSERT(magic == 7654321 + n); return x; }
1818
operator int() const { return x; }
1919
static int count() { return counter; }
2020

0 commit comments

Comments
 (0)