On Sat, Mar 13, 2010 at 12:27 AM, Stanislav Malyshev <s...@zend.com> wrote: > Hi! > >> It is always possible to write a test for both versions (except >> namespace). However it requires a radical change on how we test >> things. >> Instead of testing the output of given script, we will have to add >> logics in a test, something similar to the classic xUnit frameworks. >> For example, we will have to do the error msg check inside the test > > It is possible, but that means instead of 2 trees of files you'd have these > trees distributed inside test files in a myriad of small if()s: > if(version == X) { test this error message } > elseif(version == Y) { test that error message } > else { test that another error message } > > and the same for different pieces of function, etc. Why is it better?
I'm not saying it is better to write test, but it is better to maintain one set of tests for all branches and keep them uptodate. But that's definitivelly more work, and not only for the 1st shot. That's why I would rather triple check if we really want to go down this way. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php