Hi, On Monday 01 November 2010, meik michalke wrote: > ok, i've tried something different. all tests are now run in the temp suite > dir by default, so any output goes there as well. as for the problem of > loading files, the class "RKTest" gained a new slot called "files" for > those. just define them relative to the test standard folder. they will be > copied to the temp dir and can then be used by their simple file name.
sounds like a clean solution. > however, i found something new ;-) until now each test run left an object > called "suite" in .GlobalEnv, which was created by a source() call in > "rktest.makeplugintests.R", line 47. it took a while until i managed to > make all functions run without that global object in place, that is, the > mentioned source() call is now called with the parameter "local=TRUE", so > the "suite" object is created only in the test function environment. this > works great, with one exception: it seems to break the "active_binding" > test in "rkward_application_tests": > > <error> > Error in bindingIsActive(\"active.binding\", rkward::.rk.watched.symbols) : > no binding for \"active.binding\" > </error> > > this still happens even after i sourced the R file manually, so "suite" is > actually present in .GlobalEnv, and then run > > rktest.makeplugintests("rkward_application_tests.R", > test.id="active_binding") > > but the error doesn't occur if "local=TRUE" is removed again (it's FALSE by > default). This last bit is easily explained: The local object "suite" is found before the global one, and so the local "suite" gets run. > frankly, i don't get it. any idea how that affects this very > test? has it something to do with the reference to > rkward::.rk.watched.symbols? The key thing is the call to makeActiveBinding(). Currently, we need to override that in order to be able to detect changes in objects which are active bindings. Having a symbol by that name in rkward::.rk.watched.symbols bascially just means that our version of makeActiveBinding() was called. So far, all we did was to mask makeActiveBinding(). That was enough for the old version of the test, since the test-function ultimately had .GlobalEnv as its enclosing environment. In the new version it has package:rkwardtests as the enclosing environment, and that changes symbol in subtle and confusing ways. And so, actually, yes, this showed a real bug, although one that most users would not be likely to trigger. The SVN version now makes a better effort at actually replacing base::makeActiveBinding(), and the test passes again. Regards Thomas
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________ RKWard-devel mailing list RKWard-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rkward-devel