From: <wda...@us...> - 2007-12-27 21:12:38
|
Revision: 1815 http://oorexx.svn.sourceforge.net/oorexx/?rev=1815&view=rev Author: wdashley Date: 2007-12-27 13:12:43 -0800 (Thu, 27 Dec 2007) Log Message: ----------- ArtifactID: None Comment: Last of the DO instruction tests. I finally finished it. Modified Paths: -------------- test/trunk/ooRexx/base/keyword/DO.testGroup Modified: test/trunk/ooRexx/base/keyword/DO.testGroup =================================================================== --- test/trunk/ooRexx/base/keyword/DO.testGroup 2007-12-27 20:09:18 UTC (rev 1814) +++ test/trunk/ooRexx/base/keyword/DO.testGroup 2007-12-27 21:12:43 UTC (rev 1815) @@ -1762,18 +1762,18 @@ src[7] = "If c=2 Then Return c" src[8] = "End" src[9] = "Return 99" - call createFile src, path'SCIDOS2A' + call createFile src, path'SCIDOS2M' -- now do the tests c=0 Call intloop self~AssertSame("subTest1", c,2) result=17 - Call SCIDOS2A + Call SCIDOS2M self~AssertSame("subTest2", RESULT,2) -- now remove the external functions - call deleteFile path'SCIDOS2A' + call deleteFile path'SCIDOS2M' intloop: Do i=1 to 3 @@ -1817,5 +1817,869 @@ self~AssertSame("subTest2", i, 4) self~AssertSame("subTest3", (a.1 a.2 a.3 a.4),'2 5 9 17') +::method "test_DO_standardTest3A-1" + self~expectSyntax(41.1) + i=0;Do 6 For 7; i=i+1; End; +::method "test_DO_standardTest3A-2" + self~expectSyntax(41.1) + i=0;Do 6 By 7 ; i=i+1; End; +::method "test_DO_standardTest3A-3" + self~expectSyntax(41.1) + i=0;Do 6 To 7 ; i=i+1; End; + +::method "test_DO_standardTest3A-4" + self~expectSyntax(41.1) + Do To 9 ; i=4; End; + +::method "test_DO_standardTest3A-5" + self~expectSyntax(41.1) + Do by 9 ; i=4; End; + +::method "test_DO_standardTest3A-6" + self~expectSyntax(41.1) + Do For 9 ; i=4; End; + + +::method "test_DO_standardTest3B" + Doi=1 To 4;a=1; + self~AssertTrue("subTest1", 1) + +::method "test_DO_standardTest3C-1" + self~expectSyntax(41.1) + Do cv='a'; Call err; End; /* cv=nonnumeric */ + +::method "test_DO_standardTest3C-2" + self~expectSyntax(41.1) + Do 1cv; Call err; End; /* exprr=invalid num*/ + +::method "test_DO_standardTest3D-1" + self~expectSyntax(41.1) + t='to' + Do i=1 t 5; End + +::method "test_DO_standardTest3D-2" + self~expectSyntax(41.1) + t='to' + Do i=1 b 5; End + +::method "test_DO_standardTest3D-3" + self~expectSyntax(41.1) + t='to' + Do i=1 fo 5; End + +::method "test_DO_standardTest3D-4" + FOR=1 + Do 0||for||0 + for=for+1 + End + self~AssertSame("subTest2", for, 11) + +::method "test_DO_standardTest5-1" + a=0 ; o='' ; + Do; ; b=2; a=a+1;End; + self~AssertSame("subTest5-1", (a b),(1 2)) + +::method "test_DO_standardTest5-2" + a=0; + Do FOREVER; a=a+1; If a=10 Then leave;End; + self~AssertSame("subTest5-2", (a),(10)) + +::method "test_DO_standardTest5-3" + a=0;o='' + i=5; Do i; a=a+1;End; + self~AssertSame("subTest5-3", (i a),(5 5)) + +::method "test_DO_standardTest5-4" + a=0;o='' + Do cv=f('I',5) TO f('T',15); a=a+1;End; + self~AssertSame("subTest5-4", (cv o a),(16 'IT' 11)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-5" + a=0;o='' + Do cv=f('I',5) TO f('T',15) By f('B',3) + a=a+1;End; + self~AssertSame("subTest5-5", (cv o a),(17 'ITB' 4 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-6" + a=0;o='' + Do cv=f('I',5) TO f('T',15) For f('F',20) + a=a+1;End; + self~AssertSame("subTest5-6", (cv o a),(16 'ITF' 11)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-7" + a=0;o='' + Do cv=f('I',5) TO f('T',15) By f('B',3) For f('F',20) + a=a+1;End; + self~AssertSame("subTest5-7", (cv o a),(17 'ITBF' 4)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-8" + a=0;o='' + Do cv=f('I',5) TO f('T',15) For f('F',20) By f('B',3) + a=a+1;End; + self~AssertSame("subTest5-8", (cv o a),(17 'ITFB' 4)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-9" + a=0;o='' + Do cv=f('I',5) By f('B',3); + if cv>16 then leave + a=a+1;End; + self~AssertSame("subTest5-9", (cv o a),(17 'IB' 4 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-10" + a=0;o='' + Do cv=f('I',5) By f('B',3) TO f('T',15) + a=a+1;End; + self~AssertSame("subTest5-10", (cv o a),(17 'IBT' 4 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-11" + a=0;o='' + Do cv=f('I',5) By f('B',3) For f('F',20) + a=a+1;End; + self~AssertSame("subTest5-11", (cv o a),(65 'IBF' 20)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-12" + a=0;o='' + Do cv=f('I',5) By f('B',15) TO f('T',3) For f('F',20) + a=a+1;End; + self~AssertSame("subTest5-12", (cv o a),(5 'IBTF' 0)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-13" + a=0;o='' + Do cv=f('I',5) By f('B',3) For f('F',20) TO f('T',15) + a=a+1;End; + self~AssertSame("subTest5-13", (cv o a),(17 'IBFT' 4)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-14" + a=0;o='' + Do cv=f('I',5) For f('F',20) + if cv>16 then leave + a=a+1;End; + self~AssertSame("subTest5-14", (cv o a),(17 'IF' 12)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-15" + a=0;o='' + Do cv=f('I',5) For f('F',20) To f('T',15) + a=a+1;End; + self~AssertSame("subTest5-15", (cv o a),(16 'IFT' 11)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-16" + a=0;o='' + Do cv=f('I',5) For f('F',20) By f('B',3) + a=a+1;End; + self~AssertSame("subTest5-16", (cv o a),(65 'IFB' 20)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-17" + a=0;o='' + Do cv=f('I',5) For f('F',20) TO f('T',15) By f('B',3) + a=a+1;End; + self~AssertSame("subTest5-17", (cv o a),(17 'IFTB' 4)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-18" + a=0;o='' + Do cv=f('I',5) For f('F',20) By f('B',3) TO f('T',15) + a=a+1;End; + self~AssertSame("subTest5-18", (cv o a),(17 'IFBT' 4)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-19" + a=0 ; o='' ; + Do Until a >=7 + b=2 + a=a+1;End; + self~AssertSame("subTest5-19", (a b),(7 2)) + +::method "test_DO_standardTest5-20" + a=0 + Do FOREVER , + Until a >=7 + a=a+1; + If a=10 Then leave;End; + self~AssertSame("subTest5-20", (a),(7)) + +::method "test_DO_standardTest5-21" + a=0;o='' + i=5; Do i , + Until a >=7 + a=a+1;End; + self~AssertSame("subTest5-21", (i a),(5 5)) + +::method "test_DO_standardTest5-22" + a=0;o='' + Do cv=f('I',5) TO f('T',15) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-22", (cv o a),(7 'IT' 3)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-23" + a=0;o='' + Do cv=f('I',5) TO f('T',15) By f('B',3), + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-23", (cv o a),(8 'ITB' 2 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-24" + a=0;o='' + Do cv=f('I',5) TO f('T',15) For f('F',20), + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-24", (cv o a),(7 'ITF' 3)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-25" + a=0;o='' + Do cv=f('I',5) TO f('T',15) By f('B',3) For f('F',20) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-25", (cv o a),(8 'ITBF' 2)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-26" + a=0;o='' + Do cv=f('I',5) TO f('T',15) For f('F',20) By f('B',3) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-26", (cv o a),(8 'ITFB' 2)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-27" + a=0;o='' + Do cv=f('I',5) By f('B',3) , + Until cv>=7 + if cv>16 then leave + a=a+1;End; + self~AssertSame("subTest5-27", (cv o a),(8 'IB' 2 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-28" + a=0;o='' + Do cv=f('I',5) By f('B',3) TO f('T',15) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-28", (cv o a),(8 'IBT' 2 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-29" + a=0;o='' + Do cv=f('I',5) By f('B',3) For f('F',20) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-29", (cv o a),(8 'IBF' 2)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-30" + a=0;o='' + Do cv=f('I',5) By f('B',15) TO f('T',3) For f('F',20) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-30", (cv o a),(5 'IBTF' 0)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-31" + a=0;o='' + Do cv=f('I',5) By f('B',3) For f('F',20) TO f('T',15) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-31", (cv o a),(8 'IBFT' 2)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-32" + a=0;o='' + Do cv=f('I',5) For f('F',20) , + Until cv>=7 + if cv>16 then leave + a=a+1;End; + self~AssertSame("subTest5-32", (cv o a),(7 'IF' 3)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-33" + a=0;o='' + Do cv=f('I',5) For f('F',20) To f('T',15) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-33", (cv o a),(7 'IFT' 3)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-34" + a=0;o='' + Do cv=f('I',5) For f('F',20) By f('B',3) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-34", (cv o a),(8 'IFB' 2)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-35" + a=0;o='' + Do cv=f('I',5) For f('F',20) TO f('T',15) By f('B',3) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-35", (cv o a),(8 'IFTB' 2)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-36" + a=0;o='' + Do cv=f('I',5) For f('F',20) By f('B',3) TO f('T',15) , + Until cv>=7 + a=a+1;End; + self~AssertSame("subTest5-36", (cv o a),(8 'IFBT' 2)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-37" + a=0 ; o='' ; + Do , + While a <=7 + b=2 + a=a+1;End; + self~AssertSame("subTest5-37", (a b),(8 2)) + +::method "test_DO_standardTest5-38" + a=0 + Do FOREVER , + While a <=7 + a=a+1; + If a=10 Then leave;End; + self~AssertSame("subTest5-38", (a),(8)) + +::method "test_DO_standardTest5-39" + a=0;o='' + i=5; Do i , + While a <=7 + a=a+1;End; + self~AssertSame("subTest5-39", (i a),(5 5)) + +::method "test_DO_standardTest5-40" + a=0;o='' + Do cv=f('I',5) TO f('T',15) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-40", (cv o a),(8 'IT' 3)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-41" + a=0;o='' + Do cv=f('I',5) TO f('T',15) By f('B',3) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-41", (cv o a),(8 'ITB' 1 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-42" + a=0;o='' + Do cv=f('I',5) TO f('T',15) For f('F',20) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-42", (cv o a),(8 'ITF' 3)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-43" + a=0;o='' + Do cv=f('I',5) TO f('T',15) By f('B',3) For f('F',20) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-43", (cv o a),(8 'ITBF' 1)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-44" + a=0;o='' + Do cv=f('I',5) TO f('T',15) For f('F',20) By f('B',3) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-44", (cv o a),(8 'ITFB' 1)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-45" + a=0;o='' + Do cv=f('I',5) By f('B',3) , + While cv<=7 + if cv>16 then leave + a=a+1;End; + self~AssertSame("subTest5-45", (cv o a),(8 'IB' 1 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-46" + a=0;o='' + Do cv=f('I',5) By f('B',3) TO f('T',15) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-46", (cv o a),(8 'IBT' 1 )) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-47" + a=0;o='' + Do cv=f('I',5) By f('B',3) For f('F',20) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-47", (cv o a),(8 'IBF' 1)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-48" + a=0;o='' + Do cv=f('I',5) By f('B',15) TO f('T',3) For f('F',20) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-48", (cv o a),(5 'IBTF' 0)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-49" + a=0;o='' + Do cv=f('I',5) By f('B',3) For f('F',20) TO f('T',15) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-49", (cv o a),(8 'IBFT' 1)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-50" + a=0;o='' + Do cv=f('I',5) For f('F',20) , + While cv<=7 + if cv>16 then leave + a=a+1;End; + self~AssertSame("subTest5-50", (cv o a),(8 'IF' 3)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-51" + a=0;o='' + Do cv=f('I',5) For f('F',20) To f('T',15) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-51", (cv o a),(8 'IFT' 3)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-52" + a=0;o='' + Do cv=f('I',5) For f('F',20) By f('B',3) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-52", (cv o a),(8 'IFB' 1)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-53" + a=0;o='' + Do cv=f('I',5) For f('F',20) TO f('T',15) By f('B',3) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-53", (cv o a),(8 'IFTB' 1)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-54" + a=0;o='' + Do cv=f('I',5) For f('F',20) By f('B',3) TO f('T',15) , + While cv<=7 + a=a+1;End; + self~AssertSame("subTest5-54", (cv o a),(8 'IFBT' 1)) + return + f: o=o||"ARG"(1); Return "ARG"(2) + +::method "test_DO_standardTest5-55" + a=0 + Do until a=10 + a=a+1 + End + self~AssertSame("subTest5-55", (a),(10)) + +::method "test_DO_standardTest5-56" + a=0 + Do while a<10 + a=a+1 + End + self~AssertSame("subTest5-56", (a),(10)) + +::method "test_DO_standardTest5-57" + v.=0 ; t. =0 ; b. =0; f.=0 ; + v.1=5; t.1=15; b.1=3; f.1=20; + j=1 + Do j=v.j To t.j By b.j For f.j + End + self~AssertSame("subTest5-57", j,17) + +::method "test_DO_standardTest5-58" + a=0; Do i=5 To 15 ; a=a+1; end; + self~AssertSame("subTest5-58", a,11) + +::method "test_DO_standardTest5-59" + a=0; Do i=5 For 20 ; a=a+1; end; + self~AssertSame("subTest5-59", a,20) + +::method "test_DO_standardTest5-60" + a=0; Do i=1 By 1 To 9 ; a=a+1; end; + self~AssertSame("subTest5-60", a i,9 10) + +::method "test_DO_standardTest5-61" + a=0; Do i=1 By -1 To -9 ; a=a+1; end; + self~AssertSame("subTest5-61", a i,'11' '-10') + +::method "test_DO_standardTest5-62" + a=0; Do i=1 For 10 ; a=a+1; end; + self~AssertSame("subTest5-62", a i,10 11) + +::method "test_DO_standardTest5-63" + a=0; Do i=1 Until i=10 ; a=a+1; end; + self~AssertSame("subTest5-63", a i,10 10) + +::method "test_DO_standardTest5-64" + a=0; Do i=1 Until a=10 ; a=a+1; end; + self~AssertSame("subTest5-64", a i,10 10) + +::method "test_DO_standardTest5-65" + NUMERIC DIGITS 2 + a=0; Do i=1 For 13 ; a=a+1; end; + self~AssertSame("subTest5-65", a i,13 14) + +::method "test_DO_standardTest5-66" + self~expectSyntax(26.3) + NUMERIC DIGITS 1 + a=0; Do i=1 For 13 ; a=a+1; end; + +::method "test_DO_standardTest5-67" + NUMERIC DIGITS 2 + a=0 + Do i=1 For 13 ; + NUMERIC DIGITS 1 + a=a+1; end; + NUMERIC DIGITS 2 + self~AssertSame("subTest5-67", a i,1E+1 1E+1) + +::method "test_DO_standardTest5-68" + c=0;cc=1 + i=1 + Do i.1=1 To 1 + Do i.2=1 To 1 + Do i.3=1 To 1 + Do i.4=1 To 1 + Do i.5=1 To 1 + Do i.6=1 To 1 + Do i.7=1 To 1 + Do i.8=1 To 1 + Do i.9=1 To 1 + Do i.10=1 To 1 + Do i.11=1 To 1 + Do i.12=1 To 1 + Do i.13=1 To 1 + Do i.14=1 To 1 + Do i.15=1 To 1 + Do i.16=1 To 1 + Do i.17=1 To 1 + Do i.18=1 To 1 + Do i.19=1 To 1 + Do i.20=1 To 1 + Do i.21=1 To 1 + Do i.22=1 To 1 + Do i.23=1 To 1 + Do i.24=1 To 1 + Do i.25=1 To 1 + Do i.26=1 To 1 + Do i.27=1 To 1 + Do i.28=1 To 1 + Do i.29=1 To 1 + Do i.30=1 To 1 + Do i.31=1 To 1 + Do i.32=1 To 1 + Do i.33=1 To 1 + Do i.34=1 To 1 + Do i.35=1 To 1 + Do i.36=1 To 1 + Do i.37=1 To 1 + Do i.38=1 To 1 + Do i.39=1 To 1 + Do i.40=1 To 1 + Do i.41=1 To 1 + Do i.42=1 To 1 + Do i.43=1 To 1 + Do i.44=1 To 1 + Do i.45=1 To 1 + Do i.46=1 To 1 + Do i.47=1 To 1 + Do i.48=1 To 1 + Do i.49=1 To 1 + Do i.50=1 To 1 + Do i.51=1 To 1 + Do i.52=1 To 1 + Do i.53=1 To 1 + Do i.54=1 To 1 + Do i.55=1 To 1 + Do i.56=1 To 1 + Do i.57=1 To 1 + Do i.58=1 To 1 + Do i.59=1 To 1 + Do i.60=1 To 1 + Do i.61=1 To 1 + Do i.62=1 To 1 + Do i.63=1 To 1 + Do i.64=1 To 1 + Do i.65=1 To 1 + Do i.66=1 To 1 + Do i.67=1 To 1 + Do i.68=1 To 1 + Do i.69=1 To 1 + Do i.70=1 To 1 + Do i.71=1 To 1 + Do i.72=1 To 1 + Do i.73=1 To 1 + Do i.74=1 To 1 + Do i.75=1 To 1 + Do i.76=1 To 1 + Do i.77=1 To 1 + Do i.78=1 To 1 + Do i.79=1 To 1 + Do i.80=1 To 1 + Do i.81=1 To 1 + Do i.82=1 To 1 + Do i.83=1 To 1 + Do i.84=1 To 1 + Do i.85=1 To 1 + Do i.86=1 To 1 + Do i.87=1 To 1 + Do i.88=1 To 1 + Do i.89=1 To 1 + Do i.90=1 To 1 + Do i.91=1 To 1 + Do i.92=1 To 1 + c=c+1 + End i.92 + End i.91 + End i.90 + End i.89 + End i.88 + End i.87 + End i.86 + End i.85 + End i.84 + End i.83 + End i.82 + End i.81 + End i.80 + End i.79 + End i.78 + End i.77 + End i.76 + End i.75 + End i.74 + End i.73 + End i.72 + End i.71 + End i.70 + End i.69 + End i.68 + End i.67 + End i.66 + End i.65 + End i.64 + End i.63 + End i.62 + End i.61 + End i.60 + End i.59 + End i.58 + End i.57 + End i.56 + End i.55 + End i.54 + End i.53 + End i.52 + End i.51 + End i.50 + End i.49 + End i.48 + End i.47 + End i.46 + End i.45 + End i.44 + End i.43 + End i.42 + End i.41 + End i.40 + End i.39 + End i.38 + End i.37 + End i.36 + End i.35 + End i.34 + End i.33 + End i.32 + End i.31 + End i.30 + End i.29 + End i.28 + End i.27 + End i.26 + End i.25 + End i.24 + End i.23 + End i.22 + End i.21 + End i.20 + End i.19 + End i.18 + End i.17 + End i.16 + End i.15 + End i.14 + End i.13 + End i.12 + End i.11 + End i.10 + End i.9 + End i.8 + End i.7 + End i.6 + End i.5 + End i.4 + End i.3 + End i.2 + End i.1 + self~AssertSame("subTest5-68", c,cc) + +::method "test_DO_standardTest5-69" + a.=0 + i=1 + Do a.i=1 To 3 + If i>7 Then Leave + i=i+1 + End + self~AssertSame("subTest5-69", i,8) + Do i=-1 To 10 + self~AssertSame("subTest5-69-"i, a.i,(0<i&i<9)) + End + +::method "test_DO_standardTest5-70" + expri=1 + exprb=2 + exprt=10 + k=0 + Do i=expri To exprt By exprb + k=k+1 + Parse Value '0 -1 -5' With expri exprb exprt + End + self~AssertSame("subTest5-70-1", k,5) + Do i=expri To exprt By exprb + k=k+1 + Parse Value 0 0 0 With expri exprb exprt + End + self~AssertSame("subTest5-70-2", k,11) + Do i=expri To exprt By exprb While exprb>=0 + k=k+1 + If k>31 Then exprb=-1 + End + self~AssertSame("subTest5-70-3", k,32) + +::method "test_DO_standardTest5-71" + self~AssertSame("subTest5-71-1", fact(10),(2*3*4*5*6*7*8*9)0) + self~AssertSame("subTest5-71-2", fact(10),3628800) + self~AssertSame("subTest5-71-3", fact(11),facti(11)) + return + + fact: Procedure + Arg n + If n=0 Then Return 1 + Else Return n*fact(n-1) + + facti: + factin=1 + Do factii=2 To "ARG"(1) + factin=factin*factii + End + Return factin + +::method "test_DO_standardTest5-72" + self~expectSyntax(34.3) + z=2 + Do While z; ; End; + +::method "test_DO_standardTest5-73" + self~expectSyntax(34.3) + z=2 + Do Forever While z; ; End; + +::method "test_DO_standardTest5-74" + self~expectSyntax(34.3) + z=2 + Do 100 While z; ; End; + +::method "test_DO_standardTest5-75" + self~expectSyntax(34.4) + z=2 + Do i=1 By 1 Until z; If i=2 Then self~assertTrue("subTest1", 0); End; + +::method "test_DO_standardTest5-76" + self~expectSyntax(34.4) + z=2 + Do i=1 To 2 Until z; If i=2 Then self~assertTrue("subTest1", 0); End; + +::method "test_DO_standardTest5-77" + self~expectSyntax(41.1) + a='a' + Do i=1 By a; If i=2 Then self~assertTrue("subTest1", 0); End; + +::method "test_DO_standardTest5-78" + self~expectSyntax(34.3) + Do 100 While z; Call err; End; + +::method "test_DO_standardTest5-79" + self~expectSyntax(34.4) + Do i=1 By 1 Until z; If i=2 Then self~assertTrue("subTest1", 0); End; + +::method "test_DO_standardTest5-80" + self~expectSyntax(41.1) + Do i=1 By a; If i=2 Then self~assertTrue("subTest1", 0); End; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |