Fixed: set_DelOdd and map_DelOdd tests for FeldmanHashSet/Map now use correct compare...
[libcds.git] / test / stress / set / set_type.h
index 2925cf0128a4c750b34ecc680b3d1d7c2c4aa22d..3d0edd7c5730f08b99fad774106b2b0cea958b57 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -25,7 +25,7 @@
     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef CDSUNIT_SET_TYPE_H
@@ -59,11 +59,11 @@ namespace set {
     struct less;
 
     template <typename Key>
-    struct cmp 
+    struct cmp
     {
         int operator ()(Key const& k1, Key const& k2) const
         {
-            if ( less<Key>( k1, k2 ) )
+            if ( less<Key>( k1, k2 ))
                 return -1;
             return less<Key>( k2, k1 ) ? 1 : 0;
         }
@@ -183,7 +183,7 @@ namespace set {
             key_type    key;
             value_type  val;
 
-            /*explicit*/ key_val( key_type const& k ): key(k), val() {}
+            explicit key_val( key_type const& k ): key(k), val() {}
             key_val( key_type const& k, value_type const& v ): key(k), val(v) {}
 
             template <typename K>
@@ -289,9 +289,17 @@ namespace set {
     // print_stat
     // *************************************************
 
+    struct empty_stat {};
+    static inline cds_test::property_stream& operator <<( cds_test::property_stream& o, empty_stat const& )
+    {
+        return o;
+    }
+
     template <typename Set>
-    static inline void print_stat( cds_test::property_stream&, Set const& /*s*/ )
-    {}
+    static inline void print_stat( cds_test::property_stream& o, Set const& s )
+    {
+        o << s.statistics();
+    }
 
 
     //*******************************************************