@@ -256,7 +256,6 @@ TEST(FunctionalVectorTest, ReversedTest)
256256 EXPECT_EQ (9 , vector_under_test[2 ].age );
257257}
258258
259- #ifndef NDEBUG
260259TEST (FunctionalVectorTest, ZipWithStdVectorUnequalSizesThrowsTest)
261260{
262261 const functional_vector ages_vector ({32 , 25 , 53 , 62 });
@@ -269,7 +268,6 @@ TEST(FunctionalVectorTest, ZipWithFunctionalVectorUnequalSizesThrowsTest)
269268 const auto names_vector = functional_vector<std::string>({" Jake" , " Mary" });
270269 EXPECT_DEATH ({ const auto zipped_vector = ages_vector.zip (names_vector); }, " " );
271270}
272- #endif
273271
274272TEST (FunctionalVectorTest, ZipWithFunctionalVectorTest)
275273{
@@ -430,7 +428,6 @@ TEST(FunctionalVectorTest, SortedDescendingTest)
430428 EXPECT_EQ (-4 , sorted_vector[3 ]);
431429}
432430
433- #ifndef NDEBUG
434431TEST (FunctionalVectorTest, SubscriptOperatorNegativeDeathTest)
435432{
436433 const functional_vector vector_under_test ({3 , 1 , 9 , -4 });
@@ -466,7 +463,6 @@ TEST(FunctionalVectorTest, SubscriptOperatorAssignIndexLargerThanSizeDeathTest)
466463 functional_vector vector_under_test ({3 , 1 , 9 , -4 });
467464 EXPECT_DEATH (vector_under_test[5 ] = -3 , " " );
468465}
469- #endif
470466
471467TEST (FunctionalVectorTest, SubscriptOperatorAssignTest)
472468{
@@ -540,7 +536,6 @@ TEST(FunctionalVectorTest, FindAllIndicesFilledVectorTest)
540536 EXPECT_EQ (std::vector<size_t >({ 7 }), seven_indices);
541537}
542538
543- #ifndef NDEBUG
544539TEST (FunctionalVectorTest, RemoveAtEmptyVectorTest)
545540{
546541 functional_vector<int > vector_under_test;
@@ -554,7 +549,6 @@ TEST(FunctionalVectorTest, RemoveAtFilledVectorAboveSizeTest)
554549 auto vector_under_test = functional_vector ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
555550 EXPECT_DEATH (vector_under_test.remove_at (15 ), " " );
556551}
557- #endif
558552
559553TEST (FunctionalVectorTest, RemoveAtFilledVectorTest)
560554{
@@ -567,7 +561,6 @@ TEST(FunctionalVectorTest, RemoveAtFilledVectorTest)
567561 EXPECT_EQ (functional_vector<int >({ 1 , 5 , 8 , 3 , 7 , 1 }), vector_under_test);
568562}
569563
570- #ifndef NDEBUG
571564TEST (FunctionalVectorTest, RemovingAtEmptyVectorTest)
572565{
573566 const functional_vector<int > vector_under_test;
@@ -581,7 +574,6 @@ TEST(FunctionalVectorTest, RemovingAtFilledVectorAboveSizeTest)
581574 const functional_vector vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
582575 EXPECT_DEATH (vector_under_test.removing_at (15 ), " " );
583576}
584- #endif
585577
586578TEST (FunctionalVectorTest, RemovingAtFilledVectorTest)
587579{
@@ -633,9 +625,7 @@ TEST(FunctionalVectorTest, RemovingFrontTest)
633625TEST (FunctionalVectorTest, InsertAtEmptyVectorTest)
634626{
635627 functional_vector<int > vector_under_test;
636- #ifndef NDEBUG
637628 EXPECT_DEATH (vector_under_test.insert_at (15 , -1 ), " " );
638- #endif
639629 vector_under_test.insert_at (0 , -1 );
640630 EXPECT_EQ (1 , vector_under_test.size ());
641631 EXPECT_EQ (-1 , vector_under_test[0 ]);
@@ -644,19 +634,15 @@ TEST(FunctionalVectorTest, InsertAtEmptyVectorTest)
644634TEST (FunctionalVectorTest, InsertAtFilledVectorTest)
645635{
646636 functional_vector<int > vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
647- #ifndef NDEBUG
648637 EXPECT_DEATH (vector_under_test.insert_at (15 , -1 ), " " );
649- #endif
650638 vector_under_test.insert_at (3 , 18 );
651639 EXPECT_EQ (functional_vector<int >({ 1 , 4 , 2 , 18 , 5 , 8 , 3 , 1 , 7 , 1 }), vector_under_test);
652640}
653641
654642TEST (FunctionalVectorTest, InsertingAtEmptyVectorTest)
655643{
656644 const functional_vector<int > vector_under_test;
657- #ifndef NDEBUG
658645 EXPECT_DEATH (vector_under_test.inserting_at (15 , -1 ), " " );
659- #endif
660646 const auto augmented_vector = vector_under_test.inserting_at (0 , -1 );
661647 EXPECT_EQ (1 , augmented_vector.size ());
662648 EXPECT_EQ (-1 , augmented_vector[0 ]);
@@ -666,9 +652,7 @@ TEST(FunctionalVectorTest, InsertingAtEmptyVectorTest)
666652TEST (FunctionalVectorTest, InsertingAtFilledVectorTest)
667653{
668654 const functional_vector<int > vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
669- #ifndef NDEBUG
670655 EXPECT_DEATH (vector_under_test.inserting_at (15 , -1 ), " " );
671- #endif
672656 const auto augmented_vector = vector_under_test.inserting_at (3 , 18 );
673657 EXPECT_EQ (functional_vector<int >({ 1 , 4 , 2 , 18 , 5 , 8 , 3 , 1 , 7 , 1 }), augmented_vector);
674658 EXPECT_EQ (functional_vector<int >({ 1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 }), vector_under_test);
@@ -682,15 +666,13 @@ TEST(FunctionalVectorTest, InsertRangeEmptyFunctionalVectorTest)
682666 EXPECT_EQ (functional_vector ({ 4 , 7 , 3 , -5 }), vector_under_test);
683667}
684668
685- #ifndef NDEBUG
686669TEST (FunctionalVectorTest, InsertRangeExistingWrongInsertionIndexFunctionalVectorTest)
687670{
688671 functional_vector<int > vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
689672 const functional_vector vector_to_insert ({9 , -5 , 6 });
690673 EXPECT_DEATH (vector_under_test.insert_at (-1 , vector_to_insert), " " );
691674 EXPECT_DEATH (vector_under_test.insert_at (10 , vector_to_insert), " " );
692675}
693- #endif
694676
695677TEST (FunctionalVectorTest, InsertRangeExistingFunctionalVectorTest)
696678{
@@ -708,15 +690,13 @@ TEST(FunctionalVectorTest, InsertRangeEmptyStdVectorTest)
708690 EXPECT_EQ (functional_vector ({ 4 , 7 , 3 , -5 }), vector_under_test);
709691}
710692
711- #ifndef NDEBUG
712693TEST (FunctionalVectorTest, InsertRangeExistingWrongInsertionIndexStdVectorTest)
713694{
714695 functional_vector<int > vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
715696 const std::vector<int > vector_to_insert ({9 , -5 , 6 });
716697 EXPECT_DEATH (vector_under_test.insert_at (-1 , vector_to_insert), " " );
717698 EXPECT_DEATH (vector_under_test.insert_at (10 , vector_to_insert), " " );
718699}
719- #endif
720700
721701TEST (FunctionalVectorTest, InsertRangeExistingStdVectorTest)
722702{
@@ -733,14 +713,12 @@ TEST(FunctionalVectorTest, InsertRangeEmptyInitializerListTest)
733713 EXPECT_EQ (functional_vector ({ 4 , 7 , 3 , -5 }), vector_under_test);
734714}
735715
736- #ifndef NDEBUG
737716TEST (FunctionalVectorTest, InsertRangeExistingWrongInsertionIndexInitializerListTest)
738717{
739718 functional_vector<int > vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
740719 EXPECT_DEATH (vector_under_test.insert_at (-1 , { 9 , -5 , 6 }), " " );
741720 EXPECT_DEATH (vector_under_test.insert_at (10 , { 9 , -5 , 6 }), " " );
742721}
743- #endif
744722
745723TEST (FunctionalVectorTest, InsertRangeExistingInitializerListTest)
746724{
@@ -757,15 +735,13 @@ TEST(FunctionalVectorTest, InsertingRangeEmptyFunctionalVectorTest)
757735 EXPECT_EQ (functional_vector ({ 4 , 7 , 3 , -5 }), result_vector);
758736}
759737
760- #ifndef NDEBUG
761738TEST (FunctionalVectorTest, InsertingRangeExistingWrongInsertionIndexFunctionalVectorTest)
762739{
763740 const functional_vector<int > vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
764741 const functional_vector vector_to_insert ({9 , -5 , 6 });
765742 EXPECT_DEATH (vector_under_test.inserting_at (-1 , vector_to_insert), " " );
766743 EXPECT_DEATH (vector_under_test.inserting_at (10 , vector_to_insert), " " );
767744}
768- #endif
769745
770746TEST (FunctionalVectorTest, InsertingRangeExistingFunctionalVectorTest)
771747{
@@ -783,15 +759,13 @@ TEST(FunctionalVectorTest, InsertingRangeEmptyStdVectorTest)
783759 EXPECT_EQ (functional_vector ({ 4 , 7 , 3 , -5 }), result_vector);
784760}
785761
786- #ifndef NDEBUG
787762TEST (FunctionalVectorTest, InsertingRangeExistingWrongInsertionIndexStdVectorTest)
788763{
789764 const functional_vector<int > vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
790765 const std::vector vector_to_insert ({9 , -5 , 6 });
791766 EXPECT_DEATH (vector_under_test.inserting_at (-1 , vector_to_insert), " " );
792767 EXPECT_DEATH (vector_under_test.inserting_at (10 , vector_to_insert), " " );
793768}
794- #endif
795769
796770TEST (FunctionalVectorTest, InsertingRangeExistingStdVectorTest)
797771{
@@ -808,14 +782,12 @@ TEST(FunctionalVectorTest, InsertingRangeEmptyInitializerListTest)
808782 EXPECT_EQ (functional_vector ({ 4 , 7 , 3 , -5 }), result_vector);
809783}
810784
811- #ifndef NDEBUG
812785TEST (FunctionalVectorTest, InsertingRangeExistingWrongInsertionIndexInitializerListTest)
813786{
814787 const functional_vector<int > vector_under_test ({1 , 4 , 2 , 5 , 8 , 3 , 1 , 7 , 1 });
815788 EXPECT_DEATH (vector_under_test.inserting_at (-1 , { 9 , -5 , 6 }), " " );
816789 EXPECT_DEATH (vector_under_test.inserting_at (10 , { 9 , -5 , 6 }), " " );
817790}
818- #endif
819791
820792TEST (FunctionalVectorTest, InsertingRangeExistingInitializerListTest)
821793{
@@ -887,7 +859,6 @@ TEST(FunctionalVectorTest, ReplaceRangeAtWithEmptySource)
887859 EXPECT_EQ (functional_vector ({ 5 , -3 , 4 , -9 }), vector_under_test);
888860}
889861
890- #ifndef NDEBUG
891862TEST (FunctionalVectorTest, ReplaceRangeAtWrongIndex)
892863{
893864 functional_vector vector_under_test ({5 , -3 , 4 , -9 });
@@ -901,7 +872,6 @@ TEST(FunctionalVectorTest, ReplaceRangeAtMoreElementsInSourceThanCapacityTest)
901872 functional_vector vector_under_test ({5 , -3 , 4 , -9 });
902873 EXPECT_DEATH (vector_under_test.replace_range_at (2 , { 1 , 2 , 6 , 4 , 8 , 9 , -10 }), " " );
903874}
904- #endif
905875
906876TEST (FunctionalVectorTest, ReplaceRangeAtWithFunctionalVectorTest)
907877{
@@ -931,7 +901,6 @@ TEST(FunctionalVectorTest, ReplacingRangeAtWithEmptySource)
931901 EXPECT_EQ (functional_vector ({ 5 , -3 , 4 , -9 }), replaced_vector);
932902}
933903
934- #ifndef NDEBUG
935904TEST (FunctionalVectorTest, ReplacingRangeAtWrongIndex)
936905{
937906 const functional_vector vector_under_test ({5 , -3 , 4 , -9 });
@@ -945,7 +914,6 @@ TEST(FunctionalVectorTest, ReplacingRangeAtMoreElementsInSourceThanCapacityTest)
945914 const functional_vector vector_under_test ({5 , -3 , 4 , -9 });
946915 EXPECT_DEATH (vector_under_test.replacing_range_at (2 , { 1 , 2 , 6 , 4 , 8 , 9 , -10 }), " " );
947916}
948- #endif
949917
950918TEST (FunctionalVectorTest, ReplacingRangeAtWithFunctionalVectorTest)
951919{
0 commit comments