Switch tests to lightweight_test

This commit is contained in:
Peter Dimov
2018-01-03 18:41:14 +02:00
parent fb55aa6d4d
commit c51d8a9495
4 changed files with 20 additions and 30 deletions

View File

@ -1,8 +1,8 @@
# Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
project : requirements <library>/boost/test//boost_test_exec_monitor ; # Distributed under the Boost Software License, Version 1.0.
test-suite tuple : test-suite tuple :
[ run tuple_test_bench.cpp ] [ run tuple_test_bench.cpp ]
[ run io_test.cpp ] [ run io_test.cpp ]
[ run another_tuple_test_bench.cpp ] [ run another_tuple_test_bench.cpp ]
; ;

View File

@ -15,11 +15,10 @@
// Defining any of E1 to E5 or E7 to E11 opens some illegal code that // Defining any of E1 to E5 or E7 to E11 opens some illegal code that
// should cause the compliation to fail. // should cause the compliation to fail.
#define BOOST_INCLUDE_MAIN // for testing, include rather than link
#include <boost/test/test_tools.hpp> // see "Header Implementation Option"
#include "boost/tuple/tuple.hpp" #include "boost/tuple/tuple.hpp"
#include "boost/core/lightweight_test.hpp"
#include <string> #include <string>
#include <utility> #include <utility>
@ -149,7 +148,7 @@ void foo7() {
// -------------------------------- // --------------------------------
// ---------------------------- // ----------------------------
int test_main(int, char *[]) { int main() {
foo1(); foo1();
foo2(); foo2();
@ -159,5 +158,5 @@ int test_main(int, char *[]) {
foo7(); foo7();
return 0; return boost::report_errors();
} }

View File

@ -10,12 +10,11 @@
// //
// Testing the I/O facilities of tuples // Testing the I/O facilities of tuples
#define BOOST_INCLUDE_MAIN // for testing, include rather than link
#include "boost/test/test_tools.hpp" // see "Header Implementation Option"
#include "boost/tuple/tuple_io.hpp" #include "boost/tuple/tuple_io.hpp"
#include "boost/tuple/tuple_comparison.hpp" #include "boost/tuple/tuple_comparison.hpp"
#include "boost/core/lightweight_test.hpp"
#include <fstream> #include <fstream>
#include <iterator> #include <iterator>
#include <algorithm> #include <algorithm>
@ -28,6 +27,8 @@
#include <sstream> #include <sstream>
#endif #endif
#define BOOST_CHECK BOOST_TEST
using namespace boost; using namespace boost;
#if defined BOOST_NO_STRINGSTREAM #if defined BOOST_NO_STRINGSTREAM
@ -38,9 +39,7 @@ typedef std::ostringstream useThisOStringStream;
typedef std::istringstream useThisIStringStream; typedef std::istringstream useThisIStringStream;
#endif #endif
int test_main(int argc, char * argv[] ) { int main() {
(void)argc;
(void)argv;
using boost::tuples::set_close; using boost::tuples::set_close;
using boost::tuples::set_open; using boost::tuples::set_open;
using boost::tuples::set_delimiter; using boost::tuples::set_delimiter;
@ -138,6 +137,5 @@ int test_main(int argc, char * argv[] ) {
// general. If this is wanted, some kind of a parseable string class // general. If this is wanted, some kind of a parseable string class
// should be used. // should be used.
return 0; return boost::report_errors();
} }

View File

@ -8,19 +8,18 @@
// tuple_test_bench.cpp -------------------------------- // tuple_test_bench.cpp --------------------------------
#define BOOST_INCLUDE_MAIN // for testing, include rather than link
#include <boost/test/test_tools.hpp> // see "Header Implementation Option"
#include "boost/tuple/tuple.hpp" #include "boost/tuple/tuple.hpp"
#include "boost/tuple/tuple_comparison.hpp" #include "boost/tuple/tuple_comparison.hpp"
#include "boost/type_traits/is_const.hpp" #include "boost/type_traits/is_const.hpp"
#include "boost/ref.hpp" #include "boost/ref.hpp"
#include "boost/core/lightweight_test.hpp"
#include <string> #include <string>
#include <utility> #include <utility>
#define BOOST_CHECK BOOST_TEST
using namespace boost; using namespace boost;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -472,7 +471,7 @@ void tuple_swap_test()
// - main --------------------------------------------------------------------- // - main ---------------------------------------------------------------------
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
int test_main(int, char *[]) { int main() {
construction_test(); construction_test();
element_access_test(); element_access_test();
@ -486,12 +485,6 @@ int test_main(int, char *[]) {
const_tuple_test(); const_tuple_test();
tuple_length_test(); tuple_length_test();
tuple_swap_test(); tuple_swap_test();
return 0;
return boost::report_errors();
} }