Christian Mazakas
1ee91d494d
Fix bug in impl of test::exception::less::operator()
2023-02-14 10:55:35 -08:00
Christian Mazakas
75ea43823e
Update test Hash, KeyEqual to be nothrow swappable
2022-12-13 13:53:29 -08:00
Christian Mazakas
47e205487d
Fix potential integer overflow in test::hash<int>
2022-12-13 09:35:28 -08:00
Christian Mazakas
ccd40d0c44
Update fancy pointer's implementation of pointer_to to support all types by using boost::addressof()
2022-10-11 15:21:10 -07:00
Christian Mazakas
2ae686c366
Add tests for testing the SCARY-ness of iterators
2022-06-01 11:49:09 -07:00
Christian Mazakas
641c9fba9c
Update operator() implementations for predicate classes to properly return a bool
2022-06-01 11:49:09 -07:00
Christian Mazakas
8473d8120f
Mark test Hasher and KeyEqual as final to extend test coverage
2022-06-01 11:49:09 -07:00
Christian Mazakas
954db4e246
Extend fancy pointer types used by test allocators to support a wider array of semantic operations
2022-06-01 11:49:09 -07:00
Christian Mazakas
4f43bc5ec7
Add missing #include for usage of BOOST_TEST macro
2022-06-01 11:49:09 -07:00
Christian Mazakas
0bcc79baab
Update test allocators to be C++11 compliant by making them templates on the pointer type
2022-06-01 11:49:09 -07:00
Christian Mazakas
21244ab832
Fix UB caused by integer overflow in hash functions by casting int to unsigned
2022-01-11 09:53:38 -08:00
LeonineKing1199
69b882a14b
Add defaulted copy assignment operators when supported
2021-11-23 11:10:03 -08:00
LeonineKing1199
6984e6a4f2
Remove unnecessary move support
2021-11-23 10:57:26 -08:00
LeonineKing1199
fe439890e8
Remove unneeded macro as Config defines BOOST_NOEXCEPT
2021-11-19 10:10:52 -08:00
LeonineKing1199
e29f762116
Fix warning about using implicitly defined copy constructor/assignment by completing the Rule of 5 for test allocator
2021-11-19 10:10:52 -08:00
Daniel James
1cc3f680e8
Fix a couple more explicit default constructors for Visual C++ 7.1
2018-01-20 11:49:07 +00:00
Daniel James
dc9faddf22
Try to fix constructor_tests on Visual C++ 7.1
...
I'm really not sure why it fails to compile, the error message isn't very
helpful. I assume it might be because allocator1 has an explicit default
constructor, so I tried making it implicit.
2018-01-17 10:40:58 +00:00
Daniel James
6b5b968b97
Format with clang-format 4.0
2017-10-05 10:54:22 +01:00
Daniel James
0676b4f4ca
Change clang format indentation + .editorconfig file
2017-06-11 20:55:59 +01:00
Daniel James
76e7322262
Use streams from lightweight test
2017-05-10 19:02:47 +01:00
Daniel James
31c5b5bfa1
Merge exception tests
2017-05-07 17:54:34 +01:00
Daniel James
3fe259a79e
Fix creating exception::less from exception::equal_to
2017-05-05 12:58:26 +01:00
Daniel James
47a8c3fc67
Fix exception handling in rehash_impl
...
And improve tests so they will catch the error, and other similar errors.
2017-05-04 19:30:18 +01:00
Daniel James
8229aa6b3c
Stop throwing exception in allocator copy/assignment
...
The standard specifies that all of these "shall not exit via an
exception". The containers have been exception safe when these throw,
but the 'noexcept' attribute on 'get_allocator' will terminate if an
exception is thrown in the copy constructor.
The standard doesn't specify a default constructor, so that is allowed
to throw an exception (not just pedantry, this makes sense if an
allocator has shared data that's allocated in the initial constructor).
2017-04-23 11:01:04 +01:00
Daniel James
ef05493c83
Test that construct/destroy aren't used when C++11 isn't available
2017-04-18 10:14:26 +01:00
Daniel James
7a0a598649
Don't track construction when using boost::tuple
...
Because it doesn't quiet work on C++11 compilers onwards.
2017-04-18 10:14:26 +01:00
Daniel James
cafd236a18
Test more memory tracking
2017-04-18 10:14:26 +01:00
Daniel James
c0b72d97b3
Stricter about rebinding the allocator
2017-02-23 20:14:27 +00:00
Daniel James
13063abce5
Move friend function outside of class
...
The use of std::pair was causing issues with the sun compiler.
2017-02-23 20:10:40 +00:00
Daniel James
bf5ef9824d
Reformat with clang-format
2017-02-19 13:05:17 +00:00
Daniel James
e416cafd49
Count instances constructed/destructed in exception tests
2017-01-01 18:35:50 +00:00
Daniel James
7da307c696
Supply explicit test::cxx11_allocator::rebind for old GCC
...
The rebind mechanism doesn't work for templates with multiple template
parameters on old versions of GCC. But allocators written for that
compiler will have an explicit rebind, so that should be acceptable.
2016-10-17 07:54:06 +01:00
Daniel James
da6e8e8041
Better allocator rebind support
2016-10-14 09:27:40 +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
65aaf27380
Fix accidental fallthrough in switch cases.
...
This was causing the hash function to be different to the equality
function. For some reason this resulted in a lot of windows test
failures, but none on linux or os x. I'm a bit confused and worried
about that.
2016-10-06 10:53:10 +01:00
Daniel James
71d19820ac
Fix signed conversion warnings.
2016-10-05 09:45:53 +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
0273ec59d7
Fix Visual C++ 9.0 workaround.
2014-12-03 18:28:40 +00:00
Daniel James
9090d87725
Restore ampersand workaround for Visual C++ 9
2014-11-16 10:01:29 +00: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
Marshall Clow
1bd3b029fa
Removed usage of deprecated macros
...
[SVN r81563]
2012-11-26 17:47:12 +00:00
Daniel James
3f060a70d1
Unordered: Fix unnecessary_copy_tests + extra tests.
...
It looks the odd result in unnecessary_copy_tests on Visual C++ 11 is not a
bug, but add some extra tests just to make sure. Also some extra rehash and
reserve testing thrown in.
[SVN r80705]
2012-09-26 08:09:26 +00:00
Daniel James
37d58e84e3
Unordered: Fix creating extra node when resizing.
...
[SVN r80518]
2012-09-13 19:50:31 +00:00
Daniel James
c0faf59a86
Unordered: De-template constructor for allocator2 from allocator.
...
Sun is failing one of the tests because it isn't using it implicitly.
[SVN r80276]
2012-08-28 08:04:51 +00:00
Daniel James
a822b27efc
Unordered: Weaken requirements in compile tests.
...
Assigning a container requires that its elements can be assignable. Could split
the tests up so that other tests aren't assignable, but it doesn't seem worth
the hassle.
[SVN r80228]
2012-08-25 21:56:16 +00:00
Daniel James
aefea862c2
Unordered: Two exception testing allocators.
...
For different C++11 properties.
[SVN r80225]
2012-08-25 21:54:50 +00:00
Daniel James
7c968fd38d
Unordered: Avoid an MSVC warning.
...
[SVN r79651]
2012-07-22 07:14:42 +00:00
Daniel James
f387994422
Unordered: Test with more allocators.
...
Causes some C++11 failures....
[SVN r79357]
2012-07-08 11:55:35 +00:00
Daniel James
f5292fd9f7
Unordered: Simplify the object count stuff.
...
[SVN r79355]
2012-07-08 11:54:47 +00:00