ArrayMac > Function display > TEST_DimSet

     ∇ r←TEST_DimSet;ckFnExists;unless;aOk;aEq;on;chkFeature;ckObExists;chkFeatureLine;tfuuN;tfuu       
[1]   ⍝∇ 20081120/20150611 ra⌈ --()-- test "DimSet"                                                     
[2]    test_start                                                                                       
[3]    r←0                                                                                              
[4]    unless←{(~⍵)/⍺}                                                                                  
[5]    aOk←#.Assert                                                                                     
[6]    aEq←#.AssertEq                                                                                   
[7]    on←{⍺ ⍵}                                                                                         
[8]   ⍝⍝--------                                                                                        
[9]    ckObExists←{(⍵ omrepl'missing "⍵"')AssertEq ⍺ on ⍬⍴⎕NC ⍵}                                        
[10]   ckFnExists←3∘ckObExists                                                                          
[11]   chkFeature←{⍺←0 ⋄ ('Requirement:',⍵)aEq 1 ⍺}                                                     
[12]   chkFeatureLine←{⍺←0 ⋄ ⍺ chkFeature'⍝⍝--'{(1+(⍬⍴⍴⍺)+⍬⍴where ⍺⍷⍵)↓⍵}(1 atpars 2⌷[1]qSI'')FNline ⍵}
[13]   ⍝⍝--                                                                                             
[14]   tfuuN←'DimSet'                                                                                   
[15]   :If 1                                                                                            
[16]       :If ~ckFnExists tfuuN                                                                        
[17]           ⎕←APLPmtMFS tfuuN                                                                        
[18]           →XIT                                                                                     
[19]       :EndIf                                                                                       
[20]       tfuu←⍎tfuuN                                                                                  
[21]   :EndIf                                                                                           
[22]   ⍝⍝--                                                                                             
[23]   →fail unless aEq 1 1 on⍴2 tfuu'x'                                                               
[24]   →fail unless aEq 0 0 on⍴2 tfuu''                                                                
[25]   →fail unless aEq 1 1 1 on⍴3 tfuu'x'                                                             
[26]   →fail unless aEq 1 1 1 on⍴3 tfuu'x'                                                              
[27]   →fail unless aEq 0 0 on⍴2 tfuu ⍬                                                                 
[28]   →fail unless aEq 1 4 on⍴2 tfuu'xxxx'                                                            
[29]   →fail unless aEq 4 1 on⍴2 tfuu'xxxx'                                                             
[30]                                                                                                    
[31]   ⍝⍝--                                                                                             
[32]   :If ~1 chkFeature tfuuN omrepl'implement "⍵"'                                                    
[33]       ⎕←APLPmtMFS'TEST_',tfuuN                                                                     
[34]       →XIT                                                                                         
[35]   :EndIf                                                                                           
[36]   r←1                                                                                              
[37]   →XIT                                                                                             
[38]  fail:                                                                                             
[39]   ⎕←APLPmtMFS ThisFN''                                                                             
[40]  XIT: ⍝⍝-------                                                                                    
[41]   test_complete                                                                                    
     ∇                                                                                                  

Page served at: Wed, 08 Apr 2020 06:07:40 AST.