Checker.Check needs better documentation

Bug #1214038 reported by Nate Finch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gocheck
New
Undecided
Unassigned

Bug Description

When implementing Checker.Check it was unclear to me what the return values represented. I could figure out "result", but error was unclear. Both should be documented.

Upon reading the code for C.Check, I saw that if error != "", the test will always be treated as failed, but this wasn't made clear by the documentation, resulting in an hour or so of head scratching when c.Check(foo, MyChecker, bar) and c.Check(foo, gocheck.Not(MyChecker), bar) both produced test failures (because I was always returning a non-empty error string when the check failed).

I expected the error string to be an explanation of why the check failed, not a generic error inside the checker itself.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.