<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
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:
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.
*/
#include "map_type.h"
check_before_cleanup( testMap );
- testMap.clear();
+ //testMap.clear();
+ for ( auto const& str: s_arrKeys )
+ testMap.erase( str );
EXPECT_TRUE( testMap.empty() );
+ EXPECT_EQ( testMap.size(), 0u );
additional_check( testMap );
print_stat( propout(), testMap );
return seed;
}
};
-
};
+ struct empty_stat {};
+ static inline cds_test::property_stream& operator <<( cds_test::property_stream& o, empty_stat const& )
+ {
+ return o;
+ }
+
template <typename Map>
- static inline void print_stat( cds_test::property_stream&, Map const& /*m*/ )
- {}
+ static inline void print_stat( cds_test::property_stream& o, Map const& m )
+ {
+ o << m.statistics();
+ }
+
template <typename Map>
static inline void check_before_cleanup( Map& /*m*/ )
return false;
}
- std::ostream& dump( std::ostream& stm ) { return stm; }
-
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
return false;
}
- std::ostream& dump( std::ostream& stm ) { return stm; }
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
// for testing
};
} // namespace map
+
#define CDSSTRESS_StdMap_case( fixture, test_case, std_map_type, key_type, value_type ) \
TEST_F( fixture, std_map_type ) \
{ \
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:
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_MAP_TYPE_STRIPED_H
: base_class( cfg.s_nMapSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )) )
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
: base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )) )
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
: base_class( cfg.s_nMapSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )))
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
: base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )) )
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
<< std::make_pair( "delete_failed", nDeleteFailed )
<< std::make_pair( "final_set_size", testSet.size() );
- testSet.clear();
+ //testSet.clear();
+ for (auto const& str: m_arrString )
+ testSet.erase( str );
EXPECT_TRUE( testSet.empty() );
+ EXPECT_EQ( testSet.size(), 0u );
additional_check( testSet );
print_stat( propout(), testSet );
<< std::make_pair( "extract_failed", nExtractFailed )
<< std::make_pair( "final_set_size", testSet.size() );
- testSet.clear();
+ //testSet.clear();
+ for ( auto const& str : m_arrString )
+ testSet.erase( str );
EXPECT_TRUE( testSet.empty() );
+ EXPECT_EQ( testSet.size(), 0u );
additional_check( testSet );
print_stat( propout(), testSet );
// 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();
+ }
//*******************************************************
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:
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_STD_H
return false;
}
- std::ostream& dump( std::ostream& stm ) { return stm; }
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
return false;
}
- std::ostream& dump( std::ostream& stm ) { return stm; }
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
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:
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_STRIPED_H
: base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )) )
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
/*
template <typename Q, typename Less>
bool erase_with( Q const& v, Less pred )
: base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( 1, cfg.s_nLoadFactor )) )
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
/*
template <typename Q, typename Less>
bool erase_with( Q const& v, Less pred )
: base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )) )
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
: base_class( 0, *(new(&m_placeHolder) resizing_policy_t( 1024, cfg.s_nLoadFactor )))
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
: base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )) )
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
/*
template <typename Q, typename Less>
bool erase_with( Q const& v, Less pred )
: base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( 1, cfg.s_nLoadFactor )))
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
: base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )) )
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
: base_class( 0, *(new(&m_placeHolder) resizing_policy_t( 1024, cfg.s_nLoadFactor )))
{}
+ empty_stat statistics() const
+ {
+ return empty_stat();
+ }
+
// for testing
static CDS_CONSTEXPR bool const c_bExtractSupported = false;
static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;