mirror of
				https://github.com/boostorg/unordered.git
				synced 2025-11-04 01:31:41 +01:00 
			
		
		
		
	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:
		@@ -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))
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user