On Sun, Feb 13, 2011 at 9:34 AM, Gil Barmwater <gbarmwa...@alum.rpi.edu> wrote: > see below... > > Mark Miesfeld wrote: >> Just an FYI regarding the test suite. ... >> The reason I added the oodTestGroup extension is that I was having >> trouble getting the ooDialog.cls package loaded with everything in the >> proper scope. As I'm sure you all recall, if you put a "::requires >> 'ooDialog.cls'" statement directly in the the test group file, an >> error is generated when the test suite is run on a non-Windows OS. >> > > A trick I've used when needing to "conditionally ::requires" a file is > to simply CALL it; e.g. if windows? then call 'ooDialog.cls'. This lets > me use code in, for example, rexxtry that is in a file that would > normally be included with ::requires. YMMV :-)
In the test suite we normally use: signal on any name loadErr .context~package~loadPackage('ooDialog.cls') for these situations. But, the problem here, in rough pseudo code: /* MyTestGroup file */ tg = .MyTestGroup~new < do some stuff> ::requires 'ooTest.frm' ::class TestSuite ::method setup if windows call ooDialog.cls testDialog = .TestDialog~new ... ::class MyTestGroup <tests> ::class TestDialog subclass UserDialog <dialog definiton> -------------------------------------- When MyTestGroup file is initially called, the class objects are constructed. But, the 'call ooDialog.cls' has not been executed, so the interpreter does not as yet have any idea what a UserDialog class is. [Framework exception] [20110213 10:29:25.550000] Type: Trap Severity: Fatal File: C:\work.ooRexx\...\platform\windows\oodialog\ListBox\ListBox.testGroup Line: 2073 Initial call of test container failed Condition: SYNTAX Class "USERDIALOG" not found File: C:\work.ooRexx\...\platform\windows\oodialog\ListBox\ListBox.testGroup Line: 136 136 *-* ::class SimpleDialog subclass UserDialog inherit advancedcontrols 2073 *-* call (file) self~testTypes There is no way to keep everything for the ListBox tests in one file, which is what I want. I could jump through a few hoops to get it to work, but I can't keep all the stuff pertaining to the tests in one file. -- Mark Miesfeld ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel