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.
This commit is contained in:
Daniel James
2016-10-06 17:06:32 +01:00
parent 65aaf27380
commit 147885fec4
16 changed files with 115 additions and 94 deletions

View File

@@ -206,6 +206,7 @@ bool is_propagate(T*)
using test::default_generator;
using test::generate_collisions;
using test::limited_range;
UNORDERED_AUTO_TEST(check_traits)
{
@@ -220,7 +221,7 @@ UNORDERED_TEST(swap_tests1, (
(test_set_prop_swap)(test_multiset_prop_swap)(test_map_prop_swap)(test_multimap_prop_swap)
(test_set_no_prop_swap)(test_multiset_no_prop_swap)(test_map_no_prop_swap)(test_multimap_no_prop_swap)
)
((default_generator)(generate_collisions))
((default_generator)(generate_collisions)(limited_range))
)
UNORDERED_TEST(swap_tests2, (
@@ -228,7 +229,7 @@ UNORDERED_TEST(swap_tests2, (
(test_set_prop_swap)(test_multiset_prop_swap)(test_map_prop_swap)(test_multimap_prop_swap)
(test_set_no_prop_swap)(test_multiset_no_prop_swap)(test_map_no_prop_swap)(test_multimap_no_prop_swap)
)
((default_generator)(generate_collisions))
((default_generator)(generate_collisions)(limited_range))
)
}