Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error checking weak in assertTrue #30

Closed
GoogleCodeExporter opened this issue Jun 26, 2015 · 1 comment
Closed

error checking weak in assertTrue #30

GoogleCodeExporter opened this issue Jun 26, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

assertTrue does not check for zero args.  It should use the same error checking 
as assertFalse:


*** shunit2     Thu Sep 15 10:35:01 2011
--- shunit2.patched       Thu Sep 15 10:38:25 2011
***************
*** 315,321 ****
  assertTrue()
  {
    ${_SHUNIT_LINENO_}
!   if [ $# -gt 2 ]; then
      _shunit_error "assertTrue() takes one two arguments; $# given"
      return ${SHUNIT_ERROR}
    fi
--- 315,321 ----
  assertTrue()
  {
    ${_SHUNIT_LINENO_}
!   if [ $# -lt 1 -o $# -gt 2 ]; then
      _shunit_error "assertTrue() takes one two arguments; $# given"
      return ${SHUNIT_ERROR}
    fi



URL: http://shunit2.googlecode.com/svn/trunk/source/2.1/src
Revision: 337

(Minor, I know, but I found it by making a mistake and diagnosing the problem.)

Original issue reported on code.google.com by sienkiew...@gtempaccount.com on 15 Sep 2011 at 2:45

@GoogleCodeExporter
Copy link
Author

Fixed in r345.

Original comment by kate.w...@forestent.com on 16 Jan 2013 at 11:03

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant