On Mon, 24 Dec 2007, [EMAIL PROTECTED] wrote:
Quoting Mathieu Bouchard <[EMAIL PROTECTED]>:
I think that pretty much anyone doing automated tests so far agree that
it's better to have just all tests be written in the positive way, so
that you don't have to ever exchange the meanings of PASS and FAIL.
i needed it to test the framework itself.
i believe that this is important.
(and i am doing automated tests and do not agree that just all tests
ought to be written in a positive way)
my proposals where not about a theoretic test-framework, but based in
my practical experiences with an automated test-framework.
i that i learned quite a lot about tests....

Oh, there are lot of very practical people doing very practical testing and never ever using fail-tests. Actually, you're the first one that ever told me about negative tests. Anyone else would test for an error like this:

  def infinite_recursion
    infinite_recursion
  end

  def test_infinite_recursion
    begin
      infinite_recursion
    rescue Exception => this_error
      return this_error == SystemStackError
    end
    return false
  end

So they would check that infinite_recursion causes an error, and then check whether it's the correct error, and then return true (PASS) if it does, and if it's the wrong error, return false (FAIL), and likewise if infinite_recursion ever returned. They don't ever return false to mean true and true to mean false.

I still don't know how you got there. Good for you that you found it from experience. I hope that it was a good experience, but if you keep it that much secret, there's no way I can relate to that experience.

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to