Boost logo

Boost-Commit :

From: asutton_at_[hidden]
Date: 2007-09-06 09:58:04


Author: asutton
Date: 2007-09-06 09:58:03 EDT (Thu, 06 Sep 2007)
New Revision: 39137
URL: http://svn.boost.org/trac/boost/changeset/39137

Log:
Removed old cc test
Added a bunch of other tests

Removed:
   sandbox/graph-v2/libs/property_map/test/compile/property_map_cc.cpp
Text files modified:
   sandbox/graph-v2/libs/property_map/test/compile/Jamfile | 8 +++
   sandbox/graph-v2/libs/property_map/test/compile/compile.cpp | 71 +--------------------------------------
   2 files changed, 9 insertions(+), 70 deletions(-)

Modified: sandbox/graph-v2/libs/property_map/test/compile/Jamfile
==============================================================================
--- sandbox/graph-v2/libs/property_map/test/compile/Jamfile (original)
+++ sandbox/graph-v2/libs/property_map/test/compile/Jamfile 2007-09-06 09:58:03 EDT (Thu, 06 Sep 2007)
@@ -14,5 +14,11 @@
 
 test-suite property-map-test :
     [ compile identity.cpp ]
- [ compile compile.cpp ]
+ [ compile iterator_property_map.cpp ]
+ [ compile associative_property_map.cpp ]
+ [ compile reference_property_map.cpp ]
+ [ compile constant_property_map.cpp ]
+ [ compile identity_property_map.cpp ]
+ [ compile dummy_property_map.cpp ]
+ [ compile dynamic_property_map.cpp ]
     ;

Modified: sandbox/graph-v2/libs/property_map/test/compile/compile.cpp
==============================================================================
--- sandbox/graph-v2/libs/property_map/test/compile/compile.cpp (original)
+++ sandbox/graph-v2/libs/property_map/test/compile/compile.cpp 2007-09-06 09:58:03 EDT (Thu, 06 Sep 2007)
@@ -21,89 +21,22 @@
     using namespace boost;
     using namespace boost::property_map;
 
- // Use this for the index map for now...
- typedef size_t Key;
- typedef size_t Value;
- Value v;
- Key k;
+#if 0
     {
- typedef vector<Value> Vector;
- typedef readable_property_map_archetype<Key, Value> IndexMap;
- typedef iterator_property_map<Vector::iterator, IndexMap> IteratorMap;
-
- Vector v;
- IndexMap& indices = static_object<IndexMap>::get();
- IteratorMap imap = make_iterator_property_map(v.begin(), indices);
- get(imap, Key());
- put(imap, Key(), Value());
- imap[Key()];
     }
 
     {
- typedef vector<Value> Vector;
- typedef readable_property_map_archetype<Key, Value> IndexMap;
- typedef safe_iterator_property_map<Vector::iterator, IndexMap> IteratorMap;
-
- Vector v;
- IndexMap& indices = static_object<IndexMap>::get();
- IteratorMap imap = make_safe_iterator_property_map(v.begin(), Key(), indices);
- get(imap, Key());
- put(imap, Key(), Value());
- imap[Key()];
- }
-
- {
- typedef map<Key, Value> Map;
- typedef associative_property_map<Map> AssociativeMap;
 
- Map m;
- AssociativeMap amap = make_associative_property_map(m);
- get(amap, Key());
- put(amap, Key(), Value());
- amap[Key()];
     }
 
     {
- typedef reference_property_map<Key, Value> ReferenceMap;
-
- ReferenceMap rmap = make_reference_property_map<Key>(v);
- get(rmap, k);
- put(rmap, k, v);
- rmap[k];
- rmap[k] = v;
     }
 
     {
- typedef constant_property_map<Key, Value> ReferenceMap;
-
- ReferenceMap rmap = make_constant_property_map<Key>(v);
- get(rmap, k);
- }
-
- {
- typedef identity_property_map<Value> IdentityMap;
-
- IdentityMap imap;
- get(imap, k);
- imap[k];
- imap[k] = v;
- }
-
- {
- typedef dummy_property_map<Key, Value> DummyMap;
-
- DummyMap dmap;
- put(dmap, k, v);
     }
 
     {
- // construct a couple different property maps
- constant_property_map<Key, Value> cmap(v);
- reference_property_map<Key, Value> rmap(v);
-
- dynamic_properties dp;
- dp.property("constant", cmap);
- // dp.property("reference", rmap);
 
     }
