Skip to content

Commit

Permalink
when using TODO_ASSERT_EQUALS it's a good idea to pair it with a ASSE…
Browse files Browse the repository at this point in the history
…RT_EQUALS
  • Loading branch information
Daniel Marjamäki committed Jan 23, 2011
1 parent 586cbd5 commit c041071
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/testuninitvar.cpp
Expand Up @@ -799,6 +799,7 @@ class TestUninitVar : public TestFixture
" }\n"
"}\n");
TODO_ASSERT_EQUALS("[test.cpp:4]: (error) Uninitialized variable: pItem\n", errout.str());
ASSERT_EQUALS("", errout.str()); // current result
}

// switch..
Expand Down

3 comments on commit c041071

@johnsyweb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should make TODO_ASSERT_EQUALS take three arguments (value, to_be, as_is)? This would enforce this checking and remove unnecessary lines of code.

@danmar
Copy link
Owner

@danmar danmar commented on c041071 Jan 30, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@johnsyweb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.