Boost logo

Boost-Commit :

From: jefffaust_at_[hidden]
Date: 2007-05-28 13:32:18


Author: jefffaust
Date: 2007-05-28 13:32:17 EDT (Mon, 28 May 2007)
New Revision: 4330
URL: http://svn.boost.org/trac/boost/changeset/4330

Log:
Add is_assoc_iter test

Added:
   sandbox/explore/libs/explore/test/is_assoc_iter.cpp
Text files modified:
   sandbox/explore/libs/explore/test/Jamfile.v2 | 2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)

Modified: sandbox/explore/libs/explore/test/Jamfile.v2
==============================================================================
--- sandbox/explore/libs/explore/test/Jamfile.v2 (original)
+++ sandbox/explore/libs/explore/test/Jamfile.v2 2007-05-28 13:32:17 EDT (Mon, 28 May 2007)
@@ -37,5 +37,7 @@
   [ run boost_range.cpp ]
   
   [ run custom_format_simple.cpp ]
+
+ [ run is_assoc_iter.cpp ]
  ;
 }

Added: sandbox/explore/libs/explore/test/is_assoc_iter.cpp
==============================================================================
--- (empty file)
+++ sandbox/explore/libs/explore/test/is_assoc_iter.cpp 2007-05-28 13:32:17 EDT (Mon, 28 May 2007)
@@ -0,0 +1,34 @@
+// Boost.Print library
+
+// Copyright Jeffrey Faust 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+#define BOOST_TEST_MODULE PrintLib
+#include <boost/test/unit_test.hpp>
+#include <sstream>
+#include <vector>
+#include "../../../boost/explore/explore.hpp"
+#include "../../../boost/explore/stream_container.hpp"
+#include "../../../boost/explore/is_assoc_iter.hpp"
+
+BOOST_AUTO_TEST_CASE( is_assoc_iter_test )
+{
+ bool mapHasAssocIter = explore::is_assoc_iter<std::map<int, double> >::type();
+ BOOST_CHECK(mapHasAssocIter);
+
+ bool multimapHasAssocIter = explore::is_assoc_iter<std::multimap<std::string, bool> >::type();
+ BOOST_CHECK(multimapHasAssocIter);
+
+ bool vectorHasAssocIter = explore::is_assoc_iter<std::vector<double> >::type();
+ BOOST_CHECK(!vectorHasAssocIter);
+
+ bool pointerHasAssocIter = explore::is_assoc_iter<int*>::type();
+ BOOST_CHECK(!pointerHasAssocIter);
+
+ bool pairHasAssocIter = explore::is_assoc_iter<std::pair<int, double> >::type();
+ BOOST_CHECK(!pairHasAssocIter);
+}


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