Commit Graph
251 Commits
Author SHA1 Message Date
Daniel James dad0d48c9c Support containers with const value type
Currently just storing the value without a const. Can do better with
C++11 constructors, so maybe should do that, and cast away const on
compilers without support.

Another problem is that std::allocator<const int> doesn't compile for
libstdc++ (and potentially other standard libraries), so
boost::unordered_set<const int> can't compile. I'm not sure if I should
work around that, as it means changing the type of the container
(i.e. to boost::unordered_set<const int,... , std::allocator<int>>).
2016-10-17 08:06:19 +01:00
Daniel James 74abdd6973 Replace boost::next with a simpler version
Less optimized, but hopefully it won't cause any warnings.
2016-10-11 13:36:41 +01:00
Daniel James a316d3fa46 Fix more warnings 2016-10-11 10:07:07 +01:00
Daniel James 147885fec4 Add another random generation style.
This time for a more limited range of values so that equal values turn
up more often.  This is a bit shoddy, but seems like the best way to
improve the existing tests without too much effort.
2016-10-06 21:52:19 +01:00
Daniel James b1588929cc Fix another sign conversion warning. 2016-10-05 13:52:33 +01:00
Daniel James 71d19820ac Fix signed conversion warnings. 2016-10-05 09:45:53 +01:00
Daniel James 982685d3a0 Adjust order of variables to see if intel failure changes.
So currently on one intel tester find_tests is failing the 'pos !=
x.end()' test, but not the 'const_pos != x_const.end()' test for
unordered_set (and possibly others, the test results are truncated). I'm
a bit stumped as to why this should be, as for unordered_set the const
and non-const versions are basically the exact same code. See if
changing the order makes any difference to what fails.
2016-10-05 00:57:58 +01:00
Daniel James dadb4486ee Fix calls to std::rand in tests 2016-10-04 15:52:47 +01:00
Daniel James d14c1dec59 Revert "Allocator aware constructors."
This reverts commit b00bc15c3e.

I messed that up a bit, will get back to it later.
2016-10-03 20:58:15 +01:00
Daniel James 21d6d7bc21 Fix detection of is_nothrow_move_constructible support.
I should possibly also check how it handles `throw()`?
2016-10-03 10:49:49 +01:00
Daniel James b00bc15c3e Allocator aware constructors. 2016-10-02 17:56:01 +01:00
Daniel James 50c4cbe06c Try to fix the failures in noxcept_tests 2016-10-02 13:04:25 +01:00
Daniel James 573e10665c Use standard boost move style in noexcept_tests. 2016-10-02 13:04:25 +01:00
Daniel James a93331dd96 Fix new emplace tests. 2016-10-01 13:51:25 +01:00
Daniel James 021817f2b4 Fix Visual C++ version number + use BOOST_WORKAROUND. 2016-09-18 22:56:23 +01:00
Daniel James b881bcfee3 More insert and erase tests 2016-09-18 12:22:48 +01:00
Daniel James 1c606980ec Update tests for standard changes involving bucket count.
It seems my defect report was accepted at some point, and they tweaked
the requirements involving bucket counts. This also makes it possible to
have a bucket count of 0, which I think wasn't allowed in the past. I
don't think I'll change this implementation to do so, but I'd like to be
able to run these tests against standard implementations, so I'm
starting to take that into account.

I believe these changes were made after the C++14 standard, but I've
always been tracking the draft standards, so that doesn't really matter.
2016-09-18 12:22:48 +01:00
Daniel James 95e477902e Special case for Visual C++ 12 test failure.
Plus some extra tests while I'm at it.
2016-09-18 10:28:21 +01:00
Daniel James 7c2f11f8e1 Fix signed/unsigned comparisons. 2016-09-07 09:26:25 +01:00
Daniel James 86a8a0429a Merge branch 'fixes' into develop 2016-09-04 08:23:52 +01:00
Daniel James 4b00548138 Test+document insertion from initializer lists. 2016-09-04 08:23:32 +01:00
Daniel James 9debeadee7 Fix some test warnings.
And turn on warnings as errors in Travis.
2016-08-17 12:08:16 +01:00
Daniel James cae72eec2f Insert/emplace with hint. 2016-08-17 12:08:15 +01:00
Daniel James e250fb44f6 Merge local develop branch develop
Oops, I merged the wrong 'develop' branch into master. Luckily, there's
not much of a difference, so I'm resolving the merge here, and will
merge into master soon.
2016-08-14 20:02:13 +01:00
Daniel James cdb887e880 Clean up a memory leak in a test. 2016-08-04 13:35:47 +01:00
Daniel James 0769ecd70d Some more checks.
The intel-linux failures I'm getting now are odd. This find test is
failing for iterator, but not const_iterator. So maybe it's a problem
with the iterator object. The failures I was getting before have
disappeared, so I'm not sure about that.
2016-07-29 12:19:50 +01:00
Daniel James 2be69b3eb9 A little more information in the find_tests.
Now the intel-linux tester that was failing for erase_tests is passing,
but has started failing for find_tests instead. Oddly the test for
non-const find is failing, but the const find is fine - this doesn't
make much sense as they should be the same. Not sure, but it suggests
the problem might be in the way iterators are handled, rather than the
data structure?

