Skip to content

Commit b2a87b9

Browse files
committed
removed release builds
1 parent cf2ab69 commit b2a87b9

File tree

3 files changed

+5
-62
lines changed

3 files changed

+5
-62
lines changed

.github/workflows/cmake.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
config:
2323
- {
24-
name: "Windows Latest MSVC (Debug)",
24+
name: "Windows Latest MSVC",
2525
os: windows-latest,
2626
build_type: "Debug",
2727
cc: "cl",
@@ -30,46 +30,21 @@ jobs:
3030
generators: "Visual Studio 16 2019"
3131
}
3232
- {
33-
name: "Windows Latest MSVC (Release)",
34-
os: windows-latest,
35-
build_type: "Release",
36-
cc: "cl",
37-
cxx: "cl",
38-
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
39-
generators: "Visual Studio 16 2019"
40-
}
41-
- {
42-
name: "Ubuntu Latest GCC (Debug)",
33+
name: "Ubuntu Latest GCC",
4334
os: ubuntu-latest,
4435
build_type: "Debug",
4536
cc: "gcc",
4637
cxx: "g++",
4738
generators: "Ninja"
4839
}
4940
- {
50-
name: "Ubuntu Latest GCC (Release)",
51-
os: ubuntu-latest,
52-
build_type: "Release",
53-
cc: "gcc",
54-
cxx: "g++",
55-
generators: "Ninja"
56-
}
57-
- {
58-
name: "macOS Latest Clang (Debug)",
41+
name: "macOS Latest Clang",
5942
os: macos-latest,
6043
build_type: "Debug",
6144
cc: "clang",
6245
cxx: "clang++",
6346
generators: "Xcode"
6447
}
65-
- {
66-
name: "macOS Latest Clang (Release)",
67-
os: macos-latest,
68-
build_type: "Release",
69-
cc: "clang",
70-
cxx: "clang++",
71-
generators: "Xcode"
72-
}
7348

7449
steps:
7550
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

include/functional_vector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ class functional_vector
515515

516516
// Returns the last index in which the given element is found in the vector.
517517
// In case of multiple occurrences, only the last index is returned
518-
// (see find_all_indices for multiple occurences).
518+
// (see find_all_indices for multiple occurrences).
519519
//
520520
// example:
521521
// const functional_vector numbers({1, 4, 2, 5, -6, 3, 1, 7, 1});
@@ -1115,7 +1115,7 @@ class functional_vector
11151115
return *this;
11161116
}
11171117

1118-
// Returns the size of the vector (how many elements it contains)
1118+
// Returns the size of the vector (how many elements it contains, it may be different from its capacity)
11191119
size_t size() const
11201120
{
11211121
return backing_vector_.size();

tests/functional_vector_test.cc

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ TEST(FunctionalVectorTest, ReversedTest)
256256
EXPECT_EQ(9, vector_under_test[2].age);
257257
}
258258

259-
#ifndef NDEBUG
260259
TEST(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

274272
TEST(FunctionalVectorTest, ZipWithFunctionalVectorTest)
275273
{
@@ -430,7 +428,6 @@ TEST(FunctionalVectorTest, SortedDescendingTest)
430428
EXPECT_EQ(-4, sorted_vector[3]);
431429
}
432430

433-
#ifndef NDEBUG
434431
TEST(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

471467
TEST(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
544539
TEST(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

559553
TEST(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
571564
TEST(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

586578
TEST(FunctionalVectorTest, RemovingAtFilledVectorTest)
587579
{
@@ -633,9 +625,7 @@ TEST(FunctionalVectorTest, RemovingFrontTest)
633625
TEST(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)
644634
TEST(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

654642
TEST(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)
666652
TEST(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
686669
TEST(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

695677
TEST(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
712693
TEST(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

721701
TEST(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
737716
TEST(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

745723
TEST(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
761738
TEST(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

770746
TEST(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
787762
TEST(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

796770
TEST(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
812785
TEST(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

820792
TEST(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
891862
TEST(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

906876
TEST(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
935904
TEST(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

950918
TEST(FunctionalVectorTest, ReplacingRangeAtWithFunctionalVectorTest)
951919
{

0 commit comments

Comments
 (0)