|
From: Marcus B. <ma...@la...> - 2004-02-14 01:04:34
|
Hi...
Jeff Moore wrote:
> I'm having some trouble writing tests for some code that uses the error
> suppression operator (@).
Unfortunately SimpleTest still very much reflects my personal biases. I
tend not to use the @ operator. I know of no way to distinguish a
warning that is suppressed from one that isn't assuming that your ini
file reports all errors.
> Adding the following to simpleTestErrorHandler clears up the problem and
> the test passes.
>
> if ( ( $severity & error_reporting() ) != $severity ) {
> return; // Ignore this error because of error suppression
> }
Ok, I should probably add this or something similar to the core code.
Obviously this won't happen until the next release (Beta4). I'd like to
investigate the error_reporting() function further before I decide if
that is OK?
>
> Any suggestions on how to proceed?
If your fix is sufficient then use it for now. Hopefully on the next
release of Wact (I assume) you can specify SimpleTest Beta4 and things
should be less severe. Other actions, decorating the runner or
subclassing the reporter, would simply involve you in more work than
really necessary.
I am afraid that is all that I can suggest right now until I investigate
things a bit more :(.
>
> Jeff
yours, Marcus
--
Marcus Baker, ma...@la..., no...@ap...
|