Changeset 24


Ignore:
Timestamp:
Jun 27, 2008, 6:29:18 PM (16 years ago)
Author:
George Lilly
Message:

Fixed a unit testing bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/GPLUNIT.m

    r22 r24  
    2222        I '$D(ZARY(BAT))  D  ; FIRST TEST IN THIS BATTERY
    2323        . S ZARY(BAT)=CNT_"^"_CNT ; FIRST AND LAST TESTS IN BATTERY
    24         . ; S ZARY("TESTS",BAT)="" ; PUT THE BATTERY IN THE TESTS INDEX
    25         . S TN=$NA(ZARY("TESTS"))
    26         . D PUSH^GPLXPATH(TN,BAT)
     24        . S ZARY("TESTS",BAT)="" ; PUT THE BATTERY IN THE TESTS INDEX
     25        . ; S TN=$NA(ZARY("TESTS"))
     26        . ; D PUSH^GPLXPATH(TN,BAT)
    2727        S ZARY(0)=CNT ; update the array counter
    2828        Q
     
    4848       . . I LINE?." "1";;>>".E  D  ; test case found
    4949       . . . D ZT(.@ZARY,SECTION,$P(LINE,";;>>",2)) ; put the test in the array
    50        ; S @ZARY@("ALL")="1"_"^"_@ZARY@(0) ; MAKE A BATTERY FOR ALL
     50       S @ZARY@("ALL")="1"_"^"_@ZARY@(0) ; MAKE A BATTERY FOR ALL
    5151       Q
    5252       ;
     
    5454        N I,ZX,ZR,ZP
    5555        S DEBUG=0
    56         I WHICH="ALL" D  Q ; RUN ALL THE TESTS
    57         . W "DOING ALL",!
    58         . N J,NT
    59         . S NT=$NA(ZARY("TESTS"))
    60         . W NT,@NT@(0),!
    61         . F J=1:1:@NT@(0) D  ;
    62         . . W @NT@(J),!
    63         . . D ZTEST^GPLUNIT(@ZARY,@NT@(J))
     56        ; I WHICH="ALL" D  Q ; RUN ALL THE TESTS
     57        ; . W "DOING ALL",!
     58        ; . N J,NT
     59        ; . S NT=$NA(ZARY("TESTS"))
     60        ; . W NT,@NT@(0),!
     61        ; . F J=1:1:@NT@(0) D  ;
     62        ; . . W @NT@(J),!
     63        ; . . D ZTEST^GPLUNIT(@ZARY,@NT@(J))
    6464        I '$D(ZARY(WHICH))  D  ; TEST SECTION DOESN'T EXIST
    6565        . W "ERROR -- TEST SECTION DOESN'T EXIST -> ",WHICH,!
Note: See TracChangeset for help on using the changeset viewer.