mirror of
https://github.com/boostorg/local_function.git
synced 2026-01-26 18:42:17 +00:00
Reworked all LocalFunction tests and examples to use Boost.Detail/LightweightTest (instead of Boost.Test) and test sequence syntax without variadic macros (..._nova tests).
[SVN r77747]
This commit is contained in:
@@ -6,15 +6,16 @@
|
||||
// Home at http://www.boost.org/libs/local_function
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifndef BOOST_NO_VARIADIC_MACROS
|
||||
#ifdef BOOST_NO_VARIADIC_MACROS
|
||||
# error "variadic macros required"
|
||||
#else
|
||||
|
||||
#include <boost/local_function.hpp>
|
||||
#define BOOST_TEST_MODULE TestAddInline
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_add_inline) {
|
||||
int main(void) {
|
||||
//[add_inline
|
||||
int sum = 0, factor = 10;
|
||||
|
||||
@@ -28,12 +29,9 @@ BOOST_AUTO_TEST_CASE(test_add_inline) {
|
||||
for(size_t i = 0; i < v.size(); ++i) add(v[i]); // Cannot use for_each.
|
||||
//]
|
||||
|
||||
BOOST_CHECK(sum == 1000);
|
||||
BOOST_TEST(sum == 1000);
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int main(void) { return 0; } // Trivial test.
|
||||
|
||||
#endif
|
||||
#endif // VARIADIC_MACROS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user