+#endif
 }

Deleted: sandbox/graph-v2/libs/property_map/test/compile/property_map_cc.cpp
==============================================================================
--- sandbox/graph-v2/libs/property_map/test/compile/property_map_cc.cpp 2007-09-06 09:58:03 EDT (Thu, 06 Sep 2007)
+++ (empty file)
@@ -1,107 +0,0 @@
-// (C) Copyright Jeremy Siek 2001.
-// Distributed under 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)
-
-#include <boost/property_map.hpp>
-#include <map>
-
-// This file checks the property map concepts against the property map
-// archetypes to make sure they are consistent and that they compile.
-// This also checks all the property map classes defined in
-// property_map.hpp against the concept checking classes.
-
-int
-main()
-{
- using namespace boost;
- {
- typedef null_archetype<> Key;
- typedef assignable_archetype<copy_constructible_archetype<> > Value;
- typedef readable_property_map_archetype<Key, Value> PMap;
- function_requires<ReadablePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef null_archetype<> Key;
- typedef assignable_archetype<copy_constructible_archetype<> > Value;
- typedef writable_property_map_archetype<Key, Value> PMap;
- function_requires<WritablePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef null_archetype<> Key;
- typedef assignable_archetype<copy_constructible_archetype<> > Value;
- typedef read_write_property_map_archetype<Key, Value> PMap;
- function_requires<ReadWritePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef null_archetype<> Key;
- typedef assignable_archetype<copy_constructible_archetype<> > Value;
- typedef lvalue_property_map_archetype<Key, Value> PMap;
- function_requires<LvaluePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef null_archetype<> Key;
- typedef assignable_archetype<copy_constructible_archetype<> > Value;
- typedef mutable_lvalue_property_map_archetype<Key, Value> PMap;
- function_requires<Mutable_LvaluePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef std::ptrdiff_t Key;
- typedef int* PMap;
- function_requires<Mutable_LvaluePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef std::ptrdiff_t Key;
- typedef const int* PMap;
- function_requires<LvaluePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef sgi_assignable_archetype<> Key; // ?
- typedef sgi_assignable_archetype<> Value;
- typedef random_access_iterator_archetype<Value> Iterator;
- typedef readable_property_map_archetype<Key, std::ptrdiff_t> IndexMap;
- typedef iterator_property_map<Iterator, IndexMap
-#ifdef BOOST_NO_STD_ITERATOR_TRAITS
- , Value, const Value&
-#endif
- > PMap;
- function_requires<LvaluePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef sgi_assignable_archetype<> Key;
- typedef sgi_assignable_archetype<> Value;
- typedef mutable_random_access_iterator_archetype<Value> Iterator;
- typedef readable_property_map_archetype<Key, std::ptrdiff_t> IndexMap;
- typedef iterator_property_map<Iterator, IndexMap
-#ifdef BOOST_NO_STD_ITERATOR_TRAITS
- , Value, Value&
-#endif
- > PMap;
- function_requires<Mutable_LvaluePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef sgi_assignable_archetype< less_than_comparable_archetype<> > Key;
- typedef default_constructible_archetype< sgi_assignable_archetype<> >
- Value;
- typedef std::map<Key, Value> Container;
- typedef associative_property_map<Container> PMap;
- function_requires<Mutable_LvaluePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef sgi_assignable_archetype< less_than_comparable_archetype<> > Key;
- typedef default_constructible_archetype< sgi_assignable_archetype<> >
- Value;
- typedef std::map<Key, Value> Container;
- typedef const_associative_property_map<Container> PMap;
- function_requires<LvaluePropertyMapConcept<PMap, Key> >();
- }
- {
- typedef identity_property_map PMap;
- function_requires<ReadablePropertyMapConcept<PMap, int> >();
- }
- {
- typedef dummy_property_map PMap;
- function_requires<ReadWritePropertyMapConcept<PMap, int> >();
- }
- return 0;
-}


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