@@ -402,14 +402,30 @@ constexpr void test_sequence_insert_range(Validate validate) {
402
402
auto get_pos = [](auto & c, auto & test_case) { return std::ranges::next (c.begin (), static_cast <D>(test_case.index )); };
403
403
404
404
auto test = [&](auto & test_case) {
405
- Container c (test_case.initial .begin (), test_case.initial .end ());
406
- auto in = wrap_input<Iter, Sent>(test_case.input );
407
- auto pos = get_pos (c, test_case);
408
-
409
- auto result = c.insert_range (pos, in);
410
- assert (result == get_pos (c, test_case));
411
- validate (c);
412
- return std::ranges::equal (c, test_case.expected );
405
+ {
406
+ Container c (test_case.initial .begin (), test_case.initial .end ());
407
+ auto in = wrap_input<Iter, Sent>(test_case.input );
408
+ auto pos = get_pos (c, test_case);
409
+
410
+ auto result = c.insert_range (pos, in);
411
+ assert (result == get_pos (c, test_case));
412
+ validate (c);
413
+ if (!std::ranges::equal (c, test_case.expected ))
414
+ return false ;
415
+ }
416
+ {
417
+ Container c (test_case.initial .begin (), test_case.initial .end ());
418
+ auto in = wrap_input_decay<Iter, Sent>(test_case.input );
419
+ auto pos = get_pos (c, test_case);
420
+
421
+ auto result = c.insert_range (pos, in);
422
+ assert (result == get_pos (c, test_case));
423
+ validate (c);
424
+ if (!std::ranges::equal (c, test_case.expected ))
425
+ return false ;
426
+ }
427
+
428
+ return true ;
413
429
};
414
430
415
431
{ // Empty container.
@@ -469,12 +485,26 @@ constexpr void test_sequence_prepend_range(Validate validate) {
469
485
using T = typename Container::value_type;
470
486
471
487
auto test = [&](auto & test_case) {
472
- Container c (test_case.initial .begin (), test_case.initial .end ());
473
- auto in = wrap_input<Iter, Sent>(test_case.input );
474
-
475
- c.prepend_range (in);
476
- validate (c);
477
- return std::ranges::equal (c, test_case.expected );
488
+ {
489
+ Container c (test_case.initial .begin (), test_case.initial .end ());
490
+ auto in = wrap_input<Iter, Sent>(test_case.input );
491
+
492
+ c.prepend_range (in);
493
+ validate (c);
494
+ if (!std::ranges::equal (c, test_case.expected ))
495
+ return false ;
496
+ }
497
+ {
498
+ Container c (test_case.initial .begin (), test_case.initial .end ());
499
+ auto in = wrap_input_decay<Iter, Sent>(test_case.input );
500
+
501
+ c.prepend_range (in);
502
+ validate (c);
503
+ if (!std::ranges::equal (c, test_case.expected ))
504
+ return false ;
505
+ }
506
+
507
+ return true ;
478
508
};
479
509
480
510
{ // Empty container.
@@ -512,12 +542,26 @@ constexpr void test_sequence_append_range(Validate validate) {
512
542
using T = typename Container::value_type;
513
543
514
544
auto test = [&](auto & test_case) {
515
- Container c (test_case.initial .begin (), test_case.initial .end ());
516
- auto in = wrap_input<Iter, Sent>(test_case.input );
517
-
518
- c.append_range (in);
519
- validate (c);
520
- return std::ranges::equal (c, test_case.expected );
545
+ {
546
+ Container c (test_case.initial .begin (), test_case.initial .end ());
547
+ auto in = wrap_input<Iter, Sent>(test_case.input );
548
+
549
+ c.append_range (in);
550
+ validate (c);
551
+ if (!std::ranges::equal (c, test_case.expected ))
552
+ return false ;
553
+ }
554
+ {
555
+ Container c (test_case.initial .begin (), test_case.initial .end ());
556
+ auto in = wrap_input_decay<Iter, Sent>(test_case.input );
557
+
558
+ c.append_range (in);
559
+ validate (c);
560
+ if (!std::ranges::equal (c, test_case.expected ))
561
+ return false ;
562
+ }
563
+
564
+ return true ;
521
565
};
522
566
523
567
{ // Empty container.
@@ -563,12 +607,26 @@ constexpr void test_sequence_assign_range(Validate validate) {
563
607
auto & input_long_range = FullContainer_Begin_LongRange<T>.input ;
564
608
565
609
auto test = [&](auto & initial, auto & input) {
566
- Container c (initial.begin (), initial.end ());
567
- auto in = wrap_input<Iter, Sent>(input);
568
-
569
- c.assign_range (in);
570
- validate (c);
571
- return std::ranges::equal (c, input);
610
+ {
611
+ Container c (initial.begin (), initial.end ());
612
+ auto in = wrap_input<Iter, Sent>(input);
613
+
614
+ c.assign_range (in);
615
+ validate (c);
616
+ if (!std::ranges::equal (c, input))
617
+ return false ;
618
+ }
619
+ {
620
+ Container c (initial.begin (), initial.end ());
621
+ auto in = wrap_input_decay<Iter, Sent>(input);
622
+
623
+ c.assign_range (in);
624
+ validate (c);
625
+ if (!std::ranges::equal (c, input))
626
+ return false ;
627
+ }
628
+
629
+ return true ;
572
630
};
573
631
574
632
{ // Empty container.
0 commit comments