|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58224 - trunk/libs/iostreams/test
From: daniel_james_at_[hidden]
Date: 2009-12-07 14:36:19
Author: danieljames
Date: 2009-12-07 14:36:18 EST (Mon, 07 Dec 2009)
New Revision: 58224
URL: http://svn.boost.org/trac/boost/changeset/58224
Log:
Change the macro setup for restrict_test and slice_test.
Because of the way restrict_test and slice_test were including the
header file they were testing, bjam was missing the dependency on that
files and sometimes, when changing the headers, the test wouldn't get
run. This fixes that.
Text files modified:
trunk/libs/iostreams/test/restrict_test.cpp | 12 ++++++++----
trunk/libs/iostreams/test/slice_test.cpp | 3 +--
2 files changed, 9 insertions(+), 6 deletions(-)
Modified: trunk/libs/iostreams/test/restrict_test.cpp
==============================================================================
--- trunk/libs/iostreams/test/restrict_test.cpp (original)
+++ trunk/libs/iostreams/test/restrict_test.cpp 2009-12-07 14:36:18 EST (Mon, 07 Dec 2009)
@@ -9,11 +9,15 @@
// replace BOOST_RESTRICT with BOOST_IOSTREAMS_RESTRICT here, since that
// would interfere with the oepration of the header
// <boost/iostreams/restrict.hpp>
-#ifndef BOOST_RESTRICT
-# define BOOST_RESTRICT restrict
-# define BOOST_RESTRICT_HEADER <boost/iostreams/restrict.hpp>
+#include <iostream>
+
+#if defined(BOOST_RESTRICT_USE_SLICE)
+# include <boost/iostreams/slice.hpp>
+# define BOOST_RESTRICT slice
+#else
+# include <boost/iostreams/restrict.hpp>
+# define BOOST_RESTRICT restrict
#endif
-#include BOOST_RESTRICT_HEADER
#include <algorithm> // equal.
#include <cctype>
Modified: trunk/libs/iostreams/test/slice_test.cpp
==============================================================================
--- trunk/libs/iostreams/test/slice_test.cpp (original)
+++ trunk/libs/iostreams/test/slice_test.cpp 2009-12-07 14:36:18 EST (Mon, 07 Dec 2009)
@@ -13,6 +13,5 @@
* Tests the overloaded function template boost::iostreams::slice.
*/
-#define BOOST_RESTRICT slice
-#define BOOST_RESTRICT_HEADER <boost/iostreams/slice.hpp>
+#define BOOST_RESTRICT_USE_SLICE
#include "restrict_test.cpp"
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk