Browse code

Correct argument order for ASSERT_STR_EQ

John Hawthorn authored on 03/04/2017 07:57:40
Showing 1 changed files

... ...
@@ -233,7 +233,7 @@ TEST test_choices_2() {
233 233
 	choices_search(&choices, "te");
234 234
 	ASSERT(choices.available == 1);
235 235
 	ASSERT(choices.selection == 0);
236
-	ASSERT_STR_EQ(choices_get(&choices, 0), "test");
236
+	ASSERT_STR_EQ("test", choices_get(&choices, 0));
237 237
 
238 238
 	choices_next(&choices);
239 239
 	ASSERT(choices.selection == 0);
... ...
@@ -250,8 +250,8 @@ TEST test_choices_2() {
250 250
 	choices_search(&choices, "ts");
251 251
 	ASSERT(choices.available == 2);
252 252
 	ASSERT(choices.selection == 0);
253
-	ASSERT_STR_EQ(choices_get(&choices, 0), "test");
254
-	ASSERT_STR_EQ(choices_get(&choices, 1), "tags");
253
+	ASSERT_STR_EQ("test", choices_get(&choices, 0));
254
+	ASSERT_STR_EQ("tags", choices_get(&choices, 1));
255 255
 
256 256
 	choices_destroy(&choices);
257 257
 
... ...
@@ -310,7 +310,7 @@ TEST test_choices_large_input() {
310 310
 	/* Must match `seq 0 99999 | grep '.*1.*2.*' | wc -l` */
311 311
 	ASSERT(choices.available == 8146);
312 312
 
313
-	ASSERT_STR_EQ(choices_get(&choices, 0), "12");
313
+	ASSERT_STR_EQ("12", choices_get(&choices, 0));
314 314
 
315 315
 	for(int i = 0; i < N; i++) {
316 316
 		free(strings[i]);