Changeset 28


Ignore:
Timestamp:
Jul 1, 2008, 11:26:13 AM (16 years ago)
Author:
George Lilly
Message:

Added unit tests for GPLCCR

Location:
ccr/trunk/p
Files:
2 edited

Legend:

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

    r27 r28  
    77        ; Select a patient for real.
    88        S DIC=2,DIC(0)="AEMQ" D ^DIC
     9        I Y<1 Q ; EXIT
    910        S DFN=$P(Y,U,1) ; SET THE PATIENT
    1011        N CCRGLO
     
    2627        ;
    2728        ; DELETE THE BODY, ACTORS AND SIGNATURES SECTIONS FROM THE CCR GLOBAL
    28         ; THESE WILL BE POPULATED WITH CALLS TO THE XPATH PROCESSING ROUTINES
     29        ; THESE WILL BE POPULATED AFTER CALLS TO THE XPATH PROCESSING ROUTINES
    2930        D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Body")
    3031        D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Actors")
     
    5051        . D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body")
    5152        . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),!
    52         . ; D QOPEN^GPLXPATH("CCRBLD",CCRGLO,"//ContinuityOfCareRecord/Body")
    53         . ; D QUEUE^GPLXPATH("CCRBLD",OXML,1,@OXML@(0))
    54         . ; D QCLOSE^GPLXPATH("CCRBLD",CCRGLO,"//ContinuityOfCareRecord/Body")
    55         . ; I DEBUG W "GOING TO BUILD CCR",!
    56         . ; N CCRTMP
    57         . ; D BUILD^GPLXPATH("CCRBLD","CCRTMP")
    58         . ; I DEBUG F GPLI=1:1:CCRTMP(0) W CCRTMP(GPLI),!
    59         . ; D CP^GPLXPATH("CCRTMP",CCRGLO)
    6053        Q
    6154        ;
     
    6861         ;
    6962TEST   ; RUN ALL THE TEST CASES
    70       N ZTMP
    71       D ZLOAD^GPLUNIT("ZTMP","GPLCCR")
    72       D ZTEST^GPLUNIT(.ZTMP,"ALL")
    73       W !
    74       ; W "THE TESTS!",!
    75       ; ZWR ZTMP
     63      ;D TESTALL^GPLUNIT("GPLCCR")
     64      D ZTEST^GPLCCR("PROBLEMS")
     65      W "TESTING TESTING 123",!
     66      D ZTEST^GPLCCR("CCR")
    7667      Q
    7768      ;
     
    8980      ;
    9081;;><TEST>
    91 ;;><INIT>
     82;;><PROBLEMS>
    9283;;>>>K GPL S GPL=""
     84;;>>>D CCRRPC^GPLCCR(.GPL,"2","PROBLEMS")
     85;;>>?@GPL@(@GPL@(0))="</Problems>"
     86;;><CCR>
     87;;>>>K GPL S GPL=""
     88;;>>>D CCRRPC^GPLCCR(.GPL,"2","CCR")
     89;;>>?@GPL@(@GPL@(0))="</ContinutiyOfCareRecord>"
    9390;;></TEST>
  • ccr/trunk/p/GPLUNIT.m

    r27 r28  
    9999      Q
    100100      ;
    101 GTSTS(ZARY,RTN) ; return an array of test names
    102         N I,J S I="" S I=$O(ZARY("TESTS",I))
     101GTSTS(GTZARY,RTN) ; return an array of test names
     102        N I,J S I="" S I=$O(GTZARY("TESTS",I))
    103103        F J=0:0  Q:I=""  D
    104104        . D PUSH^GPLXPATH(RTN,I)
    105         . S I=$O(ZARY("TESTS",I))
     105        . S I=$O(GTZARY("TESTS",I))
    106106        Q
    107107        ;
    108108TESTALL(RNM) ; RUN ALL THE TESTS
    109         N I,J,ZTMP,TSTS,TOTP,TOTF
     109        N I,J,TZTMP,TSTS,TOTP,TOTF
    110110        S TOTP=0 S TOTF=0
    111         D ZLOAD^GPLUNIT("ZTMP",RNM)
    112         D GTSTS(.ZTMP,"TSTS")
     111        D ZLOAD^GPLUNIT("TZTMP",RNM)
     112        D GTSTS(.TZTMP,"TSTS")
    113113        F I=1:1:TSTS(0) D  ;
    114114        . S TPASSED=0 S TFAILED=0
    115         . D ZTEST(.ZTMP,TSTS(I))
     115        . D ZTEST^GPLUNIT(.TZTMP,TSTS(I))
    116116        . S TOTP=TOTP+TPASSED
    117117        . S TOTF=TOTF+TFAILED
Note: See TracChangeset for help on using the changeset viewer.