Skip to content

Commit 1357392

Browse files
authored
Merge pull request #7 from UMM-CSci-Systems/extend-test-value-range
Add some large positive and negative values to the tests
2 parents b4e0b22 + c795a4f commit 1357392

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
22
"cSpell.words": [
3+
"cmake",
4+
"exitcode",
35
"gtest",
46
"ints",
57
"lgtest",
8+
"libgtest",
69
"mergesort",
7-
"pthread"
10+
"pthread",
11+
"valgrind"
812
]
913
}

array_merge/array_merge_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ TEST(ArrayMerge, Handle_multiple_copies_of_longer_list) {
5959
TEST(ArrayMerge, Handle_multiple_copies_of_longer_list_different_orders) {
6060
int num_arrays = 9;
6161
int sizes[] = { 10, 10, 10, 10, 10, 10, 10, 10, 10 };
62-
int a0[] = { 3, 2, 0, 5, 8, 9, 6, 3, 2, 0 };
63-
int a1[] = { 5, 8, 9, 3, 2, 0, 6, 3, 2, 0 };
64-
int a2[] = { 8, 5, 0, 2, 3, 0, 2, 3, 6, 9 };
62+
int a0[] = { 3, -22345, 0, 5, 8, 9, 6, 3, 2, 0 };
63+
int a1[] = { 5, 8, 9, 3, 2, 0, 6, 378293, 2, 0 };
64+
int a2[] = { 8, -52857, 0, 2, 3, 0, 2, 3, 6, 9 };
6565
int* a[] = { a0, a1, a2, a0, a1, a2, a0, a1, a2 };
66-
int expected[] = { 7, 0, 2, 3, 5, 6, 8, 9 };
66+
int expected[] = { 7, -52857, -22345, 0, 2, 3, 5, 6, 8, 9, 378293 };
6767
int* result;
6868

6969
result = array_merge(num_arrays, sizes, a);

0 commit comments

Comments
 (0)