Re: SenTestingKit fails when using CG-Only

  • The code below surfaced in this group on 10 november by Chris Hanson.
    It was augmented a day later by Andre and claims to have solved the
    problem of unit testing with the GCRequired setting.

    When I tried to implement this scheme it did not work for me. I
    suspect I am not doing things as should be with the following:
    - in the project for a framework made a target with the unit testing
    code;
    - made this target dependent on the framework target;
    - the above setup is working except for GCRequired;
    - Took the amended code (as per 11-11) into a .h/.m pair generated
    from the new file wizard opting for Objective C Test Class;
    - added the files to the target.
    This setup appears to be at fault, because the NSLog message does not
    appear and otest crashes. Besides, a get a compilation warning
    "SenTestProbe may not respond to runTests".
    Clearly I am at the wrong track and would very much appreciate it if
    someone will provide me with more specific and detailed instructions
    on this issue.
    Hans van der Meer

    The code for reference (abbreviated):
    > #import "GCRequiredUnitTesting.h"
    > @implementation GCRequiredUnitTesting
    > int main (int argc, const char * argv[]) {
    > ...
    > // Tell SenTestingKit to use our last argument as the test bundle, to
    > // run all the tests it can find, and that the executable is
    > equivalent
    > // to the otest test rig supplied with OCUnit.
    > ...

    > NSLog(@"Your (Garbage Collected) Test Suite is %@ \n",lastArgument);
    >
    > ...
    > //Probing
    > [SenTestProbe runTests:testDefaults];
    > ...

    Hans van der Meer
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today