@@ -132,14 +132,14 @@ double input5_1[TEST_SIZE][4] = {
132132 {5 , 8 , 10 , 3 }
133133};
134134
135- int input6_1 [TEST_SIZE ][7 ] = {
136- {4 , 10 , 13 , 20 , 25 , 32 , 55 },
137- {3 , 8 , 11 , 6 , 8 , 10 , 30 },
138- {7 , 6 , 5 , 4 , 3 , 2 , 1 },
139- {20 , 200 , 5 , 2 , 3 , 25 , 5 },
140- {7 , 6 , 5 , 4 , 3 , 2 , 1 },
141- {20 , 200 , 5 , 2 , 3 , 25 , 5 },
142- {3 , 8 , 11 , 6 , 8 , 10 , 30 }
135+ int input6_1 [TEST_SIZE ][11 ] = {
136+ {4 , 10 , 13 , 20 , 25 , 32 , 55 , 20 , 25 , 32 , 55 },
137+ {3 , 8 , 11 , 6 , 8 , 10 , 30 , 6 , 8 , 10 , 30 },
138+ {7 , 6 , 5 , 4 , 3 , 2 , 1 , 4 , 3 , 2 , 1 },
139+ {20 , 200 , 5 , 2 , 3 , 25 , 5 , 2 , 3 , 25 , 5 },
140+ {7 , 6 , 5 , 4 , 3 , 2 , 1 , 4 , 3 , 2 , 1 },
141+ {20 , 200 , 5 , 2 , 3 , 25 , 5 , 2 , 3 , 25 , 5 },
142+ {38 , 6 , 1 , 90 , 12 , 50 , 54 , 17 , 20 , 4 , 45 }
143143};
144144
145145int input6_2 [TEST_SIZE ][3 ] = {
@@ -149,7 +149,7 @@ int input6_2[TEST_SIZE][3] = {
149149 {5 , 3 , 5 },
150150 {0 , 0 , 0 },
151151 {0 , 0 , 25 },
152- {0 , 0 , 0 }
152+ {4 , 11 , 45 }
153153};
154154
155155
@@ -189,14 +189,14 @@ double expected_output5[TEST_SIZE][4] = {
189189 {5 , 8 , 8 , 5 }
190190 };
191191
192- int expected_output6 [TEST_SIZE ][7 ] = {
192+ int expected_output6 [TEST_SIZE ][11 ] = {
193193 {20 , 25 , 32 , 55 },
194194 {6 , 8 , 30 },
195195 {1 , 2 , 3 , 4 , 7 },
196196 {2 , 20 , 25 , 200 },
197197 {1 , 2 , 3 , 4 , 5 , 6 , 7 },
198198 {2 , 3 , 5 , 20 , 200 },
199- {3 , 6 , 8 , 10 , 11 , 30 }
199+ {1 , 6 , 12 , 17 , 20 , 38 , 50 , 54 , 90 }
200200};
201201
202202
@@ -345,7 +345,7 @@ int main(int argc, char *argv[]) {
345345 case 6 : ;
346346 struct Node * root = NULL ;
347347
348- for (int i = 0 ; i < 7 ; i ++ ) {
348+ for (int i = 0 ; i < 11 ; i ++ ) {
349349 root = Insert (root , input6_1 [test_index ][i ]);
350350 }
351351
@@ -355,13 +355,15 @@ int main(int argc, char *argv[]) {
355355
356356 int * actual_output6 = getInorder (root );
357357
358- for (int i = 0 ; i < 7 ; i ++ ) {
358+ for (int i = 0 ; i < 11 ; i ++ ) {
359359 printf ("%d, " , actual_output6 [i ]);
360360 }
361361 int i = 0 ;
362362 bool compare = true;
363- for (int i = 0 ; i < 7 ; i ++ ) {
363+ for (int i = 0 ; i < 11 ; i ++ ) {
364+ printf ("Actual: %d Expected: %d\n" , actual_output6 [i ], expected_output6 [test_index ][i ]);
364365 if (actual_output6 [i ] != expected_output6 [test_index ][i ]) {
366+
365367 compare = false;
366368 break ;
367369 }
0 commit comments