Test descriptions/name, say what the test is? or what it means when it fails?
- by xenoterracide
The API docs for Test::More::ok is
ok($got eq $expected, $test_name);
right now in one of my apps I have $test_name print what the test is testing. So for example in one of my tests I have set this to 'filename exists'. What I realized after I got a bug report recently, and realized that the only time I ever see this message is when the test is failing, if the test is failing that means the file doesn't exist.
In your opinion, do you think these $test_name's should say what the test means if successful? what it means if it failed? or do you think it should say something else? please explain why?