- Timestamp:
- Jun 30, 2008, 2:21:04 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCR.m
r22 r27 12 12 S OARY=$NA(^TMP($J,DFN,"CCR",1)) 13 13 S ONAM="PAT_"_DFN_"_CCR_V1.xml" 14 S ODIR="/home/ wvehr1/EHR/CCR"14 S ODIR="/home/glilly/CCROUT" 15 15 D OUTPUT^GPLXPATH(OARY,ONAM,ODIR) 16 16 Q -
ccr/trunk/p/GPLUNIT.m
r24 r27 23 23 . S ZARY(BAT)=CNT_"^"_CNT ; FIRST AND LAST TESTS IN BATTERY 24 24 . S ZARY("TESTS",BAT)="" ; PUT THE BATTERY IN THE TESTS INDEX 25 26 25 . ; S TN=$NA(ZARY("TESTS")) 26 . ; D PUSH^GPLXPATH(TN,BAT) 27 27 S ZARY(0)=CNT ; update the array counter 28 28 Q … … 52 52 ; 53 53 ZTEST(ZARY,WHICH) ; try out the tests using a passed array ZTEST 54 55 56 57 ; . W "DOING ALL",! 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 54 N I,ZX,ZR,ZP 55 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)) 64 I '$D(ZARY(WHICH)) D ; TEST SECTION DOESN'T EXIST 65 . W "ERROR -- TEST SECTION DOESN'T EXIST -> ",WHICH,! 66 . Q ; EXIT 67 N FIRST,LAST 68 S FIRST=$P(ZARY(WHICH),"^",1) 69 S LAST=$P(ZARY(WHICH),"^",2) 70 F I=FIRST:1:LAST D 71 . I ZARY(I)?1">"1.E D ; NOT A TEST, JUST RUN THE STATEMENT 72 . . S ZP=$E(ZARY(I),2,$L(ZARY(I))) 73 . . ; W ZP,! 74 . . S ZX=ZP 75 . . W "RUNNING: "_ZP 76 . . X ZX 77 . . W "..SUCCESS: ",WHICH,! 78 . I ZARY(I)?1"?"1.E D ; THIS IS A TEST 79 . . S ZP=$E(ZARY(I),2,$L(ZARY(I))) 80 . . S ZX="S ZR="_ZP 81 . . W "TRYING: "_ZP 82 . . X ZX 83 . . W $S(ZR=1:"..PASSED ",1:"..FAILED "),! 84 . . I '$D(TPASSED) D ; NOT INITIALIZED YET 85 . . . S TPASSED=0 S TFAILED=0 86 . . I ZR S TPASSED=TPASSED+1 87 . . I 'ZR S TFAILED=TFAILED+1 88 Q 89 ; 90 90 TEST ; RUN ALL THE TEST CASES 91 91 N ZTMP … … 99 99 Q 100 100 ; 101 GTSTS(ZARY,RTN) ; return an array of test names 102 N I,J S I="" S I=$O(ZARY("TESTS",I)) 103 F J=0:0 Q:I="" D 104 . D PUSH^GPLXPATH(RTN,I) 105 . S I=$O(ZARY("TESTS",I)) 106 Q 107 ; 108 TESTALL(RNM) ; RUN ALL THE TESTS 109 N I,J,ZTMP,TSTS,TOTP,TOTF 110 S TOTP=0 S TOTF=0 111 D ZLOAD^GPLUNIT("ZTMP",RNM) 112 D GTSTS(.ZTMP,"TSTS") 113 F I=1:1:TSTS(0) D ; 114 . S TPASSED=0 S TFAILED=0 115 . D ZTEST(.ZTMP,TSTS(I)) 116 . S TOTP=TOTP+TPASSED 117 . S TOTF=TOTF+TFAILED 118 . S $P(TSTS(I),"^",2)=TPASSED 119 . S $P(TSTS(I),"^",3)=TFAILED 120 F I=1:1:TSTS(0) D ; 121 . W "TEST=> ",$P(TSTS(I),"^",1) 122 . W " PASSED=>",$P(TSTS(I),"^",2) 123 . W " FAILED=>",$P(TSTS(I),"^",3),! 124 W "TOTAL=> PASSED:",TOTP," FAILED:",TOTF,! 125 Q 126 ; 101 127 TLIST(ZARY) ; LIST ALL THE TESTS 102 128 ; THEY ARE MARKED AS ;;><TESTNAME> IN THE TEST CASES -
ccr/trunk/p/GPLXPATH.m
r22 r27 333 333 Q 334 334 ; 335 TEST ; RUN ALL THE TEST CASES 336 N ZTMP 337 D ZLOAD^GPLUNIT("ZTMP","GPLXPATH") 338 D ZTEST^GPLUNIT(.ZTMP,"ALL") 339 W "PASSED: ",TPASSED,! 340 W "FAILED: ",TFAILED,! 341 W ! 342 ; W "THE TESTS!",! 343 ; ZWR ZTMP 344 Q 345 ; 335 TEST ; Run all the test cases 336 D TESTALL^GPLUNIT("GPLXPATH") 337 Q 338 ; 339 OLDTEST ; RUN ALL THE TEST CASES 340 N ZTMP 341 D ZLOAD^GPLUNIT("ZTMP","GPLXPATH") 342 D ZTEST^GPLUNIT(.ZTMP,"ALL") 343 W "PASSED: ",TPASSED,! 344 W "FAILED: ",TFAILED,! 345 W ! 346 ; W "THE TESTS!",! 347 ; ZWR ZTMP 348 Q 349 ; 346 350 ZTEST(WHICH) ; RUN ONE SET OF TESTS 347 348 349 350 351 352 351 N ZTMP 352 S DEBUG=1 353 D ZLOAD^GPLUNIT("ZTMP","GPLXPATH") 354 D ZTEST^GPLUNIT(.ZTMP,WHICH) 355 Q 356 ; 353 357 TLIST ; LIST THE TESTS 354 358 N ZTMP … … 465 469 ;;>>>D ZTEST^GPLXPATH("INITXML") 466 470 ;;>>>D QOPEN^GPLXPATH("GBL","GXML") 467 ;;>>?$P(GBL(1)," ^",3)=12471 ;;>>?$P(GBL(1),";",3)=12 468 472 ;;>>>D BUILD^GPLXPATH("GBL","G2") 469 473 ;;>>?G2(G2(0))="</SECOND>" … … 472 476 ;;>>>D ZTEST^GPLXPATH("INITXML") 473 477 ;;>>>D QOPEN^GPLXPATH("GBL","GXML","//FIRST/SECOND") 474 ;;>>?$P(GBL(1)," ^",3)=12478 ;;>>?$P(GBL(1),";",3)=11 475 479 ;;>>>D BUILD^GPLXPATH("GBL","G2") 476 480 ;;>>?G2(G2(0))="</SECOND>" … … 479 483 ;;>>>D ZTEST^GPLXPATH("INITXML") 480 484 ;;>>>D QCLOSE^GPLXPATH("GBL","GXML") 481 ;;>>?$P(GBL(1)," ^",3)=13485 ;;>>?$P(GBL(1),";",3)=13 482 486 ;;>>>D BUILD^GPLXPATH("GBL","G2") 483 487 ;;>>?G2(G2(0))="</FIRST>" … … 486 490 ;;>>>D ZTEST^GPLXPATH("INITXML") 487 491 ;;>>>D QCLOSE^GPLXPATH("GBL","GXML","//FIRST/SECOND/THIRD") 488 ;;>>?$P(GBL(1)," ^",3)=13492 ;;>>?$P(GBL(1),";",3)=13 489 493 ;;>>>D BUILD^GPLXPATH("GBL","G2") 490 494 ;;>>?G2(G2(0))="</FIRST>"
Note:
See TracChangeset
for help on using the changeset viewer.