Lines Matching refs:victim

407             vector_t victim;  in TestExceptions()  local
418 victim.assign(N, move_support_tests::FooWithAssign()); in TestExceptions()
421victim.assign(move_support_tests::FooIterator(0), move_support_tests::FooIterator(N)); in TestExceptions()
425 victim.reserve(victim.max_size()+1); in TestExceptions()
430 victim.reserve(N); in TestExceptions()
434 victim.reserve(2); in TestExceptions()
435 victim = src; // fragmented assignment in TestExceptions()
442 victim.shrink_to_fit(); // should start defragmenting first segment in TestExceptions()
449 std::size_t capacity = victim.capacity(); in TestExceptions()
450 std::size_t size = victim.size(); in TestExceptions()
452 std::size_t req_size = get_early_size(victim); in TestExceptions()
471 if(!victim[i].zero_bar()) break; in TestExceptions()
473 … REQUIRE(victim[i].bar() == (m == assign_ir? i : move_support_tests::initial_bar)); in TestExceptions()
476 REQUIRE(!victim[i].zero_bar()); in TestExceptions()
483 REQUIRE_MESSAGE(victim == src, "shrink_to_fit() is broken"); in TestExceptions()
504 …concurrent_vector<move_support_tests::FooWithAssign, allocator_t> const& victim, size_t planned_vi… in verify_vector_partially_copied() argument
509 …REQUIRE_MESSAGE( victim == vector_t(src.begin(), src.begin() + victim.size(), src.get_allocator())… in verify_vector_partially_copied()
511 …REQUIRE_MESSAGE( std::equal(victim.begin(), victim.begin() + planned_victim_size, src.begin()), "f… in verify_vector_partially_copied()
512 …REQUIRE_MESSAGE( (std::all_of( victim.begin() + planned_victim_size, victim.end(), is_state_predic… in verify_vector_partially_copied()
517 void verify_last_segment_allocation_failed(vector_t const& victim){ in verify_last_segment_allocation_failed() argument
518 utils::suppress_unused_warning(victim); in verify_last_segment_allocation_failed()
519 CHECK_THROWS_AS((victim.at(victim.size())), std::out_of_range); in verify_last_segment_allocation_failed()
523 void verify_copy_and_assign_from_produce_the_same(vector_t const& victim){ in verify_copy_and_assign_from_produce_the_same() argument
525 vector_t copy_of_victim(victim, victim.get_allocator()); in verify_copy_and_assign_from_produce_the_same()
526 REQUIRE_MESSAGE(copy_of_victim == victim, "copy doesn't match original"); in verify_copy_and_assign_from_produce_the_same()
527 vector_t copy_of_victim2(10, victim[0], victim.get_allocator()); in verify_copy_and_assign_from_produce_the_same()
528 copy_of_victim2 = victim; in verify_copy_and_assign_from_produce_the_same()
533 void verify_assignment_operator_throws_bad_last_alloc(vector_t & victim){ in verify_assignment_operator_throws_bad_last_alloc() argument
534 vector_t copy_of_victim(victim, victim.get_allocator()); in verify_assignment_operator_throws_bad_last_alloc()
559 vector_t victim; in test_ex_assign_operator() local
560 victim.reserve(2); // get fragmented assignment in test_ex_assign_operator()
565 victim = src; // fragmented assignment in test_ex_assign_operator()
568 verify_c_vector_size(victim); in test_ex_assign_operator()
571 verify_c_vector_capacity_is_below(victim.capacity(), N); in test_ex_assign_operator()
574 verify_vector_partially_copied(victim, planned_victim_size, src, !t); in test_ex_assign_operator()
575 verify_last_segment_allocation_failed(victim); in test_ex_assign_operator()
576 verify_copy_and_assign_from_produce_the_same(victim); in test_ex_assign_operator()
577 verify_assignment_operator_throws_bad_last_alloc(victim); //TODO exceptions support in test_ex_assign_operator()
1072 vector_type victim(arena_allocator_fixture.allocator); in test_ex_move_assignment_memory_failure() local
1073 victim.reserve(2); // for fragmented assignment in test_ex_move_assignment_memory_failure()
1078 victim = std::move(fixture.source); // fragmented assignment in test_ex_move_assignment_memory_failure()
1083 verify_c_vector_size(victim); in test_ex_move_assignment_memory_failure()
1084 verify_c_vector_capacity_is_below(victim.capacity(), allocation_limit + 2); in test_ex_move_assignment_memory_failure()
1085 fixture.verify_part_of_content_deep_moved(victim, victim.size()); in test_ex_move_assignment_memory_failure()
1087 verify_last_segment_allocation_failed(victim); in test_ex_move_assignment_memory_failure()
1088 verify_copy_and_assign_from_produce_the_same(victim); in test_ex_move_assignment_memory_failure()
1089 verify_assignment_operator_throws_bad_last_alloc(victim); in test_ex_move_assignment_memory_failure()
1101 vector_type victim(arena_allocator_fixture.allocator); in test_ex_move_assignment_element_ctor_exception() local
1102 victim.reserve(2); // get fragmented assignment in test_ex_move_assignment_element_ctor_exception()
1107 victim = std::move(fixture.source); // fragmented assignment in test_ex_move_assignment_element_ctor_exception()
1112 verify_c_vector_size(victim); in test_ex_move_assignment_element_ctor_exception()
1114 fixture.verify_part_of_content_deep_moved(victim, planned_victim_size); in test_ex_move_assignment_element_ctor_exception()
1116 verify_last_segment_allocation_failed(victim); in test_ex_move_assignment_element_ctor_exception()
1117 verify_copy_and_assign_from_produce_the_same(victim); in test_ex_move_assignment_element_ctor_exception()
1118 verify_assignment_operator_throws_bad_last_alloc(victim); in test_ex_move_assignment_element_ctor_exception()