D'oh! Was: mgunit test not being found. ? [message #72573] |
Fri, 24 September 2010 08:20 |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Never mind... I just discovered the problem - all the tests have to be in the same file as the *__define definition.
double D'oh!
cheers,
paulv
Paul van Delst wrote:
> Hello,
>
> I just started using mgunit v1.1.0 [*] and I'm having some teething problems.
>
> Based on the trac page help, I subclassed MGutTestCase:
>
> PRO CompTest_UT__define
> COMPILE_OPT STRICTARR
> void = {CompTest_UT, INHERITS MGutTestCase}
> END
>
> and created an initial super basic test:
>
> FUNCTION CompTest_UT::test_create
> COMPILE_OPT STRICTARR
> ctest = comptest()
> result = OBJ_ISA(ctest,'CompTest')
> assert, result, 'CompTest object created'
> RETURN, result
> END
>
> But, when I run it I get the following:
>
> IDL> mgunit,'CompTest_UT'
> "All tests" test suite starting (1 test suite/case, 0 tests)
> "comptest_ut" test case starting (0 tests)
> Results: 0 / 0 tests passed, 0 skipped
> Results: 0 / 0 tests passed, 0 skipped
>
>
> So it finds the testing class, but not the test. Any ideas on what I may be doing wrong? The docs state that
>
> <quote>
> A test is just a method of this class whose name starts with "test". The mgunit framework will find the tests automatically.
> </quote>
>
> so I think I've done everything ok. My install:
>
> IDL> print, !VERSION
> { x86 linux unix linux 8.0 Jun 18 2010 32 64}
>
>
> All help appreciated.
>
> cheers,
>
> paulv
>
>
> [*] Note to David Fanning: I created a svn:externals definition in my repository to the mgunit-1.1.0 tag in MichaelG's
> repository
|
|
|