|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71350 - in sandbox/icl/libs/icl/test: . fix_tickets_ test_casual_
From: afojgo_at_[hidden]
Date: 2011-04-17 07:49:34
Author: jofaber
Date: 2011-04-17 07:49:33 EDT (Sun, 17 Apr 2011)
New Revision: 71350
URL: http://svn.boost.org/trac/boost/changeset/71350
Log:
Bugfix: ticket_5482
Added:
sandbox/icl/libs/icl/test/fix_tickets_/
- copied from r71328, /trunk/libs/icl/test/fix_tickets_/
sandbox/icl/libs/icl/test/fix_tickets_/fix_tickets.cpp
- copied unchanged from r71328, /trunk/libs/icl/test/fix_tickets_/fix_tickets.cpp
sandbox/icl/libs/icl/test/fix_tickets_/vc9_fix_tickets.vcproj
- copied unchanged from r71328, /trunk/libs/icl/test/fix_tickets_/vc9_fix_tickets.vcproj
Properties modified:
sandbox/icl/libs/icl/test/ (props changed)
Text files modified:
sandbox/icl/libs/icl/test/Jamfile.v2 | 1
sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp | 75 +++++++++++++++++++++++++++++----------
sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln | 6 +++
3 files changed, 63 insertions(+), 19 deletions(-)
Modified: sandbox/icl/libs/icl/test/Jamfile.v2
==============================================================================
--- sandbox/icl/libs/icl/test/Jamfile.v2 (original)
+++ sandbox/icl/libs/icl/test/Jamfile.v2 2011-04-17 07:49:33 EDT (Sun, 17 Apr 2011)
@@ -70,6 +70,7 @@
# Bug fixes --------------------------------------------------------------
[ run fix_icl_after_thread_/fix_icl_after_thread.cpp ]
+ [ run fix_tickets_/fix_tickets.cpp ]
# Check for compiler bugs ------------------------------------------------
# compile-fail-tests
Modified: sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp (original)
+++ sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp 2011-04-17 07:49:33 EDT (Sun, 17 Apr 2011)
@@ -185,32 +185,69 @@
}
-BOOST_AUTO_TEST_CASE(casual)
+BOOST_AUTO_TEST_CASE(invariance_wrt_compare_ordering_ticket_5482)
{
typedef int T;
typedef int U;
- typedef interval_map<T,U, total_absorber> IntervalMapT;
- typedef interval_set<T> IntervalSetT;
- typedef IntervalMapT::interval_type IntervalT;
-
- BOOST_CHECK((has_std_infinity<double>::value));
-
- BOOST_CHECK((boost::detail::is_incrementable<chrono::duration<int> >::value));
+ typedef interval_map<T,U, partial_absorber> IntervalMapT;
+ typedef interval_map<T,U, partial_absorber,std::less> IntervalLtMapT;
+ typedef interval_map<T,U, partial_absorber,std::greater> IntervalGtMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef IntervalMapT::interval_type IntervalT;
+ typedef IntervalLtMapT::interval_type IntervalLtT;
+ typedef IntervalGtMapT::interval_type IntervalGtT;
+
+ IntervalLtMapT lt_map;
+ IntervalGtMapT gt_map;
+
+ BOOST_CHECK( IntervalLtMapT::domain_compare()(0,1));
+ BOOST_CHECK(!IntervalLtMapT::domain_compare()(1,0));
+ BOOST_CHECK( IntervalGtMapT::domain_compare()(1,0));
+ BOOST_CHECK(!IntervalGtMapT::domain_compare()(0,1));
+
+ IntervalGtT(5);
+
+ lt_map.insert(make_pair(IntervalLtT(1),1));
+ lt_map.insert(make_pair(IntervalLtT(2),1));
+
+ gt_map.insert(make_pair(IntervalGtT(2,1),1));
+ gt_map.insert(make_pair(IntervalGtT(3,2),1));
+ gt_map.insert(make_pair(IntervalGtT(5,4),1));
+ gt_map.add(make_pair(IntervalGtT(8,2),1));
+
+ cout << "-----------------------------\n";
+ cout << "lt_map.iterative_size() = " << lt_map.iterative_size() << endl;
+ cout << "gt_map.iterative_size() = " << gt_map.iterative_size() << endl;
+ cout << "gt_map : " << gt_map << endl;
+
- BOOST_CHECK((has_rep_type<chrono::duration<int> >::value));
- BOOST_CHECK((represents<int, chrono::duration<int> >::value));
-
- BOOST_CHECK((!is_discrete<chrono::duration<double> >::value));
+ BOOST_CHECK_EQUAL(true, true);
+}
- //BOOST_CHECK((!is_discrete<Now_time_rational>::value));
- BOOST_CHECK(( is_continuous<boost::rational<int> >::value));
- BOOST_CHECK(( !is_discrete<boost::rational<int> >::value));
- BOOST_CHECK(( has_rep_type<Now_time_rational>::value));
- BOOST_CHECK(( is_continuous<Now_time_rational>::value));
- BOOST_CHECK(( !is_discrete<Now_time_rational>::value));
- BOOST_CHECK(( is_continuous<typename rep_type_of<Now_time_rational>::type>::value));
+BOOST_AUTO_TEST_CASE(ticket_5482)
+{
+ typedef interval_map<int,int,partial_absorber,std::less> m1_t;
+ typedef interval_map<int,int,partial_absorber,std::greater> m2_t;
+ m1_t m1;
+ m2_t m2;
+ m1.insert(make_pair(m1_t::interval_type(1), 20));
+ m1.insert(make_pair(m1_t::interval_type(2), 20));
+ m1.insert(make_pair(m1_t::interval_type(3), 20));
+
+ m2.insert(make_pair(m2_t::interval_type(1), 20));
+ m2.insert(make_pair(m2_t::interval_type(2), 20));
+ m2.insert(make_pair(m2_t::interval_type(3), 20));
+ BOOST_CHECK_EQUAL(m1.iterative_size(), m2.iterative_size());
+}
+BOOST_AUTO_TEST_CASE(casual)
+{
+ typedef int T;
+ typedef int U;
+ typedef interval_map<T,U, partial_absorber> IntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef IntervalMapT::interval_type IntervalT;
BOOST_CHECK_EQUAL(true, true);
}
Modified: sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln
==============================================================================
--- sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln (original)
+++ sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln 2011-04-17 07:49:33 EDT (Sun, 17 Apr 2011)
@@ -67,6 +67,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fast_stat_interval_map", "fast_stat_interval_map_\vc9_fast_stat_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fix_tickets", "fix_tickets_\vc9_fix_tickets.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -205,6 +207,10 @@
{EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}.Debug|Win32.Build.0 = Debug|Win32
{EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}.Release|Win32.ActiveCfg = Release|Win32
{EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
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