Checking the iterators before checking that the keys are equal in order
to tell which part of the test is failing.
2016-07-27 06:51:05 +01:00
Daniel James bc601e34d2 More info on test failure on intel-linux.
The count check is reporting errors, but everything else appears to work
okay.
2016-07-25 15:03:39 +01:00
Daniel James 21f2522695 Try running the tests from unordered/test. 2016-07-02 22:11:43 +01:00
Daniel James 1d4845d6b8 Stop using predef in test. 2016-05-26 22:39:47 +01:00
Daniel James a81c86a90e Remove use of operator&.
Also reactivate operator& for minimal test classes. Apparently I
disabled them because of a problem in a type trait, but I'm not seeing
that now. Maybe it will appear on other compilers.
2014-10-26 22:21:12 +00:00
Daniel James 99985bb1b2 Fix pointer types in iterators.
https://svn.boost.org/trac/boost/ticket/10672
2014-10-22 22:03:32 +01:00
Daniel James 6b7cecb9d3 Workaround initialiser list bug in gcc 4.4. 2014-08-02 03:11:44 +01:00
Daniel James 15cb6d7d1b Tweak warning flags in tests. 2014-07-14 21:49:58 +01:00
Daniel James 94071cc6e8 Clean up warnings. Fixes trac #9377. 2014-01-26 22:57:24 +00:00
Daniel James a4881436d2 Disable forward_as_tuple test for older Visual C++. 2014-01-23 22:49:05 +00:00
Daniel James 70190b3aa2 Disable test for compilers that emulate old Visual C++. 2014-01-15 00:04:13 +00:00
Daniel James 8ae166a2c3 Tweak compiler checks in unnecessary_copy_tests.
I'm running these tests by default now, which will probably break
several compilers, so I'll need to add extra conditions later.
2014-01-15 00:00:01 +00:00
Daniel James 7d0c6d2425 Unused typedef. 2013-12-15 17:11:26 +00:00
Daniel James 5995e5521f Account for extra moves/copies when using Visual Age. 2013-12-15 17:11:26 +00:00
Daniel James 59c83ab942 Reintroduce std::move test.
There used to be a std::move test here, but it was changed to
boost::test for a wider range of testing, but I'd quite like to test
with std::move regardless.
2013-12-15 17:11:25 +00:00
Daniel James 0a552a47cb Disable test for Visual C++ 12. 2013-12-15 17:11:25 +00:00
Daniel James 621c1523c0 Fix potential msvc 12 workaround.
[SVN r86433]
2013-10-25 22:21:51 +00:00
Daniel James b4d62e4670 Attempt to work around Visual C++ initializer list overload bug.
I'm hoping that these templated initializer lists will be considered a better
overload than the others. I have no idea if it will actually work, this is a
real shot in the dark.

The enable_if checks should probably be for implicit conversion, there might
be a chance this could override a valid call when there's an explicit
conversion.

[SVN r86419]
2013-10-24 18:11:35 +00:00
Daniel James 3922d1bb63 This special case doesn't seem to apply to the latest Visual C++.
[SVN r86365]
2013-10-19 16:53:37 +00:00
Daniel James 0f080552fa Remove 'private' definition that I used for debugging.
[SVN r84408]
2013-05-21 22:50:19 +00:00
Daniel James 1a067034c1 Add conditional noexcept for move constructors.
Also added `noexcept` for destructors because of a gcc bug, see:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56191

Found via:

http://stackoverflow.com/questions/15721544/destructors-and-noexcept

[SVN r84373]
2013-05-19 14:30:12 +00:00
Daniel James 64994d76dd Unordered: Detab.
[SVN r81762]
2012-12-07 17:06:11 +00:00
Marshall Clow 1bd3b029fa Removed usage of deprecated macros
[SVN r81563]
2012-11-26 17:47:12 +00:00
Daniel James 8fb85cbb8d Unordered: Fix overload edge case for piecewise construction.
[SVN r81393]
2012-11-17 12:03:55 +00:00