Commit 3ba76269 authored by Sergej Chodarev's avatar Sergej Chodarev
Browse files

Fix order of arguments for ASSERT_EQ: expected valueshould come first

parent b34b5d51
...@@ -7,7 +7,7 @@ TEST like_post_increments_like_count() { ...@@ -7,7 +7,7 @@ TEST like_post_increments_like_count() {
post_t *post = create_post("test"); post_t *post = create_post("test");
like_post(post); like_post(post);
ASSERT_EQ(post->like_count, 1); ASSERT_EQ(1, post->like_count);
destroy_post(post); destroy_post(post);
PASS(); PASS();
......
...@@ -16,8 +16,8 @@ wall_t *create_wall_with_posts(int num_posts) { ...@@ -16,8 +16,8 @@ wall_t *create_wall_with_posts(int num_posts) {
TEST empty_wall_should_have_no_posts() { TEST empty_wall_should_have_no_posts() {
wall_t *wall = create_wall(); wall_t *wall = create_wall();
ASSERT_EQ(get_post(wall, 0), NULL); ASSERT_EQ(NULL, get_post(wall, 0));
ASSERT_EQ(get_post(wall, 1), NULL); ASSERT_EQ(NULL, get_post(wall, 1));
destroy_wall(wall); destroy_wall(wall);
PASS(); PASS();
...@@ -28,7 +28,7 @@ TEST get_post_should_return_first_post() { ...@@ -28,7 +28,7 @@ TEST get_post_should_return_first_post() {
post_t *post1 = create_post("Post 1"); post_t *post1 = create_post("Post 1");
add_post(wall, post1); add_post(wall, post1);
ASSERT_EQ(get_post(wall, 1), post1); ASSERT_EQ(post1, get_post(wall, 1));
destroy_wall(wall); destroy_wall(wall);
PASS(); PASS();
...@@ -39,7 +39,7 @@ TEST get_post_should_return_last_post() { ...@@ -39,7 +39,7 @@ TEST get_post_should_return_last_post() {
post_t *post4 = create_post("Post 4"); post_t *post4 = create_post("Post 4");
add_post(wall, post4); add_post(wall, post4);
ASSERT_EQ(get_post(wall, 4), post4); ASSERT_EQ(post4, get_post(wall, 4));
destroy_wall(wall); destroy_wall(wall);
PASS(); PASS();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment