Oberon.Compilation.Test 855 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695
  1. # Oberon language test and validation suite
  2. # options --command="Compiler.Compile TesterInput.txt" --result="Oberon.Compilation.Test.Diff"
  3. # Syntax tests
  4. # =====================================
  5. # plain modules
  6. negative: missing module name
  7. MODULE END.
  8. negative: unmatched module name
  9. MODULE Test; END tseT.
  10. negative: missing semicolon in module definition
  11. MODULE Test END Test.
  12. negative: missing END in module definition
  13. MODULE Test; Test.
  14. negative: missing concluding dot
  15. MODULE Test; END Test
  16. positive: empty module
  17. MODULE Test; END Test.
  18. negative: module named system
  19. MODULE SYSTEM; END SYSTEM.
  20. # identifiers
  21. negative: number as identifier
  22. MODULE Test;
  23. CONST 007 = 0;
  24. END Test.
  25. negative: keyword as identifier
  26. MODULE Test;
  27. CONST THEN = 0;
  28. END Test.
  29. negative: string as identifier
  30. MODULE Test;
  31. CONST "Test" = 0;
  32. END Test.
  33. positive: single character identifier
  34. MODULE Test;
  35. CONST T = 0;
  36. END Test.
  37. positive: long identifiers
  38. MODULE Test;
  39. CONST IncrediblyLongModuleNameLikeSupercalifragilisticexpialidocious = 0;
  40. END Test.
  41. positive: underscore in identifier
  42. MODULE Test;
  43. CONST Test_Module = 0;
  44. END Test.
  45. # comments
  46. negative: comment only
  47. (* MODULE *)
  48. positive: comment in front of module definition
  49. (* comment *)
  50. MODULE Test; END Test.
  51. positive: comment within module definition
  52. MODULE Test;
  53. (* comment *)
  54. END Test.
  55. positive: comment after module definition
  56. MODULE Test;
  57. END Test.
  58. (* comment *)
  59. positive: plain text after module definition
  60. MODULE Test;
  61. END Test.
  62. plain text
  63. negative: invalid closing of comment
  64. MODULE Test; *) END Test.
  65. negative: missing closing of comment
  66. MODULE Test; (* END Test.
  67. positive: comment spanning several lines
  68. MODULE Test;
  69. (*
  70. this comment spans
  71. several text lines
  72. *)
  73. END Test.
  74. positive: comment as whitespace
  75. MODULE(*whitespace*)Test;END(*whitespace*)Test.
  76. # nested comments
  77. positive: nested comment
  78. (* (* nested comment *) *)
  79. MODULE Test; END Test.
  80. negative: invalid closing of nested comment
  81. (* nested comment *) *)
  82. MODULE Test; END Test.
  83. negative: missing closing of nested comment
  84. (* (* nested comment *)
  85. MODULE Test; END Test.
  86. positive: double nested comments
  87. (* (* extremely (* nested comment *) *) *)
  88. MODULE Test; END Test.
  89. positive: multiple nested comments
  90. MODULE Test;
  91. (* (* multiple *) nested (* comments (* over (* four *) levels *) *) *)
  92. END Test.
  93. negative: invalid multiple nested comments
  94. MODULE Test;
  95. (* invalid (* multiple *) nested (* comments (* over *) (* four *) levels *) *) *)
  96. END Test.
  97. # import section
  98. positive: dummy module for import section tests
  99. MODULE Dummy; END Dummy.
  100. negative: empty import list
  101. MODULE Test;
  102. IMPORT;
  103. END Test.
  104. negative: single module import without concluding semicolon
  105. MODULE Test;
  106. IMPORT Dummy
  107. END Test.
  108. positive: single module import
  109. MODULE Test;
  110. IMPORT Dummy;
  111. END Test.
  112. positive: single module import with alias
  113. MODULE Test;
  114. IMPORT Alias := Dummy;
  115. END Test.
  116. negative: double module import missing second module name
  117. MODULE Test;
  118. IMPORT Dummy, ;
  119. END Test.
  120. negative: double module import without separating comma
  121. MODULE Test;
  122. IMPORT A := Dummy B := Dummy;
  123. END Test.
  124. negative: double module import with separating semicolon
  125. MODULE Test;
  126. IMPORT A := Dummy; B := Dummy;
  127. END Test.
  128. negative: double module import without concluding semicolon
  129. MODULE Test;
  130. IMPORT A := Dummy, B := Dummy
  131. END Test.
  132. positive: double module import
  133. MODULE Test;
  134. IMPORT A := Dummy, B := Dummy;
  135. END Test.
  136. positive: multiple module import
  137. MODULE Test;
  138. IMPORT A := Dummy, B := Dummy, C := Dummy, D := Dummy;
  139. END Test.
  140. positive: multiple import lists
  141. MODULE Test;
  142. IMPORT A := Dummy;
  143. IMPORT B := Dummy;
  144. END Test.
  145. # const section
  146. positive: empty const section
  147. MODULE Test;
  148. CONST
  149. END Test.
  150. positive: const section without declarations
  151. MODULE Test;
  152. CONST ;;;;
  153. END Test.
  154. positive: repeated empty const sections
  155. MODULE Test;
  156. CONST CONST CONST
  157. CONST ; CONST ; CONST
  158. END Test.
  159. negative: single constant declaration missing equal sign
  160. MODULE Test;
  161. CONST Constant 5;
  162. END Test.
  163. negative: single constant declaration missing value
  164. MODULE Test;
  165. CONST Constant =
  166. END Test.
  167. positive: single constant declaration
  168. MODULE Test;
  169. CONST Constant = 5
  170. END Test.
  171. negative: double constant declaration without separating semicolon
  172. MODULE Test;
  173. CONST A = 5 B = 10
  174. END Test.
  175. positive: double constant declaration
  176. MODULE Test;
  177. CONST A = 5; B = 10
  178. END Test.
  179. # literals
  180. positive: boolean literal FALSE
  181. MODULE Test;
  182. CONST Boolean = TRUE
  183. END Test.
  184. positive: boolean literal TRUE
  185. MODULE Test;
  186. CONST Boolean = FALSE
  187. END Test.
  188. # legacy behaviour
  189. positive: character literal using '
  190. MODULE Test;
  191. CONST Character = 'a'
  192. END Test.
  193. # legacy behaviour
  194. positive: character literal using "
  195. MODULE Test;
  196. CONST Character = "b"
  197. END Test.
  198. negative: unclosed character literal
  199. MODULE Test;
  200. CONST Character = 't
  201. END Test.
  202. positive: uppercase hexadecimal character literal
  203. MODULE Test;
  204. CONST Character = 0ABX
  205. END Test.
  206. negative: lowercase hexadecimal character literal
  207. MODULE Test;
  208. CONST Character = 0efX
  209. END Test.
  210. negative: hexadecimal character literal beginning with letter
  211. MODULE Test;
  212. CONST Character = CDX
  213. END Test.
  214. negative: hexadecimal character literal missing concluding X
  215. MODULE Test;
  216. CONST Character = 9A
  217. END Test.
  218. negative: hexadecimal character literal with concluding x
  219. MODULE Test;
  220. CONST Character = 0CAx
  221. END Test.
  222. positive: integer literal
  223. MODULE Test;
  224. CONST Integer = 25
  225. END Test.
  226. positive: uppercase hexadecimal integer literal
  227. MODULE Test;
  228. CONST Integer = 1EDH
  229. END Test.
  230. negative: lowercase hexadecimal integer literal
  231. MODULE Test;
  232. CONST Integer = 4faH
  233. END Test.
  234. negative: hexadecimal integer literal beginning with letter
  235. MODULE Test;
  236. CONST Integer = EFH
  237. END Test.
  238. negative: hexadecimal integer literal missing concluding H
  239. MODULE Test;
  240. CONST Integer = 42F
  241. END Test.
  242. negative: hexadecimal integer literal with concluding h
  243. MODULE Test;
  244. CONST Integer = 89h
  245. END Test.
  246. positive: real literal
  247. MODULE Test;
  248. CONST Real = 25.3
  249. END Test.
  250. positive: real literal with concluding dot
  251. MODULE Test;
  252. CONST Real = 7.
  253. END Test.
  254. negative: real literal beginning with dot
  255. MODULE Test;
  256. CONST Real = .4
  257. END Test.
  258. negative: real literal with comma instead of dot
  259. MODULE Test;
  260. CONST Real = 12,1
  261. END Test.
  262. positive: real literal with scale factor
  263. MODULE Test;
  264. CONST Real = 1.2E5
  265. END Test.
  266. positive: real literal with positive scale factor
  267. MODULE Test;
  268. CONST Real = 0.3E+8
  269. END Test.
  270. negative: real literal with positive too large scale factor
  271. MODULE Test;
  272. CONST Real= 0.3E+80;
  273. END Test.
  274. positive: real literal with negative scale factor
  275. MODULE Test;
  276. CONST Real = 0.E-30
  277. END Test.
  278. negative: real literal with too small negative scale factor
  279. MODULE Test;
  280. CONST Real = 0.E-54
  281. END Test.
  282. negative: real literal with scale factor without number
  283. MODULE Test;
  284. CONST Real = 6354.9E+
  285. END Test.
  286. negative: real literal with scale factor without number and sign
  287. MODULE Test;
  288. CONST Real = 9.1E
  289. END Test.
  290. negative: real literal with lowercase scale factor
  291. MODULE Test;
  292. CONST Real = 24.e97
  293. END Test.
  294. negative: real literal with hexadecimal scale factor
  295. MODULE Test;
  296. CONST Real = 1.97E1AB
  297. END Test.
  298. negative: real literal with whitespace sepatared scale factor
  299. MODULE Test;
  300. CONST Real = 12.3 E-4
  301. END Test.
  302. negative: real literal with scale factor with whitespace sepatared number
  303. MODULE Test;
  304. CONST Real = 0.1E 2
  305. END Test.
  306. negative: real literal with scale factor without decimal point
  307. MODULE Test;
  308. CONST Real = 5E+2
  309. END Test.
  310. positive: long real literal with scale factor
  311. MODULE Test;
  312. CONST Real = 0.77D24
  313. END Test.
  314. positive: long real literal with positive scale factor
  315. MODULE Test;
  316. CONST Real = 0.1D+9
  317. END Test.
  318. positive: long real literal with negative scale factor
  319. MODULE Test;
  320. CONST Real = 1.D-14
  321. END Test.
  322. negative: long real literal with lowercase scale factor
  323. MODULE Test;
  324. CONST Real = 24.d97
  325. END Test.
  326. positive: set literal
  327. MODULE Test;
  328. CONST Set = {}
  329. END Test.
  330. negative: unclosed set literal
  331. MODULE Test;
  332. CONST Set = {
  333. END Test.
  334. negative: unopened set literal
  335. MODULE Test;
  336. CONST Set = }
  337. END Test.
  338. # legacy behaviour
  339. #temporarily removed
  340. #negative: string literal using '
  341. #
  342. # MODULE Test;
  343. # CONST String = 'abc'
  344. # END Test.
  345. positive: string literal using "
  346. MODULE Test;
  347. CONST String = "ABC"
  348. END Test.
  349. negative: unclosed string literal
  350. MODULE Test;
  351. CONST Character = "string
  352. END Test.
  353. positive: string literal holding printable ASCII character set
  354. MODULE Test;
  355. CONST String = " !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
  356. BEGIN ASSERT (String = String)
  357. END Test.
  358. # type section
  359. positive: empty type section
  360. MODULE Test;
  361. TYPE
  362. END Test.
  363. positive: type section without declarations
  364. MODULE Test;
  365. TYPE ;;;;
  366. END Test.
  367. positive: repeated empty type sections
  368. MODULE Test;
  369. TYPE TYPE TYPE
  370. TYPE ; TYPE ; TYPE
  371. END Test.
  372. negative: single type declaration missing equal sign
  373. MODULE Test;
  374. TYPE Type RECORD END;
  375. END Test.
  376. negative: single type declaration missing type
  377. MODULE Test;
  378. TYPE Type =
  379. END Test.
  380. positive: single type declaration
  381. MODULE Test;
  382. TYPE Type = OBJECT;
  383. END Test.
  384. negative: double type declaration without separating semicolon
  385. MODULE Test;
  386. TYPE A = RECORD END B = OBJECT;
  387. END Test.
  388. positive: double type declaration
  389. MODULE Test;
  390. TYPE A = OBJECT; B = RECORD END
  391. END Test.
  392. # types
  393. negative: array without of
  394. MODULE Test;
  395. TYPE Array = ARRAY 10 OBJECT;
  396. END Test.
  397. negative: array without base type
  398. MODULE Test;
  399. TYPE Array = ARRAY 15 OF;
  400. END Test.
  401. positive: basic array of objects
  402. MODULE Test;
  403. TYPE Array = ARRAY 5 OF OBJECT;
  404. END Test.
  405. negative: record without end
  406. MODULE Test;
  407. TYPE Record = RECORD;
  408. END Test.
  409. positive: simple record
  410. MODULE Test;
  411. TYPE Record = RECORD END;
  412. END Test.
  413. negative: record with empty base record
  414. MODULE Test;
  415. TYPE Record = RECORD () END;
  416. END Test.
  417. negative: record with explicitly defined base record
  418. MODULE Test;
  419. TYPE Record = RECORD (RECORD END) END;
  420. END Test.
  421. negative: record with variable declaration
  422. MODULE Test;
  423. TYPE Record = RECORD VAR f: OBJECT; END;
  424. END Test.
  425. negative: missing matching object name
  426. MODULE Test;
  427. TYPE Object = OBJECT END;
  428. END Test;
  429. negative: unmatched object name
  430. MODULE Test;
  431. TYPE Object = OBJECT END tcejbO;
  432. END Test;
  433. negative: object without end
  434. MODULE Test;
  435. TYPE Object = OBJECT Object;
  436. END Test.
  437. positive: simple object
  438. MODULE Test;
  439. TYPE Object = OBJECT END Object;
  440. END Test.
  441. negative: object with empty base object
  442. MODULE Test;
  443. TYPE Object = OBJECT () END;
  444. END Test.
  445. negative: record with explicit base object
  446. MODULE Test;
  447. TYPE Record = RECORD (OBJECT) END;
  448. END Test.
  449. negative: record with explicitly defined base object
  450. MODULE Test;
  451. TYPE Record = RECORD (OBJECT END) END;
  452. END Test.
  453. negative: object with field declaration
  454. MODULE Test;
  455. TYPE Object = OBJECT f: OBJECT; END Object;
  456. END Test.
  457. negative: pointer missing pointer keyword
  458. MODULE Test;
  459. TYPE Pointer = TO RECORD END;
  460. END Test.
  461. negative: pointer missing to
  462. MODULE Test;
  463. TYPE Pointer = POINTER RECORD END;
  464. END Test.
  465. negative: pointer missing base type
  466. MODULE Test;
  467. TYPE Pointer = POINTER TO;
  468. END Test.
  469. positive: plain procedure type without parentheses
  470. MODULE Test;
  471. TYPE Procedure = PROCEDURE;
  472. END Test.
  473. positive: plain procedure type with parentheses
  474. MODULE Test;
  475. TYPE Procedure = PROCEDURE ();
  476. END Test.
  477. negative: procedure type missing return type
  478. MODULE Test;
  479. TYPE Procedure = PROCEDURE ():;
  480. END Test.
  481. negative: procedure type with return type missing parentheses
  482. MODULE Test;
  483. TYPE Procedure = PROCEDURE: BOOLEAN;
  484. END Test.
  485. negative: procedure type with return type missing colon
  486. MODULE Test;
  487. TYPE Procedure = PROCEDURE () BOOLEAN;
  488. END Test.
  489. positive: procedure type with empty parameter list
  490. MODULE Test;
  491. TYPE Procedure = PROCEDURE ();
  492. END Test.
  493. negative: procedure type with parameter list missing parameter section
  494. MODULE Test;
  495. TYPE Procedure = PROCEDURE (;);
  496. END Test.
  497. negative: procedure type with parameter missing name
  498. MODULE Test;
  499. TYPE Procedure = PROCEDURE (: SET);
  500. END Test.
  501. negative: procedure type with parameter missing colon
  502. MODULE Test;
  503. TYPE Procedure = PROCEDURE (parameter SET);
  504. END Test.
  505. negative: procedure type with parameter missing type
  506. MODULE Test;
  507. TYPE Procedure = PROCEDURE (parameter:);
  508. END Test.
  509. # var section
  510. positive: empty var section
  511. MODULE Test;
  512. VAR
  513. END Test.
  514. positive: var section without declarations
  515. MODULE Test;
  516. VAR ;;;;
  517. END Test.
  518. positive: repeated empty var sections
  519. MODULE Test;
  520. VAR VAR VAR
  521. VAR ; VAR ; VAR
  522. END Test.
  523. negative: single variable declaration missing colon
  524. MODULE Test;
  525. VAR variable RECORD END;
  526. END Test.
  527. negative: single variable declaration missing type
  528. MODULE Test;
  529. VAR variable: ;
  530. END Test.
  531. positive: single variable declaration
  532. MODULE Test;
  533. VAR variable: RECORD END;
  534. END Test.
  535. negative: double variable declaration without separating semicolon
  536. MODULE Test;
  537. VAR a: RECORD END b: OBJECT;
  538. END Test.
  539. positive: double variable declaration
  540. MODULE Test;
  541. VAR a: ARRAY 10 OF CHAR; b: RECORD END;
  542. END Test.
  543. # procedure section
  544. positive: plain procedure without parentheses
  545. MODULE Test;
  546. PROCEDURE Procedure;
  547. END Procedure;
  548. END Test.
  549. negative: procedure missing name
  550. MODULE Test;
  551. PROCEDURE;
  552. END Procedure;
  553. END Test.
  554. negative: procedure missing separating semicolon
  555. MODULE Test;
  556. PROCEDURE Procedure
  557. END Procedure;
  558. END Test.
  559. negative: procedure missing end
  560. MODULE Test;
  561. PROCEDURE Procedure;
  562. Procedure;
  563. END Test.
  564. negative: procedure missing matching name
  565. MODULE Test;
  566. PROCEDURE Procedure;
  567. END;
  568. END Test.
  569. negative: unmatched procedure name
  570. MODULE Test;
  571. PROCEDURE Procedure;
  572. END erudecorP;
  573. END Test.
  574. positive: procedure missing concluding semicolon
  575. MODULE Test;
  576. PROCEDURE Procedure;
  577. END Procedure
  578. END Test.
  579. positive: plain procedure with parentheses
  580. MODULE Test;
  581. PROCEDURE Procedure ();
  582. END Procedure;
  583. END Test.
  584. negative: procedure missing return type
  585. MODULE Test;
  586. PROCEDURE Procedure ():;
  587. END Procedure;
  588. END Test.
  589. negative: procedure with return type missing parentheses
  590. MODULE Test;
  591. PROCEDURE Procedure: BOOLEAN;
  592. END Procedure;
  593. END Test.
  594. negative: procedure with return type missing colon
  595. MODULE Test;
  596. PROCEDURE Procedure () BOOLEAN;
  597. END Procedure;
  598. END Test.
  599. positive: procedure with empty parameter list
  600. MODULE Test;
  601. PROCEDURE Procedure ();
  602. END Procedure;
  603. END Test.
  604. negative: procedure with parameter list missing parameter section
  605. MODULE Test;
  606. PROCEDURE Procedure (;);
  607. END Procedure;
  608. END Test.
  609. negative: procedure with parameter missing name
  610. MODULE Test;
  611. PROCEDURE Procedure (: SET);
  612. END Procedure;
  613. END Test.
  614. negative: procedure with parameter missing colon
  615. MODULE Test;
  616. PROCEDURE Procedure (parameter SET);
  617. END Procedure;
  618. END Test.
  619. negative: procedure with parameter missing type
  620. MODULE Test;
  621. PROCEDURE Procedure (parameter:);
  622. END Procedure;
  623. END Test.
  624. # intermixed section types
  625. positive: import section before import section
  626. MODULE Test;
  627. IMPORT A := Dummy;
  628. IMPORT B := Dummy;
  629. END Test.
  630. positive: import section before const section
  631. MODULE Test;
  632. IMPORT Import := Dummy;
  633. CONST Constant = 0;
  634. END Test.
  635. positive: import section before type section
  636. MODULE Test;
  637. IMPORT Import := Dummy;
  638. TYPE Type = RECORD END;
  639. END Test.
  640. positive: import section before var section
  641. MODULE Test;
  642. IMPORT Import := Dummy;
  643. VAR variable: RECORD END;
  644. END Test.
  645. positive: import section before procedure section
  646. MODULE Test;
  647. IMPORT Import := Dummy;
  648. PROCEDURE Procedure; END Procedure;
  649. END Test.
  650. negative: const section before import section
  651. MODULE Test;
  652. CONST Constant = 0;
  653. IMPORT Import := Dummy;
  654. END Test.
  655. positive: const section before const section
  656. MODULE Test;
  657. CONST A = 0;
  658. CONST B = 0;
  659. END Test.
  660. positive: const section before type section
  661. MODULE Test;
  662. CONST Constant = 0;
  663. TYPE Type = RECORD END;
  664. END Test.
  665. positive: const section before var section
  666. MODULE Test;
  667. CONST Constant = 0;
  668. VAR variable: RECORD END;
  669. END Test.
  670. positive: const section before procedure section
  671. MODULE Test;
  672. CONST Constant = 0;
  673. PROCEDURE Procedure; END Procedure;
  674. END Test.
  675. negative: type section before import section
  676. MODULE Test;
  677. TYPE Type = RECORD END;
  678. IMPORT Import := Dummy;
  679. END Test.
  680. positive: type section before const section
  681. MODULE Test;
  682. TYPE Type = RECORD END;
  683. CONST Constant = 0;
  684. END Test.
  685. positive: type section before type section
  686. MODULE Test;
  687. TYPE A = RECORD END;
  688. TYPE B = RECORD END;
  689. END Test.
  690. positive: type section before var section
  691. MODULE Test;
  692. TYPE Type = RECORD END;
  693. VAR variable: RECORD END;
  694. END Test.
  695. positive: type section before procedure section
  696. MODULE Test;
  697. TYPE Type = RECORD END;
  698. PROCEDURE Procedure; END Procedure;
  699. END Test.
  700. negative: var section before import section
  701. MODULE Test;
  702. VAR variable: RECORD END;
  703. IMPORT Import := Dummy;
  704. END Test.
  705. positive: var section before const section
  706. MODULE Test;
  707. VAR variable: RECORD END;
  708. CONST Constant = 0;
  709. END Test.
  710. positive: var section before type section
  711. MODULE Test;
  712. VAR variable: RECORD END;
  713. TYPE Type = RECORD END;
  714. END Test.
  715. positive: var section before var section
  716. MODULE Test;
  717. VAR a: RECORD END;
  718. VAR b: RECORD END;
  719. END Test.
  720. positive: var section before procedure section
  721. MODULE Test;
  722. VAR variable: RECORD END;
  723. PROCEDURE Procedure; END Procedure;
  724. END Test.
  725. negative: procedure section before import section
  726. MODULE Test;
  727. PROCEDURE Procedure; END Procedure;
  728. IMPORT Import := Dummy;
  729. END Test.
  730. positive: procedure section before const section
  731. MODULE Test;
  732. PROCEDURE Procedure; END Procedure;
  733. CONST Constant = 0;
  734. END Test.
  735. positive: procedure section before type section
  736. MODULE Test;
  737. PROCEDURE Procedure; END Procedure;
  738. TYPE Type = RECORD END;
  739. END Test.
  740. positive: procedure section before var section
  741. MODULE Test;
  742. PROCEDURE Procedure; END Procedure;
  743. VAR variable: RECORD END;
  744. END Test.
  745. positive: procedure section before procedure section
  746. MODULE Test;
  747. PROCEDURE A; END A;
  748. PROCEDURE B; END B;
  749. END Test.
  750. # bodies
  751. positive: omitted module body
  752. MODULE Test;
  753. END Test.
  754. positive: empty module body
  755. MODULE Test;
  756. BEGIN
  757. END Test.
  758. positive: omitted procedure body
  759. MODULE Test;
  760. PROCEDURE Procedure;
  761. END Procedure;
  762. END Test.
  763. positive: empty procedure body
  764. MODULE Test;
  765. PROCEDURE Procedure;
  766. BEGIN
  767. END Procedure;
  768. END Test.
  769. positive: omitted object body
  770. MODULE Test;
  771. TYPE Object = OBJECT
  772. END Object;
  773. END Test.
  774. positive: empty object body
  775. MODULE Test;
  776. TYPE Object = OBJECT
  777. BEGIN
  778. END Object;
  779. END Test.
  780. # statements
  781. positive: statement with semicolon
  782. MODULE Test;
  783. BEGIN BEGIN END;
  784. END Test.
  785. positive: statement without semicolon
  786. MODULE Test;
  787. BEGIN BEGIN END
  788. END Test.
  789. positive: empty statements at the beginning
  790. MODULE Test;
  791. BEGIN ;;;; BEGIN END
  792. END Test.
  793. positive: empty statements between statements
  794. MODULE Test;
  795. BEGIN BEGIN END ;;;; BEGIN END
  796. END Test.
  797. positive: empty statements at the end
  798. MODULE Test;
  799. BEGIN BEGIN END ;;;;
  800. END Test.
  801. positive: nested empty statements at the beginning
  802. MODULE Test;
  803. BEGIN BEGIN ;;;; BEGIN END END
  804. END Test.
  805. positive: nested empty statements between statements
  806. MODULE Test;
  807. BEGIN BEGIN BEGIN END ;;;; BEGIN END END
  808. END Test.
  809. positive: nested empty statements at the end
  810. MODULE Test;
  811. BEGIN BEGIN BEGIN END ;;;; END
  812. END Test.
  813. negative: two consecutive statements without semicolon
  814. MODULE Test;
  815. BEGIN BEGIN END BEGIN END
  816. END Test.
  817. negative: two nested consecutive statements without semicolon
  818. MODULE Test;
  819. BEGIN BEGIN BEGIN END BEGIN END END
  820. END Test.
  821. negative: three consecutive statements without semicolon
  822. MODULE Test;
  823. BEGIN BEGIN END BEGIN END BEGIN END
  824. END Test.
  825. negative: three nested consecutive statements without semicolon
  826. MODULE Test;
  827. BEGIN BEGIN BEGIN END BEGIN END BEGIN END END
  828. END Test.
  829. negative: unclosed block
  830. MODULE Test;
  831. BEGIN BEGIN
  832. END Test.
  833. negative: unclosed nested block
  834. MODULE Test;
  835. BEGIN BEGIN BEGIN END
  836. END Test.
  837. negative: unopened block
  838. MODULE Test;
  839. BEGIN END
  840. END Test.
  841. negative: unopened nested block
  842. MODULE Test;
  843. BEGIN BEGIN END END
  844. END Test.
  845. positive: empty block modifier
  846. MODULE Test;
  847. BEGIN {}
  848. END Test.
  849. positive: empty nested block modifier
  850. MODULE Test;
  851. BEGIN BEGIN {} END
  852. END Test.
  853. positive: single block modifier
  854. MODULE Test;
  855. BEGIN {EXCLUSIVE}
  856. END Test.
  857. positive: multiple block modifiers
  858. MODULE Test;
  859. TYPE Object = OBJECT
  860. BEGIN {ACTIVE, EXCLUSIVE}
  861. END Object;
  862. END Test.
  863. negative: multiple block modifiers missing separating comma
  864. MODULE Test;
  865. TYPE Object = OBJECT
  866. BEGIN {ACTIVE EXCLUSIVE}
  867. END Object;
  868. END Test.
  869. negative: empty block modifier with separating comma
  870. MODULE Test;
  871. TYPE Object = OBJECT
  872. BEGIN {,}
  873. END Object;
  874. END Test.
  875. negative: exported block modifier
  876. MODULE Test;
  877. BEGIN {EXCLUSIVE*}
  878. END Test.
  879. negative: while statement missing while
  880. MODULE Test;
  881. VAR condition: BOOLEAN;
  882. BEGIN condition DO END
  883. END Test.
  884. negative: while statement missing condition
  885. MODULE Test;
  886. BEGIN WHILE DO END
  887. END Test.
  888. negative: while statement missing do
  889. MODULE Test;
  890. VAR condition: BOOLEAN;
  891. BEGIN WHILE condition END
  892. END Test.
  893. negative: while statement missing end
  894. MODULE Test;
  895. VAR condition: BOOLEAN;
  896. BEGIN WHILE condition DO
  897. END Test.
  898. positive: nested while statement
  899. MODULE Test;
  900. VAR condition: BOOLEAN;
  901. BEGIN WHILE condition DO WHILE condition DO END END
  902. END Test.
  903. negative: repeat statement missing repeat
  904. MODULE Test;
  905. VAR condition: BOOLEAN;
  906. BEGIN UNTIL condition
  907. END Test.
  908. negative: repeat statement missing until
  909. MODULE Test;
  910. VAR condition: BOOLEAN;
  911. BEGIN REPEAT condition
  912. END Test.
  913. negative: repeat statement missing condition
  914. MODULE Test;
  915. BEGIN REPEAT UNTIL
  916. END Test.
  917. positive: nested repeat statement
  918. MODULE Test;
  919. VAR condition: BOOLEAN;
  920. BEGIN REPEAT REPEAT UNTIL condition UNTIL condition
  921. END Test.
  922. negative: loop statement missing loop
  923. MODULE Test;
  924. BEGIN END
  925. END Test.
  926. negative: loop statement missing end
  927. MODULE Test;
  928. BEGIN LOOP
  929. END Test.
  930. positive: nested loop statement
  931. MODULE Test;
  932. BEGIN LOOP LOOP END END
  933. END Test.
  934. negative: await statement missing parentheses
  935. MODULE Test;
  936. VAR condition: BOOLEAN;
  937. BEGIN {EXCLUSIVE} AWAIT condition
  938. END Test;
  939. negative: await statement missing closing parenthesis
  940. MODULE Test;
  941. VAR condition: BOOLEAN;
  942. BEGIN {EXCLUSIVE} AWAIT (condition
  943. END Test;
  944. negative: await statement missing opening parenthesis
  945. MODULE Test;
  946. VAR condition: BOOLEAN;
  947. BEGIN {EXCLUSIVE} AWAIT condition)
  948. END Test;
  949. negative: await statement missing condition with parentheses
  950. MODULE Test;
  951. VAR condition: BOOLEAN;
  952. BEGIN {EXCLUSIVE} AWAIT ()
  953. END Test;
  954. negative: await statement missing condition without parentheses
  955. MODULE Test;
  956. VAR condition: BOOLEAN;
  957. BEGIN {EXCLUSIVE} AWAIT
  958. END Test;
  959. negative: assignment missing left hand side
  960. MODULE Test;
  961. VAR variable: INTEGER;
  962. BEGIN := 0;
  963. END Test;
  964. negative: assignment missing assign
  965. MODULE Test;
  966. VAR variable: INTEGER;
  967. BEGIN variable 0;
  968. END Test;
  969. negative: assignment missing right hand side
  970. MODULE Test;
  971. VAR variable: INTEGER;
  972. BEGIN variable := ;
  973. END Test;
  974. negative: cascaded assignment
  975. MODULE Test;
  976. VAR variable: INTEGER;
  977. BEGIN variable := variable := 5;
  978. END Test;
  979. negative: for statement missing counter
  980. MODULE Test;
  981. BEGIN FOR := 0 TO 10 DO END
  982. END Test.
  983. negative: for statement missing assignment
  984. MODULE Test;
  985. VAR i: INTEGER;
  986. BEGIN FOR i 0 TO 10 DO END
  987. END Test.
  988. negative: for statement missing start counter
  989. MODULE Test;
  990. VAR i: INTEGER;
  991. BEGIN FOR i := TO 10 DO END
  992. END Test.
  993. negative: for statement missing to
  994. MODULE Test;
  995. VAR i: INTEGER;
  996. BEGIN FOR i := 0 10 DO END
  997. END Test.
  998. negative: for statement missing end counter
  999. MODULE Test;
  1000. VAR i: INTEGER;
  1001. BEGIN FOR i := 0 TO DO END
  1002. END Test.
  1003. negative: for statement missing do
  1004. MODULE Test;
  1005. VAR i: INTEGER;
  1006. BEGIN FOR i := 0 TO 10 END
  1007. END Test.
  1008. negative: for statement missing end
  1009. MODULE Test;
  1010. VAR i: INTEGER;
  1011. BEGIN FOR i := 0 TO 10 DO
  1012. END Test.
  1013. positive: for statement without increment
  1014. MODULE Test;
  1015. VAR i: INTEGER;
  1016. BEGIN FOR i := 0 TO 10 DO END
  1017. END Test.
  1018. negative: for statement with increment missing by
  1019. MODULE Test;
  1020. VAR i: INTEGER;
  1021. BEGIN FOR i := 0 TO 10 1 DO END
  1022. END Test.
  1023. negative: for statement with increment missing increment
  1024. MODULE Test;
  1025. VAR i: INTEGER;
  1026. BEGIN FOR i := 0 TO 10 BY DO END
  1027. END Test.
  1028. negative: plain assert statement
  1029. MODULE Test;
  1030. BEGIN ASSERT
  1031. END Test.
  1032. negative: assert statement missing condition
  1033. MODULE Test;
  1034. BEGIN ASSERT ()
  1035. END Test.
  1036. negative: assert statement missing opening parenthesis
  1037. MODULE Test;
  1038. BEGIN ASSERT TRUE)
  1039. END Test.
  1040. negative: assert statement missing closing parenthesis
  1041. MODULE Test;
  1042. BEGIN ASSERT (TRUE
  1043. END Test.
  1044. negative: assert statement missing comma
  1045. MODULE Test;
  1046. BEGIN ASSERT (TRUE 5)
  1047. END Test.
  1048. negative: assert statement missing number
  1049. MODULE Test;
  1050. BEGIN ASSERT (TRUE,)
  1051. END Test.
  1052. negative: if statement missing if
  1053. MODULE Test;
  1054. VAR condition: BOOLEAN;
  1055. BEGIN condition THEN END
  1056. END Test.
  1057. negative: if statement missing condition
  1058. MODULE Test;
  1059. BEGIN IF THEN END
  1060. END Test.
  1061. negative: if statement missing then
  1062. MODULE Test;
  1063. VAR condition: BOOLEAN;
  1064. BEGIN IF condition END
  1065. END Test.
  1066. negative: if statement missing end
  1067. MODULE Test;
  1068. VAR condition: BOOLEAN;
  1069. BEGIN IF condition THEN
  1070. END Test.
  1071. negative: if statement with else missing then
  1072. MODULE Test;
  1073. VAR condition: BOOLEAN;
  1074. BEGIN IF condition ELSE END
  1075. END Test.
  1076. negative: if statement with else missing end
  1077. MODULE Test;
  1078. VAR condition: BOOLEAN;
  1079. BEGIN IF condition THEN ELSE
  1080. END Test.
  1081. positive: nested if statement in then part
  1082. MODULE Test;
  1083. VAR condition: BOOLEAN;
  1084. BEGIN IF condition THEN IF condition THEN END END
  1085. END Test.
  1086. positive: nested if statement in else part
  1087. MODULE Test;
  1088. VAR condition: BOOLEAN;
  1089. BEGIN IF condition THEN ELSE IF condition THEN END END
  1090. END Test.
  1091. negative: else if statement missing elsif
  1092. MODULE Test;
  1093. VAR condition: BOOLEAN;
  1094. BEGIN IF TRUE THEN condition THEN END
  1095. END Test.
  1096. negative: else if statement missing condition
  1097. MODULE Test;
  1098. VAR condition: BOOLEAN;
  1099. BEGIN IF TRUE THEN ELSIF THEN END
  1100. END Test.
  1101. negative: else if statement missing then
  1102. MODULE Test;
  1103. VAR condition: BOOLEAN;
  1104. BEGIN IF TRUE THEN ELSIF condition END
  1105. END Test.
  1106. negative: else if statement missing end
  1107. MODULE Test;
  1108. VAR condition: BOOLEAN;
  1109. BEGIN IF TRUE THEN ELSIF condition THEN
  1110. END Test.
  1111. negative: else if statement with else missing then
  1112. MODULE Test;
  1113. VAR condition: BOOLEAN;
  1114. BEGIN IF TRUE THEN ELSIF condition ELSE END
  1115. END Test.
  1116. negative: else if statement with else missing end
  1117. MODULE Test;
  1118. VAR condition: BOOLEAN;
  1119. BEGIN IF TRUE THEN ELSIF condition THEN ELSE
  1120. END Test.
  1121. positive: nested else if statement in then part
  1122. MODULE Test;
  1123. VAR condition: BOOLEAN;
  1124. BEGIN IF TRUE THEN ELSIF condition THEN IF TRUE THEN ELSIF condition THEN END END
  1125. END Test.
  1126. positive: nested else if statement in else part
  1127. MODULE Test;
  1128. VAR condition: BOOLEAN;
  1129. BEGIN IF TRUE THEN ELSIF condition THEN ELSE IF TRUE THEN ELSIF condition THEN END END
  1130. END Test.
  1131. positive: multiple else if statements
  1132. MODULE Test;
  1133. VAR condition: BOOLEAN;
  1134. BEGIN IF TRUE THEN ELSIF condition THEN ELSIF condition THEN ELSIF condition THEN ELSIF condition THEN END
  1135. END Test.
  1136. positive: multiple else if statements with else
  1137. MODULE Test;
  1138. VAR condition: BOOLEAN;
  1139. BEGIN IF TRUE THEN ELSIF condition THEN ELSIF condition THEN ELSIF condition THEN ELSIF condition THEN ELSE END
  1140. END Test.
  1141. negative: plain halt statement
  1142. MODULE Test;
  1143. BEGIN HALT
  1144. END Test.
  1145. negative: halt statement missing number
  1146. MODULE Test;
  1147. BEGIN HALT ()
  1148. END Test.
  1149. negative: halt statement missing opening parenthesis
  1150. MODULE Test;
  1151. BEGIN HALT 5)
  1152. END Test.
  1153. negative: halt statement missing closing parenthesis
  1154. MODULE Test;
  1155. BEGIN HALT (5
  1156. END Test.
  1157. negative: empty case statement
  1158. MODULE Test;
  1159. BEGIN CASE 0 OF END
  1160. END Test.
  1161. negative: empty case statement with else
  1162. MODULE Test;
  1163. BEGIN CASE 0 OF ELSE END
  1164. END Test.
  1165. negative: empty case statement missing case
  1166. MODULE Test;
  1167. BEGIN 0 OF END
  1168. END Test.
  1169. negative: empty case statement missing value
  1170. MODULE Test;
  1171. BEGIN CASE OF END
  1172. END Test.
  1173. negative: empty case statement missing of
  1174. MODULE Test;
  1175. BEGIN CASE 0 END
  1176. END Test.
  1177. negative: empty case statement missing end
  1178. MODULE Test;
  1179. BEGIN CASE 0 OF
  1180. END Test.
  1181. positive: case statement with simple case
  1182. MODULE Test;
  1183. BEGIN CASE 0 OF 0: END
  1184. END Test.
  1185. positive: case statement with simple case with leading bar
  1186. MODULE Test;
  1187. BEGIN CASE 0 OF | 0: END
  1188. END Test.
  1189. negative: case statement with simple case with leading bars
  1190. MODULE Test;
  1191. BEGIN CASE 0 OF || 0: END
  1192. END Test.
  1193. negative: case statement with simple case with trailing bar
  1194. MODULE Test;
  1195. BEGIN CASE 0 OF 0: | END
  1196. END Test.
  1197. negative: case statement with simple case with trailing bars
  1198. MODULE Test;
  1199. BEGIN CASE 0 OF 0: || END
  1200. END Test.
  1201. positive: case statement with simple case with else
  1202. MODULE Test;
  1203. BEGIN CASE 0 OF 0: ELSE END
  1204. END Test.
  1205. negative: case statement with simple case missing case
  1206. MODULE Test;
  1207. BEGIN 0 OF 0: END
  1208. END Test.
  1209. negative: case statement with simple case missing value
  1210. MODULE Test;
  1211. BEGIN CASE OF 0: END
  1212. END Test.
  1213. negative: case statement with simple case missing of
  1214. MODULE Test;
  1215. BEGIN CASE 0 0: END
  1216. END Test.
  1217. negative: case statement with simple case missing value in case
  1218. MODULE Test;
  1219. BEGIN CASE 0 OF : END
  1220. END Test.
  1221. negative: case statement with simple case missing colon in case
  1222. MODULE Test;
  1223. BEGIN CASE 0 OF 0 END
  1224. END Test.
  1225. negative: case statement with simple case missing end
  1226. MODULE Test;
  1227. BEGIN CASE 0 OF 0:
  1228. END Test.
  1229. positive: case statement with simple case range
  1230. MODULE Test;
  1231. BEGIN CASE 0 OF 0..1: END
  1232. END Test.
  1233. positive: case statement with simple case range with else
  1234. MODULE Test;
  1235. BEGIN CASE 0 OF 0..1: ELSE END
  1236. END Test.
  1237. negative: case statement with simple case range missing first case
  1238. MODULE Test;
  1239. BEGIN 0 OF ..1: END
  1240. END Test.
  1241. negative: case statement with simple case range missing range
  1242. MODULE Test;
  1243. BEGIN 0 OF 0 1: END
  1244. END Test.
  1245. negative: case statement with simple case range missing last case
  1246. MODULE Test;
  1247. BEGIN 0 OF 0..: END
  1248. END Test.
  1249. negative: case statement with simple case range of multiple values
  1250. MODULE Test;
  1251. BEGIN CASE 0 OF 0..1..2: END
  1252. END Test.
  1253. positive: case statement with complex case
  1254. MODULE Test;
  1255. BEGIN CASE 0 OF 0, 1, 2: END
  1256. END Test.
  1257. positive: case statement with complex case with else
  1258. MODULE Test;
  1259. BEGIN CASE 0 OF 0, 1, 2: ELSE END
  1260. END Test.
  1261. negative: case statement with complex case missing first value in case
  1262. MODULE Test;
  1263. BEGIN CASE 0 OF , 1: END
  1264. END Test.
  1265. negative: case statement with complex case missing comma in case
  1266. MODULE Test;
  1267. BEGIN CASE 0 OF 0, : END
  1268. END Test.
  1269. negative: case statement with complex case missing second value in case
  1270. MODULE Test;
  1271. BEGIN CASE 0 OF 0, : END
  1272. END Test.
  1273. positive: case statement with complex case range
  1274. MODULE Test;
  1275. BEGIN CASE 0 OF 0..1, 2..3, 4..5: END
  1276. END Test.
  1277. positive: case statement with complex case range with else
  1278. MODULE Test;
  1279. BEGIN CASE 0 OF 0..1, 2..3, 4..5: ELSE END
  1280. END Test.
  1281. negative: case statement with complex case range missing first case
  1282. MODULE Test;
  1283. BEGIN 0 OF 0..1, ..3: END
  1284. END Test.
  1285. negative: case statement with complex case range missing range
  1286. MODULE Test;
  1287. BEGIN 0 OF 0..1, 2 3: END
  1288. END Test.
  1289. negative: case statement with complex case range missing last case
  1290. MODULE Test;
  1291. BEGIN 0 OF 0..1, 2..: END
  1292. END Test.
  1293. positive: case statement with two cases
  1294. MODULE Test;
  1295. BEGIN CASE 0 OF 0: | 1: END
  1296. END Test.
  1297. positive: case statement with two cases with else
  1298. MODULE Test;
  1299. BEGIN CASE 0 OF 0: | 1: END
  1300. END Test.
  1301. positive: case statement with two cases missing first case
  1302. MODULE Test;
  1303. BEGIN CASE 0 OF | 0: END
  1304. END Test.
  1305. negative: case statement with two cases missing bar
  1306. MODULE Test;
  1307. BEGIN CASE 0 OF 0: 1: END
  1308. END Test.
  1309. negative: case statement with two cases missing second case
  1310. MODULE Test;
  1311. BEGIN CASE 0 OF 0: | END
  1312. END Test.
  1313. positive: case statement with three cases
  1314. MODULE Test;
  1315. BEGIN CASE 0 OF 0: | 1: | 2: END
  1316. END Test.
  1317. positive: case statement with three cases with else
  1318. MODULE Test;
  1319. BEGIN CASE 0 OF 0: | 1: | 2: ELSE END
  1320. END Test.
  1321. negative: with statement missing with
  1322. MODULE Test;
  1323. TYPE Type = OBJECT;
  1324. VAR value: Type;
  1325. BEGIN value : Type DO END
  1326. END Test.
  1327. negative: with statement missing value
  1328. MODULE Test;
  1329. TYPE Type = OBJECT;
  1330. BEGIN WITH : Type DO END
  1331. END Test.
  1332. negative: with statement missing colon
  1333. MODULE Test;
  1334. TYPE Type = OBJECT;
  1335. VAR value: Type;
  1336. BEGIN WITH value Type DO END
  1337. END Test.
  1338. negative: with statement missing type
  1339. MODULE Test;
  1340. VAR value: OBJECT;
  1341. BEGIN WITH value : DO END
  1342. END Test.
  1343. negative: with statement missing do
  1344. MODULE Test;
  1345. TYPE Type = OBJECT;
  1346. VAR value: Type;
  1347. BEGIN WITH value : Type END
  1348. END Test.
  1349. negative: with statement missing end
  1350. MODULE Test;
  1351. TYPE Type = OBJECT;
  1352. VAR value: Type;
  1353. BEGIN WITH value : Type DO
  1354. END Test.
  1355. negative: plain new statement
  1356. MODULE Test;
  1357. VAR object: OBJECT END;
  1358. BEGIN NEW;
  1359. END Test.
  1360. negative: new statement missing new
  1361. MODULE Test;
  1362. VAR object: OBJECT END;
  1363. BEGIN (object);
  1364. END Test.
  1365. negative: new statement missing opening parenthesis
  1366. MODULE Test;
  1367. VAR object: OBJECT END;
  1368. BEGIN NEW object);
  1369. END Test.
  1370. negative: new statement missing reference
  1371. MODULE Test;
  1372. BEGIN NEW ();
  1373. END Test.
  1374. negative: new statement missing closing parenthesis
  1375. MODULE Test;
  1376. VAR object: OBJECT END;
  1377. BEGIN NEW (object;
  1378. END Test.
  1379. negative: plain increment statement
  1380. MODULE Test;
  1381. BEGIN INC
  1382. END Test.
  1383. negative: increment statement missing integer
  1384. MODULE Test;
  1385. BEGIN INC ()
  1386. END Test.
  1387. negative: increment statement missing opening parenthesis
  1388. MODULE Test;
  1389. VAR integer: INTEGER;
  1390. BEGIN INC integer)
  1391. END Test.
  1392. negative: increment statement missing closing parenthesis
  1393. MODULE Test;
  1394. VAR integer: INTEGER;
  1395. BEGIN INC (integer
  1396. END Test.
  1397. negative: increment statement missing comma
  1398. MODULE Test;
  1399. VAR integer: INTEGER;
  1400. BEGIN INC (integer 5)
  1401. END Test.
  1402. negative: increment statement missing increment
  1403. MODULE Test;
  1404. VAR integer: INTEGER;
  1405. BEGIN INC (integer,)
  1406. END Test.
  1407. positive: increment statement missing increment and comma
  1408. MODULE Test;
  1409. VAR integer: INTEGER;
  1410. BEGIN INC (integer)
  1411. END Test.
  1412. negative: plain decrement statement
  1413. MODULE Test;
  1414. BEGIN DEC
  1415. END Test.
  1416. negative: decrement statement missing integer
  1417. MODULE Test;
  1418. BEGIN DEC ()
  1419. END Test.
  1420. negative: decrement statement missing opening parenthesis
  1421. MODULE Test;
  1422. VAR integer: INTEGER;
  1423. BEGIN DEC integer)
  1424. END Test.
  1425. negative: decrement statement missing closing parenthesis
  1426. MODULE Test;
  1427. VAR integer: INTEGER;
  1428. BEGIN DEC (integer
  1429. END Test.
  1430. negative: decrement statement missing comma
  1431. MODULE Test;
  1432. VAR integer: INTEGER;
  1433. BEGIN DEC (integer 5)
  1434. END Test.
  1435. negative: decrement statement missing increment
  1436. MODULE Test;
  1437. VAR integer: INTEGER;
  1438. BEGIN DEC (integer,)
  1439. END Test.
  1440. positive: decrement statement missing increment and comma
  1441. MODULE Test;
  1442. VAR integer: INTEGER;
  1443. BEGIN DEC (integer)
  1444. END Test.
  1445. negative: plain include statement
  1446. MODULE Test;
  1447. BEGIN INCL
  1448. END Test.
  1449. negative: include statement missing set
  1450. MODULE Test;
  1451. BEGIN INCL ()
  1452. END Test.
  1453. negative: include statement missing opening parenthesis
  1454. MODULE Test;
  1455. VAR set: SET;
  1456. BEGIN INCL set)
  1457. END Test.
  1458. negative: include statement missing closing parenthesis
  1459. MODULE Test;
  1460. VAR set: SET;
  1461. BEGIN INCL (set
  1462. END Test.
  1463. negative: include statement missing comma
  1464. MODULE Test;
  1465. VAR set: SET;
  1466. BEGIN INCL (set 5)
  1467. END Test.
  1468. negative: include statement missing element
  1469. MODULE Test;
  1470. VAR set: SET;
  1471. BEGIN INCL (set,)
  1472. END Test.
  1473. negative: include statement missing element and comma
  1474. MODULE Test;
  1475. VAR set: SET;
  1476. BEGIN INCL (set)
  1477. END Test.
  1478. negative: plain exclude statement
  1479. MODULE Test;
  1480. BEGIN EXCL
  1481. END Test.
  1482. negative: exclude statement missing set
  1483. MODULE Test;
  1484. BEGIN EXCL ()
  1485. END Test.
  1486. negative: exclude statement missing opening parenthesis
  1487. MODULE Test;
  1488. VAR set: SET;
  1489. BEGIN EXCL set)
  1490. END Test.
  1491. negative: exclude statement missing closing parenthesis
  1492. MODULE Test;
  1493. VAR set: SET;
  1494. BEGIN EXCL (set
  1495. END Test.
  1496. negative: exclude statement missing comma
  1497. MODULE Test;
  1498. VAR set: SET;
  1499. BEGIN EXCL (set 5)
  1500. END Test.
  1501. negative: exclude statement missing element
  1502. MODULE Test;
  1503. VAR set: SET;
  1504. BEGIN EXCL (set,)
  1505. END Test.
  1506. negative: exclude statement missing element and comma
  1507. MODULE Test;
  1508. VAR set: SET;
  1509. BEGIN EXCL (set)
  1510. END Test.
  1511. negative: plain copy statement
  1512. MODULE Test;
  1513. BEGIN COPY
  1514. END Test.
  1515. negative: copy statement missing source
  1516. MODULE Test;
  1517. BEGIN COPY ()
  1518. END Test.
  1519. negative: copy statement missing opening parenthesis
  1520. MODULE Test;
  1521. VAR source: ARRAY 10 OF CHAR;
  1522. BEGIN COPY source)
  1523. END Test.
  1524. negative: copy statement missing closing parenthesis
  1525. MODULE Test;
  1526. VAR source: ARRAY 10 OF CHAR;
  1527. BEGIN COPY (source
  1528. END Test.
  1529. negative: copy statement missing comma
  1530. MODULE Test;
  1531. VAR source, dest: ARRAY 10 OF CHAR;
  1532. BEGIN COPY (source dest)
  1533. END Test.
  1534. negative: copy statement missing destination
  1535. MODULE Test;
  1536. VAR source: ARRAY 10 OF CHAR;
  1537. BEGIN COPY (source,)
  1538. END Test.
  1539. negative: copy statement missing destination and comma
  1540. MODULE Test;
  1541. VAR source: ARRAY 10 OF CHAR;
  1542. BEGIN COPY (source)
  1543. END Test.
  1544. # predefined identifiers
  1545. negative: redefining abs
  1546. MODULE Test;
  1547. CONST ABS = 0;
  1548. END Test.
  1549. negative: redefining array
  1550. MODULE Test;
  1551. CONST ARRAY = 0;
  1552. END Test.
  1553. negative: redefining ash
  1554. MODULE Test;
  1555. CONST ASH = 0;
  1556. END Test.
  1557. negative: redefining assert
  1558. MODULE Test;
  1559. CONST ASSERT = 0;
  1560. END Test.
  1561. negative: redefining await
  1562. MODULE Test;
  1563. CONST AWAIT = 0;
  1564. END Test.
  1565. negative: redefining begin
  1566. MODULE Test;
  1567. CONST BEGIN = 0;
  1568. END Test.
  1569. negative: redefining boolean
  1570. MODULE Test;
  1571. CONST BOOLEAN = 0;
  1572. END Test.
  1573. negative: redefining by
  1574. MODULE Test;
  1575. CONST BY = 0;
  1576. END Test.
  1577. negative: redefining cap
  1578. MODULE Test;
  1579. CONST CAP = 0;
  1580. END Test.
  1581. negative: redefining case
  1582. MODULE Test;
  1583. CONST CASE = 0;
  1584. END Test.
  1585. negative: redefining char
  1586. MODULE Test;
  1587. CONST CHAR = 0;
  1588. END Test.
  1589. negative: redefining chr
  1590. MODULE Test;
  1591. CONST CHR = 0;
  1592. END Test.
  1593. negative: redefining const
  1594. MODULE Test;
  1595. VAR CONST: SET;
  1596. END Test.
  1597. negative: redefining copy
  1598. MODULE Test;
  1599. CONST COPY = 0;
  1600. END Test.
  1601. negative: redefining dec
  1602. MODULE Test;
  1603. CONST DEC = 0;
  1604. END Test.
  1605. negative: redefining definition
  1606. MODULE Test;
  1607. CONST DEFINITION = 0;
  1608. END Test.
  1609. negative: redefining div
  1610. MODULE Test;
  1611. CONST DIV = 0;
  1612. END Test.
  1613. negative: redefining do
  1614. MODULE Test;
  1615. CONST DO = 0;
  1616. END Test.
  1617. negative: redefining else
  1618. MODULE Test;
  1619. CONST ELSE = 0;
  1620. END Test.
  1621. negative: redefining elseif
  1622. MODULE Test;
  1623. CONST ELSIF = 0;
  1624. END Test.
  1625. negative: redefining end
  1626. MODULE Test;
  1627. CONST END = 0;
  1628. END Test.
  1629. negative: redefining entier
  1630. MODULE Test;
  1631. CONST ENTIER = 0;
  1632. END Test.
  1633. negative: redefining excl
  1634. MODULE Test;
  1635. CONST EXCL = 0;
  1636. END Test.
  1637. negative: redefining exit
  1638. MODULE Test;
  1639. CONST EXIT = 0;
  1640. END Test.
  1641. negative: redefining false
  1642. MODULE Test;
  1643. CONST FALSE = 0;
  1644. END Test.
  1645. negative: redefining finally
  1646. MODULE Test;
  1647. CONST FINALLY = 0;
  1648. END Test.
  1649. negative: redefining for
  1650. MODULE Test;
  1651. CONST FOR = 0;
  1652. END Test.
  1653. negative: redefining halt
  1654. MODULE Test;
  1655. CONST HALT = 0;
  1656. END Test.
  1657. negative: redefining hugeint
  1658. MODULE Test;
  1659. CONST HUGEINT = 0;
  1660. END Test.
  1661. negative: redefining if
  1662. MODULE Test;
  1663. CONST IF = 0;
  1664. END Test.
  1665. negative: redefining ignore
  1666. MODULE Test;
  1667. CONST IF = 0;
  1668. END Test.
  1669. negative: redefining import
  1670. MODULE Test;
  1671. CONST IMPORT = 0;
  1672. END Test.
  1673. negative: redefining in
  1674. MODULE Test;
  1675. CONST IN = 0;
  1676. END Test.
  1677. negative: redefining inc
  1678. MODULE Test;
  1679. CONST INC = 0;
  1680. END Test.
  1681. negative: redefining incl
  1682. MODULE Test;
  1683. CONST INCL = 0;
  1684. END Test.
  1685. negative: redefining integer
  1686. MODULE Test;
  1687. CONST INTEGER = 0;
  1688. END Test.
  1689. negative: redefining is
  1690. MODULE Test;
  1691. CONST IS = 0;
  1692. END Test.
  1693. negative: redefining len
  1694. MODULE Test;
  1695. CONST LEN = 0;
  1696. END Test.
  1697. negative: redefining long
  1698. MODULE Test;
  1699. CONST LONG = 0;
  1700. END Test.
  1701. negative: redefining longint
  1702. MODULE Test;
  1703. CONST LONGINT = 0;
  1704. END Test.
  1705. negative: redefining longreal
  1706. MODULE Test;
  1707. CONST LONGREAL = 0;
  1708. END Test.
  1709. negative: redefining loop
  1710. MODULE Test;
  1711. CONST LOOP = 0;
  1712. END Test.
  1713. negative: redefining max
  1714. MODULE Test;
  1715. CONST MAX = 0;
  1716. END Test.
  1717. negative: redefining min
  1718. MODULE Test;
  1719. CONST MIN = 0;
  1720. END Test.
  1721. negative: redefining mod
  1722. MODULE Test;
  1723. CONST MOD = 0;
  1724. END Test.
  1725. negative: redefining module
  1726. MODULE Test;
  1727. CONST MODULE = 0;
  1728. END Test.
  1729. negative: redefining new
  1730. MODULE Test;
  1731. CONST NEW = 0;
  1732. END Test.
  1733. negative: redefining nil
  1734. MODULE Test;
  1735. CONST NIL = 0;
  1736. END Test.
  1737. negative: redefining object
  1738. MODULE Test;
  1739. CONST OBJECT = 0;
  1740. END Test.
  1741. negative: redefining odd
  1742. MODULE Test;
  1743. CONST ODD = 0;
  1744. END Test.
  1745. negative: redefining of
  1746. MODULE Test;
  1747. CONST OF = 0;
  1748. END Test.
  1749. negative: redefining or
  1750. MODULE Test;
  1751. CONST OR = 0;
  1752. END Test.
  1753. negative: redefining ord
  1754. MODULE Test;
  1755. CONST ORD = 0;
  1756. END Test.
  1757. negative: redefining pointer
  1758. MODULE Test;
  1759. CONST POINTER = 0;
  1760. END Test.
  1761. negative: redefining procedure
  1762. MODULE Test;
  1763. CONST PROCEDURE = 0;
  1764. END Test.
  1765. negative: redefining real
  1766. MODULE Test;
  1767. CONST REAL = 0;
  1768. END Test.
  1769. negative: redefining record
  1770. MODULE Test;
  1771. CONST RECORD = 0;
  1772. END Test.
  1773. negative: redefining repeat
  1774. MODULE Test;
  1775. CONST REPEAT = 0;
  1776. END Test.
  1777. negative: redefining return
  1778. MODULE Test;
  1779. CONST RETURN = 0;
  1780. END Test.
  1781. negative: redefining self
  1782. MODULE Test;
  1783. CONST SELF = 0;
  1784. END Test.
  1785. negative: redefining set
  1786. MODULE Test;
  1787. CONST SET = 0;
  1788. END Test.
  1789. negative: redefining short
  1790. MODULE Test;
  1791. CONST SHORT = 0;
  1792. END Test.
  1793. negative: redefining shortint
  1794. MODULE Test;
  1795. CONST SHORTINT = 0;
  1796. END Test.
  1797. negative: redefining then
  1798. MODULE Test;
  1799. CONST THEN = 0;
  1800. END Test.
  1801. negative: redefining to
  1802. MODULE Test;
  1803. CONST TO = 0;
  1804. END Test.
  1805. negative: redefining true
  1806. MODULE Test;
  1807. CONST TRUE = 0;
  1808. END Test.
  1809. negative: redefining type
  1810. MODULE Test;
  1811. CONST TYPE = 0;
  1812. END Test.
  1813. negative: redefining until
  1814. MODULE Test;
  1815. CONST UNTIL = 0;
  1816. END Test.
  1817. negative: redefining var
  1818. MODULE Test;
  1819. CONST VAR = 0;
  1820. END Test.
  1821. negative: redefining while
  1822. MODULE Test;
  1823. CONST WHILE = 0;
  1824. END Test.
  1825. negative: redefining with
  1826. MODULE Test;
  1827. CONST WITH = 0;
  1828. END Test.
  1829. # Semantic tests
  1830. # =====================================
  1831. # imports
  1832. positive: dummy module
  1833. MODULE Dummy; END Dummy.
  1834. positive: single import
  1835. MODULE Test;
  1836. IMPORT Dummy;
  1837. END Test.
  1838. negative: import marked as exported
  1839. MODULE Test;
  1840. IMPORT Dummy*;
  1841. END Test.
  1842. negative: import marked as read-only
  1843. MODULE Test;
  1844. IMPORT Dummy-;
  1845. END Test.
  1846. positive: single import with different alias
  1847. MODULE Test;
  1848. IMPORT Alias := Dummy;
  1849. END Test.
  1850. positive: single import with same alias
  1851. MODULE Test;
  1852. IMPORT Dummy := Dummy;
  1853. END Test.
  1854. negative: duplicated import
  1855. MODULE Test;
  1856. IMPORT Dummy, Dummy;
  1857. END Test.
  1858. positive: duplicated import with different alias
  1859. MODULE Test;
  1860. IMPORT A := Dummy, B := Dummy;
  1861. END Test.
  1862. negative: duplicated import with same alias
  1863. MODULE Test;
  1864. IMPORT A := Dummy, A := Dummy;
  1865. END Test.
  1866. negative: import within procedure
  1867. MODULE Test;
  1868. PROCEDURE Procedure;
  1869. IMPORT Import := Dummy;
  1870. END Procedure;
  1871. END Test.
  1872. negative: import within nested procedure
  1873. MODULE Test;
  1874. PROCEDURE Procedure;
  1875. PROCEDURE Procedure;
  1876. IMPORT Import := Dummy;
  1877. END Procedure;
  1878. END Procedure;
  1879. END Test.
  1880. negative: import within object
  1881. MODULE Test;
  1882. TYPE Object = OBJECT
  1883. IMPORT Import := Dummy;
  1884. END Object;
  1885. END Test.
  1886. negative: import within object in procedure
  1887. MODULE Test;
  1888. PROCEDURE Procedure;
  1889. TYPE Object = OBJECT
  1890. IMPORT Import := Dummy;
  1891. END Object;
  1892. END Object;
  1893. END Test.
  1894. negative: import within procedure in object
  1895. MODULE Test;
  1896. TYPE Object = OBJECT
  1897. PROCEDURE Procedure;
  1898. IMPORT Import := Dummy;
  1899. END Procedure;
  1900. END Object;
  1901. END Test.
  1902. positive: dummy empty module
  1903. MODULE Test; END Test.
  1904. positive: dummy module with import
  1905. MODULE Dummy;
  1906. IMPORT Test;
  1907. END Dummy.
  1908. negative: module importing itself directly
  1909. MODULE Test;
  1910. IMPORT Test;
  1911. END Test.
  1912. negative: module importing itself directly with alias
  1913. MODULE Test;
  1914. IMPORT Import := Test;
  1915. END Test.
  1916. negative: module importing itself indirectly
  1917. MODULE Test;
  1918. IMPORT Dummy;
  1919. END Test.
  1920. negative: module importing itself indirectly with alias
  1921. MODULE Test;
  1922. IMPORT Import := Dummy;
  1923. END Test.
  1924. negative: constant as import
  1925. MODULE Test;
  1926. IMPORT Import := Constant;
  1927. CONST Constant = 0;
  1928. END Test.
  1929. negative: type as import
  1930. MODULE Test;
  1931. IMPORT Import := Type;
  1932. TYPE Type = INTEGER;
  1933. END Test.
  1934. negative: variable as import
  1935. MODULE Test;
  1936. IMPORT Import := variable;
  1937. VAR variable: INTEGER;
  1938. END Test.
  1939. negative: procedure as import
  1940. MODULE Test;
  1941. IMPORT Import := Procedure;
  1942. PROCEDURE Procedure; INTEGER;
  1943. END Test.
  1944. negative: parameter as import
  1945. MODULE Test;
  1946. PROCEDURE Procedure (parameter: INTEGER);
  1947. IMPORT Import := parameter;
  1948. END Procedure;
  1949. END Test.
  1950. # constants
  1951. positive: unmarked constant
  1952. MODULE Test;
  1953. CONST Constant = 54;
  1954. END Test.
  1955. positive: unmarked constant within procedure
  1956. MODULE Test;
  1957. PROCEDURE Procedure;
  1958. CONST Constant = 54;
  1959. END Procedure;
  1960. END Test.
  1961. positive: unmarked constant within nested procedure
  1962. MODULE Test;
  1963. PROCEDURE Procedure;
  1964. PROCEDURE Procedure;
  1965. CONST Constant = 54;
  1966. END Procedure;
  1967. END Procedure;
  1968. END Test.
  1969. positive: unmarked constant within object
  1970. MODULE Test;
  1971. TYPE Object = OBJECT
  1972. CONST Constant = 54;
  1973. END Object;
  1974. END Test.
  1975. positive: unmarked constant within object in procedure
  1976. MODULE Test;
  1977. PROCEDURE Procedure;
  1978. TYPE Object = OBJECT
  1979. CONST Constant = 54;
  1980. END Object;
  1981. END Procedure;
  1982. END Test.
  1983. positive: unmarked constant within procedure in object
  1984. MODULE Test;
  1985. TYPE Object = OBJECT
  1986. PROCEDURE Procedure;
  1987. CONST Constant = 54;
  1988. END Procedure;
  1989. END Object;
  1990. END Test.
  1991. positive: constant marked as exported
  1992. MODULE Test;
  1993. CONST Constant* = 54;
  1994. END Test.
  1995. negative: constant marked as exported within procedure
  1996. MODULE Test;
  1997. PROCEDURE Procedure;
  1998. CONST Constant* = 54;
  1999. END Procedure;
  2000. END Test.
  2001. negative: constant marked as exported within nested procedure
  2002. MODULE Test;
  2003. PROCEDURE Procedure;
  2004. PROCEDURE Procedure;
  2005. CONST Constant* = 54;
  2006. END Procedure;
  2007. END Procedure;
  2008. END Test.
  2009. positive: constant marked as exported within object
  2010. MODULE Test;
  2011. TYPE Object = OBJECT
  2012. CONST Constant* = 54;
  2013. END Object;
  2014. END Test.
  2015. negative: constant marked as exported within object in procedure
  2016. MODULE Test;
  2017. PROCEDURE Procedure;
  2018. TYPE Object = OBJECT
  2019. CONST Constant* = 54;
  2020. END Object;
  2021. END Procedure;
  2022. END Test.
  2023. negative: constant marked as exported within procedure in object
  2024. MODULE Test;
  2025. TYPE Object = OBJECT
  2026. PROCEDURE Procedure;
  2027. CONST Constant* = 54;
  2028. END Procedure;
  2029. END Object;
  2030. END Test.
  2031. negative: constant marked as read-only
  2032. MODULE Test;
  2033. CONST Constant- = TRUE;
  2034. END Test.
  2035. negative: constant marked as read-only within procedure
  2036. MODULE Test;
  2037. PROCEDURE Procedure;
  2038. CONST Constant- = TRUE;
  2039. END Procedure;
  2040. END Test.
  2041. negative: constant marked as read-only within nested procedure
  2042. MODULE Test;
  2043. PROCEDURE Procedure;
  2044. PROCEDURE Procedure;
  2045. CONST Constant- = TRUE;
  2046. END Procedure;
  2047. END Procedure;
  2048. END Test.
  2049. negative: constant marked as read-only within object
  2050. MODULE Test;
  2051. TYPE Object = OBJECT
  2052. CONST Constant- = TRUE;
  2053. END Object;
  2054. END Test.
  2055. negative: constant marked as read-only within object in procedure
  2056. MODULE Test;
  2057. PROCEDURE Procedure;
  2058. TYPE Object = OBJECT
  2059. CONST Constant- = TRUE;
  2060. END Object;
  2061. END Procedure;
  2062. END Test.
  2063. negative: constant marked as read-only within procedure in object
  2064. MODULE Test;
  2065. TYPE Object = OBJECT
  2066. PROCEDURE Procedure;
  2067. CONST Constant- = TRUE;
  2068. END Procedure;
  2069. END Object;
  2070. END Test.
  2071. negative: duplicated constant
  2072. MODULE Test;
  2073. CONST Constant = TRUE;
  2074. CONST Constant = FALSE;
  2075. END Test.
  2076. negative: duplicated constant within procedure
  2077. MODULE Test;
  2078. PROCEDURE Procedure;
  2079. CONST Constant = TRUE;
  2080. CONST Constant = FALSE;
  2081. END Procedure;
  2082. END Test.
  2083. negative: duplicated constant within nested procedure
  2084. MODULE Test;
  2085. PROCEDURE Procedure;
  2086. PROCEDURE Procedure;
  2087. CONST Constant = TRUE;
  2088. CONST Constant = FALSE;
  2089. END Procedure;
  2090. END Procedure;
  2091. END Test.
  2092. negative: duplicated constant within object
  2093. MODULE Test;
  2094. TYPE Object = OBJECT
  2095. CONST Constant = TRUE;
  2096. CONST Constant = FALSE;
  2097. END Object;
  2098. END Test.
  2099. negative: duplicated constant within object in procedure
  2100. MODULE Test;
  2101. TYPE Object = OBJECT
  2102. PROCEDURE Procedure;
  2103. CONST Constant = TRUE;
  2104. CONST Constant = FALSE;
  2105. END Procedure;
  2106. END Object;
  2107. END Test.
  2108. negative: duplicated constant within procedure in object
  2109. MODULE Test;
  2110. PROCEDURE Procedure;
  2111. TYPE Object = OBJECT
  2112. CONST Constant = TRUE;
  2113. CONST Constant = FALSE;
  2114. END Object;
  2115. END Procedure;
  2116. END Test.
  2117. positive: backwards referencing constant
  2118. MODULE Test;
  2119. CONST A = 0; B = A;
  2120. END Test.
  2121. positive: backwards referencing constant within procedure
  2122. MODULE Test;
  2123. PROCEDURE Procedure;
  2124. CONST A = 0; B = A;
  2125. END Procedure;
  2126. END Test.
  2127. positive: backwards referencing constant within nested procedure
  2128. MODULE Test;
  2129. PROCEDURE Procedure;
  2130. PROCEDURE Procedure;
  2131. CONST A = 0; B = A;
  2132. END Procedure;
  2133. END Procedure;
  2134. END Test.
  2135. positive: backwards referencing constant within object
  2136. MODULE Test;
  2137. TYPE Object = OBJECT
  2138. CONST A = 0; B = A;
  2139. END Object;
  2140. END Test.
  2141. positive: backwards referencing constant within object in procedure
  2142. MODULE Test;
  2143. PROCEDURE Procedure;
  2144. TYPE Object = OBJECT
  2145. CONST A = 0; B = A;
  2146. END Object;
  2147. END Procedure;
  2148. END Test.
  2149. positive: backwards referencing constant within procedure in object
  2150. MODULE Test;
  2151. TYPE Object = OBJECT
  2152. PROCEDURE Procedure;
  2153. CONST A = 0; B = A;
  2154. END Procedure;
  2155. END Object;
  2156. END Test.
  2157. positive: forwards referencing constant
  2158. MODULE Test;
  2159. CONST A = B; B = 0;
  2160. END Test.
  2161. positive: forwards referencing constant within procedure
  2162. MODULE Test;
  2163. PROCEDURE Procedure;
  2164. CONST A = B; B = 0;
  2165. END Procedure;
  2166. END Test.
  2167. positive: forwards referencing constant within nested procedure
  2168. MODULE Test;
  2169. PROCEDURE Procedure;
  2170. PROCEDURE Procedure;
  2171. CONST A = B; B = 0;
  2172. END Procedure;
  2173. END Procedure;
  2174. END Test.
  2175. positive: forwards referencing constant within object
  2176. MODULE Test;
  2177. TYPE Object = OBJECT
  2178. CONST A = B; B = 0;
  2179. END Object;
  2180. END Test.
  2181. positive: forwards referencing constant within object in procedure
  2182. MODULE Test;
  2183. PROCEDURE Procedure;
  2184. TYPE Object = OBJECT
  2185. CONST A = B; B = 0;
  2186. END Object;
  2187. END Procedure;
  2188. END Test.
  2189. positive: forwards referencing constant within procedure in object
  2190. MODULE Test;
  2191. TYPE Object = OBJECT
  2192. PROCEDURE Procedure;
  2193. CONST A = B; B = 0;
  2194. END Procedure;
  2195. END Object;
  2196. END Test.
  2197. negative: cyclic referencing constants
  2198. MODULE Test;
  2199. CONST A = B; B = A;
  2200. END Test.
  2201. negative: cyclic referencing constants within procedure
  2202. MODULE Test;
  2203. PROCEDURE Procedure;
  2204. CONST A = B; B = A;
  2205. END Procedure;
  2206. END Test.
  2207. negative: cyclic referencing constants within nested procedure
  2208. MODULE Test;
  2209. PROCEDURE Procedure;
  2210. PROCEDURE Procedure;
  2211. CONST A = B; B = A;
  2212. END Procedure;
  2213. END Procedure;
  2214. END Test.
  2215. negative: cyclic referencing constants within object
  2216. MODULE Test;
  2217. TYPE Object = OBJECT
  2218. CONST A = B; B = A;
  2219. END Object;
  2220. END Test.
  2221. negative: cyclic referencing constants within object in procedure
  2222. MODULE Test;
  2223. PROCEDURE Procedure;
  2224. TYPE Object = OBJECT
  2225. CONST A = B; B = A;
  2226. END Object;
  2227. END Procedure;
  2228. END Test.
  2229. negative: cyclic referencing constants within procedure in object
  2230. MODULE Test;
  2231. TYPE Object = OBJECT
  2232. PROCEDURE Procedure;
  2233. CONST A = B; B = A;
  2234. END Procedure;
  2235. END Object;
  2236. END Test.
  2237. negative: self referencing constant
  2238. MODULE Test;
  2239. CONST Constant = Constant;
  2240. END Test.
  2241. negative: self referencing constant within procedure
  2242. MODULE Test;
  2243. PROCEDURE Procedure;
  2244. CONST Constant = Constant;
  2245. END Procedure;
  2246. END Test.
  2247. negative: self referencing constant within nested procedure
  2248. MODULE Test;
  2249. PROCEDURE Procedure;
  2250. PROCEDURE Procedure;
  2251. CONST Constant = Constant;
  2252. END Procedure;
  2253. END Procedure;
  2254. END Test.
  2255. negative: self referencing constant within object
  2256. MODULE Test;
  2257. TYPE Object = OBJECT
  2258. CONST Constant = Constant;
  2259. END Object;
  2260. END Test.
  2261. negative: self referencing constant within object in procedure
  2262. MODULE Test;
  2263. TYPE Object = OBJECT
  2264. PROCEDURE Procedure;
  2265. CONST Constant = Constant;
  2266. END Procedure;
  2267. END Object;
  2268. END Test.
  2269. negative: self referencing constant within procedure in object
  2270. MODULE Test;
  2271. PROCEDURE Procedure;
  2272. TYPE Object = OBJECT
  2273. CONST Constant = Constant;
  2274. END Object;
  2275. END Procedure;
  2276. END Test.
  2277. positive: dummy module exporting constants
  2278. MODULE Dummy;
  2279. CONST Exported* = 5;
  2280. CONST Private = 5;
  2281. END Dummy.
  2282. positive: importing exported constant
  2283. MODULE Test;
  2284. IMPORT Dummy;
  2285. CONST Constant = Dummy.Exported;
  2286. BEGIN ASSERT (Constant = 5);
  2287. END Test.
  2288. negative: importing private constant
  2289. MODULE Test;
  2290. IMPORT Dummy;
  2291. CONST Constant = Dummy.Private;
  2292. END Test.
  2293. negative: importing invalid constant
  2294. MODULE Test;
  2295. IMPORT Dummy;
  2296. CONST Constant = Dummy.Invalid;
  2297. END Test.
  2298. negative: import as constant
  2299. MODULE Test;
  2300. IMPORT Import := Dummy;
  2301. CONST Constant = Import;
  2302. END Test.
  2303. negative: type as constant
  2304. MODULE Test;
  2305. CONST Constant = Type;
  2306. TYPE Type = INTEGER;
  2307. END Test.
  2308. negative: variable as constant
  2309. MODULE Test;
  2310. CONST Constant = variable;
  2311. VAR variable: INTEGER;
  2312. END Test.
  2313. negative: procedure as constant
  2314. MODULE Test;
  2315. CONST Constant = Procedure;
  2316. PROCEDURE Procedure; INTEGER;
  2317. END Test.
  2318. negative: parameter as constant
  2319. MODULE Test;
  2320. PROCEDURE Procedure (parameter: INTEGER);
  2321. CONST Constant = parameter;
  2322. END Procedure;
  2323. END Test.
  2324. negative: const parameter as constant
  2325. MODULE Test;
  2326. PROCEDURE Procedure (CONST parameter: INTEGER);
  2327. CONST Constant = parameter;
  2328. END Procedure;
  2329. END Test.
  2330. # constant booleans
  2331. negative: arithmetic negation on constant boolean
  2332. MODULE Test;
  2333. CONST Result = -TRUE;
  2334. END Test.
  2335. positive: logical negation on constant boolean
  2336. MODULE Test;
  2337. CONST Result = ~FALSE;
  2338. BEGIN ASSERT (Result = TRUE);
  2339. END Test.
  2340. positive: multiple logical negations on constant boolean
  2341. MODULE Test;
  2342. CONST Result = ~~~~FALSE;
  2343. BEGIN ASSERT (Result = FALSE);
  2344. END Test.
  2345. negative: dereferencing constant boolean
  2346. MODULE Test;
  2347. CONST Result = FALSE^;
  2348. END Test.
  2349. negative: dereferencing constant boolean indirectly
  2350. MODULE Test;
  2351. CONST Constant = FALSE;
  2352. CONST Result = Constant^;
  2353. END Test.
  2354. negative: addition on constant booleans
  2355. MODULE Test;
  2356. CONST Result = TRUE + FALSE;
  2357. END Test.
  2358. negative: subtraction on constant booleans
  2359. MODULE Test;
  2360. CONST Result = FALSE - TRUE
  2361. END Test.
  2362. negative: multiplication on constant booleans
  2363. MODULE Test;
  2364. CONST Result = FALSE * TRUE
  2365. END Test.
  2366. negative: integer division on constant booleans
  2367. MODULE Test;
  2368. CONST Result = TRUE DIV TRUE
  2369. END Test.
  2370. negative: real division on constant booleans
  2371. MODULE Test;
  2372. CONST Result = TRUE / FALSE
  2373. END Test.
  2374. negative: modulo on constant booleans
  2375. MODULE Test;
  2376. CONST Result = FALSE MOD TRUE
  2377. END Test.
  2378. positive: equal relation on constant booleans
  2379. MODULE Test;
  2380. CONST Result = TRUE = FALSE
  2381. BEGIN ASSERT (Result = FALSE);
  2382. END Test.
  2383. positive: unequal relation on constant booleans
  2384. MODULE Test;
  2385. CONST Result = TRUE # TRUE
  2386. BEGIN ASSERT (Result = FALSE);
  2387. END Test.
  2388. negative: less relation on constant booleans
  2389. MODULE Test;
  2390. CONST Result = TRUE < FALSE
  2391. END Test.
  2392. negative: less or equal relation on constant booleans
  2393. MODULE Test;
  2394. CONST Result = FALSE <= FALSE
  2395. END Test.
  2396. negative: greater relation on constant booleans
  2397. MODULE Test;
  2398. CONST Result = FALSE > TRUE
  2399. END Test.
  2400. negative: greater or equal relation on constant booleans
  2401. MODULE Test;
  2402. CONST Result = FALSE >= TRUE
  2403. END Test.
  2404. negative: set membership on constant booleans
  2405. MODULE Test;
  2406. CONST Result = TRUE IN FALSE
  2407. END Test.
  2408. negative: type test on constant booleans
  2409. MODULE Test;
  2410. CONST Result = TRUE IS FALSE
  2411. END Test.
  2412. negative: type test on constant boolean
  2413. MODULE Test;
  2414. CONST Result = TRUE IS BOOLEAN
  2415. END Test.
  2416. negative: type test on constant boolean type
  2417. MODULE Test;
  2418. TYPE Type = BOOLEAN;
  2419. CONST Result = TRUE IS Type
  2420. END Test.
  2421. negative: type guard on constant booleans
  2422. MODULE Test;
  2423. CONST Result = TRUE(FALSE)
  2424. END Test.
  2425. negative: indirect type guard on constant booleans
  2426. MODULE Test;
  2427. CONST Constant = TRUE
  2428. CONST Result = Constant(Constant)
  2429. END Test.
  2430. negative: type guard on constant boolean
  2431. MODULE Test;
  2432. CONST Result = TRUE(BOOLEAN)
  2433. END Test.
  2434. negative: indirect type guard on constant boolean
  2435. MODULE Test;
  2436. CONST Constant = TRUE
  2437. CONST Result = Constant(BOOLEAN)
  2438. END Test.
  2439. negative: type guard on constant boolean type
  2440. MODULE Test;
  2441. TYPE Type = BOOLEAN;
  2442. CONST Result = TRUE(Type)
  2443. END Test.
  2444. negative: indirect type guard on constant boolean type
  2445. MODULE Test;
  2446. CONST Constant = TRUE
  2447. TYPE Type = BOOLEAN;
  2448. CONST Result = Constant(Type)
  2449. END Test.
  2450. positive: logical and on constant booleans
  2451. MODULE Test;
  2452. CONST Result = TRUE & FALSE
  2453. BEGIN ASSERT (Result = FALSE);
  2454. END Test.
  2455. positive: logical or on constant booleans
  2456. MODULE Test;
  2457. CONST Result = FALSE OR TRUE
  2458. BEGIN ASSERT (Result = TRUE);
  2459. END Test.
  2460. negative: ordinal value of constant boolean
  2461. MODULE Test;
  2462. CONST Result = ORD (TRUE)
  2463. END Test.
  2464. negative: character value of constant boolean
  2465. MODULE Test;
  2466. CONST Result = CHR (FALSE)
  2467. END Test.
  2468. negative: absolute value of constant boolean
  2469. MODULE Test;
  2470. CONST Result = ABS (FALSE)
  2471. END Test.
  2472. negative: odd test on constant boolean
  2473. MODULE Test;
  2474. CONST Result = ODD (FALSE)
  2475. END Test.
  2476. negative: capital letter of constant boolean
  2477. MODULE Test;
  2478. CONST Result = CAP (TRUE)
  2479. END Test.
  2480. negative: minimal value of boolean
  2481. MODULE Test;
  2482. CONST Result = MIN (BOOLEAN)
  2483. END Test.
  2484. negative: maximal value of boolean
  2485. MODULE Test;
  2486. CONST Result = MAX (BOOLEAN)
  2487. END Test.
  2488. negative: arithmetic shift of constant booleans
  2489. MODULE Test;
  2490. CONST Result = ASH (TRUE, FALSE)
  2491. END Test.
  2492. negative: short on constant boolean
  2493. MODULE Test;
  2494. CONST Result = SHORT (FALSE)
  2495. END Test.
  2496. negative: long on constant boolean
  2497. MODULE Test;
  2498. CONST Result = LONG (FALSE)
  2499. END Test.
  2500. negative: entier on constant boolean
  2501. MODULE Test;
  2502. CONST Result = ENTIER (FALSE)
  2503. END Test.
  2504. negative: unary length of constant boolean
  2505. MODULE Test;
  2506. CONST Result = LEN (FALSE)
  2507. END Test.
  2508. negative: binary length of constant boolean
  2509. MODULE Test;
  2510. CONST Result = LEN (FALSE, 0)
  2511. END Test.
  2512. negative: indexing constant boolean
  2513. MODULE Test;
  2514. CONST Result = TRUE[0]
  2515. END Test.
  2516. negative: indexing constant boolean indirectly
  2517. MODULE Test;
  2518. CONST Constant = TRUE;
  2519. CONST Result = Constant[0]
  2520. END Test.
  2521. negative: constant boolean as index
  2522. MODULE Test;
  2523. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  2524. BEGIN result := array[TRUE]
  2525. END Test.
  2526. negative: member selection on constant boolean
  2527. MODULE Test;
  2528. CONST Result = TRUE.member
  2529. END Test.
  2530. negative: indirect member selection on constant boolean
  2531. MODULE Test;
  2532. CONST Constant = TRUE;
  2533. CONST Result = Constant.member
  2534. END Test.
  2535. negative: calling constant boolean
  2536. MODULE Test;
  2537. BEGIN TRUE ()
  2538. END Test.
  2539. negative: calling constant boolean indirectly
  2540. MODULE Test;
  2541. CONST Constant = TRUE;
  2542. BEGIN Constant
  2543. END Test.
  2544. negative: calling constant boolean indirectly with parentheses
  2545. MODULE Test;
  2546. CONST Constant = TRUE;
  2547. BEGIN Constant ()
  2548. END Test.
  2549. positive: calling procedure with parameter and constant boolean argument
  2550. MODULE Test;
  2551. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  2552. BEGIN Procedure (TRUE);
  2553. END Test.
  2554. negative: calling procedure with variable parameter and constant boolean argument
  2555. MODULE Test;
  2556. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  2557. BEGIN Procedure (TRUE);
  2558. END Test.
  2559. positive: calling procedure with constant parameter and constant boolean argument
  2560. MODULE Test;
  2561. PROCEDURE Procedure (CONST value: BOOLEAN); END Procedure;
  2562. BEGIN Procedure (TRUE);
  2563. END Test.
  2564. # constant characters
  2565. negative: constant character exceeding valid range
  2566. MODULE Test;
  2567. CONST Result = 1234X;
  2568. END Test.
  2569. positive: ordering of constant character ordinals
  2570. MODULE Test;
  2571. BEGIN ASSERT (0X < 0FFX)
  2572. END Test.
  2573. negative: arithmetic negation on constant character
  2574. MODULE Test;
  2575. CONST Result = -'a';
  2576. END Test.
  2577. negative: logical negation on constant character
  2578. MODULE Test;
  2579. CONST Result = ~5X;
  2580. END Test.
  2581. negative: dereferencing constant character
  2582. MODULE Test;
  2583. CONST Result = 't'^;
  2584. END Test.
  2585. negative: dereferencing constant character indirectly
  2586. MODULE Test;
  2587. CONST Constant = 't';
  2588. CONST Result = Constant^;
  2589. END Test.
  2590. negative: addition on constant characters
  2591. MODULE Test;
  2592. CONST Result = 45X + 'r';
  2593. END Test.
  2594. negative: subtraction on constant characters
  2595. MODULE Test;
  2596. CONST Result = '3' - 'a'
  2597. END Test.
  2598. negative: multiplication on constant characters
  2599. MODULE Test;
  2600. CONST Result = '9' * 4FX
  2601. END Test.
  2602. negative: integer division on constant characters
  2603. MODULE Test;
  2604. CONST Result = '@' DIV 'g'
  2605. END Test.
  2606. negative: real division on constant characters
  2607. MODULE Test;
  2608. CONST Result = 'a' / 'b'
  2609. END Test.
  2610. negative: modulo on constant characters
  2611. MODULE Test;
  2612. CONST Result = 8X MOD 2X
  2613. END Test.
  2614. positive: equal relation on constant characters
  2615. MODULE Test;
  2616. CONST Result = 'r' = 'l'
  2617. BEGIN ASSERT (Result = FALSE);
  2618. END Test.
  2619. positive: unequal relation on constant characters
  2620. MODULE Test;
  2621. CONST Result = 4AX # 'z'
  2622. BEGIN ASSERT (Result = TRUE);
  2623. END Test.
  2624. positive: less relation on constant characters
  2625. MODULE Test;
  2626. CONST Result = 's' < 64X
  2627. BEGIN ASSERT (Result = FALSE);
  2628. END Test.
  2629. positive: less or equal relation on constant characters
  2630. MODULE Test;
  2631. CONST Result = 'e' <= 9X
  2632. BEGIN ASSERT (Result = FALSE);
  2633. END Test.
  2634. positive: greater relation on constant characters
  2635. MODULE Test;
  2636. CONST Result = 'r' > 'a'
  2637. BEGIN ASSERT (Result = TRUE);
  2638. END Test.
  2639. positive: greater or equal relation on constant characters
  2640. MODULE Test;
  2641. CONST Result = 'h' >= 0DX
  2642. BEGIN ASSERT (Result = TRUE);
  2643. END Test.
  2644. negative: set membership on constant characters
  2645. MODULE Test;
  2646. CONST Result = 1DX IN 'z'
  2647. END Test.
  2648. negative: type test on constant characters
  2649. MODULE Test;
  2650. CONST Result = '0' IS 0X
  2651. END Test.
  2652. negative: type test on constant character
  2653. MODULE Test;
  2654. CONST Result = '0' IS CHAR
  2655. END Test.
  2656. negative: type test on constant character type
  2657. MODULE Test;
  2658. TYPE Type = CHAR;
  2659. CONST Result = '0' IS Type
  2660. END Test.
  2661. negative: type guard on constant characters
  2662. MODULE Test;
  2663. CONST Result = '0'(0X)
  2664. END Test.
  2665. negative: indirect type guard on constant characters
  2666. MODULE Test;
  2667. CONST Constant = '0'
  2668. CONST Result = Constant(Constant)
  2669. END Test.
  2670. negative: type guard on constant character
  2671. MODULE Test;
  2672. CONST Result = '0'(CHAR)
  2673. END Test.
  2674. negative: indirect type guard on constant character
  2675. MODULE Test;
  2676. CONST Constant = '0'
  2677. CONST Result = Constant(CHAR)
  2678. END Test.
  2679. negative: type guard on constant character type
  2680. MODULE Test;
  2681. TYPE Type = CHAR;
  2682. CONST Result = '0'(Type)
  2683. END Test.
  2684. negative: indirect guard test on constant character type
  2685. MODULE Test;
  2686. CONST Constant = '0'
  2687. TYPE Type = CHAR;
  2688. CONST Result = Constant(Type)
  2689. END Test.
  2690. negative: logical and on constant characters
  2691. MODULE Test;
  2692. CONST Result = 'A' & 't'
  2693. END Test.
  2694. negative: logical or on constant characters
  2695. MODULE Test;
  2696. CONST Result = 0X OR 1X
  2697. END Test.
  2698. positive: ordinal value of constant character
  2699. MODULE Test;
  2700. CONST Result = ORD (10X)
  2701. BEGIN ASSERT (Result = 10H)
  2702. END Test.
  2703. negative: character value of constant character
  2704. MODULE Test;
  2705. CONST Result = CHR (23X)
  2706. END Test.
  2707. negative: absolute value of constant character
  2708. MODULE Test;
  2709. CONST Result = ABS (0X)
  2710. END Test.
  2711. negative: odd test on constant character
  2712. MODULE Test;
  2713. CONST Result = ODD ('2')
  2714. END Test.
  2715. positive: capital letter of constant character
  2716. MODULE Test;
  2717. CONST Result = CAP ('a')
  2718. BEGIN ASSERT (Result = 'A')
  2719. END Test.
  2720. positive: minimal value of character
  2721. MODULE Test;
  2722. CONST Result = MIN (CHAR)
  2723. BEGIN ASSERT (Result = 0X);
  2724. END Test.
  2725. positive: maximal value of character
  2726. MODULE Test;
  2727. CONST Result = MAX (CHAR)
  2728. BEGIN ASSERT (Result = 0FFX);
  2729. END Test.
  2730. negative: arithmetic shift of constant characters
  2731. MODULE Test;
  2732. CONST Result = ASH ('5', '9')
  2733. END Test.
  2734. negative: short on constant character
  2735. MODULE Test;
  2736. CONST Result = SHORT ('t')
  2737. END Test.
  2738. negative: long on constant character
  2739. MODULE Test;
  2740. CONST Result = LONG ('t')
  2741. END Test.
  2742. negative: entier on constant character
  2743. MODULE Test;
  2744. CONST Result = ENTIER ('t')
  2745. END Test.
  2746. negative: unary length of constant character
  2747. MODULE Test;
  2748. CONST Result = LEN (0X)
  2749. END Test.
  2750. negative: binary length of constant character
  2751. MODULE Test;
  2752. CONST Result = LEN (0X, 0)
  2753. END Test.
  2754. negative: indexing constant character
  2755. MODULE Test;
  2756. CONST Result = 'a'[0]
  2757. END Test.
  2758. negative: indexing constant character indirectly
  2759. MODULE Test;
  2760. CONST Constant = 'a';
  2761. CONST Result = Constant[0]
  2762. END Test.
  2763. negative: constant character as index
  2764. MODULE Test;
  2765. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  2766. BEGIN result := array['a']
  2767. END Test.
  2768. negative: member selection on constant character
  2769. MODULE Test;
  2770. CONST Result = '3'.member
  2771. END Test.
  2772. negative: indirect member selection on constant character
  2773. MODULE Test;
  2774. CONST Constant = '3';
  2775. CONST Result = Constant.member
  2776. END Test.
  2777. negative: calling constant character
  2778. MODULE Test;
  2779. BEGIN 'o' ()
  2780. END Test.
  2781. negative: calling constant character indirectly
  2782. MODULE Test;
  2783. CONST Constant = 'o';
  2784. BEGIN Constant
  2785. END Test.
  2786. negative: calling constant character indirectly with parentheses
  2787. MODULE Test;
  2788. CONST Constant = 'o';
  2789. BEGIN Constant ()
  2790. END Test.
  2791. positive: calling procedure with parameter and constant character argument
  2792. MODULE Test;
  2793. PROCEDURE Procedure (value: CHAR); END Procedure;
  2794. BEGIN Procedure ('a');
  2795. END Test.
  2796. negative: calling procedure with variable parameter and constant character argument
  2797. MODULE Test;
  2798. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  2799. BEGIN Procedure (54X);
  2800. END Test.
  2801. positive: calling procedure with constant parameter and constant character argument
  2802. MODULE Test;
  2803. PROCEDURE Procedure (CONST value: CHAR); END Procedure;
  2804. BEGIN Procedure (0AX);
  2805. END Test.
  2806. # constant integers
  2807. negative: constant integer exceeding valid range
  2808. MODULE Test;
  2809. CONST Result = 123456789012345678901234567890;
  2810. END Test.
  2811. positive: arithmetic negation on constant integer
  2812. MODULE Test;
  2813. CONST Result = -5;
  2814. BEGIN ASSERT (Result = -5);
  2815. END Test.
  2816. positive: multiple arithmetic negations on constant integer
  2817. MODULE Test;
  2818. CONST Result = -(-(-9));
  2819. BEGIN ASSERT (Result = -9);
  2820. END Test.
  2821. negative: logical negation on constant integer
  2822. MODULE Test;
  2823. CONST Result = ~788;
  2824. END Test.
  2825. negative: dereferencing constant integer
  2826. MODULE Test;
  2827. CONST Result = 7^;
  2828. END Test.
  2829. negative: dereferencing constant integer indirectly
  2830. MODULE Test;
  2831. CONST Constant = 7;
  2832. CONST Result = Constant^;
  2833. END Test.
  2834. positive: addition on constant integers
  2835. MODULE Test;
  2836. CONST Result = 1 + 057H;
  2837. BEGIN ASSERT (Result = 88);
  2838. END Test.
  2839. positive: subtraction on constant integers
  2840. MODULE Test;
  2841. CONST Result = 0 - 1
  2842. BEGIN ASSERT (Result = -1);
  2843. END Test.
  2844. positive: multiplication on constant integers
  2845. MODULE Test;
  2846. CONST Result = 1AH * 10
  2847. BEGIN ASSERT (Result = 260);
  2848. END Test.
  2849. positive: integer division on constant integers
  2850. MODULE Test;
  2851. CONST Divisor = -2147483648; Dividend = 131072; Result = Divisor DIV Dividend;
  2852. BEGIN ASSERT (Result = -16384);
  2853. END Test.
  2854. negative: integer division on constant integers by zero
  2855. MODULE Test;
  2856. CONST Result = 10 DIV 0
  2857. END Test.
  2858. positive: real division on constant integers
  2859. MODULE Test;
  2860. CONST Result = 680 / 16
  2861. BEGIN ASSERT (Result = 42.5);
  2862. END Test.
  2863. negative: real division on constant integers by zero
  2864. MODULE Test;
  2865. CONST Result = 1ACH / 0
  2866. END Test.
  2867. positive: modulo on constant integers
  2868. MODULE Test;
  2869. CONST Divisor = -2147483648; Dividend = 131072; Result = Divisor MOD Dividend;
  2870. BEGIN ASSERT (Result = 0);
  2871. END Test.
  2872. negative: modulo on constant integers by zero
  2873. MODULE Test;
  2874. CONST Result = 15H MOD 0
  2875. END Test.
  2876. positive: equal relation on constant integers
  2877. MODULE Test;
  2878. CONST Result = 54 = 8
  2879. BEGIN ASSERT (Result = FALSE);
  2880. END Test.
  2881. positive: unequal relation on constant integers
  2882. MODULE Test;
  2883. CONST Result = 0 # 9
  2884. BEGIN ASSERT (Result = TRUE);
  2885. END Test.
  2886. positive: less relation on constant integers
  2887. MODULE Test;
  2888. CONST Result = 5 < 687H
  2889. BEGIN ASSERT (Result = TRUE);
  2890. END Test.
  2891. positive: less or equal relation on constant integers
  2892. MODULE Test;
  2893. CONST Result = 0 <= 1321
  2894. BEGIN ASSERT (Result = TRUE);
  2895. END Test.
  2896. positive: greater relation on constant integers
  2897. MODULE Test;
  2898. CONST Result = 0EFH > 54
  2899. BEGIN ASSERT (Result = TRUE);
  2900. END Test.
  2901. positive: greater or equal relation on constant integers
  2902. MODULE Test;
  2903. CONST Result = 131 >= 9
  2904. BEGIN ASSERT (Result = TRUE);
  2905. END Test.
  2906. negative: set membership on constant integers
  2907. MODULE Test;
  2908. CONST Result = 5 IN 9
  2909. END Test.
  2910. negative: type test on constant integers
  2911. MODULE Test;
  2912. CONST Result = 4 IS 0
  2913. END Test.
  2914. negative: type test on constant integer
  2915. MODULE Test;
  2916. CONST Result = 4 IS INTEGER
  2917. END Test.
  2918. negative: type test on constant integer type
  2919. MODULE Test;
  2920. TYPE Type = INTEGER;
  2921. CONST Result = 4 IS Type
  2922. END Test.
  2923. negative: type guard on constant integers
  2924. MODULE Test;
  2925. CONST Result = 5(0)
  2926. END Test.
  2927. negative: indirect type guard on constant integers
  2928. MODULE Test;
  2929. CONST Constant = 5
  2930. CONST Result = Constant(Constant)
  2931. END Test.
  2932. negative: type guard on constant integer
  2933. MODULE Test;
  2934. CONST Result = 5(INTEGER)
  2935. END Test.
  2936. negative: indirect type guard on constant integer
  2937. MODULE Test;
  2938. CONST Constant = 5
  2939. CONST Result = Constant(INTEGER)
  2940. END Test.
  2941. negative: type guard on constant integer type
  2942. MODULE Test;
  2943. TYPE Type = INTEGER;
  2944. CONST Result = 5(Type)
  2945. END Test.
  2946. negative: indirect guard test on constant integer type
  2947. MODULE Test;
  2948. CONST Constant = 5
  2949. TYPE Type = INTEGER;
  2950. CONST Result = Constant(Type)
  2951. END Test.
  2952. negative: logical and on constant integers
  2953. MODULE Test;
  2954. CONST Result = 123 & 3AH
  2955. END Test.
  2956. negative: logical or on constant integers
  2957. MODULE Test;
  2958. CONST Result = 0 OR 685
  2959. END Test.
  2960. negative: ordinal value of constant integer
  2961. MODULE Test;
  2962. CONST Result = ORD (99)
  2963. END Test.
  2964. positive: character value of constant integer
  2965. MODULE Test;
  2966. CONST Result = CHR (65H)
  2967. BEGIN ASSERT (Result = 65X)
  2968. END Test.
  2969. positive: absolute value of constant integer
  2970. MODULE Test;
  2971. CONST Result = ABS (-5)
  2972. BEGIN ASSERT (Result >= 0)
  2973. END Test.
  2974. positive: odd test on constant integer
  2975. MODULE Test;
  2976. CONST Result = ODD (5)
  2977. BEGIN ASSERT (Result)
  2978. END Test.
  2979. negative: capital letter of constant integer
  2980. MODULE Test;
  2981. CONST Result = CAP (6)
  2982. END Test.
  2983. positive: minimal value of integer
  2984. MODULE Test;
  2985. CONST A = MIN (SHORTINT); B = MIN (INTEGER); C = MIN (LONGINT); D = MIN (HUGEINT)
  2986. END Test.
  2987. positive: maximal value of integer
  2988. MODULE Test;
  2989. CONST A = MAX (SHORTINT); B = MAX (INTEGER); C = MAX (LONGINT); D = MAX (HUGEINT)
  2990. END Test.
  2991. positive: arithmetic left shift of constant integers
  2992. MODULE Test;
  2993. CONST Result = ASH (13, 6)
  2994. BEGIN ASSERT (Result = 13 * (2 * 2 * 2 * 2 * 2 * 2));
  2995. END Test.
  2996. positive: arithmetic right shift of constant integers
  2997. MODULE Test;
  2998. CONST Result = ASH (2379, -6)
  2999. BEGIN ASSERT (Result = 2379 DIV (2 * 2 * 2 * 2 * 2 * 2));
  3000. END Test.
  3001. positive: short on constant integer
  3002. MODULE Test;
  3003. CONST Result = SHORT (3215)
  3004. END Test.
  3005. negative: short on constant short integer
  3006. MODULE Test;
  3007. CONST Result = SHORT (5)
  3008. END Test.
  3009. positive: long on constant integer
  3010. MODULE Test;
  3011. CONST Result = LONG (5)
  3012. END Test.
  3013. negative: long on constant huge integer
  3014. MODULE Test;
  3015. CONST Result = LONG (32154878786668)
  3016. END Test.
  3017. negative: entier on constant integer
  3018. MODULE Test;
  3019. CONST Result = ENTIER (654)
  3020. END Test.
  3021. negative: unary length of constant integer
  3022. MODULE Test;
  3023. CONST Result = LEN (6548)
  3024. END Test.
  3025. negative: binary length of constant integer
  3026. MODULE Test;
  3027. CONST Result = LEN (6548, 0)
  3028. END Test.
  3029. negative: indexing constant integer
  3030. MODULE Test;
  3031. CONST Result = 5[0]
  3032. END Test.
  3033. negative: indexing constant integer indirectly
  3034. MODULE Test;
  3035. CONST Constant = 5;
  3036. CONST Result = Constant[0]
  3037. END Test.
  3038. positive: constant integer as index
  3039. MODULE Test;
  3040. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3041. BEGIN result := array[5]
  3042. END Test.
  3043. positive: zero as index
  3044. MODULE Test;
  3045. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3046. BEGIN result := array[0]
  3047. END Test.
  3048. negative: negative constant integer as index
  3049. MODULE Test;
  3050. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3051. BEGIN result := array[-10]
  3052. END Test.
  3053. negative: array size as index
  3054. MODULE Test;
  3055. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3056. BEGIN result := array[10]
  3057. END Test.
  3058. negative: constant integer as index exceeding valid range
  3059. MODULE Test;
  3060. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3061. BEGIN result := array[2, 20]
  3062. END Test.
  3063. positive: zero as index in two-dimensional array
  3064. MODULE Test;
  3065. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3066. BEGIN result := array[2, 0]
  3067. END Test.
  3068. negative: negative constant integer as index in two-dimensional array
  3069. MODULE Test;
  3070. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3071. BEGIN result := array[2, -10]
  3072. END Test.
  3073. negative: array size as index in two-dimensional array
  3074. MODULE Test;
  3075. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3076. BEGIN result := array[2, 10]
  3077. END Test.
  3078. negative: constant integer as index exceeding valid range in two-dimensional array
  3079. MODULE Test;
  3080. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3081. BEGIN result := array[2, 20]
  3082. END Test.
  3083. negative: member selection on constant integer
  3084. MODULE Test;
  3085. CONST Result = 654.member
  3086. END Test.
  3087. negative: indirect member selection on constant integer
  3088. MODULE Test;
  3089. CONST Constant = 654;
  3090. CONST Result = Constant.member
  3091. END Test.
  3092. negative: calling constant integer
  3093. MODULE Test;
  3094. BEGIN 007 ()
  3095. END Test.
  3096. negative: calling constant integer indirectly
  3097. MODULE Test;
  3098. CONST Constant = 007;
  3099. BEGIN Constant
  3100. END Test.
  3101. negative: calling constant integer indirectly with parentheses
  3102. MODULE Test;
  3103. CONST Constant = 007;
  3104. BEGIN Constant ()
  3105. END Test.
  3106. positive: calling procedure with parameter and constant integer argument
  3107. MODULE Test;
  3108. PROCEDURE Procedure (value: INTEGER); END Procedure;
  3109. BEGIN Procedure (0);
  3110. END Test.
  3111. negative: calling procedure with variable parameter and constant integer argument
  3112. MODULE Test;
  3113. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  3114. BEGIN Procedure (1);
  3115. END Test.
  3116. positive: calling procedure with constant parameter and constant integer argument
  3117. MODULE Test;
  3118. PROCEDURE Procedure (CONST value: INTEGER); END Procedure;
  3119. BEGIN Procedure (2);
  3120. END Test.
  3121. # constant reals
  3122. positive: constant real in valid real range
  3123. MODULE Test;
  3124. CONST Result = 1.E10;
  3125. END Test.
  3126. positive: constant long real in valid long real range
  3127. MODULE Test;
  3128. CONST Result = 1.D10;
  3129. END Test.
  3130. negative: constant real exceeding valid real range
  3131. MODULE Test;
  3132. CONST Result = 1.E100;
  3133. END Test.
  3134. positive: constant long real exceeding valid real range
  3135. MODULE Test;
  3136. CONST Result = 1.D100;
  3137. END Test.
  3138. negative: constant real exceeding valid long range
  3139. MODULE Test;
  3140. CONST Result = 1.E500;
  3141. END Test.
  3142. negative: constant long real exceeding valid long real range
  3143. MODULE Test;
  3144. CONST Result = 1.D500;
  3145. END Test.
  3146. positive: arithmetic negation on constant real
  3147. MODULE Test;
  3148. CONST Result = -1.0;
  3149. BEGIN ASSERT (Result = -1);
  3150. END Test.
  3151. positive: multiple arithmetic negations on constant real
  3152. MODULE Test;
  3153. CONST Result = -(-(-1.0));
  3154. BEGIN ASSERT (Result = -1);
  3155. END Test.
  3156. negative: logical negation on constant real
  3157. MODULE Test;
  3158. CONST Result = ~1.D4;
  3159. END Test.
  3160. negative: dereferencing constant real
  3161. MODULE Test;
  3162. CONST Result = 2.7^;
  3163. END Test.
  3164. negative: dereferencing constant real indirectly
  3165. MODULE Test;
  3166. CONST Constant = 2.7;
  3167. CONST Result = Constant^;
  3168. END Test.
  3169. positive: addition on constant reals
  3170. MODULE Test;
  3171. CONST Result = 1.75 + 87.25;
  3172. BEGIN ASSERT (Result = 89);
  3173. END Test.
  3174. positive: subtraction on constant reals
  3175. MODULE Test;
  3176. CONST Result = 25.E-2 - 0.75
  3177. BEGIN ASSERT (Result = -0.5);
  3178. END Test.
  3179. positive: multiplication on constant reals
  3180. MODULE Test;
  3181. CONST Result = 0.5 * 1.5
  3182. BEGIN ASSERT (Result = 0.75);
  3183. END Test.
  3184. negative: integer division on constant reals
  3185. MODULE Test;
  3186. CONST Result = 3.E9 DIV 1.
  3187. END Test.
  3188. positive: real division on constant reals
  3189. MODULE Test;
  3190. CONST Result = 0.75 / 0.5
  3191. BEGIN ASSERT (Result = 1.5);
  3192. END Test.
  3193. negative: real division on constant reals by zero
  3194. MODULE Test;
  3195. CONST Result = 0.5 / 0.0
  3196. END Test.
  3197. negative: modulo on constant reals
  3198. MODULE Test;
  3199. CONST Result = 8.9 MOD 7.1
  3200. END Test.
  3201. positive: equal relation on constant reals
  3202. MODULE Test;
  3203. CONST Result = 1.0 = 5.E32
  3204. BEGIN ASSERT (Result = FALSE);
  3205. END Test.
  3206. positive: unequal relation on constant reals
  3207. MODULE Test;
  3208. CONST Result = 0.001 # 9.
  3209. BEGIN ASSERT (Result = TRUE);
  3210. END Test.
  3211. positive: less relation on constant reals
  3212. MODULE Test;
  3213. CONST Result = 1.0 < 97.4
  3214. BEGIN ASSERT (Result = TRUE);
  3215. END Test.
  3216. positive: less or equal relation on constant reals
  3217. MODULE Test;
  3218. CONST Result = 464.1 <= 9.E+7
  3219. BEGIN ASSERT (Result = TRUE);
  3220. END Test.
  3221. positive: greater relation on constant reals
  3222. MODULE Test;
  3223. CONST Result = 0.1 > 1.54
  3224. BEGIN ASSERT (Result = FALSE);
  3225. END Test.
  3226. positive: greater or equal relation on constant reals
  3227. MODULE Test;
  3228. CONST Result = 9.E9 >= 0.0
  3229. BEGIN ASSERT (Result = TRUE);
  3230. END Test.
  3231. negative: set membership on constant reals
  3232. MODULE Test;
  3233. CONST Result = 9.1 IN 1.0
  3234. END Test.
  3235. negative: type test on constant reals
  3236. MODULE Test;
  3237. CONST Result = 4.E9 IS 1.
  3238. END Test.
  3239. negative: type test on constant real
  3240. MODULE Test;
  3241. CONST Result = 4.E9 IS Real
  3242. END Test.
  3243. negative: type test on constant real type
  3244. MODULE Test;
  3245. TYPE Type = REAL;
  3246. CONST Result = 4.E9 IS Type
  3247. END Test.
  3248. negative: type guard on constant reals
  3249. MODULE Test;
  3250. CONST Result = 5.0(0.0)
  3251. END Test.
  3252. negative: indirect type guard on constant reals
  3253. MODULE Test;
  3254. CONST Constant = 5.0
  3255. CONST Result = Constant(Constant)
  3256. END Test.
  3257. negative: type guard on constant real
  3258. MODULE Test;
  3259. CONST Result = 5.0(REAL)
  3260. END Test.
  3261. negative: indirect type guard on constant real
  3262. MODULE Test;
  3263. CONST Constant = 5.0
  3264. CONST Result = Constant(REAL)
  3265. END Test.
  3266. negative: type guard on constant real type
  3267. MODULE Test;
  3268. TYPE Type = REAL;
  3269. CONST Result = 5.0(Type)
  3270. END Test.
  3271. negative: indirect type guard on constant real type
  3272. MODULE Test;
  3273. CONST Constant = 5.0
  3274. TYPE Type = REAL;
  3275. CONST Result = Constant(Type)
  3276. END Test.
  3277. negative: logical and on constant reals
  3278. MODULE Test;
  3279. CONST Result = 9.D54 & 1.974D+9
  3280. END Test.
  3281. negative: logical or on constant reals
  3282. MODULE Test;
  3283. CONST Result = 0.4 OR 0.
  3284. END Test.
  3285. negative: ordinal value of constant real
  3286. MODULE Test;
  3287. CONST Result = ORD (84.4)
  3288. END Test.
  3289. negative: character value of constant real
  3290. MODULE Test;
  3291. CONST Result = CHR (67.4)
  3292. END Test.
  3293. positive: absolute value of constant real
  3294. MODULE Test;
  3295. CONST Result = ABS (-67.4)
  3296. BEGIN ASSERT (Result >= 0);
  3297. END Test.
  3298. negative: odd test on constant real
  3299. MODULE Test;
  3300. CONST Result = ODD (2.5)
  3301. END Test.
  3302. negative: capital letter of constant real
  3303. MODULE Test;
  3304. CONST Result = CAP (-0.5)
  3305. END Test.
  3306. positive: minimal value of real
  3307. MODULE Test;
  3308. CONST A = MIN (REAL); B = MIN (LONGREAL)
  3309. END Test.
  3310. positive: maximal value of real
  3311. MODULE Test;
  3312. CONST A = MAX (REAL); B = MAX (LONGREAL)
  3313. END Test.
  3314. negative: arithmetic shift of constant reals
  3315. MODULE Test;
  3316. CONST Result = ASH (64.5, 3.4)
  3317. END Test.
  3318. negative: short on constant real
  3319. MODULE Test;
  3320. CONST Result = SHORT (5.4)
  3321. END Test.
  3322. positive: short on constant long real
  3323. MODULE Test;
  3324. CONST Result = SHORT (5.0D300)
  3325. END Test.
  3326. positive: long on constant real
  3327. MODULE Test;
  3328. CONST Result = LONG (5.4)
  3329. END Test.
  3330. negative: long on constant long real
  3331. MODULE Test;
  3332. CONST Result = LONG (5.0D300)
  3333. END Test.
  3334. positive: entier on constant real
  3335. MODULE Test;
  3336. CONST Result = ENTIER (5.4)
  3337. END Test.
  3338. positive: entier on constant long real
  3339. MODULE Test;
  3340. CONST Result = ENTIER (5.0D300)
  3341. END Test.
  3342. negative: unary length of constant real
  3343. MODULE Test;
  3344. CONST Result = LEN (0.123)
  3345. END Test.
  3346. negative: binary length of constant real
  3347. MODULE Test;
  3348. CONST Result = LEN (0.123, 0)
  3349. END Test.
  3350. negative: indexing constant real
  3351. MODULE Test;
  3352. CONST Result = 9.7[0]
  3353. END Test.
  3354. negative: indexing constant real indirectly
  3355. MODULE Test;
  3356. CONST Constant = 9.7;
  3357. CONST Result = Constant[0]
  3358. END Test.
  3359. negative: constant real as index
  3360. MODULE Test;
  3361. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3362. BEGIN result := array[9.7]
  3363. END Test.
  3364. negative: member selection on constant real
  3365. MODULE Test;
  3366. CONST Result = 654.654.member
  3367. END Test.
  3368. negative: indirect member selection on constant real
  3369. MODULE Test;
  3370. CONST Constant = 654.654;
  3371. CONST Result = Constant.member
  3372. END Test.
  3373. negative: calling constant real
  3374. MODULE Test;
  3375. BEGIN 1.23 ()
  3376. END Test.
  3377. negative: calling constant real indirectly
  3378. MODULE Test;
  3379. CONST Constant = 1.23;
  3380. BEGIN Constant
  3381. END Test.
  3382. negative: calling constant real indirectly with parentheses
  3383. MODULE Test;
  3384. CONST Constant = 1.23;
  3385. BEGIN Constant ()
  3386. END Test.
  3387. positive: calling procedure with parameter and constant real argument
  3388. MODULE Test;
  3389. PROCEDURE Procedure (value: REAL); END Procedure;
  3390. BEGIN Procedure (0.0);
  3391. END Test.
  3392. negative: calling procedure with variable parameter and constant real argument
  3393. MODULE Test;
  3394. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  3395. BEGIN Procedure (1.1);
  3396. END Test.
  3397. positive: calling procedure with constant parameter and constant real argument
  3398. MODULE Test;
  3399. PROCEDURE Procedure (CONST value: REAL); END Procedure;
  3400. BEGIN Procedure (2.2);
  3401. END Test.
  3402. # constant set
  3403. positive: empty constant set
  3404. MODULE Test;
  3405. CONST Result = {};
  3406. END Test.
  3407. negative: constant boolean as set element
  3408. MODULE Test;
  3409. CONST Result = {FALSE};
  3410. END Test.
  3411. negative: constant character as set element
  3412. MODULE Test;
  3413. CONST Result = {'a'};
  3414. END Test.
  3415. positive: constant integer constant as set element
  3416. MODULE Test;
  3417. CONST Result = {10};
  3418. BEGIN ASSERT (Result = {10});
  3419. END Test.
  3420. negative: constant real as set element
  3421. MODULE Test;
  3422. CONST Result = {45.4};
  3423. END Test.
  3424. negative: constant set as set element
  3425. MODULE Test;
  3426. CONST Result = {{}};
  3427. END Test.
  3428. negative: constant string as set element
  3429. MODULE Test;
  3430. CONST Result = {"string"};
  3431. END Test.
  3432. negative: constant set element exceeding valid range
  3433. MODULE Test;
  3434. CONST Result = {100};
  3435. END Test.
  3436. negative: negative constant set element
  3437. MODULE Test;
  3438. CONST Result = {-1};
  3439. END Test.
  3440. positive: several equal constant set elements
  3441. MODULE Test;
  3442. CONST Result = {0, 0, 0};
  3443. BEGIN ASSERT (Result = {0});
  3444. END Test.
  3445. positive: several different constant set elements
  3446. MODULE Test;
  3447. CONST Result = {0, 1, 2};
  3448. BEGIN ASSERT (Result = {0..2});
  3449. END Test.
  3450. positive: constant set element range
  3451. MODULE Test;
  3452. CONST Result = {5..6};
  3453. BEGIN ASSERT (Result = {5, 6});
  3454. END Test.
  3455. positive: constant set element range with single element
  3456. MODULE Test;
  3457. CONST Result = {6..6};
  3458. BEGIN ASSERT (Result = {6});
  3459. END Test.
  3460. positive: empty constant set element range
  3461. MODULE Test;
  3462. CONST Result = {3..2};
  3463. BEGIN ASSERT (Result = {});
  3464. END Test.
  3465. negative: empty constant set element range with negative start element
  3466. MODULE Test;
  3467. CONST Result = {-1..2};
  3468. END Test.
  3469. negative: empty constant set element range with negative end element
  3470. MODULE Test;
  3471. CONST Result = {3..-4};
  3472. END Test.
  3473. positive: relations on constant sets
  3474. MODULE Test;
  3475. BEGIN
  3476. ASSERT ({1..3,5} <= {1..3,5});
  3477. ASSERT (~({1..3,5,6} < {1..3,5,8}));
  3478. ASSERT (~({1..3,5,6} <= {1..3,5,8}));
  3479. ASSERT (~({1..3,5,6} > {1..3,5,8}));
  3480. ASSERT (~({1..3,5,6} >= {1..3,5,8}));
  3481. ASSERT ({1..3,5} < {1..3,5,7});
  3482. ASSERT ({1..3,5} > {1..3});
  3483. ASSERT ({1..3,5,7} >= {1..3,5,7});
  3484. ASSERT ({1..3,5} = {1..3,5});
  3485. ASSERT ({1..3,5,8} # {1..3,5,7});
  3486. END Test.
  3487. positive: complement on constant set
  3488. MODULE Test;
  3489. CONST Result = -{4, 9};
  3490. BEGIN ASSERT (Result = -{4, 9});
  3491. END Test.
  3492. positive: multiple complements on constant set
  3493. MODULE Test;
  3494. CONST Result = -(-(-{5}));
  3495. BEGIN ASSERT (Result = -{5});
  3496. END Test.
  3497. negative: logical negation on constant set
  3498. MODULE Test;
  3499. CONST Result = ~{};
  3500. END Test.
  3501. negative: dereferencing constant set
  3502. MODULE Test;
  3503. CONST Result = {2..5}^;
  3504. END Test.
  3505. negative: dereferencing constant set indirectly
  3506. MODULE Test;
  3507. CONST Constant = {2..5};
  3508. CONST Result = Constant^;
  3509. END Test.
  3510. positive: union on constant sets
  3511. MODULE Test;
  3512. CONST Result = {4, 6} + {9};
  3513. BEGIN ASSERT (Result = {4, 6, 9});
  3514. END Test.
  3515. positive: difference on constant sets
  3516. MODULE Test;
  3517. CONST Result = {7, 2} - {2..1}
  3518. BEGIN ASSERT (Result = {2, 7});
  3519. END Test.
  3520. positive: intersection on constant sets
  3521. MODULE Test;
  3522. CONST Result = {7..9} * {6..7}
  3523. BEGIN ASSERT (Result = {7});
  3524. END Test.
  3525. negative: integer division on constant sets
  3526. MODULE Test;
  3527. CONST Result = {8} DIV {}
  3528. END Test.
  3529. positive: symmetric difference on constant sets
  3530. MODULE Test;
  3531. CONST Result = {4..9} / {5,4,3,2,1}
  3532. BEGIN ASSERT (Result = {1..3, 6..9});
  3533. END Test.
  3534. negative: modulo on constant sets
  3535. MODULE Test;
  3536. CONST Result = {7} MOD {0}
  3537. END Test.
  3538. positive: equal relation on constant sets
  3539. MODULE Test;
  3540. CONST Result = {4} = {}
  3541. BEGIN ASSERT (Result = FALSE);
  3542. END Test.
  3543. positive: unequal relation on constant sets
  3544. MODULE Test;
  3545. CONST Result = {9, 5} # {0..5}
  3546. BEGIN ASSERT (Result = TRUE);
  3547. END Test.
  3548. positive: less relation on constant sets
  3549. MODULE Test;
  3550. CONST Result = {9} < {7}
  3551. BEGIN ASSERT (Result = FALSE);
  3552. END Test.
  3553. positive: less or equal relation on constant sets
  3554. MODULE Test;
  3555. CONST Result = {8} <= {8}
  3556. BEGIN ASSERT (Result = TRUE);
  3557. END Test.
  3558. positive: greater relation on constant sets
  3559. MODULE Test;
  3560. CONST Result = {0..5} > {0..2}
  3561. BEGIN ASSERT (Result = TRUE);
  3562. END Test.
  3563. positive: greater or equal relation on constant sets
  3564. MODULE Test;
  3565. CONST Result = {4} >= {4..4}
  3566. BEGIN ASSERT (Result = TRUE);
  3567. END Test.
  3568. negative: set membership on constant sets
  3569. MODULE Test;
  3570. CONST Result = {9} IN {1}
  3571. END Test.
  3572. positive: set membership on integer and constant set
  3573. MODULE Test;
  3574. CONST Result = 3 IN {2}
  3575. BEGIN ASSERT (Result = FALSE);
  3576. END Test.
  3577. negative: type test on constant sets
  3578. MODULE Test;
  3579. CONST Result = {7} IS {}
  3580. END Test.
  3581. negative: type test on constant set
  3582. MODULE Test;
  3583. CONST Result = {7} IS Set
  3584. END Test.
  3585. negative: type test on constant set type
  3586. MODULE Test;
  3587. TYPE Type = Set;
  3588. CONST Result = {7} IS Type
  3589. END Test.
  3590. negative: type guard on constant sets
  3591. MODULE Test;
  3592. CONST Result = {}({4})
  3593. END Test.
  3594. negative: indirect type guard on constant sets
  3595. MODULE Test;
  3596. CONST Constant = {}
  3597. CONST Result = Constant(Constant)
  3598. END Test.
  3599. negative: type guard on constant set
  3600. MODULE Test;
  3601. CONST Result = {}(SET)
  3602. END Test.
  3603. negative: indirect type guard on constant set
  3604. MODULE Test;
  3605. CONST Constant = {}
  3606. CONST Result = Constant(SET)
  3607. END Test.
  3608. negative: type guard on constant set type
  3609. MODULE Test;
  3610. TYPE Type = SET;
  3611. CONST Result = {}(Type)
  3612. END Test.
  3613. negative: indirect type guard on constant set type
  3614. MODULE Test;
  3615. CONST Constant = {}
  3616. TYPE Type = SET;
  3617. CONST Result = Constant(Type)
  3618. END Test.
  3619. negative: logical and on constant sets
  3620. MODULE Test;
  3621. CONST Result = {0..7} & {7}
  3622. END Test.
  3623. negative: logical or on constant sets
  3624. MODULE Test;
  3625. CONST Result = {8} OR {}
  3626. END Test.
  3627. negative: ordinal value of constant set
  3628. MODULE Test;
  3629. CONST Result = ORD ({5})
  3630. END Test.
  3631. negative: character value of constant set
  3632. MODULE Test;
  3633. CONST Result = CHR ({1..4})
  3634. END Test.
  3635. negative: absolute value of constant set
  3636. MODULE Test;
  3637. CONST Result = ABS ({1..4})
  3638. END Test.
  3639. negative: odd test on constant set
  3640. MODULE Test;
  3641. CONST Result = ODD ({})
  3642. END Test.
  3643. negative: capital letter of constant set
  3644. MODULE Test;
  3645. CONST Result = CAP ({2..9})
  3646. END Test.
  3647. positive: minimal value of set
  3648. MODULE Test;
  3649. CONST Result = MIN (SET)
  3650. BEGIN ASSERT (Result = 0);
  3651. END Test.
  3652. positive: maximal value of set
  3653. MODULE Test;
  3654. CONST Result = MAX (SET)
  3655. BEGIN ASSERT (Result = SIZEOF (SET) * 8 - 1)
  3656. END Test.
  3657. negative: arithmetic shift of constant set
  3658. MODULE Test;
  3659. CONST Result = ASH ({6}, {})
  3660. END Test.
  3661. negative: short on constant set
  3662. MODULE Test;
  3663. CONST Result = SHORT ({4, 2})
  3664. END Test.
  3665. negative: long on constant set
  3666. MODULE Test;
  3667. CONST Result = LONG ({4, 2})
  3668. END Test.
  3669. negative: entier on constant set
  3670. MODULE Test;
  3671. CONST Result = ENTIER ({4, 2})
  3672. END Test.
  3673. negative: unary length of constant set
  3674. MODULE Test;
  3675. CONST Result = LEN ({0,3})
  3676. END Test.
  3677. negative: binary length of constant set
  3678. MODULE Test;
  3679. CONST Result = LEN ({0,3}, 0)
  3680. END Test.
  3681. negative: indexing constant set
  3682. MODULE Test;
  3683. CONST Result = {1}[0]
  3684. END Test.
  3685. negative: indexing constant set indirectly
  3686. MODULE Test;
  3687. CONST Constant = {1};
  3688. CONST Result = Constant[0]
  3689. END Test.
  3690. negative: constant set as index
  3691. MODULE Test;
  3692. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3693. BEGIN result := array[{1}]
  3694. END Test.
  3695. negative: member selection on constant set
  3696. MODULE Test;
  3697. CONST Result = {2}.member
  3698. END Test.
  3699. negative: indirect member selection on constant set
  3700. MODULE Test;
  3701. CONST Constant = {2};
  3702. CONST Result = Constant.member
  3703. END Test.
  3704. negative: calling constant set
  3705. MODULE Test;
  3706. BEGIN {} ()
  3707. END Test.
  3708. negative: calling constant set indirectly
  3709. MODULE Test;
  3710. CONST Constant = {};
  3711. BEGIN Constant
  3712. END Test.
  3713. negative: calling constant set indirectly with parentheses
  3714. MODULE Test;
  3715. CONST Constant = {};
  3716. BEGIN Constant ()
  3717. END Test.
  3718. positive: calling procedure with parameter and constant set argument
  3719. MODULE Test;
  3720. PROCEDURE Procedure (value: SET); END Procedure;
  3721. BEGIN Procedure ({0});
  3722. END Test.
  3723. negative: calling procedure with variable parameter and constant set argument
  3724. MODULE Test;
  3725. PROCEDURE Procedure (VAR value: SET); END Procedure;
  3726. BEGIN Procedure ({4..6});
  3727. END Test.
  3728. positive: calling procedure with constant parameter and constant set argument
  3729. MODULE Test;
  3730. PROCEDURE Procedure (CONST value: SET); END Procedure;
  3731. BEGIN Procedure ({1,2});
  3732. END Test.
  3733. # constant strings
  3734. positive: empty constant string
  3735. MODULE Test;
  3736. CONST Result = "";
  3737. END Test.
  3738. negative: arithmetic negation on constant string
  3739. MODULE Test;
  3740. CONST Result = -"123";
  3741. END Test.
  3742. negative: logical negation on constant string
  3743. MODULE Test;
  3744. CONST Result = ~"invalid";
  3745. END Test.
  3746. negative: dereferencing constant string
  3747. MODULE Test;
  3748. CONST Result = "string"^;
  3749. END Test.
  3750. negative: dereferencing constant string indirectly
  3751. MODULE Test;
  3752. CONST Constant = "string";
  3753. CONST Result = Constant^;
  3754. END Test.
  3755. negative: addition on constant strings
  3756. MODULE Test;
  3757. CONST Result = "hello" + "world";
  3758. END Test.
  3759. negative: subtraction on constant strings
  3760. MODULE Test;
  3761. CONST Result = "nice" - "try"
  3762. END Test.
  3763. negative: multiplication on constant strings
  3764. MODULE Test;
  3765. CONST Result = "multiplication" * "disallowed"
  3766. END Test.
  3767. negative: integer division on constant strings
  3768. MODULE Test;
  3769. CONST Result = "abc" DIV "ABC"
  3770. END Test.
  3771. negative: real division on constant strings
  3772. MODULE Test;
  3773. CONST Result = "007" / "008"
  3774. END Test.
  3775. negative: modulo on constant strings
  3776. MODULE Test;
  3777. CONST Result = "one" MOD "two"
  3778. END Test.
  3779. positive: equal relation on constant strings
  3780. MODULE Test;
  3781. CONST Result = "string" = "gnirts"
  3782. BEGIN ASSERT (Result = FALSE);
  3783. END Test.
  3784. positive: unequal relation on constant strings
  3785. MODULE Test;
  3786. CONST Result = "qwerty" # "ytrewq"
  3787. BEGIN ASSERT (Result = TRUE);
  3788. END Test.
  3789. positive: less relation on constant strings
  3790. MODULE Test;
  3791. CONST Result = "av" < "bv"
  3792. BEGIN ASSERT (Result = TRUE);
  3793. END Test.
  3794. positive: less or equal relation on constant strings
  3795. MODULE Test;
  3796. CONST Result = "word1" <= "word2"
  3797. BEGIN ASSERT (Result = TRUE);
  3798. END Test.
  3799. positive: greater relation on constant strings
  3800. MODULE Test;
  3801. CONST Result = "lower" > "UPPER"
  3802. BEGIN ASSERT (Result = TRUE);
  3803. END Test.
  3804. positive: greater or equal relation on constant strings
  3805. MODULE Test;
  3806. CONST Result = "number" >= "text"
  3807. BEGIN ASSERT (Result = FALSE);
  3808. END Test.
  3809. negative: set membership on constant strings
  3810. MODULE Test;
  3811. CONST Result = "name" IN "ninety"
  3812. END Test.
  3813. negative: type test on constant strings
  3814. MODULE Test;
  3815. CONST Result = "not" IS "supported"
  3816. END Test.
  3817. negative: type test on constant string
  3818. MODULE Test;
  3819. CONST Result = "not" IS ARRAY OF CHAR
  3820. END Test.
  3821. negative: type test on string type
  3822. MODULE Test;
  3823. TYPE Type = ARRAY OF CHAR;
  3824. CONST Result = "not" IS Type
  3825. END Test.
  3826. negative: type guard on constant strings
  3827. MODULE Test;
  3828. CONST Result = "type"("guard")
  3829. END Test.
  3830. negative: indirect type guard on constant strings
  3831. MODULE Test;
  3832. CONST Constant = "type"
  3833. CONST Result = Constant(Constant)
  3834. END Test.
  3835. negative: type guard on constant string
  3836. MODULE Test;
  3837. CONST Result = "type"(ARRAY OF CHAR)
  3838. END Test.
  3839. negative: indirect type guard on constant string
  3840. MODULE Test;
  3841. CONST Constant = "type"
  3842. CONST Result = Constant(ARRAY OF CHAR)
  3843. END Test.
  3844. negative: type guard on string type
  3845. MODULE Test;
  3846. TYPE Type = ARRAY OF CHAR;
  3847. CONST Result = "type"(Type)
  3848. END Test.
  3849. negative: indirect type guard on string type
  3850. MODULE Test;
  3851. CONST Constant = "type"
  3852. TYPE Type = ARRAY OF CHAR;
  3853. CONST Result = Constant(Type)
  3854. END Test.
  3855. negative: logical and on constant strings
  3856. MODULE Test;
  3857. CONST Result = "oh" & "dear"
  3858. END Test.
  3859. negative: logical or on constant strings
  3860. MODULE Test;
  3861. CONST Result = "last" OR "one"
  3862. END Test.
  3863. negative: ordinal value of constant string
  3864. MODULE Test;
  3865. CONST Result = ORD ("ORD")
  3866. END Test.
  3867. negative: character value of constant string
  3868. MODULE Test;
  3869. CONST Result = CHR ("CHR")
  3870. END Test.
  3871. negative: absolute value of constant string
  3872. MODULE Test;
  3873. CONST Result = ABS ("ABS")
  3874. END Test.
  3875. negative: odd test on constant string
  3876. MODULE Test;
  3877. CONST Result = ODD ("ODD")
  3878. END Test.
  3879. negative: capital letter of constant string
  3880. MODULE Test;
  3881. CONST Result = CAP ("lowercase")
  3882. END Test.
  3883. negative: arithmetic shift of constant string
  3884. MODULE Test;
  3885. CONST Result = ASH ("shift", "me")
  3886. END Test.
  3887. negative: short on constant string
  3888. MODULE Test;
  3889. CONST Result = SHORT ("integer")
  3890. END Test.
  3891. negative: long on constant string
  3892. MODULE Test;
  3893. CONST Result = LONG ("integer")
  3894. END Test.
  3895. negative: entier on constant string
  3896. MODULE Test;
  3897. CONST Result = ENTIER ("real")
  3898. END Test.
  3899. negative: unary length of constant string
  3900. MODULE Test;
  3901. CONST Result = LEN ("abc")
  3902. END Test.
  3903. negative: binary length of constant string
  3904. MODULE Test;
  3905. CONST Result = LEN ("abc", 0)
  3906. END Test.
  3907. negative: indexing constant string
  3908. MODULE Test;
  3909. CONST Result = "string"[0]
  3910. END Test.
  3911. negative: indexing constant string indirectly
  3912. MODULE Test;
  3913. CONST Constant = "string";
  3914. CONST Result = Constant[0]
  3915. END Test.
  3916. negative: constant string as index
  3917. MODULE Test;
  3918. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3919. BEGIN result := array["string"]
  3920. END Test.
  3921. negative: member selection on constant string
  3922. MODULE Test;
  3923. CONST Result = "record".member
  3924. END Test.
  3925. negative: indirect member selection on constant string
  3926. MODULE Test;
  3927. CONST Constant = "record";
  3928. CONST Result = Constant.member
  3929. END Test.
  3930. negative: calling constant string
  3931. MODULE Test;
  3932. BEGIN "asdf" ()
  3933. END Test.
  3934. negative: calling constant string indirectly
  3935. MODULE Test;
  3936. CONST Constant = "asdf";
  3937. BEGIN Constant
  3938. END Test.
  3939. negative: calling constant string indirectly with parentheses
  3940. MODULE Test;
  3941. CONST Constant = "asdf";
  3942. BEGIN Constant ()
  3943. END Test.
  3944. positive: calling procedure with parameter and constant string argument
  3945. MODULE Test;
  3946. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  3947. BEGIN Procedure ("argument");
  3948. END Test.
  3949. negative: calling procedure with variable parameter and constant string argument
  3950. MODULE Test;
  3951. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  3952. BEGIN Procedure ("argument");
  3953. END Test.
  3954. positive: calling procedure with constant parameter and constant string argument
  3955. MODULE Test;
  3956. PROCEDURE Procedure (CONST value: ARRAY OF CHAR); END Procedure;
  3957. BEGIN Procedure ("argument");
  3958. END Test.
  3959. # constant nil pointers
  3960. negative: arithmetic negation on nil pointer
  3961. MODULE Test;
  3962. CONST Result = -NIL;
  3963. END Test.
  3964. negative: logical negation on nil pointer
  3965. MODULE Test;
  3966. CONST Result = ~NIL;
  3967. END Test.
  3968. negative: multiple logical negations on nil pointer
  3969. MODULE Test;
  3970. CONST Result = ~~~~NIL;
  3971. END Test.
  3972. negative: dereferencing nil pointer
  3973. MODULE Test;
  3974. CONST Result = NIL^;
  3975. END Test.
  3976. negative: dereferencing constant nil pointer indirectly
  3977. MODULE Test;
  3978. CONST Constant = NIL;
  3979. CONST Result = Constant^;
  3980. END Test.
  3981. negative: addition on nil pointer
  3982. MODULE Test;
  3983. CONST Result = NIL + NIL;
  3984. END Test.
  3985. negative: subtraction on nil pointer
  3986. MODULE Test;
  3987. CONST Result = NIL - NIL
  3988. END Test.
  3989. negative: multiplication on nil pointer
  3990. MODULE Test;
  3991. CONST Result = NIL * NIL
  3992. END Test.
  3993. negative: integer division on nil pointer
  3994. MODULE Test;
  3995. CONST Result = NIL DIV NIL
  3996. END Test.
  3997. negative: real division on nil pointer
  3998. MODULE Test;
  3999. CONST Result = NIL / NIL
  4000. END Test.
  4001. negative: modulo on nil pointer
  4002. MODULE Test;
  4003. CONST Result = NIL MOD NIL
  4004. END Test.
  4005. positive: equal relation on nil pointer
  4006. MODULE Test;
  4007. CONST Result = NIL = NIL
  4008. BEGIN ASSERT (Result = TRUE);
  4009. END Test.
  4010. positive: unequal relation on nil pointer
  4011. MODULE Test;
  4012. CONST Result = NIL # NIL
  4013. BEGIN ASSERT (Result = FALSE);
  4014. END Test.
  4015. negative: less relation on nil pointer
  4016. MODULE Test;
  4017. CONST Result = NIL < NIL
  4018. END Test.
  4019. negative: less or equal relation on nil pointer
  4020. MODULE Test;
  4021. CONST Result = NIL <= NIL
  4022. END Test.
  4023. negative: greater relation on nil pointer
  4024. MODULE Test;
  4025. CONST Result = NIL > NIL
  4026. END Test.
  4027. negative: greater or equal relation on nil pointer
  4028. MODULE Test;
  4029. CONST Result = NIL >= NIL
  4030. END Test.
  4031. negative: set membership on nil pointer
  4032. MODULE Test;
  4033. CONST Result = NIL IN NIL
  4034. END Test.
  4035. negative: type test on nil pointers
  4036. MODULE Test;
  4037. CONST Result = NIL IS NIL
  4038. END Test.
  4039. negative: type test on nil pointer
  4040. MODULE Test;
  4041. CONST Result = NIL IS OBJECT
  4042. END Test.
  4043. negative: type test on nil pointer type
  4044. MODULE Test;
  4045. TYPE Type = OBJECT;
  4046. CONST Result = NIL IS Type
  4047. END Test.
  4048. negative: type guard on nil pointers
  4049. MODULE Test;
  4050. CONST Result = NIL(NIL)
  4051. END Test.
  4052. negative: indirect type guard on nil pointers
  4053. MODULE Test;
  4054. CONST Constant = NIL
  4055. CONST Result = Constant(Constant)
  4056. END Test.
  4057. negative: type guard on nil pointer
  4058. MODULE Test;
  4059. CONST Result = NIL(OBJECT)
  4060. END Test.
  4061. negative: indirect type guard on nil pointer
  4062. MODULE Test;
  4063. CONST Constant = NIL
  4064. CONST Result = Constant(NIL)
  4065. END Test.
  4066. negative: type guard on nil pointer type
  4067. MODULE Test;
  4068. TYPE Type = OBJECT;
  4069. CONST Result = NIL(Type)
  4070. END Test.
  4071. negative: indirect type guard on nil pointer type
  4072. MODULE Test;
  4073. CONST Constant = NIL
  4074. TYPE Type = OBJECT;
  4075. CONST Result = Constant(Type)
  4076. END Test.
  4077. negative: logical and on nil pointer
  4078. MODULE Test;
  4079. CONST Result = NIL & NIL
  4080. END Test.
  4081. negative: logical or on nil pointer
  4082. MODULE Test;
  4083. CONST Result = NIL OR NIL
  4084. END Test.
  4085. negative: ordinal value of nil pointer
  4086. MODULE Test;
  4087. CONST Result = ORD (NIL)
  4088. END Test.
  4089. negative: character value of nil pointer
  4090. MODULE Test;
  4091. CONST Result = CHR (NIL)
  4092. END Test.
  4093. negative: absolute value of nil pointer
  4094. MODULE Test;
  4095. CONST Result = ABS (NIL)
  4096. END Test.
  4097. negative: odd test on nil pointer
  4098. MODULE Test;
  4099. CONST Result = ODD (NIL)
  4100. END Test.
  4101. negative: capital letter of nil pointer
  4102. MODULE Test;
  4103. CONST Result = CAP (NIL)
  4104. END Test.
  4105. negative: arithmetic shift of nil pointer
  4106. MODULE Test;
  4107. CONST Result = ASH (NIL, NIL)
  4108. END Test.
  4109. negative: short on nil pointer
  4110. MODULE Test;
  4111. CONST Result = SHORT (NIL)
  4112. END Test.
  4113. negative: long on nil pointer
  4114. MODULE Test;
  4115. CONST Result = LONG (NIL)
  4116. END Test.
  4117. negative: entier on nil pointer
  4118. MODULE Test;
  4119. CONST Result = ENTIER (NIL)
  4120. END Test.
  4121. negative: unary length of nil pointer
  4122. MODULE Test;
  4123. CONST Result = LEN (NIL)
  4124. END Test.
  4125. negative: binary length of nil pointer
  4126. MODULE Test;
  4127. CONST Result = LEN (NIL, 0)
  4128. END Test.
  4129. negative: indexing nil pointer
  4130. MODULE Test;
  4131. CONST Result = NIL[0]
  4132. END Test.
  4133. negative: indexing nil pointer indirectly
  4134. MODULE Test;
  4135. CONST Constant = NIL;
  4136. CONST Result = Constant[0]
  4137. END Test.
  4138. negative: nil pointer as index
  4139. MODULE Test;
  4140. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  4141. BEGIN result := array[NIL]
  4142. END Test.
  4143. negative: member selection on nil pointer
  4144. MODULE Test;
  4145. CONST Result = NIL.member
  4146. END Test.
  4147. negative: indirect member selection on nil pointer
  4148. MODULE Test;
  4149. CONST Constant = NIL;
  4150. CONST Result = Constant.member
  4151. END Test.
  4152. negative: calling nil pointer
  4153. MODULE Test;
  4154. BEGIN NIL ()
  4155. END Test.
  4156. negative: calling nil pointer indirectly
  4157. MODULE Test;
  4158. CONST Constant = NIL;
  4159. BEGIN Constant
  4160. END Test.
  4161. negative: calling nil pointer indirectly with parentheses
  4162. MODULE Test;
  4163. CONST Constant = NIL;
  4164. BEGIN Constant ()
  4165. END Test.
  4166. positive: calling procedure with parameter and nil pointer argument
  4167. MODULE Test;
  4168. PROCEDURE Procedure (value: OBJECT); END Procedure;
  4169. BEGIN Procedure (NIL);
  4170. END Test.
  4171. negative: calling procedure with variable parameter and nil pointer argument
  4172. MODULE Test;
  4173. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  4174. BEGIN Procedure (NIL);
  4175. END Test.
  4176. positive: calling procedure with constant parameter and nil pointer argument
  4177. MODULE Test;
  4178. PROCEDURE Procedure (CONST value: OBJECT); END Procedure;
  4179. BEGIN Procedure (NIL);
  4180. END Test.
  4181. # implicit constant conversions
  4182. positive: implicit constant short to integer conversion
  4183. MODULE Test;
  4184. CONST Result = 10H + 1000H
  4185. END Test.
  4186. positive: implicit constant short to long integer conversion
  4187. MODULE Test;
  4188. CONST Result = 10H * 100000H
  4189. END Test.
  4190. positive: implicit constant short to huge integer conversion
  4191. MODULE Test;
  4192. CONST Result = 10H DIV 100000000H
  4193. END Test.
  4194. positive: implicit constant integer to long integer conversion
  4195. MODULE Test;
  4196. CONST Result = 1000H - 100000H
  4197. END Test.
  4198. positive: implicit constant integer to huge integer conversion
  4199. MODULE Test;
  4200. CONST Result = 1000H * 100000000H
  4201. END Test.
  4202. positive: implicit constant long to huge integer conversion
  4203. MODULE Test;
  4204. CONST Result = 100000H + 100000000H
  4205. END Test.
  4206. positive: implicit constant integer to real conversion
  4207. MODULE Test;
  4208. CONST Result = 4 + 5.0
  4209. END Test.
  4210. positive: implicit constant integer to long real conversion
  4211. MODULE Test;
  4212. CONST Result = 4.5D127 / 54
  4213. END Test.
  4214. positive: implicit constant real to long real conversion
  4215. MODULE Test;
  4216. CONST Result = 1.2 * 1.7D247
  4217. END Test.
  4218. negative: implicit conversion between constant boolean and character
  4219. MODULE Test;
  4220. CONST Result = TRUE = 's'
  4221. END Test.
  4222. negative: implicit conversion between constant boolean and integer
  4223. MODULE Test;
  4224. CONST Result = TRUE # 5
  4225. END Test.
  4226. negative: implicit conversion between constant boolean and real
  4227. MODULE Test;
  4228. CONST Result = FALSE = 1.0E4
  4229. END Test.
  4230. negative: implicit conversion between constant boolean and set
  4231. MODULE Test;
  4232. CONST Result = TRUE = {3}
  4233. END Test.
  4234. negative: implicit conversion between constant boolean and string
  4235. MODULE Test;
  4236. CONST Result = TRUE = "adsf"
  4237. END Test.
  4238. negative: implicit conversion between constant boolean and nil pointer
  4239. MODULE Test;
  4240. CONST Result = FALSE = NIL
  4241. END Test.
  4242. negative: implicit conversion between constant character and integer
  4243. MODULE Test;
  4244. CONST Result = 's' # 2
  4245. END Test.
  4246. negative: implicit conversion between constant character and real
  4247. MODULE Test;
  4248. CONST Result = 't' # 1.0
  4249. END Test.
  4250. negative: implicit conversion between constant character and set
  4251. MODULE Test;
  4252. CONST Result = 0X = {}
  4253. END Test.
  4254. negative: implicit conversion between constant character and string
  4255. MODULE Test;
  4256. CONST Result = 0X # "string"
  4257. END Test.
  4258. negative: implicit conversion between constant character and nil pointer
  4259. MODULE Test;
  4260. CONST Result = 45X # NIL
  4261. END Test.
  4262. positive: implicit conversion between constant integer and real
  4263. MODULE Test;
  4264. CONST Result = 54 # 2.0
  4265. END Test.
  4266. negative: implicit conversion between constant integer and set
  4267. MODULE Test;
  4268. CONST Result = 0 = {5}
  4269. END Test.
  4270. negative: implicit conversion between constant integer and string
  4271. MODULE Test;
  4272. CONST Result = 9 # "text"
  4273. END Test.
  4274. negative: implicit conversion between constant integer and nil pointer
  4275. MODULE Test;
  4276. CONST Result = 5 # NIL
  4277. END Test.
  4278. negative: implicit conversion between constant real and set
  4279. MODULE Test;
  4280. CONST Result = 54.1 = {0..4}
  4281. END Test.
  4282. negative: implicit conversion between constant real and string
  4283. MODULE Test;
  4284. CONST Result = 0.0 = "zero"
  4285. END Test.
  4286. negative: implicit conversion between constant real and nil pointer
  4287. MODULE Test;
  4288. CONST Result = 5.5 = NIL
  4289. END Test.
  4290. negative: implicit conversion between constant set and string
  4291. MODULE Test;
  4292. CONST Result = {9} # "value"
  4293. END Test.
  4294. negative: implicit conversion between constant set and nil pointer
  4295. MODULE Test;
  4296. CONST Result = {} # NIL
  4297. END Test.
  4298. negative: implicit conversion between constant string and nil pointer
  4299. MODULE Test;
  4300. CONST Result = "NIL" # NIL
  4301. END Test.
  4302. # explicit constant conversions
  4303. positive: explicit constant short integer to integer conversion
  4304. MODULE Test;
  4305. CONST Result = LONG (12H)
  4306. BEGIN ASSERT (Result = 12H)
  4307. END Test.
  4308. positive: explicit constant short to long integer conversion
  4309. MODULE Test;
  4310. CONST Result = LONG (LONG (12H))
  4311. BEGIN ASSERT (Result = 12H)
  4312. END Test.
  4313. positive: explicit constant short to huge integer conversion
  4314. MODULE Test;
  4315. CONST Result = LONG (LONG (LONG (12H)))
  4316. BEGIN ASSERT (Result = 12H)
  4317. END Test.
  4318. positive: explicit constant integer to short integer conversion
  4319. MODULE Test;
  4320. CONST Result = SHORT (1234H)
  4321. BEGIN ASSERT (Result = 34H)
  4322. END Test.
  4323. positive: explicit constant integer to long integer conversion
  4324. MODULE Test;
  4325. CONST Result = LONG (1234H)
  4326. BEGIN ASSERT (Result = 1234H)
  4327. END Test.
  4328. positive: explicit constant integer to huge integer conversion
  4329. MODULE Test;
  4330. CONST Result = LONG (LONG (1234H))
  4331. BEGIN ASSERT (Result = 1234H)
  4332. END Test.
  4333. positive: explicit constant long to short integer conversion
  4334. MODULE Test;
  4335. CONST Result = SHORT (SHORT (123456H))
  4336. BEGIN ASSERT (Result = 56H)
  4337. END Test.
  4338. positive: explicit constant long integer to integer conversion
  4339. MODULE Test;
  4340. CONST Result = SHORT (123456H)
  4341. BEGIN ASSERT (Result = 3456H)
  4342. END Test.
  4343. positive: explicit constant long to huge integer conversion
  4344. MODULE Test;
  4345. CONST Result = LONG (123456H)
  4346. BEGIN ASSERT (Result = 123456H)
  4347. END Test.
  4348. positive: explicit constant huge to short integer conversion
  4349. MODULE Test;
  4350. CONST Result = SHORT (SHORT (SHORT (123456777H)))
  4351. BEGIN ASSERT (Result = 77H)
  4352. END Test.
  4353. positive: explicit constant huge integer to integer conversion
  4354. MODULE Test;
  4355. CONST Result = SHORT (SHORT (123456789H))
  4356. BEGIN ASSERT (Result = 6789H)
  4357. END Test.
  4358. positive: explicit constant huge to long integer conversion
  4359. MODULE Test;
  4360. CONST Result = SHORT (123456789H)
  4361. BEGIN ASSERT (Result = 23456789H)
  4362. END Test.
  4363. positive: explicit positive constant real to integer conversion
  4364. MODULE Test;
  4365. CONST Result = ENTIER (5.9)
  4366. BEGIN ASSERT (Result = 5)
  4367. END Test.
  4368. positive: explicit negative constant real to integer conversion
  4369. MODULE Test;
  4370. CONST Result = ENTIER (-5.1E0)
  4371. BEGIN ASSERT (Result = -6)
  4372. END Test.
  4373. positive: explicit positive constant long real to integer conversion
  4374. MODULE Test;
  4375. CONST Result = ENTIER (5.9D0)
  4376. BEGIN ASSERT (Result = 5)
  4377. END Test.
  4378. positive: explicit negative constant long real to integer conversion
  4379. MODULE Test;
  4380. CONST Result = ENTIER (-5.1D0)
  4381. BEGIN ASSERT (Result = -6)
  4382. END Test.
  4383. # types
  4384. positive: unmarked type
  4385. MODULE Test;
  4386. TYPE Type = RECORD END;
  4387. END Test.
  4388. positive: unmarked type within procedure
  4389. MODULE Test;
  4390. PROCEDURE Procedure;
  4391. TYPE Type = RECORD END;
  4392. END Procedure;
  4393. END Test.
  4394. positive: unmarked type within nested procedure
  4395. MODULE Test;
  4396. PROCEDURE Procedure;
  4397. PROCEDURE Procedure;
  4398. TYPE Type = RECORD END;
  4399. END Procedure;
  4400. END Procedure;
  4401. END Test.
  4402. positive: unmarked type within object
  4403. MODULE Test;
  4404. TYPE Object = OBJECT
  4405. TYPE Type = RECORD END;
  4406. END Object;
  4407. END Test.
  4408. positive: unmarked type within object in procedure
  4409. MODULE Test;
  4410. PROCEDURE Procedure;
  4411. TYPE Object = OBJECT
  4412. TYPE Type = RECORD END;
  4413. END Object;
  4414. END Procedure;
  4415. END Test.
  4416. positive: unmarked type within procedure in object
  4417. MODULE Test;
  4418. TYPE Object = OBJECT
  4419. PROCEDURE Procedure;
  4420. TYPE Type = RECORD END;
  4421. END Procedure;
  4422. END Object;
  4423. END Test.
  4424. positive: type marked as exported
  4425. MODULE Test;
  4426. TYPE Type* = RECORD END;
  4427. END Test.
  4428. negative: type marked as exported within procedure
  4429. MODULE Test;
  4430. PROCEDURE Procedure;
  4431. TYPE Type* = RECORD END;
  4432. END Procedure;
  4433. END Test.
  4434. negative: type marked as exported within nested procedure
  4435. MODULE Test;
  4436. PROCEDURE Procedure;
  4437. PROCEDURE Procedure;
  4438. TYPE Type* = RECORD END;
  4439. END Procedure;
  4440. END Procedure;
  4441. END Test.
  4442. positive: type marked as exported within object
  4443. MODULE Test;
  4444. TYPE Object = OBJECT
  4445. TYPE Type* = RECORD END;
  4446. END Object;
  4447. END Test.
  4448. negative: type marked as exported within object in procedure
  4449. MODULE Test;
  4450. PROCEDURE Procedure;
  4451. TYPE Object = OBJECT
  4452. TYPE Type* = RECORD END;
  4453. END Object;
  4454. END Procedure;
  4455. END Test.
  4456. negative: type marked as exported within procedure in object
  4457. MODULE Test;
  4458. TYPE Object = OBJECT
  4459. PROCEDURE Procedure;
  4460. TYPE Type* = RECORD END;
  4461. END Procedure;
  4462. END Object;
  4463. END Test.
  4464. negative: type marked as read-only
  4465. MODULE Test;
  4466. TYPE Type- = OBJECT;
  4467. END Test.
  4468. negative: type marked as read-only within procedure
  4469. MODULE Test;
  4470. PROCEDURE Procedure;
  4471. TYPE Type- = OBJECT;
  4472. END Procedure;
  4473. END Test.
  4474. negative: type marked as read-only within nested procedure
  4475. MODULE Test;
  4476. PROCEDURE Procedure;
  4477. PROCEDURE Procedure;
  4478. TYPE Type- = OBJECT;
  4479. END Procedure;
  4480. END Procedure;
  4481. END Test.
  4482. negative: type marked as read-only within object
  4483. MODULE Test;
  4484. TYPE Object = OBJECT
  4485. TYPE Type- = OBJECT;
  4486. END Object;
  4487. END Test.
  4488. negative: type marked as read-only within object in procedure
  4489. MODULE Test;
  4490. PROCEDURE Procedure;
  4491. TYPE Object = OBJECT
  4492. TYPE Type- = OBJECT;
  4493. END Object;
  4494. END Procedure;
  4495. END Test.
  4496. negative: type marked as read-only within procedure in object
  4497. MODULE Test;
  4498. TYPE Object = OBJECT
  4499. PROCEDURE Procedure;
  4500. TYPE Type- = OBJECT;
  4501. END Procedure;
  4502. END Object;
  4503. END Test.
  4504. negative: duplicated type
  4505. MODULE Test;
  4506. TYPE Type = RECORD END;
  4507. TYPE Type = OBJECT END Type;
  4508. END Test.
  4509. negative: duplicated type within procedure
  4510. MODULE Test;
  4511. PROCEDURE Procedure;
  4512. TYPE Type = RECORD END;
  4513. TYPE Type = OBJECT END Type;
  4514. END Procedure;
  4515. END Test.
  4516. negative: duplicated type within nested procedure
  4517. MODULE Test;
  4518. PROCEDURE Procedure;
  4519. PROCEDURE Procedure;
  4520. TYPE Type = RECORD END;
  4521. TYPE Type = OBJECT END Type;
  4522. END Procedure;
  4523. END Procedure;
  4524. END Test.
  4525. negative: duplicated type within object
  4526. MODULE Test;
  4527. TYPE Object = OBJECT
  4528. TYPE Type = RECORD END;
  4529. TYPE Type = OBJECT END Type;
  4530. END Object;
  4531. END Test.
  4532. negative: duplicated type within object in procedure
  4533. MODULE Test;
  4534. PROCEDURE Procedure;
  4535. TYPE Object = OBJECT
  4536. TYPE Type = RECORD END;
  4537. TYPE Type = OBJECT END Type;
  4538. END Object;
  4539. END Procedure;
  4540. END Test.
  4541. negative: duplicated type within procedure in object
  4542. MODULE Test;
  4543. TYPE Object = OBJECT
  4544. PROCEDURE Procedure;
  4545. TYPE Type = RECORD END;
  4546. TYPE Type = OBJECT END Type;
  4547. END Procedure;
  4548. END Object;
  4549. END Test.
  4550. positive: backwards referencing type
  4551. MODULE Test;
  4552. TYPE A = RECORD END; B = A;
  4553. END Test.
  4554. positive: backwards referencing type within procedure
  4555. MODULE Test;
  4556. PROCEDURE Procedure;
  4557. TYPE A = RECORD END; B = A;
  4558. END Procedure;
  4559. END Test.
  4560. positive: backwards referencing type within nested procedure
  4561. MODULE Test;
  4562. PROCEDURE Procedure;
  4563. PROCEDURE Procedure;
  4564. TYPE A = RECORD END; B = A;
  4565. END Procedure;
  4566. END Procedure;
  4567. END Test.
  4568. positive: backwards referencing type within object
  4569. MODULE Test;
  4570. TYPE Object = OBJECT
  4571. TYPE A = RECORD END; B = A;
  4572. END Object;
  4573. END Test.
  4574. positive: backwards referencing type within object in procedure
  4575. MODULE Test;
  4576. PROCEDURE Procedure;
  4577. TYPE Object = OBJECT
  4578. TYPE A = RECORD END; B = A;
  4579. END Object;
  4580. END Procedure;
  4581. END Test.
  4582. positive: backwards referencing type within procedure in object
  4583. MODULE Test;
  4584. TYPE Object = OBJECT
  4585. PROCEDURE Procedure;
  4586. TYPE A = RECORD END; B = A;
  4587. END Procedure;
  4588. END Object;
  4589. END Test.
  4590. positive: forwards referencing type
  4591. MODULE Test;
  4592. TYPE A = B; B = RECORD END;
  4593. END Test.
  4594. positive: forwards referencing type within procedure
  4595. MODULE Test;
  4596. PROCEDURE Procedure;
  4597. TYPE A = B; B = RECORD END;
  4598. END Procedure;
  4599. END Test.
  4600. positive: forwards referencing type within nested procedure
  4601. MODULE Test;
  4602. PROCEDURE Procedure;
  4603. PROCEDURE Procedure;
  4604. TYPE A = B; B = RECORD END;
  4605. END Procedure;
  4606. END Procedure;
  4607. END Test.
  4608. positive: forwards referencing type within object
  4609. MODULE Test;
  4610. TYPE Object = OBJECT
  4611. TYPE A = B; B = RECORD END;
  4612. END Object;
  4613. END Test.
  4614. positive: forwards referencing type within object in procedure
  4615. MODULE Test;
  4616. PROCEDURE Procedure;
  4617. TYPE Object = OBJECT
  4618. TYPE A = B; B = RECORD END;
  4619. END Object;
  4620. END Procedure;
  4621. END Test.
  4622. positive: forwards referencing type within procedure in object
  4623. MODULE Test;
  4624. TYPE Object = OBJECT
  4625. PROCEDURE Procedure;
  4626. TYPE A = B; B = RECORD END;
  4627. END Procedure;
  4628. END Object;
  4629. END Test.
  4630. negative: cyclic referencing types
  4631. MODULE Test;
  4632. TYPE A = B; B = A;
  4633. END Test.
  4634. negative: cyclic referencing types within procedure
  4635. MODULE Test;
  4636. PROCEDURE Procedure;
  4637. TYPE A = B; B = A;
  4638. END Procedure;
  4639. END Test.
  4640. negative: cyclic referencing types within nested procedure
  4641. MODULE Test;
  4642. PROCEDURE Procedure;
  4643. PROCEDURE Procedure;
  4644. TYPE A = B; B = A;
  4645. END Procedure;
  4646. END Procedure;
  4647. END Test.
  4648. negative: cyclic referencing types within object
  4649. MODULE Test;
  4650. TYPE Object = OBJECT
  4651. TYPE A = B; B = A;
  4652. END Object;
  4653. END Test.
  4654. negative: cyclic referencing types within object in procedure
  4655. MODULE Test;
  4656. PROCEDURE Procedure;
  4657. TYPE Object = OBJECT
  4658. TYPE A = B; B = A;
  4659. END Object;
  4660. END Procedure;
  4661. END Test.
  4662. negative: cyclic referencing types within procedure in object
  4663. MODULE Test;
  4664. TYPE Object = OBJECT
  4665. PROCEDURE Procedure;
  4666. TYPE A = B; B = A;
  4667. END Procedure;
  4668. END Object;
  4669. END Test.
  4670. negative: self referencing type
  4671. MODULE Test;
  4672. TYPE Type = Type;
  4673. END Test.
  4674. negative: self referencing type within procedure
  4675. MODULE Test;
  4676. PROCEDURE Procedure;
  4677. TYPE Type = Type;
  4678. END Procedure;
  4679. END Test.
  4680. negative: self referencing type within nested procedure
  4681. MODULE Test;
  4682. PROCEDURE Procedure;
  4683. PROCEDURE Procedure;
  4684. TYPE Type = Type;
  4685. END Procedure;
  4686. END Procedure;
  4687. END Test.
  4688. negative: self referencing type within object
  4689. MODULE Test;
  4690. TYPE Object = OBJECT
  4691. TYPE Type = Type;
  4692. END Object;
  4693. END Test.
  4694. negative: self referencing type within object in procedure
  4695. MODULE Test;
  4696. PROCEDURE Procedure;
  4697. TYPE Object = OBJECT
  4698. TYPE Type = Type;
  4699. END Object;
  4700. END Procedure;
  4701. END Test.
  4702. negative: self referencing type within procedure in object
  4703. MODULE Test;
  4704. TYPE Object = OBJECT
  4705. PROCEDURE Procedure;
  4706. TYPE Type = Type;
  4707. END Procedure;
  4708. END Object;
  4709. END Test.
  4710. positive: dummy module exporting types
  4711. MODULE Dummy;
  4712. TYPE Exported* = RECORD END;
  4713. TYPE Private = RECORD END;
  4714. END Dummy.
  4715. positive: importing exported type
  4716. MODULE Test;
  4717. IMPORT Dummy;
  4718. TYPE Type = Dummy.Exported;
  4719. END Test.
  4720. negative: importing private type
  4721. MODULE Test;
  4722. IMPORT Dummy;
  4723. TYPE Type = Dummy.Private;
  4724. END Test.
  4725. negative: importing invalid type
  4726. MODULE Test;
  4727. IMPORT Dummy;
  4728. TYPE Type = Dummy.Invalid;
  4729. END Test.
  4730. negative: import as type
  4731. MODULE Test;
  4732. IMPORT Import := Dummy;
  4733. TYPE Type = Import;
  4734. END Test.
  4735. negative: constant as type
  4736. MODULE Test;
  4737. CONST Constant = 0;
  4738. TYPE Type = Constant;
  4739. END Test.
  4740. negative: variable as type
  4741. MODULE Test;
  4742. TYPE Type = variable;
  4743. VAR variable: INTEGER;
  4744. END Test.
  4745. negative: procedure as type
  4746. MODULE Test;
  4747. TYPE Type = Procedure;
  4748. PROCEDURE Procedure; END Procedure;
  4749. END Test.
  4750. negative: parameter as type
  4751. MODULE Test;
  4752. PROCEDURE Procedure (parameter: INTEGER);
  4753. TYPE Type = parameter;
  4754. END Procedure;
  4755. END Test.
  4756. # basic types
  4757. positive: predefined basic character type
  4758. MODULE Test;
  4759. TYPE BasicType = CHAR;
  4760. END Test.
  4761. positive: predefined basic boolean type
  4762. MODULE Test;
  4763. TYPE BasicType = BOOLEAN;
  4764. END Test.
  4765. positive: predefined basic short integer type
  4766. MODULE Test;
  4767. TYPE BasicType = SHORTINT;
  4768. END Test.
  4769. positive: predefined basic integer type
  4770. MODULE Test;
  4771. TYPE BasicType = INTEGER;
  4772. END Test.
  4773. positive: predefined basic long integer type
  4774. MODULE Test;
  4775. TYPE BasicType = LONGINT;
  4776. END Test.
  4777. positive: predefined basic huge integer type
  4778. MODULE Test;
  4779. TYPE BasicType = HUGEINT;
  4780. END Test.
  4781. positive: predefined basic real type
  4782. MODULE Test;
  4783. TYPE BasicType = REAL;
  4784. END Test.
  4785. positive: predefined basic long real type
  4786. MODULE Test;
  4787. TYPE BasicType = LONGREAL;
  4788. END Test.
  4789. positive: predefined basic set type
  4790. MODULE Test;
  4791. TYPE BasicType = SET;
  4792. END Test.
  4793. # arrays
  4794. positive: open array type definition
  4795. MODULE Test;
  4796. TYPE Array = ARRAY OF RECORD END;
  4797. END Test.
  4798. positive: two-dimensional open array type definition
  4799. MODULE Test;
  4800. TYPE Array = ARRAY OF ARRAY OF RECORD END;
  4801. END Test.
  4802. negative: fixed size array with open array element type
  4803. MODULE Test;
  4804. TYPE Array = ARRAY 10 OF ARRAY OF RECORD END;
  4805. END Test.
  4806. negative: array with negative size
  4807. MODULE Test;
  4808. TYPE Array = ARRAY -1 OF RECORD END;
  4809. END Test.
  4810. negative: multidimensional array with negative size
  4811. MODULE Test;
  4812. TYPE Array = ARRAY 5, 3, -1 OF RECORD END;
  4813. END Test.
  4814. positive: array with size zero
  4815. MODULE Test;
  4816. TYPE Array = ARRAY 0 OF RECORD END;
  4817. END Test.
  4818. positive: multidimensional array with size zero
  4819. MODULE Test;
  4820. TYPE Array = ARRAY 2, 7, 0 OF RECORD END;
  4821. END Test.
  4822. positive: array with positive size
  4823. MODULE Test;
  4824. TYPE Array = ARRAY 5 OF RECORD END;
  4825. END Test.
  4826. positive: multidimensional array with positive size
  4827. MODULE Test;
  4828. TYPE Array = ARRAY 2, 4, 6 OF RECORD END;
  4829. END Test.
  4830. negative: array with size of type real
  4831. MODULE Test;
  4832. TYPE Array = ARRAY 5.4 OF RECORD END;
  4833. END Test.
  4834. negative: array with constant base type
  4835. MODULE Test;
  4836. CONST Base = 5;
  4837. TYPE Array = ARRAY 5 OF Base;
  4838. END Test.
  4839. negative: fixed size array of open array
  4840. MODULE Test;
  4841. TYPE Array = ARRAY 10 OF ARRAY OF RECORD END;
  4842. END Test.
  4843. positive: open array of fixed size array
  4844. MODULE Test;
  4845. TYPE Array = ARRAY OF ARRAY 10 OF RECORD END;
  4846. END Test.
  4847. negative: self referencing array type
  4848. MODULE Test;
  4849. TYPE Array = ARRAY 10 OF Array;
  4850. END Test.
  4851. negative: indirectly self referencing array type
  4852. MODULE Test;
  4853. TYPE A = ARRAY 10 OF B;
  4854. TYPE B = ARRAY 10 OF A;
  4855. END Test.
  4856. positive: self referencing array type with pointer
  4857. MODULE Test;
  4858. TYPE A = ARRAY 10 OF POINTER TO A;
  4859. END Test.
  4860. positive: indirectly self referencing array type with pointer
  4861. MODULE Test;
  4862. TYPE A = ARRAY 10 OF B;
  4863. TYPE B = ARRAY 10 OF POINTER TO A;
  4864. END Test.
  4865. positive: array of basic character type
  4866. MODULE Test;
  4867. TYPE Array = ARRAY 10 OF CHAR;
  4868. END Test.
  4869. positive: array of basic boolean type
  4870. MODULE Test;
  4871. TYPE Array = ARRAY 10 OF BOOLEAN;
  4872. END Test.
  4873. positive: array of basic short integer type
  4874. MODULE Test;
  4875. TYPE Array = ARRAY 10 OF SHORTINT;
  4876. END Test.
  4877. positive: array of basic integer type
  4878. MODULE Test;
  4879. TYPE Array = ARRAY 10 OF INTEGER;
  4880. END Test.
  4881. positive: array of basic long integer type
  4882. MODULE Test;
  4883. TYPE Array = ARRAY 10 OF LONGINT;
  4884. END Test.
  4885. positive: array of basic huge integer type
  4886. MODULE Test;
  4887. TYPE Array = ARRAY 10 OF HUGEINT;
  4888. END Test.
  4889. positive: array of basic real type
  4890. MODULE Test;
  4891. TYPE Array = ARRAY 10 OF REAL;
  4892. END Test.
  4893. positive: array of basic long real type
  4894. MODULE Test;
  4895. TYPE Array = ARRAY 10 OF LONGREAL;
  4896. END Test.
  4897. positive: array of basic set type
  4898. MODULE Test;
  4899. TYPE Array = ARRAY 10 OF SET;
  4900. END Test.
  4901. negative: array of basic nil pointer type
  4902. MODULE Test;
  4903. TYPE Array = ARRAY 10 OF NIL;
  4904. END Test.
  4905. positive: array of records
  4906. MODULE Test;
  4907. TYPE Array = ARRAY 10 OF RECORD END;
  4908. END Test.
  4909. positive: array of objects
  4910. MODULE Test;
  4911. TYPE Array = ARRAY 10 OF OBJECT;
  4912. END Test.
  4913. positive: array of pointers
  4914. MODULE Test;
  4915. TYPE Array = ARRAY 10 OF POINTER TO RECORD END;
  4916. END Test.
  4917. positive: array of procedures
  4918. MODULE Test;
  4919. TYPE Array = ARRAY 10 OF PROCEDURE;
  4920. END Test.
  4921. # records
  4922. negative: record extending itself
  4923. MODULE Test;
  4924. TYPE Record = RECORD (Record) END;
  4925. END Test.
  4926. negative: record extending itself indirectly
  4927. MODULE Test;
  4928. TYPE A = RECORD (B) END; B = RECORD (A) END;
  4929. END Test.
  4930. negative: record extending a constant
  4931. MODULE Test;
  4932. CONST Constant = 5;
  4933. TYPE Record = RECORD (Constant) END;
  4934. END Test.
  4935. negative: record extending a variable
  4936. MODULE Test;
  4937. TYPE Record = RECORD (variable) END;
  4938. VAR variable: Record;
  4939. END Test.
  4940. negative: record extending a basic type
  4941. MODULE Test;
  4942. TYPE Record = RECORD (LONGINT) END;
  4943. END Test.
  4944. negative: record extending an array
  4945. MODULE Test;
  4946. TYPE Array = ARRAY 10 OF OBJECT; Record = RECORD (Array) END;
  4947. END Test.
  4948. positive: record extending a record
  4949. MODULE Test;
  4950. TYPE A = RECORD END; B = RECORD (A) END;
  4951. END Test.
  4952. positive: record extending a record from outer scope
  4953. MODULE Test;
  4954. TYPE Outer = RECORD END;
  4955. PROCEDURE Procedure;
  4956. TYPE Inner = RECORD (Outer) END;
  4957. END Procedure;
  4958. END Test.
  4959. negative: record extending a record from inner scope
  4960. MODULE Test;
  4961. TYPE Outer = RECORD (Inner) END;
  4962. PROCEDURE Procedure;
  4963. TYPE Inner = RECORD END;
  4964. END Procedure;
  4965. END Test.
  4966. negative: record extending an object
  4967. MODULE Test;
  4968. TYPE Object = OBJECT; Record = RECORD (Object) END;
  4969. END Test.
  4970. negative: record extending a pointer
  4971. MODULE Test;
  4972. TYPE Pointer = POINTER TO RECORD END; Record = RECORD (Pointer) END;
  4973. END Test.
  4974. negative: record extending a procedure
  4975. MODULE Test;
  4976. TYPE Procedure = PROCEDURE; Record = RECORD (Procedure) END;
  4977. END Test.
  4978. negative: record containing itself
  4979. MODULE Test;
  4980. TYPE Record = RECORD r: Record END;
  4981. END Test.
  4982. positive: record containing pointer to itself
  4983. MODULE Test;
  4984. TYPE Record = RECORD r: POINTER TO Record END;
  4985. END Test.
  4986. negative: record containing itself indirectly
  4987. MODULE Test;
  4988. TYPE A = RECORD b: B END;
  4989. TYPE B = RECORD a: A END;
  4990. END Test.
  4991. positive: record containing pointer to itself indirectly
  4992. MODULE Test;
  4993. TYPE A = RECORD b: POINTER TO B END;
  4994. TYPE B = RECORD a: A END;
  4995. END Test.
  4996. positive: record containing pointer in declaration to itself indirectly
  4997. MODULE Test;
  4998. TYPE A = RECORD b: B END;
  4999. TYPE B = POINTER TO RECORD a: A END;
  5000. END Test.
  5001. positive: record containing backward referenced type
  5002. MODULE Test;
  5003. TYPE A = RECORD END;
  5004. TYPE B = RECORD a: A END;
  5005. END Test.
  5006. positive: record containing forward referenced type
  5007. MODULE Test;
  5008. TYPE A = RECORD b: B END;
  5009. TYPE B = OBJECT;
  5010. END Test.
  5011. positive: record containing anonymous records
  5012. MODULE Test;
  5013. TYPE Record = RECORD r: RECORD r: RECORD r: RECORD END END END END;
  5014. END Test.
  5015. positive: deeply nested records
  5016. MODULE Test;
  5017. TYPE A = RECORD b: B END;
  5018. TYPE F = RECORD END;
  5019. TYPE B = RECORD c: C END;
  5020. TYPE E = RECORD f: F END;
  5021. TYPE D = RECORD e: E END;
  5022. TYPE C = RECORD d: D END;
  5023. END Test.
  5024. negative: record containing itself deeply indirectly
  5025. MODULE Test;
  5026. TYPE A = RECORD b: B END;
  5027. TYPE F = RECORD a: A END;
  5028. TYPE B = RECORD c: C END;
  5029. TYPE E = RECORD f: F END;
  5030. TYPE D = RECORD e: E END;
  5031. TYPE C = RECORD d: D END;
  5032. END Test.
  5033. negative: nested record containing itself indirectly
  5034. MODULE Test;
  5035. TYPE A = RECORD b: B END;
  5036. TYPE B = RECORD c: C END;
  5037. TYPE C = RECORD d: D END;
  5038. TYPE D = RECORD b: B END;
  5039. END Test.
  5040. positive: record containing pointer to record
  5041. MODULE Test;
  5042. TYPE Record = RECORD p: POINTER TO RECORD END END;
  5043. END Test.
  5044. positive: record containing pointer to record containing the first record
  5045. MODULE Test;
  5046. TYPE Record = RECORD p: POINTER TO RECORD r: Record END END;
  5047. END Test.
  5048. positive: record containing record containing pointer to record containing the first record
  5049. MODULE Test;
  5050. TYPE A = RECORD b: B END;
  5051. TYPE B = RECORD p: POINTER TO RECORD a: A END END;
  5052. END Test.
  5053. positive: pointer to record containing record containing record containing the pointer
  5054. MODULE Test;
  5055. TYPE A = POINTER TO RECORD b: B END;
  5056. TYPE B = RECORD r: RECORD a: A END END;
  5057. END Test.
  5058. positive: record containing basic types
  5059. MODULE Test;
  5060. TYPE Record = RECORD i: INTEGER; s: SET; b: BOOLEAN END;
  5061. END Test.
  5062. positive: record containing an array
  5063. MODULE Test;
  5064. TYPE Record = RECORD a: ARRAY 10 OF OBJECT; END;
  5065. END Test.
  5066. negative: record containing an open array
  5067. MODULE Test;
  5068. TYPE Record = RECORD a: ARRAY OF RECORD END END;
  5069. END Test.
  5070. positive: record containing an object
  5071. MODULE Test;
  5072. TYPE Record = RECORD o: OBJECT; END;
  5073. END Test.
  5074. positive: record containing a procedure
  5075. MODULE Test;
  5076. TYPE Record = RECORD p: PROCEDURE END;
  5077. END Test.
  5078. negative: record with variable with same name as its type
  5079. MODULE Test;
  5080. TYPE Type = RECORD END;
  5081. TYPE Record = RECORD Type: Type END;
  5082. END Test.
  5083. # objects
  5084. negative: object extending itself
  5085. MODULE Test;
  5086. TYPE Object = OBJECT (Object) END Object;
  5087. END Test.
  5088. negative: object extending itself indirectly
  5089. MODULE Test;
  5090. TYPE A = OBJECT (B) END A; B = OBJECT (A) END B;
  5091. END Test.
  5092. negative: object extending a constant
  5093. MODULE Test;
  5094. CONST Constant = 5;
  5095. TYPE Object = OBJECT (Constant) END Object;
  5096. END Test.
  5097. negative: object extending a variable
  5098. MODULE Test;
  5099. TYPE Object = OBJECT (variable) END Object;
  5100. VAR variable: Object;
  5101. END Test.
  5102. negative: object extending a basic type
  5103. MODULE Test;
  5104. TYPE Object = OBJECT (LONGINT) END Object;
  5105. END Test.
  5106. negative: object extending an array
  5107. MODULE Test;
  5108. TYPE Array = ARRAY 10 OF OBJECT; Object = OBJECT (Array) END Object;
  5109. END Test.
  5110. negative: object extending a record
  5111. MODULE Test;
  5112. TYPE Record = RECORD END; Object = OBJECT (Record) END Object;
  5113. END Test.
  5114. positive: object extending an object
  5115. MODULE Test;
  5116. TYPE A = OBJECT; B = OBJECT (A) END B;
  5117. END Test.
  5118. negative: object extending the base object
  5119. MODULE Test;
  5120. TYPE Object = OBJECT (OBJECT) END Object;
  5121. END Test.
  5122. positive: object extending a pointer to record
  5123. MODULE Test;
  5124. TYPE Pointer = POINTER TO RECORD END; Object = OBJECT (Pointer) END Object;
  5125. END Test.
  5126. negative: object extending a procedure
  5127. MODULE Test;
  5128. TYPE Procedure = PROCEDURE; Object = OBJECT (Procedure) END Object;
  5129. END Test.
  5130. positive: object containing itself
  5131. MODULE Test;
  5132. TYPE Object = OBJECT VAR o: Object END Object;
  5133. END Test.
  5134. positive: object containing itself indirectly
  5135. MODULE Test;
  5136. TYPE A = OBJECT VAR b: B END A;
  5137. TYPE B = OBJECT VAR a: A END B;
  5138. END Test.
  5139. positive: object containing backward referenced type
  5140. MODULE Test;
  5141. TYPE A = OBJECT;
  5142. TYPE B = OBJECT VAR a: A END B;
  5143. END Test.
  5144. positive: object containing forward referenced type
  5145. MODULE Test;
  5146. TYPE A = OBJECT VAR b: B END A;
  5147. TYPE B = OBJECT;
  5148. END Test.
  5149. positive: object containing anonymous records
  5150. MODULE Test;
  5151. TYPE Object = OBJECT VAR r: RECORD r: RECORD r: RECORD END END END END Object;
  5152. END Test.
  5153. positive: deeply nested objects
  5154. MODULE Test;
  5155. TYPE A = OBJECT VAR b: B END A;
  5156. TYPE F = OBJECT;
  5157. TYPE B = OBJECT VAR c: C END B;
  5158. TYPE E = OBJECT VAR f: F END E;
  5159. TYPE D = OBJECT VAR e: E END D;
  5160. TYPE C = OBJECT VAR d: D END C;
  5161. END Test.
  5162. positive: object containing itself deeply indirectly
  5163. MODULE Test;
  5164. TYPE A = OBJECT VAR b: B END A;
  5165. TYPE F = OBJECT VAR a: A END F;
  5166. TYPE B = OBJECT VAR c: C END B;
  5167. TYPE E = OBJECT VAR f: F END E;
  5168. TYPE D = OBJECT VAR e: E END D;
  5169. TYPE C = OBJECT VAR d: D END C;
  5170. END Test.
  5171. positive: nested object containing itself indirectly
  5172. MODULE Test;
  5173. TYPE A = OBJECT VAR b: B END A;
  5174. TYPE B = OBJECT VAR c: C END B;
  5175. TYPE C = OBJECT VAR d: D END C;
  5176. TYPE D = OBJECT VAR b: B END D;
  5177. END Test.
  5178. positive: object containing basic types
  5179. MODULE Test;
  5180. TYPE Object = OBJECT VAR i: INTEGER; s: SET; b: BOOLEAN END Object;
  5181. END Test.
  5182. positive: object containing an array
  5183. MODULE Test;
  5184. TYPE Object = OBJECT VAR a: ARRAY 10 OF OBJECT; END Object;
  5185. END Test.
  5186. negative: object containing an open array
  5187. MODULE Test;
  5188. TYPE Object = OBJECT VAR a: ARRAY OF OBJECT; END Object;
  5189. END Test.
  5190. positive: object containing an object
  5191. MODULE Test;
  5192. TYPE Object = OBJECT VAR o: OBJECT; END Object;
  5193. END Test.
  5194. positive: object containing a procedure
  5195. MODULE Test;
  5196. TYPE Object = OBJECT VAR p: PROCEDURE END Object;
  5197. END Test.
  5198. positive: object referenced in procedure variable
  5199. MODULE Test;
  5200. TYPE Object = OBJECT PROCEDURE Object; END Object; END Object;
  5201. VAR procedure : PROCEDURE (object: Object);
  5202. END Test.
  5203. positive: local object accessing local constant
  5204. MODULE Test;
  5205. PROCEDURE P;
  5206. CONST Constant = TRUE;
  5207. VAR o: OBJECT VAR v: BOOLEAN BEGIN v := Constant END;
  5208. END P;
  5209. END Test.
  5210. positive: local object accessing local type
  5211. MODULE Test;
  5212. PROCEDURE P;
  5213. TYPE Type = BOOLEAN;
  5214. VAR o: OBJECT VAR v: Type END;
  5215. END P;
  5216. END Test.
  5217. negative: local object accessing local variable
  5218. MODULE Test;
  5219. PROCEDURE P;
  5220. VAR o: OBJECT BEGIN v := TRUE END; v: BOOLEAN;
  5221. END P;
  5222. END Test.
  5223. negative: local object accessing local procedure
  5224. MODULE Test;
  5225. PROCEDURE P;
  5226. VAR o: OBJECT BEGIN Procedure END;
  5227. PROCEDURE Procedure; END Procedure;
  5228. END P;
  5229. END Test.
  5230. negative: local object accessing local parameter
  5231. MODULE Test;
  5232. PROCEDURE P (p: BOOLEAN);
  5233. VAR o: OBJECT BEGIN p := TRUE END;
  5234. END P;
  5235. END Test.
  5236. positive: local object accessing global constant
  5237. MODULE Test;
  5238. CONST Constant = TRUE;
  5239. PROCEDURE P;
  5240. VAR o: OBJECT VAR v: BOOLEAN BEGIN v := Constant END;
  5241. END P;
  5242. END Test.
  5243. positive: local object accessing global type
  5244. MODULE Test;
  5245. TYPE Type = BOOLEAN;
  5246. PROCEDURE P;
  5247. VAR o: OBJECT VAR v: Type END;
  5248. END P;
  5249. END Test.
  5250. positive: local object accessing global variable
  5251. MODULE Test;
  5252. VAR v: BOOLEAN;
  5253. PROCEDURE P;
  5254. VAR o: OBJECT BEGIN v := TRUE END;
  5255. END P;
  5256. END Test.
  5257. positive: local object accessing global procedure
  5258. MODULE Test;
  5259. PROCEDURE P;
  5260. VAR o: OBJECT BEGIN Procedure END;
  5261. END P;
  5262. PROCEDURE Procedure; END Procedure;
  5263. END Test.
  5264. # pointers
  5265. negative: pointer to basic character type
  5266. MODULE Test;
  5267. TYPE Pointer = POINTER TO CHAR;
  5268. END Test.
  5269. negative: pointer to basic boolean type
  5270. MODULE Test;
  5271. TYPE Pointer = POINTER TO BOOLEAN;
  5272. END Test.
  5273. negative: pointer to basic short integer type
  5274. MODULE Test;
  5275. TYPE Pointer = POINTER TO SHORTINT;
  5276. END Test.
  5277. negative: pointer to basic integer type
  5278. MODULE Test;
  5279. TYPE Pointer = POINTER TO INTEGER;
  5280. END Test.
  5281. negative: pointer to basic long integer type
  5282. MODULE Test;
  5283. TYPE Pointer = POINTER TO LONGINT;
  5284. END Test.
  5285. negative: pointer to basic huge integer type
  5286. MODULE Test;
  5287. TYPE Pointer = POINTER TO HUGEINT;
  5288. END Test.
  5289. negative: pointer to basic real type
  5290. MODULE Test;
  5291. TYPE Pointer = POINTER TO REAL;
  5292. END Test.
  5293. negative: pointer to basic long real type
  5294. MODULE Test;
  5295. TYPE Pointer = POINTER TO LONGREAL;
  5296. END Test.
  5297. negative: pointer to basic set type
  5298. MODULE Test;
  5299. TYPE Pointer = POINTER TO SET;
  5300. END Test.
  5301. positive: pointer to record
  5302. MODULE Test;
  5303. TYPE Pointer = POINTER TO RECORD END;
  5304. END Test.
  5305. positive: pointer to record from outer scope
  5306. MODULE Test;
  5307. TYPE Record = RECORD END;
  5308. PROCEDURE Procedure;
  5309. TYPE Pointer = POINTER TO Record;
  5310. END Procedure;
  5311. END Test.
  5312. positive: pointer to record from with variable of nested type
  5313. MODULE Test;
  5314. PROCEDURE Procedure;
  5315. TYPE Pointer = POINTER TO RECORD pointer: Pointer END;
  5316. END Procedure;
  5317. END Test.
  5318. negative: pointer to record inside object
  5319. MODULE Test;
  5320. TYPE Pointer = POINTER TO Record;
  5321. TYPE Object = OBJECT
  5322. TYPE Record = RECORD END;
  5323. END Object;
  5324. END Test.
  5325. negative: pointer to record inside procedure
  5326. MODULE Test;
  5327. TYPE Pointer = POINTER TO Record;
  5328. PROCEDURE Procedure;
  5329. TYPE Record = RECORD END;
  5330. END Procedure;
  5331. END Test.
  5332. positive: pointer to array
  5333. MODULE Test;
  5334. TYPE Pointer = POINTER TO ARRAY 10 OF RECORD END;
  5335. END Test.
  5336. positive: pointer to open array
  5337. MODULE Test;
  5338. TYPE Pointer = POINTER TO ARRAY OF RECORD END;
  5339. END Test.
  5340. positive: pointer to array of same pointer
  5341. MODULE Test;
  5342. TYPE Pointer = POINTER TO ARRAY 10 OF Pointer;
  5343. END Test.
  5344. positive: pointers to array of same pointer
  5345. MODULE Test;
  5346. TYPE A = POINTER TO ARRAY 10 OF B;
  5347. TYPE B = POINTER TO ARRAY 10 OF C;
  5348. TYPE C = POINTER TO ARRAY 10 OF D;
  5349. TYPE D = POINTER TO ARRAY 10 OF A;
  5350. END Test.
  5351. positive: pointer to open array of same pointer
  5352. MODULE Test;
  5353. TYPE Pointer = POINTER TO ARRAY OF Pointer;
  5354. END Test.
  5355. positive: pointers to open array of same pointer
  5356. MODULE Test;
  5357. TYPE A = POINTER TO ARRAY OF B;
  5358. TYPE B = POINTER TO ARRAY OF C;
  5359. TYPE C = POINTER TO ARRAY OF D;
  5360. TYPE D = POINTER TO ARRAY OF A;
  5361. END Test.
  5362. negative: pointer to pointer
  5363. MODULE Test;
  5364. TYPE Pointer = POINTER TO POINTER TO RECORD END;
  5365. END Test.
  5366. negative: pointer to object
  5367. MODULE Test;
  5368. TYPE Pointer = POINTER TO OBJECT;
  5369. END Test.
  5370. negative: pointer to procedure
  5371. MODULE Test;
  5372. TYPE Pointer = POINTER TO PROCEDURE;
  5373. END Test.
  5374. # procedure types
  5375. positive: plain procedure type
  5376. MODULE Test;
  5377. TYPE Procedure = PROCEDURE;
  5378. END Test.
  5379. positive: procedure type returning basic character type
  5380. MODULE Test;
  5381. TYPE Procedure = PROCEDURE (): CHAR;
  5382. END Test.
  5383. positive: procedure type returning basic boolean type
  5384. MODULE Test;
  5385. TYPE Procedure = PROCEDURE (): BOOLEAN;
  5386. END Test.
  5387. positive: procedure type returning basic short integer type
  5388. MODULE Test;
  5389. TYPE Procedure = PROCEDURE (): SHORTINT;
  5390. END Test.
  5391. positive: procedure type returning basic integer type
  5392. MODULE Test;
  5393. TYPE Procedure = PROCEDURE (): INTEGER;
  5394. END Test.
  5395. positive: procedure type returning basic long integer type
  5396. MODULE Test;
  5397. TYPE Procedure = PROCEDURE (): LONGINT;
  5398. END Test.
  5399. positive: procedure type returning basic huge integer type
  5400. MODULE Test;
  5401. TYPE Procedure = PROCEDURE (): HUGEINT;
  5402. END Test.
  5403. positive: procedure type returning basic real type
  5404. MODULE Test;
  5405. TYPE Procedure = PROCEDURE (): REAL;
  5406. END Test.
  5407. positive: procedure type returning basic long real type
  5408. MODULE Test;
  5409. TYPE Procedure = PROCEDURE (): LONGREAL;
  5410. END Test.
  5411. positive: procedure type returning basic set type
  5412. MODULE Test;
  5413. TYPE Procedure = PROCEDURE (): SET;
  5414. END Test.
  5415. positive: procedure type returning record type
  5416. MODULE Test;
  5417. TYPE Record = RECORD END;
  5418. TYPE Procedure = PROCEDURE (): Record;
  5419. END Test.
  5420. positive: procedure type returning anonymous record type
  5421. MODULE Test;
  5422. TYPE Procedure = PROCEDURE (): RECORD END;
  5423. END Test.
  5424. positive: procedure type returning array type
  5425. MODULE Test;
  5426. TYPE Array = ARRAY 10 OF RECORD END;
  5427. TYPE Procedure = PROCEDURE (): Array;
  5428. END Test.
  5429. positive: procedure type returning anonymous array type
  5430. MODULE Test;
  5431. TYPE Procedure = PROCEDURE (): ARRAY 10 OF RECORD END;
  5432. END Test.
  5433. negative: procedure type returning open array type
  5434. MODULE Test;
  5435. TYPE Array = ARRAY OF RECORD END;
  5436. TYPE Procedure = PROCEDURE (): Array;
  5437. END Test.
  5438. negative: procedure type returning anonymous open array type
  5439. MODULE Test;
  5440. TYPE Procedure = PROCEDURE (): ARRAY OF RECORD END;
  5441. END Test.
  5442. positive: procedure type returning object type
  5443. MODULE Test;
  5444. TYPE Object = OBJECT;
  5445. TYPE Procedure = PROCEDURE (): Object;
  5446. END Test.
  5447. positive: procedure type returning anonymous object type
  5448. MODULE Test;
  5449. TYPE Procedure = PROCEDURE (): OBJECT;
  5450. END Test.
  5451. positive: procedure type returning pointer type
  5452. MODULE Test;
  5453. TYPE Pointer = POINTER TO RECORD END;
  5454. TYPE Procedure = PROCEDURE (): Pointer;
  5455. END Test.
  5456. positive: procedure type returning anonymous pointer type
  5457. MODULE Test;
  5458. TYPE Procedure = PROCEDURE (): POINTER TO RECORD END;
  5459. END Test.
  5460. positive: procedure type returning procedure type
  5461. MODULE Test;
  5462. TYPE Proc = PROCEDURE;
  5463. TYPE Procedure = PROCEDURE (): Proc;
  5464. END Test.
  5465. positive: procedure type returning anonymous procedure type
  5466. MODULE Test;
  5467. TYPE Procedure = PROCEDURE (): PROCEDURE;
  5468. END Test.
  5469. positive: procedure type returning anonymous procedure returning anonymous procedure
  5470. MODULE Test;
  5471. TYPE Procedure = PROCEDURE (): PROCEDURE (): PROCEDURE;
  5472. END Test.
  5473. positive: procedure type returning itself
  5474. MODULE Test;
  5475. TYPE Procedure = PROCEDURE (): Procedure;
  5476. END Test.
  5477. positive: procedure types returning themselves
  5478. MODULE Test;
  5479. TYPE A = PROCEDURE (): B;
  5480. TYPE B = PROCEDURE (): C;
  5481. TYPE C = PROCEDURE (): D;
  5482. TYPE D = PROCEDURE (): A;
  5483. END Test.
  5484. positive: procedure type with parameter of same type
  5485. MODULE Test;
  5486. TYPE Procedure = PROCEDURE (procedure: Procedure);
  5487. END Test.
  5488. positive: procedure types with parameters of same type
  5489. MODULE Test;
  5490. TYPE A = PROCEDURE (b: B);
  5491. TYPE B = PROCEDURE (c: C);
  5492. TYPE C = PROCEDURE (d: D);
  5493. TYPE D = PROCEDURE (a: A);
  5494. END Test.
  5495. negative: procedure type with multiple variable parameter
  5496. MODULE Test;
  5497. TYPE Procedure = PROCEDURE (VAR VAR parameter: SET);
  5498. END Test.
  5499. negative: procedure type with multiple constant parameter
  5500. MODULE Test;
  5501. TYPE Procedure = PROCEDURE (CONST CONST parameter: SET);
  5502. END Test.
  5503. negative: procedure type with variable and constant parameter
  5504. MODULE Test;
  5505. TYPE Procedure = PROCEDURE (VAR CONST parameter: SET);
  5506. END Test.
  5507. negative: procedure type with constant and variable parameter
  5508. MODULE Test;
  5509. TYPE Procedure = PROCEDURE (VAR CONST parameter: SET);
  5510. END Test.
  5511. negative: procedure type with parameter marked as exported
  5512. MODULE Test;
  5513. TYPE Procedure = PROCEDURE (parameter*: CHAR);
  5514. END Test.
  5515. negative: procedure type with parameter marked as read-only
  5516. MODULE Test;
  5517. TYPE Procedure = PROCEDURE (parameter-: CHAR);
  5518. END Test.
  5519. positive: procedure type with a parameter of basic character type
  5520. MODULE Test;
  5521. TYPE Procedure = PROCEDURE (parameter: CHAR);
  5522. END Test.
  5523. positive: procedure type with parameters of basic character type
  5524. MODULE Test;
  5525. TYPE Procedure = PROCEDURE (a, b, c: CHAR);
  5526. END Test.
  5527. positive: procedure type with a parameter of variable character type
  5528. MODULE Test;
  5529. TYPE Procedure = PROCEDURE (VAR parameter: CHAR);
  5530. END Test.
  5531. positive: procedure type with parameters of variable character type
  5532. MODULE Test;
  5533. TYPE Procedure = PROCEDURE (VAR a, b, c: CHAR);
  5534. END Test.
  5535. positive: procedure type with a parameter of constant character type
  5536. MODULE Test;
  5537. TYPE Procedure = PROCEDURE (CONST parameter: CHAR);
  5538. END Test.
  5539. positive: procedure type with parameters of constant character type
  5540. MODULE Test;
  5541. TYPE Procedure = PROCEDURE (CONST a, b, c: CHAR);
  5542. END Test.
  5543. positive: procedure type with intermixed parameters of character type
  5544. MODULE Test;
  5545. TYPE Procedure = PROCEDURE (a: CHAR; VAR b: CHAR; CONST c: CHAR);
  5546. END Test.
  5547. positive: procedure type with a parameter of basic boolean type
  5548. MODULE Test;
  5549. TYPE Procedure = PROCEDURE (parameter: BOOLEAN);
  5550. END Test.
  5551. positive: procedure type with parameters of basic boolean type
  5552. MODULE Test;
  5553. TYPE Procedure = PROCEDURE (a, b, c: BOOLEAN);
  5554. END Test.
  5555. positive: procedure type with a parameter of variable boolean type
  5556. MODULE Test;
  5557. TYPE Procedure = PROCEDURE (VAR parameter: BOOLEAN);
  5558. END Test.
  5559. positive: procedure type with parameters of variable boolean type
  5560. MODULE Test;
  5561. TYPE Procedure = PROCEDURE (VAR a, b, c: BOOLEAN);
  5562. END Test.
  5563. positive: procedure type with a parameter of constant boolean type
  5564. MODULE Test;
  5565. TYPE Procedure = PROCEDURE (CONST parameter: BOOLEAN);
  5566. END Test.
  5567. positive: procedure type with parameters of constant boolean type
  5568. MODULE Test;
  5569. TYPE Procedure = PROCEDURE (CONST a, b, c: BOOLEAN);
  5570. END Test.
  5571. positive: procedure type with intermixed parameters of boolean type
  5572. MODULE Test;
  5573. TYPE Procedure = PROCEDURE (a: BOOLEAN; VAR b: BOOLEAN; CONST c: BOOLEAN);
  5574. END Test.
  5575. positive: procedure type with a parameter of basic short integer type
  5576. MODULE Test;
  5577. TYPE Procedure = PROCEDURE (parameter: SHORTINT);
  5578. END Test.
  5579. positive: procedure type with parameters of basic short integer type
  5580. MODULE Test;
  5581. TYPE Procedure = PROCEDURE (a, b, c: SHORTINT);
  5582. END Test.
  5583. positive: procedure type with a parameter of variable short integer type
  5584. MODULE Test;
  5585. TYPE Procedure = PROCEDURE (VAR parameter: SHORTINT);
  5586. END Test.
  5587. positive: procedure type with parameters of variable short integer type
  5588. MODULE Test;
  5589. TYPE Procedure = PROCEDURE (VAR a, b, c: SHORTINT);
  5590. END Test.
  5591. positive: procedure type with a parameter of constant short integer type
  5592. MODULE Test;
  5593. TYPE Procedure = PROCEDURE (CONST parameter: SHORTINT);
  5594. END Test.
  5595. positive: procedure type with parameters of constant short integer type
  5596. MODULE Test;
  5597. TYPE Procedure = PROCEDURE (CONST a, b, c: SHORTINT);
  5598. END Test.
  5599. positive: procedure type with intermixed parameters of short integer type
  5600. MODULE Test;
  5601. TYPE Procedure = PROCEDURE (a: SHORTINT; VAR b: SHORTINT; CONST c: SHORTINT);
  5602. END Test.
  5603. positive: procedure type with a parameter of basic integer type
  5604. MODULE Test;
  5605. TYPE Procedure = PROCEDURE (parameter: INTEGER);
  5606. END Test.
  5607. positive: procedure type with parameters of basic integer type
  5608. MODULE Test;
  5609. TYPE Procedure = PROCEDURE (a, b, c: INTEGER);
  5610. END Test.
  5611. positive: procedure type with a parameter of variable integer type
  5612. MODULE Test;
  5613. TYPE Procedure = PROCEDURE (VAR parameter: INTEGER);
  5614. END Test.
  5615. positive: procedure type with parameters of variable integer type
  5616. MODULE Test;
  5617. TYPE Procedure = PROCEDURE (VAR a, b, c: INTEGER);
  5618. END Test.
  5619. positive: procedure type with a parameter of constant integer type
  5620. MODULE Test;
  5621. TYPE Procedure = PROCEDURE (CONST parameter: INTEGER);
  5622. END Test.
  5623. positive: procedure type with parameters of constant integer type
  5624. MODULE Test;
  5625. TYPE Procedure = PROCEDURE (CONST a, b, c: INTEGER);
  5626. END Test.
  5627. positive: procedure type with intermixed parameters of integer type
  5628. MODULE Test;
  5629. TYPE Procedure = PROCEDURE (a: INTEGER; VAR b: INTEGER; CONST c: INTEGER);
  5630. END Test.
  5631. positive: procedure type with a parameter of basic long integer type
  5632. MODULE Test;
  5633. TYPE Procedure = PROCEDURE (parameter: LONGINT);
  5634. END Test.
  5635. positive: procedure type with parameters of basic long integer type
  5636. MODULE Test;
  5637. TYPE Procedure = PROCEDURE (a, b, c: LONGINT);
  5638. END Test.
  5639. positive: procedure type with a parameter of variable long integer type
  5640. MODULE Test;
  5641. TYPE Procedure = PROCEDURE (VAR parameter: LONGINT);
  5642. END Test.
  5643. positive: procedure type with parameters of variable long integer type
  5644. MODULE Test;
  5645. TYPE Procedure = PROCEDURE (VAR a, b, c: LONGINT);
  5646. END Test.
  5647. positive: procedure type with a parameter of constant long integer type
  5648. MODULE Test;
  5649. TYPE Procedure = PROCEDURE (CONST parameter: LONGINT);
  5650. END Test.
  5651. positive: procedure type with parameters of constant long integer type
  5652. MODULE Test;
  5653. TYPE Procedure = PROCEDURE (CONST a, b, c: LONGINT);
  5654. END Test.
  5655. positive: procedure type with intermixed parameters of long integer type
  5656. MODULE Test;
  5657. TYPE Procedure = PROCEDURE (a: LONGINT; VAR b: LONGINT; CONST c: LONGINT);
  5658. END Test.
  5659. positive: procedure type with a parameter of basic huge integer type
  5660. MODULE Test;
  5661. TYPE Procedure = PROCEDURE (parameter: HUGEINT);
  5662. END Test.
  5663. positive: procedure type with parameters of basic huge integer type
  5664. MODULE Test;
  5665. TYPE Procedure = PROCEDURE (a, b, c: HUGEINT);
  5666. END Test.
  5667. positive: procedure type with a parameter of variable huge integer type
  5668. MODULE Test;
  5669. TYPE Procedure = PROCEDURE (VAR parameter: HUGEINT);
  5670. END Test.
  5671. positive: procedure type with parameters of variable huge integer type
  5672. MODULE Test;
  5673. TYPE Procedure = PROCEDURE (VAR a, b, c: HUGEINT);
  5674. END Test.
  5675. positive: procedure type with a parameter of constant huge integer type
  5676. MODULE Test;
  5677. TYPE Procedure = PROCEDURE (CONST parameter: HUGEINT);
  5678. END Test.
  5679. positive: procedure type with parameters of constant huge integer type
  5680. MODULE Test;
  5681. TYPE Procedure = PROCEDURE (CONST a, b, c: HUGEINT);
  5682. END Test.
  5683. positive: procedure type with intermixed parameters of huge integer type
  5684. MODULE Test;
  5685. TYPE Procedure = PROCEDURE (a: HUGEINT; VAR b: HUGEINT; CONST c: HUGEINT);
  5686. END Test.
  5687. positive: procedure type with a parameter of basic real type
  5688. MODULE Test;
  5689. TYPE Procedure = PROCEDURE (parameter: REAL);
  5690. END Test.
  5691. positive: procedure type with parameters of basic real type
  5692. MODULE Test;
  5693. TYPE Procedure = PROCEDURE (a, b, c: REAL);
  5694. END Test.
  5695. positive: procedure type with a parameter of variable real type
  5696. MODULE Test;
  5697. TYPE Procedure = PROCEDURE (VAR parameter: REAL);
  5698. END Test.
  5699. positive: procedure type with parameters of variable real type
  5700. MODULE Test;
  5701. TYPE Procedure = PROCEDURE (VAR a, b, c: REAL);
  5702. END Test.
  5703. positive: procedure type with a parameter of constant real type
  5704. MODULE Test;
  5705. TYPE Procedure = PROCEDURE (CONST parameter: REAL);
  5706. END Test.
  5707. positive: procedure type with parameters of constant real type
  5708. MODULE Test;
  5709. TYPE Procedure = PROCEDURE (CONST a, b, c: REAL);
  5710. END Test.
  5711. positive: procedure type with intermixed parameters of real type
  5712. MODULE Test;
  5713. TYPE Procedure = PROCEDURE (a: REAL; VAR b: REAL; CONST c: REAL);
  5714. END Test.
  5715. positive: procedure type with a parameter of basic long real type
  5716. MODULE Test;
  5717. TYPE Procedure = PROCEDURE (parameter: LONGREAL);
  5718. END Test.
  5719. positive: procedure type with parameters of basic long real type
  5720. MODULE Test;
  5721. TYPE Procedure = PROCEDURE (a, b, c: LONGREAL);
  5722. END Test.
  5723. positive: procedure type with a parameter of variable long real type
  5724. MODULE Test;
  5725. TYPE Procedure = PROCEDURE (VAR parameter: LONGREAL);
  5726. END Test.
  5727. positive: procedure type with parameters of variable long real type
  5728. MODULE Test;
  5729. TYPE Procedure = PROCEDURE (VAR a, b, c: LONGREAL);
  5730. END Test.
  5731. positive: procedure type with a parameter of constant long real type
  5732. MODULE Test;
  5733. TYPE Procedure = PROCEDURE (CONST parameter: LONGREAL);
  5734. END Test.
  5735. positive: procedure type with parameters of constant long real type
  5736. MODULE Test;
  5737. TYPE Procedure = PROCEDURE (CONST a, b, c: LONGREAL);
  5738. END Test.
  5739. positive: procedure type with intermixed parameters of long real type
  5740. MODULE Test;
  5741. TYPE Procedure = PROCEDURE (a: LONGREAL; VAR b: LONGREAL; CONST c: LONGREAL);
  5742. END Test.
  5743. positive: procedure type with a parameter of basic set type
  5744. MODULE Test;
  5745. TYPE Procedure = PROCEDURE (parameter: SET);
  5746. END Test.
  5747. positive: procedure type with parameters of basic set type
  5748. MODULE Test;
  5749. TYPE Procedure = PROCEDURE (a, b, c: SET);
  5750. END Test.
  5751. positive: procedure type with a parameter of variable set type
  5752. MODULE Test;
  5753. TYPE Procedure = PROCEDURE (VAR parameter: SET);
  5754. END Test.
  5755. positive: procedure type with parameters of variable set type
  5756. MODULE Test;
  5757. TYPE Procedure = PROCEDURE (VAR a, b, c: SET);
  5758. END Test.
  5759. positive: procedure type with a parameter of constant set type
  5760. MODULE Test;
  5761. TYPE Procedure = PROCEDURE (CONST parameter: SET);
  5762. END Test.
  5763. positive: procedure type with parameters of constant set type
  5764. MODULE Test;
  5765. TYPE Procedure = PROCEDURE (CONST a, b, c: SET);
  5766. END Test.
  5767. positive: procedure type with intermixed parameters of set type
  5768. MODULE Test;
  5769. TYPE Procedure = PROCEDURE (a: SET; VAR b: SET; CONST c: SET);
  5770. END Test.
  5771. positive: procedure type with a parameter of record type
  5772. MODULE Test;
  5773. TYPE Record = RECORD END;
  5774. TYPE Procedure = PROCEDURE (parameter: Record);
  5775. END Test.
  5776. positive: procedure type with parameters of record type
  5777. MODULE Test;
  5778. TYPE Record = RECORD END;
  5779. TYPE Procedure = PROCEDURE (a, b, c: Record);
  5780. END Test.
  5781. positive: procedure type with a parameter of variable record type
  5782. MODULE Test;
  5783. TYPE Record = RECORD END;
  5784. TYPE Procedure = PROCEDURE (VAR parameter: Record);
  5785. END Test.
  5786. positive: procedure type with parameters of variable record type
  5787. MODULE Test;
  5788. TYPE Record = RECORD END;
  5789. TYPE Procedure = PROCEDURE (VAR a, b, c: Record);
  5790. END Test.
  5791. positive: procedure type with a parameter of constant record type
  5792. MODULE Test;
  5793. TYPE Record = RECORD END;
  5794. TYPE Procedure = PROCEDURE (CONST parameter: Record);
  5795. END Test.
  5796. positive: procedure type with parameters of constant record type
  5797. MODULE Test;
  5798. TYPE Record = RECORD END;
  5799. TYPE Procedure = PROCEDURE (CONST a, b, c: Record);
  5800. END Test.
  5801. positive: procedure type with intermixed parameters of record type
  5802. MODULE Test;
  5803. TYPE Record = RECORD END;
  5804. TYPE Procedure = PROCEDURE (a: Record; VAR b: Record; CONST c: Record);
  5805. END Test.
  5806. positive: procedure type with a parameter of anonymous record type
  5807. MODULE Test;
  5808. TYPE Record = RECORD END;
  5809. TYPE Procedure = PROCEDURE (parameter: RECORD END);
  5810. END Test.
  5811. positive: procedure type with parameters of anonymous record type
  5812. MODULE Test;
  5813. TYPE Procedure = PROCEDURE (a, b, c: RECORD END);
  5814. END Test.
  5815. positive: procedure type with a parameter of variable anonymous record type
  5816. MODULE Test;
  5817. TYPE Procedure = PROCEDURE (VAR parameter: RECORD END);
  5818. END Test.
  5819. positive: procedure type with parameters of variable anonymous record type
  5820. MODULE Test;
  5821. TYPE Procedure = PROCEDURE (VAR a, b, c: RECORD END);
  5822. END Test.
  5823. positive: procedure type with a parameter of constant anonymous record type
  5824. MODULE Test;
  5825. TYPE Procedure = PROCEDURE (CONST parameter: RECORD END);
  5826. END Test.
  5827. positive: procedure type with parameters of constant anonymous record type
  5828. MODULE Test;
  5829. TYPE Procedure = PROCEDURE (CONST a, b, c: RECORD END);
  5830. END Test.
  5831. positive: procedure type with intermixed parameters of anonymous record type
  5832. MODULE Test;
  5833. TYPE Procedure = PROCEDURE (a: RECORD END; VAR b: RECORD END; CONST c: RECORD END);
  5834. END Test.
  5835. positive: procedure type with a parameter of array type
  5836. MODULE Test;
  5837. TYPE Array = ARRAY 10 OF RECORD END;
  5838. TYPE Procedure = PROCEDURE (parameter: Array);
  5839. END Test.
  5840. positive: procedure type with parameters of array type
  5841. MODULE Test;
  5842. TYPE Array = ARRAY 10 OF RECORD END;
  5843. TYPE Procedure = PROCEDURE (a, b, c: Array);
  5844. END Test.
  5845. positive: procedure type with a parameter of variable array type
  5846. MODULE Test;
  5847. TYPE Array = ARRAY 10 OF RECORD END;
  5848. TYPE Procedure = PROCEDURE (VAR parameter: Array);
  5849. END Test.
  5850. positive: procedure type with parameters of variable array type
  5851. MODULE Test;
  5852. TYPE Array = ARRAY 10 OF RECORD END;
  5853. TYPE Procedure = PROCEDURE (VAR a, b, c: Array);
  5854. END Test.
  5855. positive: procedure type with a parameter of constant array type
  5856. MODULE Test;
  5857. TYPE Array = ARRAY 10 OF RECORD END;
  5858. TYPE Procedure = PROCEDURE (CONST parameter: Array);
  5859. END Test.
  5860. positive: procedure type with parameters of constant array type
  5861. MODULE Test;
  5862. TYPE Array = ARRAY 10 OF RECORD END;
  5863. TYPE Procedure = PROCEDURE (CONST a, b, c: Array);
  5864. END Test.
  5865. positive: procedure type with intermixed parameters of array type
  5866. MODULE Test;
  5867. TYPE Array = ARRAY 10 OF RECORD END;
  5868. TYPE Procedure = PROCEDURE (a: Array; VAR b: Array; CONST c: Array);
  5869. END Test.
  5870. positive: procedure type with a parameter of anonymous array type
  5871. MODULE Test;
  5872. TYPE Procedure = PROCEDURE (parameter: ARRAY 10 OF RECORD END);
  5873. END Test.
  5874. positive: procedure type with parameters of anonymous array type
  5875. MODULE Test;
  5876. TYPE Procedure = PROCEDURE (a, b, c: ARRAY 10 OF RECORD END);
  5877. END Test.
  5878. positive: procedure type with a parameter of variable anonymous array type
  5879. MODULE Test;
  5880. TYPE Procedure = PROCEDURE (VAR parameter: ARRAY 10 OF RECORD END);
  5881. END Test.
  5882. positive: procedure type with parameters of variable anonymous array type
  5883. MODULE Test;
  5884. TYPE Procedure = PROCEDURE (VAR a, b, c: ARRAY 10 OF RECORD END);
  5885. END Test.
  5886. positive: procedure type with a parameter of constant anonymous array type
  5887. MODULE Test;
  5888. TYPE Procedure = PROCEDURE (CONST parameter: ARRAY 10 OF RECORD END);
  5889. END Test.
  5890. positive: procedure type with parameters of constant anonymous array type
  5891. MODULE Test;
  5892. TYPE Procedure = PROCEDURE (CONST a, b, c: ARRAY 10 OF RECORD END);
  5893. END Test.
  5894. positive: procedure type with intermixed parameters of anonymous array type
  5895. MODULE Test;
  5896. TYPE Procedure = PROCEDURE (a: ARRAY 10 OF RECORD END; VAR b: ARRAY 10 OF RECORD END; CONST c: ARRAY 10 OF RECORD END);
  5897. END Test.
  5898. positive: procedure type with a parameter of open array type
  5899. MODULE Test;
  5900. TYPE Array = ARRAY OF RECORD END;
  5901. TYPE Procedure = PROCEDURE (parameter: Array);
  5902. END Test.
  5903. positive: procedure type with parameters of open array type
  5904. MODULE Test;
  5905. TYPE Array = ARRAY OF RECORD END;
  5906. TYPE Procedure = PROCEDURE (a, b, c: Array);
  5907. END Test.
  5908. positive: procedure type with a parameter of variable open array type
  5909. MODULE Test;
  5910. TYPE Array = ARRAY OF RECORD END;
  5911. TYPE Procedure = PROCEDURE (VAR parameter: Array);
  5912. END Test.
  5913. positive: procedure type with parameters of variable open array type
  5914. MODULE Test;
  5915. TYPE Array = ARRAY OF RECORD END;
  5916. TYPE Procedure = PROCEDURE (VAR a, b, c: Array);
  5917. END Test.
  5918. positive: procedure type with a parameter of constant open array type
  5919. MODULE Test;
  5920. TYPE Array = ARRAY OF RECORD END;
  5921. TYPE Procedure = PROCEDURE (CONST parameter: Array);
  5922. END Test.
  5923. positive: procedure type with parameters of constant open array type
  5924. MODULE Test;
  5925. TYPE Array = ARRAY OF RECORD END;
  5926. TYPE Procedure = PROCEDURE (CONST a, b, c: Array);
  5927. END Test.
  5928. positive: procedure type with intermixed parameters of open array type
  5929. MODULE Test;
  5930. TYPE Array = ARRAY OF RECORD END;
  5931. TYPE Procedure = PROCEDURE (a: Array; VAR b: Array; CONST c: Array);
  5932. END Test.
  5933. positive: procedure type with a parameter of anonymous open array type
  5934. MODULE Test;
  5935. TYPE Procedure = PROCEDURE (parameter: ARRAY OF RECORD END);
  5936. END Test.
  5937. positive: procedure type with parameters of anonymous open array type
  5938. MODULE Test;
  5939. TYPE Procedure = PROCEDURE (a, b, c: ARRAY OF RECORD END);
  5940. END Test.
  5941. positive: procedure type with a parameter of variable anonymous open array type
  5942. MODULE Test;
  5943. TYPE Procedure = PROCEDURE (VAR parameter: ARRAY OF RECORD END);
  5944. END Test.
  5945. positive: procedure type with parameters of variable anonymous open array type
  5946. MODULE Test;
  5947. TYPE Procedure = PROCEDURE (VAR a, b, c: ARRAY OF RECORD END);
  5948. END Test.
  5949. positive: procedure type with a parameter of constant anonymous open array type
  5950. MODULE Test;
  5951. TYPE Procedure = PROCEDURE (CONST parameter: ARRAY OF RECORD END);
  5952. END Test.
  5953. positive: procedure type with parameters of constant anonymous open array type
  5954. MODULE Test;
  5955. TYPE Procedure = PROCEDURE (CONST a, b, c: ARRAY OF RECORD END);
  5956. END Test.
  5957. positive: procedure type with intermixed parameters of anonymous open array type
  5958. MODULE Test;
  5959. TYPE Procedure = PROCEDURE (a: ARRAY OF RECORD END; VAR b: ARRAY OF RECORD END; CONST c: ARRAY OF RECORD END);
  5960. END Test.
  5961. positive: procedure type with a parameter of object type
  5962. MODULE Test;
  5963. TYPE Object = OBJECT END Object;
  5964. TYPE Procedure = PROCEDURE (parameter: Object);
  5965. END Test.
  5966. positive: procedure type with parameters of object type
  5967. MODULE Test;
  5968. TYPE Object = OBJECT END Object;
  5969. TYPE Procedure = PROCEDURE (a, b, c: Object);
  5970. END Test.
  5971. positive: procedure type with a parameter of variable object type
  5972. MODULE Test;
  5973. TYPE Object = OBJECT END Object;
  5974. TYPE Procedure = PROCEDURE (VAR parameter: Object);
  5975. END Test.
  5976. positive: procedure type with parameters of variable object type
  5977. MODULE Test;
  5978. TYPE Object = OBJECT END Object;
  5979. TYPE Procedure = PROCEDURE (VAR a, b, c: Object);
  5980. END Test.
  5981. positive: procedure type with a parameter of constant object type
  5982. MODULE Test;
  5983. TYPE Object = OBJECT END Object;
  5984. TYPE Procedure = PROCEDURE (CONST parameter: Object);
  5985. END Test.
  5986. positive: procedure type with parameters of constant object type
  5987. MODULE Test;
  5988. TYPE Object = OBJECT END Object;
  5989. TYPE Procedure = PROCEDURE (CONST a, b, c: Object);
  5990. END Test.
  5991. positive: procedure type with intermixed parameters of object type
  5992. MODULE Test;
  5993. TYPE Object = OBJECT END Object;
  5994. TYPE Procedure = PROCEDURE (a: Object; VAR b: Object; CONST c: Object);
  5995. END Test.
  5996. positive: procedure type with a parameter of anonymous object type
  5997. MODULE Test;
  5998. TYPE Procedure = PROCEDURE (parameter: OBJECT END);
  5999. END Test.
  6000. positive: procedure type with parameters of anonymous object type
  6001. MODULE Test;
  6002. TYPE Procedure = PROCEDURE (a, b, c: OBJECT END);
  6003. END Test.
  6004. positive: procedure type with a parameter of variable anonymous object type
  6005. MODULE Test;
  6006. TYPE Procedure = PROCEDURE (VAR parameter: OBJECT END);
  6007. END Test.
  6008. positive: procedure type with parameters of variable anonymous object type
  6009. MODULE Test;
  6010. TYPE Procedure = PROCEDURE (VAR a, b, c: OBJECT END);
  6011. END Test.
  6012. positive: procedure type with a parameter of constant anonymous object type
  6013. MODULE Test;
  6014. TYPE Procedure = PROCEDURE (CONST parameter: OBJECT END);
  6015. END Test.
  6016. positive: procedure type with parameters of constant anonymous object type
  6017. MODULE Test;
  6018. TYPE Procedure = PROCEDURE (CONST a, b, c: OBJECT END);
  6019. END Test.
  6020. positive: procedure type with intermixed parameters of anonymous object type
  6021. MODULE Test;
  6022. TYPE Procedure = PROCEDURE (a: OBJECT END; VAR b: OBJECT END; CONST c: OBJECT END);
  6023. END Test.
  6024. positive: procedure type with a parameter of pointer type
  6025. MODULE Test;
  6026. TYPE Pointer = POINTER TO RECORD END;
  6027. TYPE Procedure = PROCEDURE (parameter: Pointer);
  6028. END Test.
  6029. positive: procedure type with parameters of pointer type
  6030. MODULE Test;
  6031. TYPE Pointer = POINTER TO RECORD END;
  6032. TYPE Procedure = PROCEDURE (a, b, c: Pointer);
  6033. END Test.
  6034. positive: procedure type with a parameter of variable pointer type
  6035. MODULE Test;
  6036. TYPE Pointer = POINTER TO RECORD END;
  6037. TYPE Procedure = PROCEDURE (VAR parameter: Pointer);
  6038. END Test.
  6039. positive: procedure type with parameters of variable pointer type
  6040. MODULE Test;
  6041. TYPE Pointer = POINTER TO RECORD END;
  6042. TYPE Procedure = PROCEDURE (VAR a, b, c: Pointer);
  6043. END Test.
  6044. positive: procedure type with a parameter of constant pointer type
  6045. MODULE Test;
  6046. TYPE Pointer = POINTER TO RECORD END;
  6047. TYPE Procedure = PROCEDURE (CONST parameter: Pointer);
  6048. END Test.
  6049. positive: procedure type with parameters of constant pointer type
  6050. MODULE Test;
  6051. TYPE Pointer = POINTER TO RECORD END;
  6052. TYPE Procedure = PROCEDURE (CONST a, b, c: Pointer);
  6053. END Test.
  6054. positive: procedure type with intermixed parameters of pointer type
  6055. MODULE Test;
  6056. TYPE Pointer = POINTER TO RECORD END;
  6057. TYPE Procedure = PROCEDURE (a: Pointer; VAR b: Pointer; CONST c: Pointer);
  6058. END Test.
  6059. positive: procedure type with a parameter of anonymous pointer type
  6060. MODULE Test;
  6061. TYPE Procedure = PROCEDURE (parameter: POINTER TO RECORD END);
  6062. END Test.
  6063. positive: procedure type with parameters of anonymous pointer type
  6064. MODULE Test;
  6065. TYPE Procedure = PROCEDURE (a, b, c: POINTER TO RECORD END);
  6066. END Test.
  6067. positive: procedure type with a parameter of variable anonymous pointer type
  6068. MODULE Test;
  6069. TYPE Procedure = PROCEDURE (VAR parameter: POINTER TO RECORD END);
  6070. END Test.
  6071. positive: procedure type with parameters of variable anonymous pointer type
  6072. MODULE Test;
  6073. TYPE Procedure = PROCEDURE (VAR a, b, c: POINTER TO RECORD END);
  6074. END Test.
  6075. positive: procedure type with a parameter of constant anonymous pointer type
  6076. MODULE Test;
  6077. TYPE Procedure = PROCEDURE (CONST parameter: OBJECT END);
  6078. END Test.
  6079. positive: procedure type with parameters of constant anonymous pointer type
  6080. MODULE Test;
  6081. TYPE Procedure = PROCEDURE (CONST a, b, c: POINTER TO RECORD END);
  6082. END Test.
  6083. positive: procedure type with intermixed parameters of anonymous pointer type
  6084. MODULE Test;
  6085. TYPE Procedure = PROCEDURE (a: POINTER TO RECORD END; VAR b: POINTER TO RECORD END; CONST c: POINTER TO RECORD END);
  6086. END Test.
  6087. positive: procedure type with a parameter of procedure type
  6088. MODULE Test;
  6089. TYPE ProcedureType = PROCEDURE;
  6090. TYPE Procedure = PROCEDURE (parameter: ProcedureType);
  6091. END Test.
  6092. positive: procedure type with parameters of procedure type
  6093. MODULE Test;
  6094. TYPE ProcedureType = PROCEDURE;
  6095. TYPE Procedure = PROCEDURE (a, b, c: ProcedureType);
  6096. END Test.
  6097. positive: procedure type with a parameter of variable procedure type
  6098. MODULE Test;
  6099. TYPE ProcedureType = PROCEDURE;
  6100. TYPE Procedure = PROCEDURE (VAR parameter: ProcedureType);
  6101. END Test.
  6102. positive: procedure type with parameters of variable procedure type
  6103. MODULE Test;
  6104. TYPE ProcedureType = PROCEDURE;
  6105. TYPE Procedure = PROCEDURE (VAR a, b, c: ProcedureType);
  6106. END Test.
  6107. positive: procedure type with a parameter of constant procedure type
  6108. MODULE Test;
  6109. TYPE ProcedureType = PROCEDURE;
  6110. TYPE Procedure = PROCEDURE (CONST parameter: ProcedureType);
  6111. END Test.
  6112. positive: procedure type with parameters of constant procedure type
  6113. MODULE Test;
  6114. TYPE ProcedureType = PROCEDURE;
  6115. TYPE Procedure = PROCEDURE (CONST a, b, c: ProcedureType);
  6116. END Test.
  6117. positive: procedure type with intermixed parameters of procedure type
  6118. MODULE Test;
  6119. TYPE ProcedureType = PROCEDURE;
  6120. TYPE Procedure = PROCEDURE (a: ProcedureType; VAR b: ProcedureType; CONST c: ProcedureType);
  6121. END Test.
  6122. positive: procedure type with a parameter of anonymous procedure type
  6123. MODULE Test;
  6124. TYPE Procedure = PROCEDURE (parameter: PROCEDURE);
  6125. END Test.
  6126. positive: procedure type with parameters of anonymous procedure type
  6127. MODULE Test;
  6128. TYPE Procedure = PROCEDURE (a, b, c: PROCEDURE);
  6129. END Test.
  6130. positive: procedure type with a parameter of variable anonymous procedure type
  6131. MODULE Test;
  6132. TYPE Procedure = PROCEDURE (VAR parameter: PROCEDURE);
  6133. END Test.
  6134. positive: procedure type with parameters of variable anonymous procedure type
  6135. MODULE Test;
  6136. TYPE Procedure = PROCEDURE (VAR a, b, c: PROCEDURE);
  6137. END Test.
  6138. positive: procedure type with a parameter of constant anonymous procedure type
  6139. MODULE Test;
  6140. TYPE Procedure = PROCEDURE (CONST parameter: PROCEDURE);
  6141. END Test.
  6142. positive: procedure type with parameters of constant anonymous procedure type
  6143. MODULE Test;
  6144. TYPE Procedure = PROCEDURE (CONST a, b, c: PROCEDURE);
  6145. END Test.
  6146. positive: procedure type with intermixed parameters of anonymous procedure type
  6147. MODULE Test;
  6148. TYPE Procedure = PROCEDURE (a: PROCEDURE; VAR b: PROCEDURE; CONST c: PROCEDURE);
  6149. END Test.
  6150. # enumerations
  6151. positive: simple enumeration
  6152. MODULE Test;
  6153. TYPE Color=ENUM red, green, blue END;
  6154. VAR color: Color;
  6155. BEGIN color := Color.red END Test.
  6156. positive: enumeration type extension
  6157. MODULE Test;
  6158. TYPE Color=ENUM red, green, blue END;
  6159. FineColor=ENUM (Color) black, white END;
  6160. VAR color: FineColor;
  6161. BEGIN color := Color.red; color := FineColor.white END Test.
  6162. positive: enumeration assignment compatibility
  6163. MODULE Test;
  6164. TYPE Color=ENUM red, green, blue END;
  6165. FineColor=ENUM(Color) black, white END;
  6166. VAR color,color2: Color; fineColor,fineColor2: FineColor;
  6167. BEGIN color := Color.blue; fineColor := Color.red; fineColor := FineColor.black;
  6168. color2 := color; fineColor2 := fineColor;
  6169. fineColor := color;
  6170. END Test.
  6171. negative: wrong enumeration assignment
  6172. MODULE Test;
  6173. TYPE Color=ENUM red, green, blue END;
  6174. FineColor=ENUM(Color) black, white END;
  6175. VAR color,color2: Color; fineColor,fineColor2: FineColor;
  6176. BEGIN color := fineColor
  6177. END Test.
  6178. positive: enumeration comparison compatibility
  6179. MODULE Test;
  6180. TYPE Color=ENUM red, green, blue END;
  6181. FineColor=ENUM(Color) black, white END;
  6182. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6183. BEGIN
  6184. b := color = color2;
  6185. b := color # color2;
  6186. b := fineColor = fineColor2;
  6187. b := fineColor # fineColor2;
  6188. b := color = fineColor;
  6189. b := fineColor = color;
  6190. END Test.
  6191. positive: enumeration comparison with impossible value (extension)
  6192. MODULE Test;
  6193. TYPE Color=ENUM red, green, blue END;
  6194. FineColor=ENUM(Color) black, white END;
  6195. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6196. BEGIN
  6197. b := color = FineColor.white;
  6198. END Test.
  6199. positive: passing enumeration as parameter
  6200. MODULE Test;
  6201. TYPE Color=ENUM red, green, blue END;
  6202. FineColor=ENUM(Color) black, white END;
  6203. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6204. PROCEDURE P1(color: Color);
  6205. BEGIN END P1;
  6206. PROCEDURE P2(color: FineColor);
  6207. BEGIN END P2;
  6208. PROCEDURE P1V(VAR color: Color);
  6209. BEGIN END P1V;
  6210. PROCEDURE P2V(VAR color: FineColor);
  6211. BEGIN END P2V;
  6212. BEGIN
  6213. P1(color);
  6214. P2(fineColor);
  6215. P2(color);
  6216. P1V(color);
  6217. P2V(fineColor);
  6218. END Test.
  6219. negative: passing enumeration extension on base type
  6220. MODULE Test;
  6221. TYPE Color=ENUM red, green, blue END;
  6222. FineColor=ENUM(Color) black, white END;
  6223. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6224. PROCEDURE P1(color: Color);
  6225. BEGIN END P1;
  6226. BEGIN
  6227. P1(fineColor);
  6228. END Test.
  6229. negative: passing enumeration extension on extended type as var parameter
  6230. MODULE Test;
  6231. TYPE Color=ENUM red, green, blue END;
  6232. FineColor=ENUM(Color) black, white END;
  6233. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6234. PROCEDURE P1(VAR color: Color);
  6235. BEGIN END P1;
  6236. BEGIN
  6237. P1(fineColor);
  6238. END Test.
  6239. positive: returning enumeration type
  6240. MODULE Test;
  6241. TYPE
  6242. Enumeration = ENUM
  6243. red, green, blue
  6244. END;
  6245. PROCEDURE Test(): Enumeration;
  6246. BEGIN
  6247. RETURN Enumeration.green;
  6248. END Test;
  6249. BEGIN
  6250. ASSERT(Test() = Enumeration.green);
  6251. END Test.
  6252. # variables
  6253. positive: unmarked variable
  6254. MODULE Test;
  6255. VAR variable: RECORD END;
  6256. END Test.
  6257. positive: initializing unmarked variable
  6258. MODULE Test;
  6259. VAR variable: INTEGER;
  6260. BEGIN variable := 0
  6261. END Test.
  6262. positive: unmarked variable within procedure
  6263. MODULE Test;
  6264. PROCEDURE Procedure;
  6265. VAR variable: RECORD END;
  6266. END Procedure;
  6267. END Test.
  6268. positive: initializing unmarked variable within procedure
  6269. MODULE Test;
  6270. PROCEDURE Procedure;
  6271. VAR variable: INTEGER;
  6272. BEGIN variable := 0
  6273. END Procedure;
  6274. END Test.
  6275. positive: unmarked variable within nested procedure
  6276. MODULE Test;
  6277. PROCEDURE Procedure;
  6278. PROCEDURE Procedure;
  6279. VAR variable: RECORD END;
  6280. END Procedure;
  6281. END Procedure;
  6282. END Test.
  6283. positive: initializing unmarked variable within nested procedure
  6284. MODULE Test;
  6285. PROCEDURE Procedure;
  6286. PROCEDURE Procedure;
  6287. VAR variable: INTEGER;
  6288. BEGIN variable := 0
  6289. END Procedure;
  6290. END Procedure;
  6291. END Test.
  6292. positive: unmarked variable within record
  6293. MODULE Test;
  6294. TYPE Record = RECORD
  6295. variable: RECORD END;
  6296. END;
  6297. END Test.
  6298. positive: initializing unmarked variable within record
  6299. MODULE Test;
  6300. TYPE Record = RECORD
  6301. variable: INTEGER;
  6302. END;
  6303. VAR record: Record;
  6304. BEGIN record.variable := 0
  6305. END Test.
  6306. positive: unmarked variable within object
  6307. MODULE Test;
  6308. TYPE Object = OBJECT
  6309. VAR variable: RECORD END;
  6310. END Object;
  6311. END Test.
  6312. positive: initializing unmarked variable within object
  6313. MODULE Test;
  6314. TYPE Object = OBJECT
  6315. VAR variable: INTEGER;
  6316. BEGIN variable := 0
  6317. END Object;
  6318. END Test.
  6319. positive: unmarked variable within record in procedure
  6320. MODULE Test;
  6321. PROCEDURE Procedure;
  6322. TYPE Record = RECORD
  6323. variable: RECORD END;
  6324. END;
  6325. END Procedure;
  6326. END Test.
  6327. positive: initializing unmarked variable within record in procedure
  6328. MODULE Test;
  6329. PROCEDURE Procedure;
  6330. TYPE Record = RECORD
  6331. variable: INTEGER;
  6332. END;
  6333. VAR record: Record;
  6334. BEGIN record.variable := 0
  6335. END Procedure;
  6336. END Test.
  6337. positive: unmarked variable within object in procedure
  6338. MODULE Test;
  6339. PROCEDURE Procedure;
  6340. TYPE Object = OBJECT
  6341. VAR variable: RECORD END;
  6342. END Object;
  6343. END Procedure;
  6344. END Test.
  6345. positive: initializing unmarked variable within object in procedure
  6346. MODULE Test;
  6347. PROCEDURE Procedure;
  6348. TYPE Object = OBJECT
  6349. VAR variable: INTEGER;
  6350. BEGIN variable := 0
  6351. END Object;
  6352. END Procedure;
  6353. END Test.
  6354. positive: unmarked variable within procedure in object
  6355. MODULE Test;
  6356. TYPE Object = OBJECT
  6357. PROCEDURE Procedure;
  6358. VAR variable: RECORD END;
  6359. END Procedure;
  6360. END Object;
  6361. END Test.
  6362. positive: initializing unmarked variable within procedure in object
  6363. MODULE Test;
  6364. TYPE Object = OBJECT
  6365. PROCEDURE Procedure;
  6366. VAR variable: INTEGER;
  6367. BEGIN variable := 0
  6368. END Procedure;
  6369. END Object;
  6370. END Test.
  6371. positive: variable marked as exported
  6372. MODULE Test;
  6373. VAR variable*: RECORD END;
  6374. END Test.
  6375. positive: initializing variable marked as exported
  6376. MODULE Test;
  6377. VAR variable*: INTEGER;
  6378. BEGIN variable := 0
  6379. END Test.
  6380. negative: variable marked as exported within procedure
  6381. MODULE Test;
  6382. PROCEDURE Procedure;
  6383. VAR variable*: RECORD END;
  6384. END Procedure;
  6385. END Test.
  6386. negative: variable marked as exported within nested procedure
  6387. MODULE Test;
  6388. PROCEDURE Procedure;
  6389. PROCEDURE Procedure;
  6390. VAR variable*: RECORD END;
  6391. END Procedure;
  6392. END Procedure;
  6393. END Test.
  6394. positive: variable marked as exported within record
  6395. MODULE Test;
  6396. TYPE Record = RECORD
  6397. variable*: RECORD END;
  6398. END;
  6399. END Test.
  6400. positive: initializing variable marked as exported within record
  6401. MODULE Test;
  6402. TYPE Record = RECORD
  6403. variable*: INTEGER;
  6404. END;
  6405. VAR record: Record;
  6406. BEGIN record.variable := 0
  6407. END Test.
  6408. positive: variable marked as exported within object
  6409. MODULE Test;
  6410. TYPE Object = OBJECT
  6411. VAR variable*: RECORD END;
  6412. END Object;
  6413. END Test.
  6414. positive: initializing variable marked as exported within object
  6415. MODULE Test;
  6416. TYPE Object = OBJECT
  6417. VAR variable*: INTEGER;
  6418. BEGIN variable := 0
  6419. END Object;
  6420. END Test.
  6421. negative: variable marked as exported within record in procedure
  6422. MODULE Test;
  6423. PROCEDURE Procedure;
  6424. TYPE Record = RECORD
  6425. variable*: RECORD END;
  6426. END;
  6427. END Procedure;
  6428. END Test.
  6429. negative: variable marked as exported within object in procedure
  6430. MODULE Test;
  6431. PROCEDURE Procedure;
  6432. TYPE Object = OBJECT
  6433. VAR variable*: RECORD END;
  6434. END Object;
  6435. END Procedure;
  6436. END Test.
  6437. negative: variable marked as exported within procedure in object
  6438. MODULE Test;
  6439. TYPE Object = OBJECT
  6440. PROCEDURE Procedure;
  6441. VAR variable*: RECORD END;
  6442. END Procedure;
  6443. END Object;
  6444. END Test.
  6445. positive: variable marked as read-only
  6446. MODULE Test;
  6447. VAR variable-: RECORD END;
  6448. END Test.
  6449. positive: initializing variable marked as read-only
  6450. MODULE Test;
  6451. VAR variable-: INTEGER;
  6452. BEGIN variable := 0
  6453. END Test.
  6454. negative: variable marked as read-only within procedure
  6455. MODULE Test;
  6456. PROCEDURE Procedure;
  6457. VAR variable-: RECORD END;
  6458. END Procedure;
  6459. END Test.
  6460. negative: variable marked as read-only within nested procedure
  6461. MODULE Test;
  6462. PROCEDURE Procedure;
  6463. PROCEDURE Procedure;
  6464. VAR variable-: RECORD END;
  6465. END Procedure;
  6466. END Procedure;
  6467. END Test.
  6468. positive: variable marked as read-only within record
  6469. MODULE Test;
  6470. TYPE Record = RECORD
  6471. variable-: RECORD END;
  6472. END;
  6473. END Test.
  6474. positive: initializing variable marked as read-only within record
  6475. MODULE Test;
  6476. TYPE Record = RECORD
  6477. variable-: INTEGER;
  6478. END;
  6479. VAR record: Record;
  6480. BEGIN record.variable := 0
  6481. END Test.
  6482. positive: variable marked as read-only within object
  6483. MODULE Test;
  6484. TYPE Object = OBJECT
  6485. VAR variable-: RECORD END;
  6486. END Object;
  6487. END Test.
  6488. positive: initializing variable marked as read-only within object
  6489. MODULE Test;
  6490. TYPE Object = OBJECT
  6491. VAR variable-: INTEGER;
  6492. BEGIN variable := 0
  6493. END Object;
  6494. END Test.
  6495. negative: variable marked as read-only within record in procedure
  6496. MODULE Test;
  6497. PROCEDURE Procedure;
  6498. TYPE Record = RECORD
  6499. variable-: RECORD END;
  6500. END;
  6501. END Procedure;
  6502. END Test.
  6503. negative: variable marked as read-only within object in procedure
  6504. MODULE Test;
  6505. PROCEDURE Procedure;
  6506. TYPE Object = OBJECT
  6507. VAR variable-: RECORD END;
  6508. END Object;
  6509. END Procedure;
  6510. END Test.
  6511. negative: variable marked as read-only within procedure in object
  6512. MODULE Test;
  6513. TYPE Object = OBJECT
  6514. PROCEDURE Procedure;
  6515. VAR variable-: RECORD END;
  6516. END Procedure;
  6517. END Object;
  6518. END Test.
  6519. negative: duplicated variable
  6520. MODULE Test;
  6521. VAR variable: LONGINT;
  6522. VAR variable: RECORD END;
  6523. END Test.
  6524. negative: duplicated variable within procedure
  6525. MODULE Test;
  6526. PROCEDURE Procedure;
  6527. VAR variable: LONGINT;
  6528. VAR variable: RECORD END;
  6529. END Procedure;
  6530. END Test.
  6531. negative: duplicated variable within nested procedure
  6532. MODULE Test;
  6533. PROCEDURE Procedure;
  6534. PROCEDURE Procedure;
  6535. VAR variable: LONGINT;
  6536. VAR variable: RECORD END;
  6537. END Procedure;
  6538. END Procedure;
  6539. END Test.
  6540. negative: duplicated variable within record
  6541. MODULE Test;
  6542. TYPE Record = RECORD
  6543. variable: LONGINT;
  6544. variable: RECORD END;
  6545. END;
  6546. END Test.
  6547. negative: duplicated variable within object
  6548. MODULE Test;
  6549. TYPE Object = OBJECT
  6550. VAR variable: LONGINT;
  6551. VAR variable: RECORD END;
  6552. END Object;
  6553. END Test.
  6554. negative: duplicated variable within record in procedure
  6555. MODULE Test;
  6556. PROCEDURE Procedure;
  6557. TYPE Record = RECORD
  6558. variable: LONGINT;
  6559. variable: RECORD END;
  6560. END;
  6561. END Procedure;
  6562. END Test.
  6563. negative: duplicated variable within object in procedure
  6564. MODULE Test;
  6565. PROCEDURE Procedure;
  6566. TYPE Object = OBJECT
  6567. VAR variable: LONGINT;
  6568. VAR variable: RECORD END;
  6569. END Object;
  6570. END Procedure;
  6571. END Test.
  6572. negative: duplicated variable within procedure in object
  6573. MODULE Test;
  6574. TYPE Object = OBJECT
  6575. PROCEDURE Procedure;
  6576. VAR variable: LONGINT;
  6577. VAR variable: RECORD END;
  6578. END Procedure;
  6579. END Object;
  6580. END Test.
  6581. negative: duplicated variable in same declaration
  6582. MODULE Test;
  6583. VAR variable, variable: LONGINT;
  6584. END Test.
  6585. negative: duplicated variable in same declaration within procedure
  6586. MODULE Test;
  6587. PROCEDURE Procedure;
  6588. VAR variable, variable: LONGINT;
  6589. END Procedure;
  6590. END Test.
  6591. negative: duplicated variable in same declaration within nested procedure
  6592. MODULE Test;
  6593. PROCEDURE Procedure;
  6594. PROCEDURE Procedure;
  6595. VAR variable, variable: LONGINT;
  6596. END Procedure;
  6597. END Procedure;
  6598. END Test.
  6599. negative: duplicated variable in same declaration within record
  6600. MODULE Test;
  6601. TYPE Record = RECORD
  6602. variable, variable: LONGINT;
  6603. END;
  6604. END Test.
  6605. negative: duplicated variable in same declaration within object
  6606. MODULE Test;
  6607. TYPE Object = OBJECT
  6608. VAR variable, variable: LONGINT;
  6609. END Object;
  6610. END Test.
  6611. negative: duplicated variable in same declaration within record in procedure
  6612. MODULE Test;
  6613. PROCEDURE Procedure;
  6614. TYPE Record = RECORD
  6615. variable, variable: LONGINT;
  6616. END;
  6617. END Procedure;
  6618. END Test.
  6619. negative: duplicated variable in same declaration within object in procedure
  6620. MODULE Test;
  6621. PROCEDURE Procedure;
  6622. TYPE Object = OBJECT
  6623. VAR variable, variable: LONGINT;
  6624. END Object;
  6625. END Procedure;
  6626. END Test.
  6627. negative: duplicated variable in same declaration within procedure in object
  6628. MODULE Test;
  6629. TYPE Object = OBJECT
  6630. PROCEDURE Procedure;
  6631. VAR variable, variable: LONGINT;
  6632. END Procedure;
  6633. END Object;
  6634. END Test.
  6635. negative: import as variable
  6636. MODULE Test;
  6637. IMPORT Import := Dummy;
  6638. VAR variable: Import;
  6639. END Test.
  6640. negative: constant as variable
  6641. MODULE Test;
  6642. CONST Constant = 0;
  6643. VAR variable: Constant;
  6644. END Test.
  6645. positive: type as variable
  6646. MODULE Test;
  6647. TYPE Type = INTEGER;
  6648. VAR variable: Type;
  6649. END Test.
  6650. negative: procedure as variable
  6651. MODULE Test;
  6652. VAR variable: Procedure;
  6653. PROCEDURE Procedure; END Procedure;
  6654. END Test.
  6655. negative: parameter as variable
  6656. MODULE Test;
  6657. PROCEDURE Procedure (parameter: INTEGER);
  6658. VAR variable: parameter;
  6659. END Procedure;
  6660. END Test.
  6661. positive: variable of basic character type
  6662. MODULE Test;
  6663. VAR variable: CHAR;
  6664. END Test.
  6665. positive: variable of basic boolean type
  6666. MODULE Test;
  6667. VAR variable: BOOLEAN;
  6668. END Test.
  6669. positive: variable of basic short integer type
  6670. MODULE Test;
  6671. VAR variable: SHORTINT;
  6672. END Test.
  6673. positive: variable of basic integer type
  6674. MODULE Test;
  6675. VAR variable: INTEGER;
  6676. END Test.
  6677. positive: variable of basic long integer type
  6678. MODULE Test;
  6679. VAR variable: LONGINT;
  6680. END Test.
  6681. positive: variable of basic huge integer type
  6682. MODULE Test;
  6683. VAR variable: HUGEINT;
  6684. END Test.
  6685. positive: variable of basic real type
  6686. MODULE Test;
  6687. VAR variable: REAL;
  6688. END Test.
  6689. positive: variable of basic long real type
  6690. MODULE Test;
  6691. VAR variable: LONGREAL;
  6692. END Test.
  6693. positive: variable of basic set type
  6694. MODULE Test;
  6695. VAR variable: SET;
  6696. END Test.
  6697. positive: variable of record type
  6698. MODULE Test;
  6699. TYPE Record = RECORD c: CHAR END;
  6700. VAR variable: Record;
  6701. END Test.
  6702. positive: variables of record type
  6703. MODULE Test;
  6704. TYPE Record = RECORD c: CHAR END;
  6705. VAR a, b, c: Record;
  6706. END Test.
  6707. positive: variable of anonymous record type
  6708. MODULE Test;
  6709. VAR variable: RECORD c: CHAR END;
  6710. END Test.
  6711. positive: variables of anonymous record type
  6712. MODULE Test;
  6713. VAR a, b, c: RECORD c: CHAR END;
  6714. END Test.
  6715. positive: variable of array type
  6716. MODULE Test;
  6717. TYPE Array = ARRAY 10 OF RECORD END;
  6718. VAR variable: Array;
  6719. END Test.
  6720. positive: variables of array type
  6721. MODULE Test;
  6722. TYPE Array = ARRAY 10 OF RECORD END;
  6723. VAR a, b, c: Array;
  6724. END Test.
  6725. positive: variable of anonymous array type
  6726. MODULE Test;
  6727. VAR variable: ARRAY 10 OF RECORD END;
  6728. END Test.
  6729. positive: variables of anonymous array type
  6730. MODULE Test;
  6731. VAR a, b, c: ARRAY 10 OF RECORD END;
  6732. END Test.
  6733. negative: variable of open array type
  6734. MODULE Test;
  6735. TYPE Array = ARRAY OF RECORD END;
  6736. VAR variable: Array;
  6737. END Test.
  6738. negative: variables of open array type
  6739. MODULE Test;
  6740. TYPE Array = ARRAY OF RECORD END;
  6741. VAR a, v, c: Array;
  6742. END Test.
  6743. negative: variable of anonymous open array type
  6744. MODULE Test;
  6745. VAR variable: ARRAY OF RECORD END;
  6746. END Test.
  6747. negative: variables of anonymous open array type
  6748. MODULE Test;
  6749. VAR a, b, c: ARRAY OF RECORD END;
  6750. END Test.
  6751. positive: variable of object type
  6752. MODULE Test;
  6753. TYPE Object = OBJECT VAR c: CHAR END Object;
  6754. VAR variable: Object;
  6755. END Test.
  6756. positive: variables of object type
  6757. MODULE Test;
  6758. TYPE Object = OBJECT VAR c: CHAR END Object;
  6759. VAR a, b, c: Object;
  6760. END Test.
  6761. positive: variable of anonymous object type
  6762. MODULE Test;
  6763. VAR variable: OBJECT VAR c: CHAR END;
  6764. END Test.
  6765. positive: variables of anonymous object type
  6766. MODULE Test;
  6767. VAR a, b, c: OBJECT VAR c: CHAR END;
  6768. END Test.
  6769. positive: variable of pointer type
  6770. MODULE Test;
  6771. TYPE Pointer = POINTER TO RECORD c: CHAR END;
  6772. VAR variable: Pointer;
  6773. END Test.
  6774. positive: variables of pointer type
  6775. MODULE Test;
  6776. TYPE Pointer = POINTER TO RECORD c: CHAR END;
  6777. VAR a, b, c: Pointer;
  6778. END Test.
  6779. positive: variable of anonymous pointer type
  6780. MODULE Test;
  6781. VAR variable: POINTER TO RECORD c: CHAR END;
  6782. END Test.
  6783. positive: variables of anonymous pointer type
  6784. MODULE Test;
  6785. VAR a, b, c: POINTER TO RECORD c: CHAR END;
  6786. END Test.
  6787. positive: variable of procedure type
  6788. MODULE Test;
  6789. TYPE Procedure = PROCEDURE;
  6790. VAR variable: Procedure;
  6791. END Test.
  6792. positive: variables of procedure type
  6793. MODULE Test;
  6794. TYPE Procedure = PROCEDURE;
  6795. VAR a, b, c: Procedure;
  6796. END Test.
  6797. positive: variable of anonymous procedure type
  6798. MODULE Test;
  6799. VAR variable: PROCEDURE;
  6800. END Test.
  6801. positive: variables of anonymous procedure type
  6802. MODULE Test;
  6803. VAR a, b, c: PROCEDURE;
  6804. END Test.
  6805. negative: definition of self in module
  6806. MODULE Test;
  6807. VAR SELF: OBJECT;
  6808. END Test.
  6809. negative: definition of self in procedure
  6810. MODULE Test;
  6811. PROCEDURE Procedure;
  6812. VAR SELF: OBJECT;
  6813. END Procedure;
  6814. END Test.
  6815. negative: definition of self in object
  6816. MODULE Test;
  6817. TYPE Object = OBJECT
  6818. VAR SELF: OBJECT;
  6819. END Object;
  6820. END Test.
  6821. negative: definition of self in procedure in object
  6822. MODULE Test;
  6823. TYPE Object = OBJECT
  6824. PROCEDURE Procedure;
  6825. VAR SELF: OBJECT;
  6826. END Procedure;
  6827. END Object;
  6828. END Test.
  6829. negative: definition of self in nested procedure in object
  6830. MODULE Test;
  6831. TYPE Object = OBJECT
  6832. PROCEDURE Procedure;
  6833. PROCEDURE Procedure;
  6834. VAR SELF: OBJECT;
  6835. END Procedure;
  6836. END Procedure;
  6837. END Object;
  6838. END Test.
  6839. negative: modification of self in module
  6840. MODULE Test;
  6841. BEGIN SELF := NIL;
  6842. END Test.
  6843. negative: modification of self in procedure
  6844. MODULE Test;
  6845. PROCEDURE Procedure;
  6846. BEGIN SELF := NIL;
  6847. END Procedure;
  6848. END Test.
  6849. negative: modification of self in object
  6850. MODULE Test;
  6851. TYPE Object = OBJECT
  6852. BEGIN SELF := NIL;
  6853. END Object;
  6854. END Test.
  6855. negative: modification of self in procedure in object
  6856. MODULE Test;
  6857. TYPE Object = OBJECT
  6858. PROCEDURE Procedure;
  6859. BEGIN SELF := NIL;
  6860. END Procedure;
  6861. END Object;
  6862. END Test.
  6863. negative: modification of self in nested procedure in object
  6864. MODULE Test;
  6865. TYPE Object = OBJECT
  6866. PROCEDURE Procedure;
  6867. PROCEDURE Procedure;
  6868. BEGIN SELF := NIL;
  6869. END Procedure;
  6870. END Procedure;
  6871. END Object;
  6872. END Test.
  6873. negative: reading self in module
  6874. MODULE Test;
  6875. VAR a: INTEGER;
  6876. BEGIN a := SELF.a;
  6877. END Test.
  6878. negative: reading self in procedure
  6879. MODULE Test;
  6880. VAR a: INTEGER;
  6881. PROCEDURE Procedure;
  6882. BEGIN a := SELF.a;
  6883. END Procedure;
  6884. END Test.
  6885. positive: reading self in object
  6886. MODULE Test;
  6887. TYPE Object = OBJECT
  6888. VAR a: INTEGER;
  6889. BEGIN a := SELF.a;
  6890. END Object;
  6891. END Test.
  6892. positive: reading self in procedure in object
  6893. MODULE Test;
  6894. TYPE Object = OBJECT
  6895. VAR a: INTEGER;
  6896. PROCEDURE Procedure;
  6897. BEGIN a := SELF.a;
  6898. END Procedure;
  6899. END Object;
  6900. END Test.
  6901. positive: reading self in nested procedure in object
  6902. MODULE Test;
  6903. TYPE Object = OBJECT
  6904. VAR a: INTEGER;
  6905. PROCEDURE Procedure;
  6906. PROCEDURE Procedure;
  6907. BEGIN a := SELF.a;
  6908. END Procedure;
  6909. END Procedure;
  6910. END Object;
  6911. END Test.
  6912. negative: writing self in module
  6913. MODULE Test;
  6914. VAR a: INTEGER;
  6915. BEGIN SELF.a := a;
  6916. END Test.
  6917. negative: writing self in procedure
  6918. MODULE Test;
  6919. VAR a: INTEGER;
  6920. PROCEDURE Procedure;
  6921. BEGIN SELF.a := a;
  6922. END Procedure;
  6923. END Test.
  6924. positive: writing self in object
  6925. MODULE Test;
  6926. TYPE Object = OBJECT
  6927. VAR a: INTEGER;
  6928. BEGIN SELF.a := a;
  6929. END Object;
  6930. END Test.
  6931. positive: writing self in procedure in object
  6932. MODULE Test;
  6933. TYPE Object = OBJECT
  6934. VAR a: INTEGER;
  6935. PROCEDURE Procedure;
  6936. BEGIN SELF.a := a;
  6937. END Procedure;
  6938. END Object;
  6939. END Test.
  6940. positive: writing self in nested procedure in object
  6941. MODULE Test;
  6942. TYPE Object = OBJECT
  6943. VAR a: INTEGER;
  6944. PROCEDURE Procedure;
  6945. PROCEDURE Procedure;
  6946. BEGIN SELF.a := a;
  6947. END Procedure;
  6948. END Procedure;
  6949. END Object;
  6950. END Test.
  6951. positive: usage of self in object
  6952. MODULE Test;
  6953. TYPE Object = OBJECT
  6954. VAR object: Object;
  6955. BEGIN object := SELF;
  6956. END Object;
  6957. END Test.
  6958. positive: usage of self in procedure in object
  6959. MODULE Test;
  6960. TYPE Object = OBJECT
  6961. VAR object: Object;
  6962. PROCEDURE Procedure;
  6963. BEGIN object := SELF;
  6964. END Procedure;
  6965. END Object;
  6966. END Test.
  6967. positive: usage of self in nested procedure in object
  6968. MODULE Test;
  6969. TYPE Object = OBJECT
  6970. VAR object: Object;
  6971. PROCEDURE Procedure;
  6972. PROCEDURE Procedure;
  6973. BEGIN object := SELF;
  6974. END Procedure;
  6975. END Procedure;
  6976. END Object;
  6977. END Test.
  6978. positive: usage of self as base object in object
  6979. MODULE Test;
  6980. TYPE Object = OBJECT
  6981. VAR object: OBJECT;
  6982. BEGIN object := SELF;
  6983. END Object;
  6984. END Test.
  6985. positive: usage of self as base object in procedure in object
  6986. MODULE Test;
  6987. TYPE Object = OBJECT
  6988. VAR object: OBJECT;
  6989. PROCEDURE Procedure;
  6990. BEGIN object := SELF;
  6991. END Procedure;
  6992. END Object;
  6993. END Test.
  6994. positive: usage of self as base object in nested procedure in object
  6995. MODULE Test;
  6996. TYPE Object = OBJECT
  6997. VAR object: OBJECT;
  6998. PROCEDURE Procedure;
  6999. PROCEDURE Procedure;
  7000. BEGIN object := SELF;
  7001. END Procedure;
  7002. END Procedure;
  7003. END Object;
  7004. END Test.
  7005. positive: dummy module exporting variables
  7006. MODULE Dummy;
  7007. VAR exported*, readonly-, private: INTEGER;
  7008. END Dummy.
  7009. positive: importing exported variable
  7010. MODULE Test;
  7011. IMPORT Dummy;
  7012. VAR result: INTEGER;
  7013. BEGIN result := Dummy.exported;
  7014. END Test.
  7015. positive: changing imported exported variable
  7016. MODULE Test;
  7017. IMPORT Dummy;
  7018. BEGIN Dummy.exported := 0;
  7019. END Test.
  7020. positive: importing read-only variable
  7021. MODULE Test;
  7022. IMPORT Dummy;
  7023. VAR result: INTEGER;
  7024. BEGIN result := Dummy.readonly;
  7025. END Test.
  7026. negative: changing imported read-only variable
  7027. MODULE Test;
  7028. IMPORT Dummy;
  7029. BEGIN Dummy.readonly := 0;
  7030. END Test.
  7031. negative: importing private variable
  7032. MODULE Test;
  7033. IMPORT Dummy;
  7034. VAR result: INTEGER;
  7035. BEGIN result := Dummy.private;
  7036. END Test.
  7037. negative: changing imported private variable
  7038. MODULE Test;
  7039. IMPORT Dummy;
  7040. BEGIN Dummy.private := 0;
  7041. END Test.
  7042. negative: importing invalid variable
  7043. MODULE Test;
  7044. IMPORT Dummy;
  7045. VAR result: INTEGER;
  7046. BEGIN result := Dummy.invalid;
  7047. END Test.
  7048. # procedures
  7049. positive: unmarked procedure
  7050. MODULE Test;
  7051. PROCEDURE Procedure;
  7052. END Procedure;
  7053. END Test.
  7054. positive: unmarked procedure within procedure
  7055. MODULE Test;
  7056. PROCEDURE Procedure;
  7057. PROCEDURE Procedure;
  7058. END Procedure;
  7059. END Procedure;
  7060. END Test.
  7061. positive: unmarked procedure within nested procedure
  7062. MODULE Test;
  7063. PROCEDURE Procedure;
  7064. PROCEDURE Procedure;
  7065. PROCEDURE Procedure;
  7066. END Procedure;
  7067. END Procedure;
  7068. END Procedure;
  7069. END Test.
  7070. positive: unmarked procedure within object
  7071. MODULE Test;
  7072. TYPE Object = OBJECT
  7073. PROCEDURE Procedure;
  7074. END Procedure;
  7075. END Object;
  7076. END Test.
  7077. positive: unmarked procedure within object in procedure
  7078. MODULE Test;
  7079. PROCEDURE Procedure;
  7080. TYPE Object = OBJECT
  7081. PROCEDURE Procedure;
  7082. END Procedure;
  7083. END Object;
  7084. END Procedure;
  7085. END Test.
  7086. positive: unmarked procedure within procedure in object
  7087. MODULE Test;
  7088. TYPE Object = OBJECT
  7089. PROCEDURE Procedure;
  7090. PROCEDURE Procedure;
  7091. END Procedure;
  7092. END Procedure;
  7093. END Object;
  7094. END Test.
  7095. positive: procedure marked as exported
  7096. MODULE Test;
  7097. PROCEDURE Procedure*;
  7098. END Procedure;
  7099. END Test.
  7100. negative: procedure marked as exported within procedure
  7101. MODULE Test;
  7102. PROCEDURE Procedure;
  7103. PROCEDURE Procedure*;
  7104. END Procedure;
  7105. END Procedure;
  7106. END Test.
  7107. negative: procedure marked as exported within nested procedure
  7108. MODULE Test;
  7109. PROCEDURE Procedure;
  7110. PROCEDURE Procedure;
  7111. PROCEDURE Procedure*;
  7112. END Procedure;
  7113. END Procedure;
  7114. END Procedure;
  7115. END Test.
  7116. positive: procedure marked as exported within object
  7117. MODULE Test;
  7118. TYPE Object = OBJECT
  7119. PROCEDURE Procedure*;
  7120. END Procedure;
  7121. END Object;
  7122. END Test.
  7123. negative: procedure marked as exported within object in procedure
  7124. MODULE Test;
  7125. PROCEDURE Procedure;
  7126. TYPE Object = OBJECT
  7127. PROCEDURE Procedure*;
  7128. END Procedure;
  7129. END Object;
  7130. END Procedure;
  7131. END Test.
  7132. negative: procedure marked as exported within procedure in object
  7133. MODULE Test;
  7134. TYPE Object = OBJECT
  7135. PROCEDURE Procedure;
  7136. PROCEDURE Procedure*;
  7137. END Procedure;
  7138. END Procedure;
  7139. END Object;
  7140. END Test.
  7141. positive: procedure marked as read-only
  7142. MODULE Test;
  7143. PROCEDURE Procedure-;
  7144. END Procedure;
  7145. END Test.
  7146. negative: procedure marked as read-only within procedure
  7147. MODULE Test;
  7148. PROCEDURE Procedure;
  7149. PROCEDURE Procedure-;
  7150. END Procedure;
  7151. END Procedure;
  7152. END Test.
  7153. negative: procedure marked as read-only within nested procedure
  7154. MODULE Test;
  7155. PROCEDURE Procedure;
  7156. PROCEDURE Procedure;
  7157. PROCEDURE Procedure-;
  7158. END Procedure;
  7159. END Procedure;
  7160. END Procedure;
  7161. END Test.
  7162. positive: procedure marked as read-only within object
  7163. MODULE Test;
  7164. TYPE Object = OBJECT
  7165. PROCEDURE Procedure-;
  7166. END Procedure;
  7167. END Object;
  7168. END Test.
  7169. negative: procedure marked as read-only within object in procedure
  7170. MODULE Test;
  7171. PROCEDURE Procedure;
  7172. TYPE Object = OBJECT
  7173. PROCEDURE Procedure-;
  7174. END Procedure;
  7175. END Object;
  7176. END Procedure;
  7177. END Test.
  7178. negative: procedure marked as read-only within procedure in object
  7179. MODULE Test;
  7180. TYPE Object = OBJECT
  7181. PROCEDURE Procedure;
  7182. PROCEDURE Procedure-;
  7183. END Procedure;
  7184. END Procedure;
  7185. END Object;
  7186. END Test.
  7187. negative: duplicated procedure
  7188. MODULE Test;
  7189. PROCEDURE Procedure; END Procedure;
  7190. PROCEDURE Procedure; END Procedure;
  7191. END Test.
  7192. negative: duplicated procedure within procedure
  7193. MODULE Test;
  7194. PROCEDURE Procedure;
  7195. PROCEDURE Procedure; END Procedure;
  7196. PROCEDURE Procedure; END Procedure;
  7197. END Procedure;
  7198. END Test.
  7199. negative: duplicated procedure within nested procedure
  7200. MODULE Test;
  7201. PROCEDURE Procedure;
  7202. PROCEDURE Procedure;
  7203. PROCEDURE Procedure; END Procedure;
  7204. PROCEDURE Procedure; END Procedure;
  7205. END Procedure;
  7206. END Procedure;
  7207. END Test.
  7208. negative: duplicated procedure within object
  7209. MODULE Test;
  7210. TYPE Object = OBJECT
  7211. PROCEDURE Procedure; END Procedure;
  7212. PROCEDURE Procedure; END Procedure;
  7213. END Object;
  7214. END Test.
  7215. negative: duplicated procedure within object in procedure
  7216. MODULE Test;
  7217. PROCEDURE Procedure;
  7218. TYPE Object = OBJECT
  7219. PROCEDURE Procedure; END Procedure;
  7220. PROCEDURE Procedure; END Procedure;
  7221. END Object;
  7222. END Procedure;
  7223. END Test.
  7224. negative: duplicated procedure within procedure in object
  7225. MODULE Test;
  7226. TYPE Object = OBJECT
  7227. PROCEDURE Procedure;
  7228. PROCEDURE Procedure; END Procedure;
  7229. PROCEDURE Procedure; END Procedure;
  7230. END Procedure;
  7231. END Object;
  7232. END Test.
  7233. positive: calling procedure in module
  7234. MODULE Test;
  7235. PROCEDURE Procedure; END Procedure;
  7236. BEGIN Procedure
  7237. END Test.
  7238. positive: calling procedure in module with parentheses
  7239. MODULE Test;
  7240. PROCEDURE Procedure; END Procedure;
  7241. BEGIN Procedure ()
  7242. END Test.
  7243. positive: calling procedure recursively
  7244. MODULE Test;
  7245. PROCEDURE Procedure;
  7246. BEGIN Procedure
  7247. END Procedure;
  7248. END Test.
  7249. positive: calling procedure recursively with parentheses
  7250. MODULE Test;
  7251. PROCEDURE Procedure;
  7252. BEGIN Procedure
  7253. END Procedure;
  7254. END Test.
  7255. positive: calling nested procedure in procedure
  7256. MODULE Test;
  7257. PROCEDURE Procedure;
  7258. PROCEDURE Nested; END Nested;
  7259. BEGIN Nested
  7260. END Procedure;
  7261. END Test.
  7262. positive: calling nested procedure in procedure with parentheses
  7263. MODULE Test;
  7264. PROCEDURE Procedure;
  7265. PROCEDURE Nested; END Nested;
  7266. BEGIN Nested ()
  7267. END Procedure;
  7268. END Test.
  7269. positive: calling nested procedure in procedure recursively
  7270. MODULE Test;
  7271. PROCEDURE Procedure;
  7272. PROCEDURE Nested;
  7273. BEGIN Nested
  7274. END Nested;
  7275. END Procedure;
  7276. END Test.
  7277. positive: calling nested procedure in procedure recursively with parentheses
  7278. MODULE Test;
  7279. PROCEDURE Procedure;
  7280. PROCEDURE Nested;
  7281. BEGIN Nested ()
  7282. END Nested;
  7283. END Procedure;
  7284. END Test.
  7285. positive: calling method in object
  7286. MODULE Test;
  7287. TYPE Object = OBJECT
  7288. PROCEDURE Procedure; END Procedure;
  7289. BEGIN Procedure
  7290. END Object;
  7291. END Test.
  7292. positive: calling method in object with parentheses
  7293. MODULE Test;
  7294. TYPE Object = OBJECT
  7295. PROCEDURE Procedure; END Procedure;
  7296. BEGIN Procedure
  7297. END Object;
  7298. END Test.
  7299. positive: calling method recursively
  7300. MODULE Test;
  7301. TYPE Object = OBJECT
  7302. PROCEDURE Procedure;
  7303. BEGIN Procedure
  7304. END Procedure;
  7305. END Object;
  7306. END Test.
  7307. positive: calling method recursively with parentheses
  7308. MODULE Test;
  7309. TYPE Object = OBJECT
  7310. PROCEDURE Procedure;
  7311. BEGIN Procedure ()
  7312. END Procedure;
  7313. END Object;
  7314. END Test.
  7315. positive: calling nested procedure in method
  7316. MODULE Test;
  7317. TYPE Object = OBJECT
  7318. PROCEDURE Procedure;
  7319. PROCEDURE Nested; END Nested;
  7320. BEGIN Nested
  7321. END Procedure;
  7322. END Object;
  7323. END Test.
  7324. positive: calling nested procedure in method with parentheses
  7325. MODULE Test;
  7326. TYPE Object = OBJECT
  7327. PROCEDURE Procedure;
  7328. PROCEDURE Nested; END Nested;
  7329. BEGIN Nested ()
  7330. END Procedure;
  7331. END Object;
  7332. END Test.
  7333. positive: calling nested procedure in method recursively
  7334. MODULE Test;
  7335. TYPE Object = OBJECT
  7336. PROCEDURE Procedure;
  7337. PROCEDURE Nested;
  7338. BEGIN Nested
  7339. END Nested;
  7340. END Procedure;
  7341. END Object;
  7342. END Test.
  7343. positive: calling nested procedure in method recursively with parentheses
  7344. MODULE Test;
  7345. TYPE Object = OBJECT
  7346. PROCEDURE Procedure;
  7347. PROCEDURE Nested;
  7348. BEGIN Nested ()
  7349. END Nested;
  7350. END Procedure;
  7351. END Object;
  7352. END Test.
  7353. positive: calling procedure variable in module
  7354. MODULE Test;
  7355. VAR procedure: PROCEDURE;
  7356. BEGIN procedure
  7357. END Test.
  7358. positive: calling procedure variable in module with parentheses
  7359. MODULE Test;
  7360. VAR procedure: PROCEDURE;
  7361. BEGIN procedure ()
  7362. END Test.
  7363. positive: calling procedure variable in procedure
  7364. MODULE Test;
  7365. VAR procedure: PROCEDURE;
  7366. PROCEDURE Procedure;
  7367. BEGIN procedure
  7368. END Procedure;
  7369. END Test.
  7370. positive: calling procedure variable in procedure with parentheses
  7371. MODULE Test;
  7372. VAR procedure: PROCEDURE;
  7373. PROCEDURE Procedure;
  7374. BEGIN procedure ()
  7375. END Procedure;
  7376. END Test.
  7377. positive: calling procedure variable in object
  7378. MODULE Test;
  7379. TYPE Object = OBJECT
  7380. VAR procedure: PROCEDURE;
  7381. BEGIN procedure
  7382. END Object;
  7383. END Test.
  7384. VAR procedure: PROCEDURE;
  7385. BEGIN procedure
  7386. positive: calling procedure variable in object with parentheses
  7387. MODULE Test;
  7388. TYPE Object = OBJECT
  7389. VAR procedure: PROCEDURE;
  7390. BEGIN procedure ()
  7391. END Object;
  7392. END Test.
  7393. VAR procedure: PROCEDURE;
  7394. BEGIN procedure
  7395. positive: calling procedure variable in method
  7396. MODULE Test;
  7397. TYPE Object = OBJECT
  7398. VAR procedure: PROCEDURE;
  7399. PROCEDURE Procedure;
  7400. BEGIN procedure
  7401. END Procedure;
  7402. END Object;
  7403. END Test.
  7404. positive: calling procedure variable in method with parentheses
  7405. MODULE Test;
  7406. TYPE Object = OBJECT
  7407. VAR procedure: PROCEDURE;
  7408. PROCEDURE Procedure;
  7409. BEGIN procedure ()
  7410. END Procedure;
  7411. END Object;
  7412. END Test.
  7413. positive: calling procedure with no parameters with no arguments
  7414. MODULE Test;
  7415. PROCEDURE Procedure; END Procedure;
  7416. BEGIN Procedure
  7417. END Test.
  7418. negative: calling procedure with one parameter with no arguments
  7419. MODULE Test;
  7420. PROCEDURE Procedure (one: INTEGER); END Procedure;
  7421. BEGIN Procedure
  7422. END Test.
  7423. negative: calling procedure with two parameter with no arguments
  7424. MODULE Test;
  7425. PROCEDURE Procedure (one, two: INTEGER); END Procedure;
  7426. BEGIN Procedure
  7427. END Test.
  7428. negative: calling procedure with no parameters with one argument
  7429. MODULE Test;
  7430. PROCEDURE Procedure; END Procedure;
  7431. BEGIN Procedure (0)
  7432. END Test.
  7433. positive: calling procedure with one parameter with one argument
  7434. MODULE Test;
  7435. PROCEDURE Procedure (one: INTEGER); END Procedure;
  7436. BEGIN Procedure (0)
  7437. END Test.
  7438. negative: calling procedure with two parameter with one argument
  7439. MODULE Test;
  7440. PROCEDURE Procedure (one, two: INTEGER); END Procedure;
  7441. BEGIN Procedure (0)
  7442. END Test.
  7443. negative: calling procedure with no parameters with two arguments
  7444. MODULE Test;
  7445. PROCEDURE Procedure; END Procedure;
  7446. BEGIN Procedure (1, 2)
  7447. END Test.
  7448. negative: calling procedure with one parameter with two arguments
  7449. MODULE Test;
  7450. PROCEDURE Procedure (one: INTEGER); END Procedure;
  7451. BEGIN Procedure (1, 2)
  7452. END Test.
  7453. positive: calling procedure with two parameter with two arguments
  7454. MODULE Test;
  7455. PROCEDURE Procedure (one, two: INTEGER); END Procedure;
  7456. BEGIN Procedure (1, 2)
  7457. END Test.
  7458. positive: calling procedure variable with no parameters with no arguments
  7459. MODULE Test;
  7460. VAR procedure: PROCEDURE;
  7461. BEGIN procedure
  7462. END Test.
  7463. negative: calling procedure variable with one parameter with no arguments
  7464. MODULE Test;
  7465. VAR procedure: PROCEDURE (one: INTEGER);
  7466. BEGIN procedure
  7467. END Test.
  7468. negative: calling procedure variable with two parameter with no arguments
  7469. MODULE Test;
  7470. VAR procedure: PROCEDURE (one, two: INTEGER);
  7471. BEGIN procedure
  7472. END Test.
  7473. negative: calling procedure variable with no parameters with one argument
  7474. MODULE Test;
  7475. VAR procedure: PROCEDURE;
  7476. BEGIN procedure (0)
  7477. END Test.
  7478. positive: calling procedure variable with one parameter with one argument
  7479. MODULE Test;
  7480. VAR procedure: PROCEDURE (one: INTEGER);
  7481. BEGIN procedure (0)
  7482. END Test.
  7483. negative: calling procedure variable with two parameter with one argument
  7484. MODULE Test;
  7485. VAR procedure: PROCEDURE (one, two: INTEGER);
  7486. BEGIN procedure (0)
  7487. END Test.
  7488. negative: calling procedure variable with no parameters with two arguments
  7489. MODULE Test;
  7490. VAR procedure: PROCEDURE;
  7491. BEGIN procedure (1, 2)
  7492. END Test.
  7493. negative: calling procedure variable with one parameter with two arguments
  7494. MODULE Test;
  7495. VAR procedure: PROCEDURE (one: INTEGER);
  7496. BEGIN procedure (1, 2)
  7497. END Test.
  7498. positive: calling procedure variable with two parameter with two arguments
  7499. MODULE Test;
  7500. VAR procedure: PROCEDURE (one, two: INTEGER);
  7501. BEGIN procedure (1, 2)
  7502. END Test.
  7503. # procedure return types
  7504. positive: procedure returning basic character type
  7505. MODULE Test;
  7506. PROCEDURE Procedure (): CHAR;
  7507. END Procedure;
  7508. END Test.
  7509. positive: procedure returning basic boolean type
  7510. MODULE Test;
  7511. PROCEDURE Procedure (): BOOLEAN;
  7512. END Procedure;
  7513. END Test.
  7514. positive: procedure returning basic short integer type
  7515. MODULE Test;
  7516. PROCEDURE Procedure (): SHORTINT;
  7517. END Procedure;
  7518. END Test.
  7519. positive: procedure returning basic integer type
  7520. MODULE Test;
  7521. PROCEDURE Procedure (): INTEGER;
  7522. END Procedure;
  7523. END Test.
  7524. positive: procedure returning basic long integer type
  7525. MODULE Test;
  7526. PROCEDURE Procedure (): LONGINT;
  7527. END Procedure;
  7528. END Test.
  7529. positive: procedure returning basic huge integer type
  7530. MODULE Test;
  7531. PROCEDURE Procedure (): HUGEINT;
  7532. END Procedure;
  7533. END Test.
  7534. positive: procedure returning basic real type
  7535. MODULE Test;
  7536. PROCEDURE Procedure (): REAL;
  7537. END Procedure;
  7538. END Test.
  7539. positive: procedure returning basic long real type
  7540. MODULE Test;
  7541. PROCEDURE Procedure (): LONGREAL;
  7542. END Procedure;
  7543. END Test.
  7544. positive: procedure returning basic set type
  7545. MODULE Test;
  7546. PROCEDURE Procedure (): SET;
  7547. END Procedure;
  7548. END Test.
  7549. positive: procedure returning record type
  7550. MODULE Test;
  7551. TYPE Record = RECORD END;
  7552. PROCEDURE Procedure (): Record;
  7553. END Procedure;
  7554. END Test.
  7555. positive: procedure returning anonymous record type
  7556. MODULE Test;
  7557. PROCEDURE Procedure (): RECORD END;
  7558. END Procedure;
  7559. END Test.
  7560. positive: procedure returning array type
  7561. MODULE Test;
  7562. TYPE Array = ARRAY 10 OF RECORD END;
  7563. PROCEDURE Procedure (): Array;
  7564. END Procedure;
  7565. END Test.
  7566. positive: procedure returning anonymous array type
  7567. MODULE Test;
  7568. PROCEDURE Procedure (): ARRAY 10 OF RECORD END;
  7569. END Procedure;
  7570. END Test.
  7571. negative: procedure returning open array type
  7572. MODULE Test;
  7573. TYPE Array = ARRAY OF RECORD END;
  7574. PROCEDURE Procedure (): Array;
  7575. END Procedure;
  7576. END Test.
  7577. negative: procedure returning anonymous open array type
  7578. MODULE Test;
  7579. PROCEDURE Procedure (): ARRAY OF RECORD END;
  7580. END Procedure;
  7581. END Test.
  7582. positive: procedure returning object type
  7583. MODULE Test;
  7584. TYPE Object = OBJECT;
  7585. PROCEDURE Procedure (): Object;
  7586. END Procedure;
  7587. END Test.
  7588. positive: procedure returning anonymous object type
  7589. MODULE Test;
  7590. PROCEDURE Procedure (): OBJECT;
  7591. END Procedure;
  7592. END Test.
  7593. positive: procedure returning pointer type
  7594. MODULE Test;
  7595. TYPE Pointer = POINTER TO RECORD END;
  7596. PROCEDURE Procedure (): Pointer;
  7597. END Procedure;
  7598. END Test.
  7599. positive: procedure returning anonymous pointer type
  7600. MODULE Test;
  7601. PROCEDURE Procedure (): POINTER TO RECORD END;
  7602. END Procedure;
  7603. END Test.
  7604. positive: procedure returning procedure type
  7605. MODULE Test;
  7606. TYPE Proc = PROCEDURE;
  7607. PROCEDURE Procedure (): Proc;
  7608. END Procedure;
  7609. END Test.
  7610. positive: procedure returning anonymous procedure type
  7611. MODULE Test;
  7612. PROCEDURE Procedure (): PROCEDURE;
  7613. END Procedure;
  7614. END Test.
  7615. positive: procedure returning anonymous procedure returning anonymous procedure
  7616. MODULE Test;
  7617. PROCEDURE Procedure (): PROCEDURE (): PROCEDURE;
  7618. END Procedure;
  7619. END Test.
  7620. negative: procedure returning itself
  7621. MODULE Test;
  7622. PROCEDURE Procedure (): Procedure;
  7623. END Procedure;
  7624. END Test.
  7625. negative: procedure with returning local type
  7626. MODULE Test;
  7627. PROCEDURE Procedure (): Type;
  7628. TYPE Type = RECORD END;
  7629. END Procedure;
  7630. END Test.
  7631. # procedure parameters
  7632. negative: parameter marked as exported
  7633. MODULE Test;
  7634. PROCEDURE Procedure (parameter*: OBJECT);
  7635. END Procedure;
  7636. END Test.
  7637. negative: parameter marked as read-only
  7638. MODULE Test;
  7639. PROCEDURE Procedure (parameter*: OBJECT);
  7640. END Procedure;
  7641. END Test.
  7642. negative: duplicated parameters
  7643. MODULE Test;
  7644. PROCEDURE Procedure (parameter: LONGINT; parameter: LONGINT);
  7645. END Procedure;
  7646. END Test.
  7647. negative: duplicated parameters in same declaration
  7648. MODULE Test;
  7649. PROCEDURE Procedure (parameter, parameter: LONGINT);
  7650. END Procedure;
  7651. END Test.
  7652. positive: procedure with parameter of same type
  7653. MODULE Test;
  7654. TYPE Proc = PROCEDURE;
  7655. PROCEDURE Procedure (procedure: Proc);
  7656. END Procedure;
  7657. END Test.
  7658. negative: procedure with multiple variable parameter
  7659. MODULE Test;
  7660. PROCEDURE Procedure (VAR VAR parameter: SET);
  7661. END Procedure;
  7662. END Test.
  7663. negative: procedure with multiple constant parameter
  7664. MODULE Test;
  7665. PROCEDURE Procedure (CONST CONST parameter: SET);
  7666. END Procedure;
  7667. END Test.
  7668. negative: procedure with variable and constant parameter
  7669. MODULE Test;
  7670. PROCEDURE Procedure (VAR CONST parameter: SET);
  7671. END Procedure;
  7672. END Test.
  7673. negative: procedure with constant and variable parameter
  7674. MODULE Test;
  7675. PROCEDURE Procedure (VAR CONST parameter: SET);
  7676. END Procedure;
  7677. END Test.
  7678. negative: procedure with parameter marked as exported
  7679. MODULE Test;
  7680. PROCEDURE Procedure (parameter*: CHAR);
  7681. END Procedure;
  7682. END Test.
  7683. negative: procedure with parameter marked as read-only
  7684. MODULE Test;
  7685. PROCEDURE Procedure (parameter-: CHAR);
  7686. END Procedure;
  7687. END Test.
  7688. positive: procedure with a parameter of basic character type
  7689. MODULE Test;
  7690. PROCEDURE Procedure (parameter: CHAR);
  7691. END Procedure;
  7692. END Test.
  7693. positive: procedure with parameters of basic character type
  7694. MODULE Test;
  7695. PROCEDURE Procedure (a, b, c: CHAR);
  7696. END Procedure;
  7697. END Test.
  7698. positive: procedure with a parameter of variable character type
  7699. MODULE Test;
  7700. PROCEDURE Procedure (VAR parameter: CHAR);
  7701. END Procedure;
  7702. END Test.
  7703. positive: procedure with parameters of variable character type
  7704. MODULE Test;
  7705. PROCEDURE Procedure (VAR a, b, c: CHAR);
  7706. END Procedure;
  7707. END Test.
  7708. positive: procedure with a parameter of constant character type
  7709. MODULE Test;
  7710. PROCEDURE Procedure (CONST parameter: CHAR);
  7711. END Procedure;
  7712. END Test.
  7713. positive: procedure with parameters of constant character type
  7714. MODULE Test;
  7715. PROCEDURE Procedure (CONST a, b, c: CHAR);
  7716. END Procedure;
  7717. END Test.
  7718. positive: procedure with intermixed parameters of character type
  7719. MODULE Test;
  7720. PROCEDURE Procedure (a: CHAR; VAR b: CHAR; CONST c: CHAR);
  7721. END Procedure;
  7722. END Test.
  7723. positive: procedure with a parameter of basic boolean type
  7724. MODULE Test;
  7725. PROCEDURE Procedure (parameter: BOOLEAN);
  7726. END Procedure;
  7727. END Test.
  7728. positive: procedure with parameters of basic boolean type
  7729. MODULE Test;
  7730. PROCEDURE Procedure (a, b, c: BOOLEAN);
  7731. END Procedure;
  7732. END Test.
  7733. positive: procedure with a parameter of variable boolean type
  7734. MODULE Test;
  7735. PROCEDURE Procedure (VAR parameter: BOOLEAN);
  7736. END Procedure;
  7737. END Test.
  7738. positive: procedure with parameters of variable boolean type
  7739. MODULE Test;
  7740. PROCEDURE Procedure (VAR a, b, c: BOOLEAN);
  7741. END Procedure;
  7742. END Test.
  7743. positive: procedure with a parameter of constant boolean type
  7744. MODULE Test;
  7745. PROCEDURE Procedure (CONST parameter: BOOLEAN);
  7746. END Procedure;
  7747. END Test.
  7748. positive: procedure with parameters of constant boolean type
  7749. MODULE Test;
  7750. PROCEDURE Procedure (CONST a, b, c: BOOLEAN);
  7751. END Procedure;
  7752. END Test.
  7753. positive: procedure with intermixed parameters of boolean type
  7754. MODULE Test;
  7755. PROCEDURE Procedure (a: BOOLEAN; VAR b: BOOLEAN; CONST c: BOOLEAN);
  7756. END Procedure;
  7757. END Test.
  7758. positive: procedure with a parameter of basic short integer type
  7759. MODULE Test;
  7760. PROCEDURE Procedure (parameter: SHORTINT);
  7761. END Procedure;
  7762. END Test.
  7763. positive: procedure with parameters of basic short integer type
  7764. MODULE Test;
  7765. PROCEDURE Procedure (a, b, c: SHORTINT);
  7766. END Procedure;
  7767. END Test.
  7768. positive: procedure with a parameter of variable short integer type
  7769. MODULE Test;
  7770. PROCEDURE Procedure (VAR parameter: SHORTINT);
  7771. END Procedure;
  7772. END Test.
  7773. positive: procedure with parameters of variable short integer type
  7774. MODULE Test;
  7775. PROCEDURE Procedure (VAR a, b, c: SHORTINT);
  7776. END Procedure;
  7777. END Test.
  7778. positive: procedure with a parameter of constant short integer type
  7779. MODULE Test;
  7780. PROCEDURE Procedure (CONST parameter: SHORTINT);
  7781. END Procedure;
  7782. END Test.
  7783. positive: procedure with parameters of constant short integer type
  7784. MODULE Test;
  7785. PROCEDURE Procedure (CONST a, b, c: SHORTINT);
  7786. END Procedure;
  7787. END Test.
  7788. positive: procedure with intermixed parameters of short integer type
  7789. MODULE Test;
  7790. PROCEDURE Procedure (a: SHORTINT; VAR b: SHORTINT; CONST c: SHORTINT);
  7791. END Procedure;
  7792. END Test.
  7793. positive: procedure with a parameter of basic integer type
  7794. MODULE Test;
  7795. PROCEDURE Procedure (parameter: INTEGER);
  7796. END Procedure;
  7797. END Test.
  7798. positive: procedure with parameters of basic integer type
  7799. MODULE Test;
  7800. PROCEDURE Procedure (a, b, c: INTEGER);
  7801. END Procedure;
  7802. END Test.
  7803. positive: procedure with a parameter of variable integer type
  7804. MODULE Test;
  7805. PROCEDURE Procedure (VAR parameter: INTEGER);
  7806. END Procedure;
  7807. END Test.
  7808. positive: procedure with parameters of variable integer type
  7809. MODULE Test;
  7810. PROCEDURE Procedure (VAR a, b, c: INTEGER);
  7811. END Procedure;
  7812. END Test.
  7813. positive: procedure with a parameter of constant integer type
  7814. MODULE Test;
  7815. PROCEDURE Procedure (CONST parameter: INTEGER);
  7816. END Procedure;
  7817. END Test.
  7818. positive: procedure with parameters of constant integer type
  7819. MODULE Test;
  7820. PROCEDURE Procedure (CONST a, b, c: INTEGER);
  7821. END Procedure;
  7822. END Test.
  7823. positive: procedure with intermixed parameters of integer type
  7824. MODULE Test;
  7825. PROCEDURE Procedure (a: INTEGER; VAR b: INTEGER; CONST c: INTEGER);
  7826. END Procedure;
  7827. END Test.
  7828. positive: procedure with a parameter of basic long integer type
  7829. MODULE Test;
  7830. PROCEDURE Procedure (parameter: LONGINT);
  7831. END Procedure;
  7832. END Test.
  7833. positive: procedure with parameters of basic long integer type
  7834. MODULE Test;
  7835. PROCEDURE Procedure (a, b, c: LONGINT);
  7836. END Procedure;
  7837. END Test.
  7838. positive: procedure with a parameter of variable long integer type
  7839. MODULE Test;
  7840. PROCEDURE Procedure (VAR parameter: LONGINT);
  7841. END Procedure;
  7842. END Test.
  7843. positive: procedure with parameters of variable long integer type
  7844. MODULE Test;
  7845. PROCEDURE Procedure (VAR a, b, c: LONGINT);
  7846. END Procedure;
  7847. END Test.
  7848. positive: procedure with a parameter of constant long integer type
  7849. MODULE Test;
  7850. PROCEDURE Procedure (CONST parameter: LONGINT);
  7851. END Procedure;
  7852. END Test.
  7853. positive: procedure with parameters of constant long integer type
  7854. MODULE Test;
  7855. PROCEDURE Procedure (CONST a, b, c: LONGINT);
  7856. END Procedure;
  7857. END Test.
  7858. positive: procedure with intermixed parameters of long integer type
  7859. MODULE Test;
  7860. PROCEDURE Procedure (a: LONGINT; VAR b: LONGINT; CONST c: LONGINT);
  7861. END Procedure;
  7862. END Test.
  7863. positive: procedure with a parameter of basic huge integer type
  7864. MODULE Test;
  7865. PROCEDURE Procedure (parameter: HUGEINT);
  7866. END Procedure;
  7867. END Test.
  7868. positive: procedure with parameters of basic huge integer type
  7869. MODULE Test;
  7870. PROCEDURE Procedure (a, b, c: HUGEINT);
  7871. END Procedure;
  7872. END Test.
  7873. positive: procedure with a parameter of variable huge integer type
  7874. MODULE Test;
  7875. PROCEDURE Procedure (VAR parameter: HUGEINT);
  7876. END Procedure;
  7877. END Test.
  7878. positive: procedure with parameters of variable huge integer type
  7879. MODULE Test;
  7880. PROCEDURE Procedure (VAR a, b, c: HUGEINT);
  7881. END Procedure;
  7882. END Test.
  7883. positive: procedure with a parameter of constant huge integer type
  7884. MODULE Test;
  7885. PROCEDURE Procedure (CONST parameter: HUGEINT);
  7886. END Procedure;
  7887. END Test.
  7888. positive: procedure with parameters of constant huge integer type
  7889. MODULE Test;
  7890. PROCEDURE Procedure (CONST a, b, c: HUGEINT);
  7891. END Procedure;
  7892. END Test.
  7893. positive: procedure with intermixed parameters of huge integer type
  7894. MODULE Test;
  7895. PROCEDURE Procedure (a: HUGEINT; VAR b: HUGEINT; CONST c: HUGEINT);
  7896. END Procedure;
  7897. END Test.
  7898. positive: procedure with a parameter of basic real type
  7899. MODULE Test;
  7900. PROCEDURE Procedure (parameter: REAL);
  7901. END Procedure;
  7902. END Test.
  7903. positive: procedure with parameters of basic real type
  7904. MODULE Test;
  7905. PROCEDURE Procedure (a, b, c: REAL);
  7906. END Procedure;
  7907. END Test.
  7908. positive: procedure with a parameter of variable real type
  7909. MODULE Test;
  7910. PROCEDURE Procedure (VAR parameter: REAL);
  7911. END Procedure;
  7912. END Test.
  7913. positive: procedure with parameters of variable real type
  7914. MODULE Test;
  7915. PROCEDURE Procedure (VAR a, b, c: REAL);
  7916. END Procedure;
  7917. END Test.
  7918. positive: procedure with a parameter of constant real type
  7919. MODULE Test;
  7920. PROCEDURE Procedure (CONST parameter: REAL);
  7921. END Procedure;
  7922. END Test.
  7923. positive: procedure with parameters of constant real type
  7924. MODULE Test;
  7925. PROCEDURE Procedure (CONST a, b, c: REAL);
  7926. END Procedure;
  7927. END Test.
  7928. positive: procedure with intermixed parameters of real type
  7929. MODULE Test;
  7930. PROCEDURE Procedure (a: REAL; VAR b: REAL; CONST c: REAL);
  7931. END Procedure;
  7932. END Test.
  7933. positive: procedure with a parameter of basic long real type
  7934. MODULE Test;
  7935. PROCEDURE Procedure (parameter: LONGREAL);
  7936. END Procedure;
  7937. END Test.
  7938. positive: procedure with parameters of basic long real type
  7939. MODULE Test;
  7940. PROCEDURE Procedure (a, b, c: LONGREAL);
  7941. END Procedure;
  7942. END Test.
  7943. positive: procedure with a parameter of variable long real type
  7944. MODULE Test;
  7945. PROCEDURE Procedure (VAR parameter: LONGREAL);
  7946. END Procedure;
  7947. END Test.
  7948. positive: procedure with parameters of variable long real type
  7949. MODULE Test;
  7950. PROCEDURE Procedure (VAR a, b, c: LONGREAL);
  7951. END Procedure;
  7952. END Test.
  7953. positive: procedure with a parameter of constant long real type
  7954. MODULE Test;
  7955. PROCEDURE Procedure (CONST parameter: LONGREAL);
  7956. END Procedure;
  7957. END Test.
  7958. positive: procedure with parameters of constant long real type
  7959. MODULE Test;
  7960. PROCEDURE Procedure (CONST a, b, c: LONGREAL);
  7961. END Procedure;
  7962. END Test.
  7963. positive: procedure with intermixed parameters of long real type
  7964. MODULE Test;
  7965. PROCEDURE Procedure (a: LONGREAL; VAR b: LONGREAL; CONST c: LONGREAL);
  7966. END Procedure;
  7967. END Test.
  7968. positive: procedure with a parameter of basic set type
  7969. MODULE Test;
  7970. PROCEDURE Procedure (parameter: SET);
  7971. END Procedure;
  7972. END Test.
  7973. positive: procedure with parameters of basic set type
  7974. MODULE Test;
  7975. PROCEDURE Procedure (a, b, c: SET);
  7976. END Procedure;
  7977. END Test.
  7978. positive: procedure with a parameter of variable set type
  7979. MODULE Test;
  7980. PROCEDURE Procedure (VAR parameter: SET);
  7981. END Procedure;
  7982. END Test.
  7983. positive: procedure with parameters of variable set type
  7984. MODULE Test;
  7985. PROCEDURE Procedure (VAR a, b, c: SET);
  7986. END Procedure;
  7987. END Test.
  7988. positive: procedure with a parameter of constant set type
  7989. MODULE Test;
  7990. PROCEDURE Procedure (CONST parameter: SET);
  7991. END Procedure;
  7992. END Test.
  7993. positive: procedure with parameters of constant set type
  7994. MODULE Test;
  7995. PROCEDURE Procedure (CONST a, b, c: SET);
  7996. END Procedure;
  7997. END Test.
  7998. positive: procedure with intermixed parameters of set type
  7999. MODULE Test;
  8000. PROCEDURE Procedure (a: SET; VAR b: SET; CONST c: SET);
  8001. END Procedure;
  8002. END Test.
  8003. positive: procedure with a parameter of record type
  8004. MODULE Test;
  8005. TYPE Record = RECORD END;
  8006. PROCEDURE Procedure (parameter: Record);
  8007. END Procedure;
  8008. END Test.
  8009. positive: procedure with parameters of record type
  8010. MODULE Test;
  8011. TYPE Record = RECORD END;
  8012. PROCEDURE Procedure (a, b, c: Record);
  8013. END Procedure;
  8014. END Test.
  8015. positive: procedure with a parameter of variable record type
  8016. MODULE Test;
  8017. TYPE Record = RECORD END;
  8018. PROCEDURE Procedure (VAR parameter: Record);
  8019. END Procedure;
  8020. END Test.
  8021. positive: procedure with parameters of variable record type
  8022. MODULE Test;
  8023. TYPE Record = RECORD END;
  8024. PROCEDURE Procedure (VAR a, b, c: Record);
  8025. END Procedure;
  8026. END Test.
  8027. positive: procedure with a parameter of constant record type
  8028. MODULE Test;
  8029. TYPE Record = RECORD END;
  8030. PROCEDURE Procedure (CONST parameter: Record);
  8031. END Procedure;
  8032. END Test.
  8033. positive: procedure with parameters of constant record type
  8034. MODULE Test;
  8035. TYPE Record = RECORD END;
  8036. PROCEDURE Procedure (CONST a, b, c: Record);
  8037. END Procedure;
  8038. END Test.
  8039. positive: procedure with intermixed parameters of record type
  8040. MODULE Test;
  8041. TYPE Record = RECORD END;
  8042. PROCEDURE Procedure (a: Record; VAR b: Record; CONST c: Record);
  8043. END Procedure;
  8044. END Test.
  8045. positive: procedure with a parameter of anonymous record type
  8046. MODULE Test;
  8047. TYPE Record = RECORD END;
  8048. PROCEDURE Procedure (parameter: RECORD END);
  8049. END Procedure;
  8050. END Test.
  8051. positive: procedure with parameters of anonymous record type
  8052. MODULE Test;
  8053. PROCEDURE Procedure (a, b, c: RECORD END);
  8054. END Procedure;
  8055. END Test.
  8056. positive: procedure with a parameter of variable anonymous record type
  8057. MODULE Test;
  8058. PROCEDURE Procedure (VAR parameter: RECORD END);
  8059. END Procedure;
  8060. END Test.
  8061. positive: procedure with parameters of variable anonymous record type
  8062. MODULE Test;
  8063. PROCEDURE Procedure (VAR a, b, c: RECORD END);
  8064. END Procedure;
  8065. END Test.
  8066. positive: procedure with a parameter of constant anonymous record type
  8067. MODULE Test;
  8068. PROCEDURE Procedure (CONST parameter: RECORD END);
  8069. END Procedure;
  8070. END Test.
  8071. positive: procedure with parameters of constant anonymous record type
  8072. MODULE Test;
  8073. PROCEDURE Procedure (CONST a, b, c: RECORD END);
  8074. END Procedure;
  8075. END Test.
  8076. positive: procedure with intermixed parameters of anonymous record type
  8077. MODULE Test;
  8078. PROCEDURE Procedure (a: RECORD END; VAR b: RECORD END; CONST c: RECORD END);
  8079. END Procedure;
  8080. END Test.
  8081. positive: procedure with a parameter of array type
  8082. MODULE Test;
  8083. TYPE Array = ARRAY 10 OF RECORD END;
  8084. PROCEDURE Procedure (parameter: Array);
  8085. END Procedure;
  8086. END Test.
  8087. positive: procedure with parameters of array type
  8088. MODULE Test;
  8089. TYPE Array = ARRAY 10 OF RECORD END;
  8090. PROCEDURE Procedure (a, b, c: Array);
  8091. END Procedure;
  8092. END Test.
  8093. positive: procedure with a parameter of variable array type
  8094. MODULE Test;
  8095. TYPE Array = ARRAY 10 OF RECORD END;
  8096. PROCEDURE Procedure (VAR parameter: Array);
  8097. END Procedure;
  8098. END Test.
  8099. positive: procedure with parameters of variable array type
  8100. MODULE Test;
  8101. TYPE Array = ARRAY 10 OF RECORD END;
  8102. PROCEDURE Procedure (VAR a, b, c: Array);
  8103. END Procedure;
  8104. END Test.
  8105. positive: procedure with a parameter of constant array type
  8106. MODULE Test;
  8107. TYPE Array = ARRAY 10 OF RECORD END;
  8108. PROCEDURE Procedure (CONST parameter: Array);
  8109. END Procedure;
  8110. END Test.
  8111. positive: procedure with parameters of constant array type
  8112. MODULE Test;
  8113. TYPE Array = ARRAY 10 OF RECORD END;
  8114. PROCEDURE Procedure (CONST a, b, c: Array);
  8115. END Procedure;
  8116. END Test.
  8117. positive: procedure with intermixed parameters of array type
  8118. MODULE Test;
  8119. TYPE Array = ARRAY 10 OF RECORD END;
  8120. PROCEDURE Procedure (a: Array; VAR b: Array; CONST c: Array);
  8121. END Procedure;
  8122. END Test.
  8123. positive: procedure with a parameter of anonymous array type
  8124. MODULE Test;
  8125. PROCEDURE Procedure (parameter: ARRAY 10 OF RECORD END);
  8126. END Procedure;
  8127. END Test.
  8128. positive: procedure with parameters of anonymous array type
  8129. MODULE Test;
  8130. PROCEDURE Procedure (a, b, c: ARRAY 10 OF RECORD END);
  8131. END Procedure;
  8132. END Test.
  8133. positive: procedure with a parameter of variable anonymous array type
  8134. MODULE Test;
  8135. PROCEDURE Procedure (VAR parameter: ARRAY 10 OF RECORD END);
  8136. END Procedure;
  8137. END Test.
  8138. positive: procedure with parameters of variable anonymous array type
  8139. MODULE Test;
  8140. PROCEDURE Procedure (VAR a, b, c: ARRAY 10 OF RECORD END);
  8141. END Procedure;
  8142. END Test.
  8143. positive: procedure with a parameter of constant anonymous array type
  8144. MODULE Test;
  8145. PROCEDURE Procedure (CONST parameter: ARRAY 10 OF RECORD END);
  8146. END Procedure;
  8147. END Test.
  8148. positive: procedure with parameters of constant anonymous array type
  8149. MODULE Test;
  8150. PROCEDURE Procedure (CONST a, b, c: ARRAY 10 OF RECORD END);
  8151. END Procedure;
  8152. END Test.
  8153. positive: procedure with intermixed parameters of anonymous array type
  8154. MODULE Test;
  8155. PROCEDURE Procedure (a: ARRAY 10 OF RECORD END; VAR b: ARRAY 10 OF RECORD END; CONST c: ARRAY 10 OF RECORD END);
  8156. END Procedure;
  8157. END Test.
  8158. positive: procedure with a parameter of open array type
  8159. MODULE Test;
  8160. TYPE Array = ARRAY OF RECORD END;
  8161. PROCEDURE Procedure (parameter: Array);
  8162. END Procedure;
  8163. END Test.
  8164. positive: procedure with parameters of open array type
  8165. MODULE Test;
  8166. TYPE Array = ARRAY OF RECORD END;
  8167. PROCEDURE Procedure (a, b, c: Array);
  8168. END Procedure;
  8169. END Test.
  8170. positive: procedure with a parameter of variable open array type
  8171. MODULE Test;
  8172. TYPE Array = ARRAY OF RECORD END;
  8173. PROCEDURE Procedure (VAR parameter: Array);
  8174. END Procedure;
  8175. END Test.
  8176. positive: procedure with parameters of variable open array type
  8177. MODULE Test;
  8178. TYPE Array = ARRAY OF RECORD END;
  8179. PROCEDURE Procedure (VAR a, b, c: Array);
  8180. END Procedure;
  8181. END Test.
  8182. positive: procedure with a parameter of constant open array type
  8183. MODULE Test;
  8184. TYPE Array = ARRAY OF RECORD END;
  8185. PROCEDURE Procedure (CONST parameter: Array);
  8186. END Procedure;
  8187. END Test.
  8188. positive: procedure with parameters of constant open array type
  8189. MODULE Test;
  8190. TYPE Array = ARRAY OF RECORD END;
  8191. PROCEDURE Procedure (CONST a, b, c: Array);
  8192. END Procedure;
  8193. END Test.
  8194. positive: procedure with intermixed parameters of open array type
  8195. MODULE Test;
  8196. TYPE Array = ARRAY OF RECORD END;
  8197. PROCEDURE Procedure (a: Array; VAR b: Array; CONST c: Array);
  8198. END Procedure;
  8199. END Test.
  8200. positive: procedure with a parameter of anonymous open array type
  8201. MODULE Test;
  8202. PROCEDURE Procedure (parameter: ARRAY OF RECORD END);
  8203. END Procedure;
  8204. END Test.
  8205. positive: procedure with parameters of anonymous open array type
  8206. MODULE Test;
  8207. PROCEDURE Procedure (a, b, c: ARRAY OF RECORD END);
  8208. END Procedure;
  8209. END Test.
  8210. positive: procedure with a parameter of variable anonymous open array type
  8211. MODULE Test;
  8212. PROCEDURE Procedure (VAR parameter: ARRAY OF RECORD END);
  8213. END Procedure;
  8214. END Test.
  8215. positive: procedure with parameters of variable anonymous open array type
  8216. MODULE Test;
  8217. PROCEDURE Procedure (VAR a, b, c: ARRAY OF RECORD END);
  8218. END Procedure;
  8219. END Test.
  8220. positive: procedure with a parameter of constant anonymous open array type
  8221. MODULE Test;
  8222. PROCEDURE Procedure (CONST parameter: ARRAY OF RECORD END);
  8223. END Procedure;
  8224. END Test.
  8225. positive: procedure with parameters of constant anonymous open array type
  8226. MODULE Test;
  8227. PROCEDURE Procedure (CONST a, b, c: ARRAY OF RECORD END);
  8228. END Procedure;
  8229. END Test.
  8230. positive: procedure with intermixed parameters of anonymous open array type
  8231. MODULE Test;
  8232. PROCEDURE Procedure (a: ARRAY OF RECORD END; VAR b: ARRAY OF RECORD END; CONST c: ARRAY OF RECORD END);
  8233. END Procedure;
  8234. END Test.
  8235. positive: procedure with a parameter of object type
  8236. MODULE Test;
  8237. TYPE Object = OBJECT END Object;
  8238. PROCEDURE Procedure (parameter: Object);
  8239. END Procedure;
  8240. END Test.
  8241. positive: procedure with a parameter of plain object type
  8242. MODULE Test;
  8243. TYPE Object = OBJECT;
  8244. PROCEDURE Procedure (parameter: Object);
  8245. END Procedure;
  8246. END Test.
  8247. positive: procedure with parameters of object type
  8248. MODULE Test;
  8249. TYPE Object = OBJECT END Object;
  8250. PROCEDURE Procedure (a, b, c: Object);
  8251. END Procedure;
  8252. END Test.
  8253. positive: procedure with a parameter of variable object type
  8254. MODULE Test;
  8255. TYPE Object = OBJECT END Object;
  8256. PROCEDURE Procedure (VAR parameter: Object);
  8257. END Procedure;
  8258. END Test.
  8259. positive: procedure with parameters of variable object type
  8260. MODULE Test;
  8261. TYPE Object = OBJECT END Object;
  8262. PROCEDURE Procedure (VAR a, b, c: Object);
  8263. END Procedure;
  8264. END Test.
  8265. positive: procedure with a parameter of constant object type
  8266. MODULE Test;
  8267. TYPE Object = OBJECT END Object;
  8268. PROCEDURE Procedure (CONST parameter: Object);
  8269. END Procedure;
  8270. END Test.
  8271. positive: procedure with parameters of constant object type
  8272. MODULE Test;
  8273. TYPE Object = OBJECT END Object;
  8274. PROCEDURE Procedure (CONST a, b, c: Object);
  8275. END Procedure;
  8276. END Test.
  8277. positive: procedure with intermixed parameters of object type
  8278. MODULE Test;
  8279. TYPE Object = OBJECT END Object;
  8280. PROCEDURE Procedure (a: Object; VAR b: Object; CONST c: Object);
  8281. END Procedure;
  8282. END Test.
  8283. positive: procedure with intermixed parameters of plain object type
  8284. MODULE Test;
  8285. TYPE Object = OBJECT;
  8286. PROCEDURE Procedure (a: Object; VAR b: Object; CONST c: Object);
  8287. END Procedure;
  8288. END Test.
  8289. positive: procedure with a parameter of anonymous object type
  8290. MODULE Test;
  8291. PROCEDURE Procedure (parameter: OBJECT END);
  8292. END Procedure;
  8293. END Test.
  8294. positive: procedure with a parameter of anonymous plain object type
  8295. MODULE Test;
  8296. PROCEDURE Procedure (parameter: OBJECT);
  8297. END Procedure;
  8298. END Test.
  8299. positive: procedure with parameters of anonymous object type
  8300. MODULE Test;
  8301. PROCEDURE Procedure (a, b, c: OBJECT END);
  8302. END Procedure;
  8303. END Test.
  8304. positive: procedure with a parameter of variable anonymous object type
  8305. MODULE Test;
  8306. PROCEDURE Procedure (VAR parameter: OBJECT END);
  8307. END Procedure;
  8308. END Test.
  8309. positive: procedure with parameters of variable anonymous object type
  8310. MODULE Test;
  8311. PROCEDURE Procedure (VAR a, b, c: OBJECT END);
  8312. END Procedure;
  8313. END Test.
  8314. positive: procedure with a parameter of constant anonymous object type
  8315. MODULE Test;
  8316. PROCEDURE Procedure (CONST parameter: OBJECT END);
  8317. END Procedure;
  8318. END Test.
  8319. positive: procedure with parameters of constant anonymous object type
  8320. MODULE Test;
  8321. PROCEDURE Procedure (CONST a, b, c: OBJECT END);
  8322. END Procedure;
  8323. END Test.
  8324. positive: procedure with intermixed parameters of anonymous object type
  8325. MODULE Test;
  8326. PROCEDURE Procedure (a: OBJECT END; VAR b: OBJECT END; CONST c: OBJECT END);
  8327. END Procedure;
  8328. END Test.
  8329. positive: procedure with intermixed parameters of anonymous plain object type
  8330. MODULE Test;
  8331. PROCEDURE Procedure (a: OBJECT; VAR b: OBJECT; CONST c: OBJECT);
  8332. END Procedure;
  8333. END Test.
  8334. positive: procedure with a parameter of pointer type
  8335. MODULE Test;
  8336. TYPE Pointer = POINTER TO RECORD END;
  8337. PROCEDURE Procedure (parameter: Pointer);
  8338. END Procedure;
  8339. END Test.
  8340. positive: procedure with parameters of pointer type
  8341. MODULE Test;
  8342. TYPE Pointer = POINTER TO RECORD END;
  8343. PROCEDURE Procedure (a, b, c: Pointer);
  8344. END Procedure;
  8345. END Test.
  8346. positive: procedure with a parameter of variable pointer type
  8347. MODULE Test;
  8348. TYPE Pointer = POINTER TO RECORD END;
  8349. PROCEDURE Procedure (VAR parameter: Pointer);
  8350. END Procedure;
  8351. END Test.
  8352. positive: procedure with parameters of variable pointer type
  8353. MODULE Test;
  8354. TYPE Pointer = POINTER TO RECORD END;
  8355. PROCEDURE Procedure (VAR a, b, c: Pointer);
  8356. END Procedure;
  8357. END Test.
  8358. positive: procedure with a parameter of constant pointer type
  8359. MODULE Test;
  8360. TYPE Pointer = POINTER TO RECORD END;
  8361. PROCEDURE Procedure (CONST parameter: Pointer);
  8362. END Procedure;
  8363. END Test.
  8364. positive: procedure with parameters of constant pointer type
  8365. MODULE Test;
  8366. TYPE Pointer = POINTER TO RECORD END;
  8367. PROCEDURE Procedure (CONST a, b, c: Pointer);
  8368. END Procedure;
  8369. END Test.
  8370. positive: procedure with intermixed parameters of pointer type
  8371. MODULE Test;
  8372. TYPE Pointer = POINTER TO RECORD END;
  8373. PROCEDURE Procedure (a: Pointer; VAR b: Pointer; CONST c: Pointer);
  8374. END Procedure;
  8375. END Test.
  8376. positive: procedure with a parameter of anonymous pointer type
  8377. MODULE Test;
  8378. PROCEDURE Procedure (parameter: POINTER TO RECORD END);
  8379. END Procedure;
  8380. END Test.
  8381. positive: procedure with parameters of anonymous pointer type
  8382. MODULE Test;
  8383. PROCEDURE Procedure (a, b, c: POINTER TO RECORD END);
  8384. END Procedure;
  8385. END Test.
  8386. positive: procedure with a parameter of variable anonymous pointer type
  8387. MODULE Test;
  8388. PROCEDURE Procedure (VAR parameter: POINTER TO RECORD END);
  8389. END Procedure;
  8390. END Test.
  8391. positive: procedure with parameters of variable anonymous pointer type
  8392. MODULE Test;
  8393. PROCEDURE Procedure (VAR a, b, c: POINTER TO RECORD END);
  8394. END Procedure;
  8395. END Test.
  8396. positive: procedure with a parameter of constant anonymous pointer type
  8397. MODULE Test;
  8398. PROCEDURE Procedure (CONST parameter: OBJECT END);
  8399. END Procedure;
  8400. END Test.
  8401. positive: procedure with parameters of constant anonymous pointer type
  8402. MODULE Test;
  8403. PROCEDURE Procedure (CONST a, b, c: POINTER TO RECORD END);
  8404. END Procedure;
  8405. END Test.
  8406. positive: procedure with intermixed parameters of anonymous pointer type
  8407. MODULE Test;
  8408. PROCEDURE Procedure (a: POINTER TO RECORD END; VAR b: POINTER TO RECORD END; CONST c: POINTER TO RECORD END);
  8409. END Procedure;
  8410. END Test.
  8411. positive: procedure with a parameter of procedure type
  8412. MODULE Test;
  8413. TYPE Proc = PROCEDURE;
  8414. PROCEDURE Procedure (parameter: Proc);
  8415. END Procedure;
  8416. END Test.
  8417. positive: procedure with parameters of procedure type
  8418. MODULE Test;
  8419. TYPE Proc = PROCEDURE;
  8420. PROCEDURE Procedure (a, b, c: Proc);
  8421. END Procedure;
  8422. END Test.
  8423. positive: procedure with a parameter of variable procedure type
  8424. MODULE Test;
  8425. TYPE Proc = PROCEDURE;
  8426. PROCEDURE Procedure (VAR parameter: Proc);
  8427. END Procedure;
  8428. END Test.
  8429. positive: procedure with parameters of variable procedure type
  8430. MODULE Test;
  8431. TYPE Proc = PROCEDURE;
  8432. PROCEDURE Procedure (VAR a, b, c: Proc);
  8433. END Procedure;
  8434. END Test.
  8435. positive: procedure with a parameter of constant procedure type
  8436. MODULE Test;
  8437. TYPE Proc = PROCEDURE;
  8438. PROCEDURE Procedure (CONST parameter: Proc);
  8439. END Procedure;
  8440. END Test.
  8441. positive: procedure with parameters of constant procedure type
  8442. MODULE Test;
  8443. TYPE Proc = PROCEDURE;
  8444. PROCEDURE Procedure (CONST a, b, c: Proc);
  8445. END Procedure;
  8446. END Test.
  8447. positive: procedure with intermixed parameters of procedure type
  8448. MODULE Test;
  8449. TYPE Proc = PROCEDURE;
  8450. PROCEDURE Procedure (a: Proc; VAR b: Proc; CONST c: Proc);
  8451. END Procedure;
  8452. END Test.
  8453. positive: procedure with a parameter of anonymous procedure type
  8454. MODULE Test;
  8455. PROCEDURE Procedure (parameter: PROCEDURE);
  8456. END Procedure;
  8457. END Test.
  8458. positive: procedure with parameters of anonymous procedure type
  8459. MODULE Test;
  8460. PROCEDURE Procedure (a, b, c: PROCEDURE);
  8461. END Procedure;
  8462. END Test.
  8463. positive: procedure with a parameter of variable anonymous procedure type
  8464. MODULE Test;
  8465. PROCEDURE Procedure (VAR parameter: PROCEDURE);
  8466. END Procedure;
  8467. END Test.
  8468. positive: procedure with parameters of variable anonymous procedure type
  8469. MODULE Test;
  8470. PROCEDURE Procedure (VAR a, b, c: PROCEDURE);
  8471. END Procedure;
  8472. END Test.
  8473. positive: procedure with a parameter of constant anonymous procedure type
  8474. MODULE Test;
  8475. PROCEDURE Procedure (CONST parameter: PROCEDURE);
  8476. END Procedure;
  8477. END Test.
  8478. positive: procedure with parameters of constant anonymous procedure type
  8479. MODULE Test;
  8480. PROCEDURE Procedure (CONST a, b, c: PROCEDURE);
  8481. END Procedure;
  8482. END Test.
  8483. positive: procedure with intermixed parameters of anonymous procedure type
  8484. MODULE Test;
  8485. PROCEDURE Procedure (a: PROCEDURE; VAR b: PROCEDURE; CONST c: PROCEDURE);
  8486. END Procedure;
  8487. END Test.
  8488. negative: procedure with parameters of local type
  8489. MODULE Test;
  8490. PROCEDURE Procedure (parameter: Type);
  8491. TYPE Type = RECORD END;
  8492. END Procedure;
  8493. END Test.
  8494. negative: procedure with parameter and local constant with same name
  8495. MODULE Test;
  8496. PROCEDURE Procedure (parameter: SET);
  8497. CONST parameter = 10;
  8498. END Procedure;
  8499. END Test.
  8500. negative: procedure with parameter and local type with same name
  8501. MODULE Test;
  8502. PROCEDURE Procedure (parameter: SET);
  8503. TYPE parameter = RECORD END;
  8504. END Procedure;
  8505. END Test.
  8506. negative: procedure with parameter and local variable with same name
  8507. MODULE Test;
  8508. PROCEDURE Procedure (parameter: SET);
  8509. VAR parameter: LONGINT;
  8510. END Procedure;
  8511. END Test.
  8512. negative: procedure with parameter and nested procedure with same name
  8513. MODULE Test;
  8514. PROCEDURE Procedure (parameter: SET);
  8515. PROCEDURE parameter; END parameter;
  8516. END Procedure;
  8517. END Test.
  8518. positive: boolean parameter assignment
  8519. MODULE Test;
  8520. PROCEDURE Procedure (value: BOOLEAN); BEGIN value := value; END Procedure;
  8521. END Test.
  8522. positive: char parameter assignment
  8523. MODULE Test;
  8524. PROCEDURE Procedure (value: CHAR); BEGIN value := value; END Procedure;
  8525. END Test.
  8526. positive: short integer parameter assignment
  8527. MODULE Test;
  8528. PROCEDURE Procedure (value: SHORTINT); BEGIN value := value; END Procedure;
  8529. END Test.
  8530. positive: integer parameter assignment
  8531. MODULE Test;
  8532. PROCEDURE Procedure (VAR value: INTEGER); BEGIN value := value; END Procedure;
  8533. END Test.
  8534. positive: long integer parameter assignment
  8535. MODULE Test;
  8536. PROCEDURE Procedure (value: LONGINT); BEGIN value := value; END Procedure;
  8537. END Test.
  8538. positive: huge integer parameter assignment
  8539. MODULE Test;
  8540. PROCEDURE Procedure (value: HUGEINT); BEGIN value := value; END Procedure;
  8541. END Test.
  8542. positive: real parameter assignment
  8543. MODULE Test;
  8544. PROCEDURE Procedure (value: REAL); BEGIN value := value; END Procedure;
  8545. END Test.
  8546. positive: long real parameter assignment
  8547. MODULE Test;
  8548. PROCEDURE Procedure (value: LONGREAL); BEGIN value := value; END Procedure;
  8549. END Test.
  8550. positive: set parameter assignment
  8551. MODULE Test;
  8552. PROCEDURE Procedure (value: SET); BEGIN value := value; END Procedure;
  8553. END Test.
  8554. positive: array parameter assignment
  8555. MODULE Test;
  8556. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8557. END Test.
  8558. positive: array parameter element assignment
  8559. MODULE Test;
  8560. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8561. END Test.
  8562. negative: open array parameter assignment
  8563. MODULE Test;
  8564. PROCEDURE Procedure (value: ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8565. END Test.
  8566. positive: open array parameter element assignment
  8567. MODULE Test;
  8568. PROCEDURE Procedure (value: ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8569. END Test.
  8570. positive: record parameter assignment
  8571. MODULE Test;
  8572. PROCEDURE Procedure (value: RECORD END); BEGIN value := value; END Procedure;
  8573. END Test.
  8574. positive: record parameter member assignment
  8575. MODULE Test;
  8576. PROCEDURE Procedure (value: RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8577. END Test.
  8578. positive: object parameter assignment
  8579. MODULE Test;
  8580. PROCEDURE Procedure (value: OBJECT END); BEGIN value := value; END Procedure;
  8581. END Test.
  8582. positive: object parameter member assignment
  8583. MODULE Test;
  8584. PROCEDURE Procedure (value: OBJECT VAR member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8585. END Test.
  8586. positive: base object parameter assignment
  8587. MODULE Test;
  8588. PROCEDURE Procedure (value: OBJECT); BEGIN value := value; END Procedure;
  8589. END Test.
  8590. positive: pointer to array parameter assignment
  8591. MODULE Test;
  8592. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8593. END Test.
  8594. positive: pointer to array parameter element assignment
  8595. MODULE Test;
  8596. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8597. END Test.
  8598. positive: pointer to open array parameter assignment
  8599. MODULE Test;
  8600. PROCEDURE Procedure (value: POINTER TO ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8601. END Test.
  8602. positive: pointer to open array parameter element assignment
  8603. MODULE Test;
  8604. PROCEDURE Procedure (value: POINTER TO ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8605. END Test.
  8606. positive: pointer to record parameter assignment
  8607. MODULE Test;
  8608. PROCEDURE Procedure (value: POINTER TO RECORD END); BEGIN value := value; END Procedure;
  8609. END Test.
  8610. positive: pointer to record parameter member assignment
  8611. MODULE Test;
  8612. PROCEDURE Procedure (value: POINTER TO RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8613. END Test.
  8614. positive: procedure parameter assignment
  8615. MODULE Test;
  8616. PROCEDURE Procedure (value: PROCEDURE); BEGIN value := value; END Procedure;
  8617. END Test.
  8618. positive: variable boolean parameter assignment
  8619. MODULE Test;
  8620. PROCEDURE Procedure (VAR value: BOOLEAN); BEGIN value := value; END Procedure;
  8621. END Test.
  8622. positive: variable char parameter assignment
  8623. MODULE Test;
  8624. PROCEDURE Procedure (VAR value: CHAR); BEGIN value := value; END Procedure;
  8625. END Test.
  8626. positive: variable short integer parameter assignment
  8627. MODULE Test;
  8628. PROCEDURE Procedure (VAR value: SHORTINT); BEGIN value := value; END Procedure;
  8629. END Test.
  8630. positive: variable integer parameter assignment
  8631. MODULE Test;
  8632. PROCEDURE Procedure (VAR value: INTEGER); BEGIN value := value; END Procedure;
  8633. END Test.
  8634. positive: variable long integer parameter assignment
  8635. MODULE Test;
  8636. PROCEDURE Procedure (VAR value: LONGINT); BEGIN value := value; END Procedure;
  8637. END Test.
  8638. positive: variable huge integer parameter assignment
  8639. MODULE Test;
  8640. PROCEDURE Procedure (VAR value: HUGEINT); BEGIN value := value; END Procedure;
  8641. END Test.
  8642. positive: variable real parameter assignment
  8643. MODULE Test;
  8644. PROCEDURE Procedure (VAR value: REAL); BEGIN value := value; END Procedure;
  8645. END Test.
  8646. positive: variable long real parameter assignment
  8647. MODULE Test;
  8648. PROCEDURE Procedure (VAR value: LONGREAL); BEGIN value := value; END Procedure;
  8649. END Test.
  8650. positive: variable set parameter assignment
  8651. MODULE Test;
  8652. PROCEDURE Procedure (VAR value: SET); BEGIN value := value; END Procedure;
  8653. END Test.
  8654. positive: variable array parameter assignment
  8655. MODULE Test;
  8656. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8657. END Test.
  8658. positive: variable array parameter element assignment
  8659. MODULE Test;
  8660. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8661. END Test.
  8662. negative: variable open array parameter assignment
  8663. MODULE Test;
  8664. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8665. END Test.
  8666. positive: variable open array parameter element assignment
  8667. MODULE Test;
  8668. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8669. END Test.
  8670. positive: variable record parameter assignment
  8671. MODULE Test;
  8672. PROCEDURE Procedure (VAR value: RECORD END); BEGIN value := value; END Procedure;
  8673. END Test.
  8674. positive: variable record parameter member assignment
  8675. MODULE Test;
  8676. PROCEDURE Procedure (VAR value: RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8677. END Test.
  8678. positive: variable object parameter assignment
  8679. MODULE Test;
  8680. PROCEDURE Procedure (VAR value: OBJECT END); BEGIN value := value; END Procedure;
  8681. END Test.
  8682. positive: variable object parameter member assignment
  8683. MODULE Test;
  8684. PROCEDURE Procedure (VAR value: OBJECT VAR member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8685. END Test.
  8686. positive: variable base object parameter assignment
  8687. MODULE Test;
  8688. PROCEDURE Procedure (VAR value: OBJECT); BEGIN value := value; END Procedure;
  8689. END Test.
  8690. positive: variable pointer to array parameter assignment
  8691. MODULE Test;
  8692. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8693. END Test.
  8694. positive: variable pointer to array parameter element assignment
  8695. MODULE Test;
  8696. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8697. END Test.
  8698. positive: variable pointer to open array parameter assignment
  8699. MODULE Test;
  8700. PROCEDURE Procedure (VAR value: POINTER TO ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8701. END Test.
  8702. positive: variable pointer to open array parameter element assignment
  8703. MODULE Test;
  8704. PROCEDURE Procedure (VAR value: POINTER TO ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8705. END Test.
  8706. positive: variable pointer to record parameter assignment
  8707. MODULE Test;
  8708. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); BEGIN value := value; END Procedure;
  8709. END Test.
  8710. positive: variable pointer to record parameter member assignment
  8711. MODULE Test;
  8712. PROCEDURE Procedure (VAR value: POINTER TO RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8713. END Test.
  8714. positive: variable procedure parameter assignment
  8715. MODULE Test;
  8716. PROCEDURE Procedure (VAR value: PROCEDURE); BEGIN value := value; END Procedure;
  8717. END Test.
  8718. negative: constant boolean parameter assignment
  8719. MODULE Test;
  8720. PROCEDURE Procedure (CONST value: BOOLEAN); BEGIN value := value; END Procedure;
  8721. END Test.
  8722. negative: constant char parameter assignment
  8723. MODULE Test;
  8724. PROCEDURE Procedure (CONST value: CHAR); BEGIN value := value; END Procedure;
  8725. END Test.
  8726. negative: constant short integer parameter assignment
  8727. MODULE Test;
  8728. PROCEDURE Procedure (CONST value: SHORTINT); BEGIN value := value; END Procedure;
  8729. END Test.
  8730. negative: constant integer parameter assignment
  8731. MODULE Test;
  8732. PROCEDURE Procedure (CONST value: INTEGER); BEGIN value := value; END Procedure;
  8733. END Test.
  8734. negative: constant long integer parameter assignment
  8735. MODULE Test;
  8736. PROCEDURE Procedure (CONST value: LONGINT); BEGIN value := value; END Procedure;
  8737. END Test.
  8738. negative: constant huge integer parameter assignment
  8739. MODULE Test;
  8740. PROCEDURE Procedure (CONST value: HUGEINT); BEGIN value := value; END Procedure;
  8741. END Test.
  8742. negative: constant real parameter assignment
  8743. MODULE Test;
  8744. PROCEDURE Procedure (CONST value: REAL); BEGIN value := value; END Procedure;
  8745. END Test.
  8746. negative: constant long real parameter assignment
  8747. MODULE Test;
  8748. PROCEDURE Procedure (CONST value: LONGREAL); BEGIN value := value; END Procedure;
  8749. END Test.
  8750. negative: constant set parameter assignment
  8751. MODULE Test;
  8752. PROCEDURE Procedure (CONST value: SET); BEGIN value := value; END Procedure;
  8753. END Test.
  8754. negative: constant array parameter assignment
  8755. MODULE Test;
  8756. PROCEDURE Procedure (CONST value: ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8757. END Test.
  8758. negative: constant array parameter element assignment
  8759. MODULE Test;
  8760. PROCEDURE Procedure (CONST value: ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8761. END Test.
  8762. negative: constant open array parameter assignment
  8763. MODULE Test;
  8764. PROCEDURE Procedure (CONST value: ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8765. END Test.
  8766. negative: constant open array parameter element assignment
  8767. MODULE Test;
  8768. PROCEDURE Procedure (CONST value: ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8769. END Test.
  8770. negative: constant record parameter assignment
  8771. MODULE Test;
  8772. PROCEDURE Procedure (CONST value: RECORD END); BEGIN value := value; END Procedure;
  8773. END Test.
  8774. negative: constant record parameter member assignment
  8775. MODULE Test;
  8776. PROCEDURE Procedure (CONST value: RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8777. END Test.
  8778. negative: constant object parameter assignment
  8779. MODULE Test;
  8780. PROCEDURE Procedure (CONST value: OBJECT END); BEGIN value := value; END Procedure;
  8781. END Test.
  8782. positive: constant object parameter member assignment
  8783. MODULE Test;
  8784. PROCEDURE Procedure (CONST value: OBJECT VAR member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8785. END Test.
  8786. negative: constant base object parameter assignment
  8787. MODULE Test;
  8788. PROCEDURE Procedure (CONST value: OBJECT); BEGIN value := value; END Procedure;
  8789. END Test.
  8790. negative: constant pointer to array parameter assignment
  8791. MODULE Test;
  8792. PROCEDURE Procedure (CONST value: POINTER TO ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8793. END Test.
  8794. positive: constant pointer to array parameter element assignment
  8795. MODULE Test;
  8796. PROCEDURE Procedure (CONST value: POINTER TO ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8797. END Test.
  8798. negative: constant pointer to open array parameter assignment
  8799. MODULE Test;
  8800. PROCEDURE Procedure (CONST value: POINTER TO ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8801. END Test.
  8802. positive: constant pointer to open array parameter element assignment
  8803. MODULE Test;
  8804. PROCEDURE Procedure (CONST value: POINTER TO ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8805. END Test.
  8806. negative: constant pointer to record parameter assignment
  8807. MODULE Test;
  8808. PROCEDURE Procedure (CONST value: POINTER TO RECORD END); BEGIN value := value; END Procedure;
  8809. END Test.
  8810. positive: constant pointer to record parameter member assignment
  8811. MODULE Test;
  8812. PROCEDURE Procedure (CONST value: POINTER TO RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8813. END Test.
  8814. negative: constant procedure parameter assignment
  8815. MODULE Test;
  8816. PROCEDURE Procedure (CONST value: PROCEDURE); BEGIN value := value; END Procedure;
  8817. END Test.
  8818. positive: calling procedure with boolean parameter with boolean argument
  8819. MODULE Test;
  8820. VAR argument: BOOLEAN;
  8821. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8822. BEGIN Procedure (argument);
  8823. END Test.
  8824. negative: calling procedure with boolean parameter with character argument
  8825. MODULE Test;
  8826. VAR argument: CHAR;
  8827. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8828. BEGIN Procedure (argument);
  8829. END Test.
  8830. negative: calling procedure with boolean parameter with short integer argument
  8831. MODULE Test;
  8832. VAR argument: SHORTINT;
  8833. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8834. BEGIN Procedure (argument);
  8835. END Test.
  8836. negative: calling procedure with boolean parameter with integer argument
  8837. MODULE Test;
  8838. VAR argument: INTEGER;
  8839. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8840. BEGIN Procedure (argument);
  8841. END Test.
  8842. negative: calling procedure with boolean parameter with long integer argument
  8843. MODULE Test;
  8844. VAR argument: LONGINT;
  8845. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8846. BEGIN Procedure (argument);
  8847. END Test.
  8848. negative: calling procedure with boolean parameter with huge integer argument
  8849. MODULE Test;
  8850. VAR argument: HUGEINT;
  8851. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8852. BEGIN Procedure (argument);
  8853. END Test.
  8854. negative: calling procedure with boolean parameter with real argument
  8855. MODULE Test;
  8856. VAR argument: REAL;
  8857. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8858. BEGIN Procedure (argument);
  8859. END Test.
  8860. negative: calling procedure with boolean parameter with long real argument
  8861. MODULE Test;
  8862. VAR argument: LONGREAL;
  8863. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8864. BEGIN Procedure (argument);
  8865. END Test.
  8866. negative: calling procedure with boolean parameter with set argument
  8867. MODULE Test;
  8868. VAR argument: SET;
  8869. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8870. BEGIN Procedure (argument);
  8871. END Test.
  8872. negative: calling procedure with boolean parameter with array argument
  8873. MODULE Test;
  8874. VAR argument: ARRAY 10 OF CHAR;
  8875. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8876. BEGIN Procedure (argument);
  8877. END Test.
  8878. negative: calling procedure with boolean parameter with record argument
  8879. MODULE Test;
  8880. VAR argument: RECORD END;
  8881. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8882. BEGIN Procedure (argument);
  8883. END Test.
  8884. negative: calling procedure with boolean parameter with object argument
  8885. MODULE Test;
  8886. VAR argument: OBJECT END;
  8887. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8888. BEGIN Procedure (argument);
  8889. END Test.
  8890. negative: calling procedure with boolean parameter with base object argument
  8891. MODULE Test;
  8892. VAR argument: OBJECT;
  8893. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8894. BEGIN Procedure (argument);
  8895. END Test.
  8896. negative: calling procedure with boolean parameter with pointer to array argument
  8897. MODULE Test;
  8898. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  8899. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8900. BEGIN Procedure (argument);
  8901. END Test.
  8902. negative: calling procedure with boolean parameter with pointer to record argument
  8903. MODULE Test;
  8904. VAR argument: POINTER TO RECORD END;
  8905. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8906. BEGIN Procedure (argument);
  8907. END Test.
  8908. negative: calling procedure with boolean parameter with procedure argument
  8909. MODULE Test;
  8910. VAR argument: PROCEDURE;
  8911. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8912. BEGIN Procedure (argument);
  8913. END Test.
  8914. negative: calling procedure with character parameter with boolean argument
  8915. MODULE Test;
  8916. VAR argument: BOOLEAN;
  8917. PROCEDURE Procedure (value: CHAR); END Procedure;
  8918. BEGIN Procedure (argument);
  8919. END Test.
  8920. positive: calling procedure with character parameter with character argument
  8921. MODULE Test;
  8922. VAR argument: CHAR;
  8923. PROCEDURE Procedure (value: CHAR); END Procedure;
  8924. BEGIN Procedure (argument);
  8925. END Test.
  8926. negative: calling procedure with character parameter with short integer argument
  8927. MODULE Test;
  8928. VAR argument: SHORTINT;
  8929. PROCEDURE Procedure (value: CHAR); END Procedure;
  8930. BEGIN Procedure (argument);
  8931. END Test.
  8932. negative: calling procedure with character parameter with integer argument
  8933. MODULE Test;
  8934. VAR argument: INTEGER;
  8935. PROCEDURE Procedure (value: CHAR); END Procedure;
  8936. BEGIN Procedure (argument);
  8937. END Test.
  8938. negative: calling procedure with character parameter with long integer argument
  8939. MODULE Test;
  8940. VAR argument: LONGINT;
  8941. PROCEDURE Procedure (value: CHAR); END Procedure;
  8942. BEGIN Procedure (argument);
  8943. END Test.
  8944. negative: calling procedure with character parameter with huge integer argument
  8945. MODULE Test;
  8946. VAR argument: HUGEINT;
  8947. PROCEDURE Procedure (value: CHAR); END Procedure;
  8948. BEGIN Procedure (argument);
  8949. END Test.
  8950. negative: calling procedure with character parameter with real argument
  8951. MODULE Test;
  8952. VAR argument: REAL;
  8953. PROCEDURE Procedure (value: CHAR); END Procedure;
  8954. BEGIN Procedure (argument);
  8955. END Test.
  8956. negative: calling procedure with character parameter with long real argument
  8957. MODULE Test;
  8958. VAR argument: LONGREAL;
  8959. PROCEDURE Procedure (value: CHAR); END Procedure;
  8960. BEGIN Procedure (argument);
  8961. END Test.
  8962. negative: calling procedure with character parameter with set argument
  8963. MODULE Test;
  8964. VAR argument: SET;
  8965. PROCEDURE Procedure (value: CHAR); END Procedure;
  8966. BEGIN Procedure (argument);
  8967. END Test.
  8968. negative: calling procedure with character parameter with array argument
  8969. MODULE Test;
  8970. VAR argument: ARRAY 10 OF CHAR;
  8971. PROCEDURE Procedure (value: CHAR); END Procedure;
  8972. BEGIN Procedure (argument);
  8973. END Test.
  8974. negative: calling procedure with character parameter with record argument
  8975. MODULE Test;
  8976. VAR argument: RECORD END;
  8977. PROCEDURE Procedure (value: CHAR); END Procedure;
  8978. BEGIN Procedure (argument);
  8979. END Test.
  8980. negative: calling procedure with character parameter with object argument
  8981. MODULE Test;
  8982. VAR argument: OBJECT END;
  8983. PROCEDURE Procedure (value: CHAR); END Procedure;
  8984. BEGIN Procedure (argument);
  8985. END Test.
  8986. negative: calling procedure with character parameter with base object argument
  8987. MODULE Test;
  8988. VAR argument: OBJECT;
  8989. PROCEDURE Procedure (value: CHAR); END Procedure;
  8990. BEGIN Procedure (argument);
  8991. END Test.
  8992. negative: calling procedure with character parameter with pointer to array argument
  8993. MODULE Test;
  8994. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  8995. PROCEDURE Procedure (value: CHAR); END Procedure;
  8996. BEGIN Procedure (argument);
  8997. END Test.
  8998. negative: calling procedure with character parameter with pointer to record argument
  8999. MODULE Test;
  9000. VAR argument: POINTER TO RECORD END;
  9001. PROCEDURE Procedure (value: CHAR); END Procedure;
  9002. BEGIN Procedure (argument);
  9003. END Test.
  9004. negative: calling procedure with character parameter with procedure argument
  9005. MODULE Test;
  9006. VAR argument: PROCEDURE;
  9007. PROCEDURE Procedure (value: CHAR); END Procedure;
  9008. BEGIN Procedure (argument);
  9009. END Test.
  9010. negative: calling procedure with short integer parameter with boolean argument
  9011. MODULE Test;
  9012. VAR argument: BOOLEAN;
  9013. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9014. BEGIN Procedure (argument);
  9015. END Test.
  9016. negative: calling procedure with short integer parameter with character argument
  9017. MODULE Test;
  9018. VAR argument: CHAR;
  9019. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9020. BEGIN Procedure (argument);
  9021. END Test.
  9022. positive: calling procedure with short integer parameter with short integer argument
  9023. MODULE Test;
  9024. VAR argument: SHORTINT;
  9025. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9026. BEGIN Procedure (argument);
  9027. END Test.
  9028. negative: calling procedure with short integer parameter with integer argument
  9029. MODULE Test;
  9030. VAR argument: INTEGER;
  9031. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9032. BEGIN Procedure (argument);
  9033. END Test.
  9034. negative: calling procedure with short integer parameter with long integer argument
  9035. MODULE Test;
  9036. VAR argument: LONGINT;
  9037. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9038. BEGIN Procedure (argument);
  9039. END Test.
  9040. negative: calling procedure with short integer parameter with huge integer argument
  9041. MODULE Test;
  9042. VAR argument: HUGEINT;
  9043. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9044. BEGIN Procedure (argument);
  9045. END Test.
  9046. negative: calling procedure with short integer parameter with real argument
  9047. MODULE Test;
  9048. VAR argument: REAL;
  9049. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9050. BEGIN Procedure (argument);
  9051. END Test.
  9052. negative: calling procedure with short integer parameter with long real argument
  9053. MODULE Test;
  9054. VAR argument: LONGREAL;
  9055. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9056. BEGIN Procedure (argument);
  9057. END Test.
  9058. negative: calling procedure with short integer parameter with set argument
  9059. MODULE Test;
  9060. VAR argument: SET;
  9061. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9062. BEGIN Procedure (argument);
  9063. END Test.
  9064. negative: calling procedure with short integer parameter with array argument
  9065. MODULE Test;
  9066. VAR argument: ARRAY 10 OF CHAR;
  9067. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9068. BEGIN Procedure (argument);
  9069. END Test.
  9070. negative: calling procedure with short integer parameter with record argument
  9071. MODULE Test;
  9072. VAR argument: RECORD END;
  9073. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9074. BEGIN Procedure (argument);
  9075. END Test.
  9076. negative: calling procedure with short integer parameter with object argument
  9077. MODULE Test;
  9078. VAR argument: OBJECT END;
  9079. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9080. BEGIN Procedure (argument);
  9081. END Test.
  9082. negative: calling procedure with short integer parameter with base object argument
  9083. MODULE Test;
  9084. VAR argument: OBJECT;
  9085. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9086. BEGIN Procedure (argument);
  9087. END Test.
  9088. negative: calling procedure with short integer parameter with pointer to array argument
  9089. MODULE Test;
  9090. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9091. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9092. BEGIN Procedure (argument);
  9093. END Test.
  9094. negative: calling procedure with short integer parameter with pointer to record argument
  9095. MODULE Test;
  9096. VAR argument: POINTER TO RECORD END;
  9097. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9098. BEGIN Procedure (argument);
  9099. END Test.
  9100. negative: calling procedure with short integer parameter with procedure argument
  9101. MODULE Test;
  9102. VAR argument: PROCEDURE;
  9103. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9104. BEGIN Procedure (argument);
  9105. END Test.
  9106. negative: calling procedure with integer parameter with boolean argument
  9107. MODULE Test;
  9108. VAR argument: BOOLEAN;
  9109. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9110. BEGIN Procedure (argument);
  9111. END Test.
  9112. negative: calling procedure with integer parameter with character argument
  9113. MODULE Test;
  9114. VAR argument: CHAR;
  9115. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9116. BEGIN Procedure (argument);
  9117. END Test.
  9118. positive: calling procedure with integer parameter with short integer argument
  9119. MODULE Test;
  9120. VAR argument: SHORTINT;
  9121. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9122. BEGIN Procedure (argument);
  9123. END Test.
  9124. positive: calling procedure with integer parameter with integer argument
  9125. MODULE Test;
  9126. VAR argument: INTEGER;
  9127. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9128. BEGIN Procedure (argument);
  9129. END Test.
  9130. negative: calling procedure with integer parameter with long integer argument
  9131. MODULE Test;
  9132. VAR argument: LONGINT;
  9133. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9134. BEGIN Procedure (argument);
  9135. END Test.
  9136. negative: calling procedure with integer parameter with huge integer argument
  9137. MODULE Test;
  9138. VAR argument: HUGEINT;
  9139. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9140. BEGIN Procedure (argument);
  9141. END Test.
  9142. negative: calling procedure with integer parameter with real argument
  9143. MODULE Test;
  9144. VAR argument: REAL;
  9145. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9146. BEGIN Procedure (argument);
  9147. END Test.
  9148. negative: calling procedure with integer parameter with long real argument
  9149. MODULE Test;
  9150. VAR argument: LONGREAL;
  9151. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9152. BEGIN Procedure (argument);
  9153. END Test.
  9154. negative: calling procedure with integer parameter with set argument
  9155. MODULE Test;
  9156. VAR argument: SET;
  9157. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9158. BEGIN Procedure (argument);
  9159. END Test.
  9160. negative: calling procedure with integer parameter with array argument
  9161. MODULE Test;
  9162. VAR argument: ARRAY 10 OF CHAR;
  9163. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9164. BEGIN Procedure (argument);
  9165. END Test.
  9166. negative: calling procedure with integer parameter with record argument
  9167. MODULE Test;
  9168. VAR argument: RECORD END;
  9169. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9170. BEGIN Procedure (argument);
  9171. END Test.
  9172. negative: calling procedure with integer parameter with object argument
  9173. MODULE Test;
  9174. VAR argument: OBJECT END;
  9175. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9176. BEGIN Procedure (argument);
  9177. END Test.
  9178. negative: calling procedure with integer parameter with base object argument
  9179. MODULE Test;
  9180. VAR argument: OBJECT;
  9181. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9182. BEGIN Procedure (argument);
  9183. END Test.
  9184. negative: calling procedure with integer parameter with pointer to array argument
  9185. MODULE Test;
  9186. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9187. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9188. BEGIN Procedure (argument);
  9189. END Test.
  9190. negative: calling procedure with integer parameter with pointer to record argument
  9191. MODULE Test;
  9192. VAR argument: POINTER TO RECORD END;
  9193. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9194. BEGIN Procedure (argument);
  9195. END Test.
  9196. negative: calling procedure with integer parameter with procedure argument
  9197. MODULE Test;
  9198. VAR argument: PROCEDURE;
  9199. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9200. BEGIN Procedure (argument);
  9201. END Test.
  9202. negative: calling procedure with long integer parameter with boolean argument
  9203. MODULE Test;
  9204. VAR argument: BOOLEAN;
  9205. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9206. BEGIN Procedure (argument);
  9207. END Test.
  9208. negative: calling procedure with long integer parameter with character argument
  9209. MODULE Test;
  9210. VAR argument: CHAR;
  9211. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9212. BEGIN Procedure (argument);
  9213. END Test.
  9214. positive: calling procedure with long integer parameter with short integer argument
  9215. MODULE Test;
  9216. VAR argument: SHORTINT;
  9217. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9218. BEGIN Procedure (argument);
  9219. END Test.
  9220. positive: calling procedure with long integer parameter with integer argument
  9221. MODULE Test;
  9222. VAR argument: INTEGER;
  9223. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9224. BEGIN Procedure (argument);
  9225. END Test.
  9226. positive: calling procedure with long integer parameter with long integer argument
  9227. MODULE Test;
  9228. VAR argument: LONGINT;
  9229. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9230. BEGIN Procedure (argument);
  9231. END Test.
  9232. negative: calling procedure with long integer parameter with huge integer argument
  9233. MODULE Test;
  9234. VAR argument: HUGEINT;
  9235. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9236. BEGIN Procedure (argument);
  9237. END Test.
  9238. negative: calling procedure with long integer parameter with real argument
  9239. MODULE Test;
  9240. VAR argument: REAL;
  9241. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9242. BEGIN Procedure (argument);
  9243. END Test.
  9244. negative: calling procedure with long integer parameter with long real argument
  9245. MODULE Test;
  9246. VAR argument: LONGREAL;
  9247. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9248. BEGIN Procedure (argument);
  9249. END Test.
  9250. negative: calling procedure with long integer parameter with set argument
  9251. MODULE Test;
  9252. VAR argument: SET;
  9253. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9254. BEGIN Procedure (argument);
  9255. END Test.
  9256. negative: calling procedure with long integer parameter with array argument
  9257. MODULE Test;
  9258. VAR argument: ARRAY 10 OF CHAR;
  9259. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9260. BEGIN Procedure (argument);
  9261. END Test.
  9262. negative: calling procedure with long integer parameter with record argument
  9263. MODULE Test;
  9264. VAR argument: RECORD END;
  9265. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9266. BEGIN Procedure (argument);
  9267. END Test.
  9268. negative: calling procedure with long integer parameter with object argument
  9269. MODULE Test;
  9270. VAR argument: OBJECT END;
  9271. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9272. BEGIN Procedure (argument);
  9273. END Test.
  9274. negative: calling procedure with long integer parameter with base object argument
  9275. MODULE Test;
  9276. VAR argument: OBJECT;
  9277. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9278. BEGIN Procedure (argument);
  9279. END Test.
  9280. negative: calling procedure with long integer parameter with pointer to array argument
  9281. MODULE Test;
  9282. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9283. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9284. BEGIN Procedure (argument);
  9285. END Test.
  9286. negative: calling procedure with long integer parameter with pointer to record argument
  9287. MODULE Test;
  9288. VAR argument: POINTER TO RECORD END;
  9289. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9290. BEGIN Procedure (argument);
  9291. END Test.
  9292. negative: calling procedure with long integer parameter with procedure argument
  9293. MODULE Test;
  9294. VAR argument: PROCEDURE;
  9295. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9296. BEGIN Procedure (argument);
  9297. END Test.
  9298. negative: calling procedure with huge integer parameter with boolean argument
  9299. MODULE Test;
  9300. VAR argument: BOOLEAN;
  9301. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9302. BEGIN Procedure (argument);
  9303. END Test.
  9304. negative: calling procedure with huge integer parameter with character argument
  9305. MODULE Test;
  9306. VAR argument: CHAR;
  9307. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9308. BEGIN Procedure (argument);
  9309. END Test.
  9310. positive: calling procedure with huge integer parameter with short integer argument
  9311. MODULE Test;
  9312. VAR argument: SHORTINT;
  9313. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9314. BEGIN Procedure (argument);
  9315. END Test.
  9316. positive: calling procedure with huge integer parameter with integer argument
  9317. MODULE Test;
  9318. VAR argument: INTEGER;
  9319. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9320. BEGIN Procedure (argument);
  9321. END Test.
  9322. positive: calling procedure with huge integer parameter with long integer argument
  9323. MODULE Test;
  9324. VAR argument: LONGINT;
  9325. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9326. BEGIN Procedure (argument);
  9327. END Test.
  9328. positive: calling procedure with huge integer parameter with huge integer argument
  9329. MODULE Test;
  9330. VAR argument: HUGEINT;
  9331. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9332. BEGIN Procedure (argument);
  9333. END Test.
  9334. negative: calling procedure with huge integer parameter with real argument
  9335. MODULE Test;
  9336. VAR argument: REAL;
  9337. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9338. BEGIN Procedure (argument);
  9339. END Test.
  9340. negative: calling procedure with huge integer parameter with long real argument
  9341. MODULE Test;
  9342. VAR argument: LONGREAL;
  9343. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9344. BEGIN Procedure (argument);
  9345. END Test.
  9346. negative: calling procedure with huge integer parameter with set argument
  9347. MODULE Test;
  9348. VAR argument: SET;
  9349. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9350. BEGIN Procedure (argument);
  9351. END Test.
  9352. negative: calling procedure with huge integer parameter with array argument
  9353. MODULE Test;
  9354. VAR argument: ARRAY 10 OF CHAR;
  9355. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9356. BEGIN Procedure (argument);
  9357. END Test.
  9358. negative: calling procedure with huge integer parameter with record argument
  9359. MODULE Test;
  9360. VAR argument: RECORD END;
  9361. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9362. BEGIN Procedure (argument);
  9363. END Test.
  9364. negative: calling procedure with huge integer parameter with object argument
  9365. MODULE Test;
  9366. VAR argument: OBJECT END;
  9367. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9368. BEGIN Procedure (argument);
  9369. END Test.
  9370. negative: calling procedure with huge integer parameter with base object argument
  9371. MODULE Test;
  9372. VAR argument: OBJECT;
  9373. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9374. BEGIN Procedure (argument);
  9375. END Test.
  9376. negative: calling procedure with huge integer parameter with pointer to array argument
  9377. MODULE Test;
  9378. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9379. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9380. BEGIN Procedure (argument);
  9381. END Test.
  9382. negative: calling procedure with huge integer parameter with pointer to record argument
  9383. MODULE Test;
  9384. VAR argument: POINTER TO RECORD END;
  9385. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9386. BEGIN Procedure (argument);
  9387. END Test.
  9388. negative: calling procedure with huge integer parameter with procedure argument
  9389. MODULE Test;
  9390. VAR argument: PROCEDURE;
  9391. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9392. BEGIN Procedure (argument);
  9393. END Test.
  9394. negative: calling procedure with real parameter with boolean argument
  9395. MODULE Test;
  9396. VAR argument: BOOLEAN;
  9397. PROCEDURE Procedure (value: REAL); END Procedure;
  9398. BEGIN Procedure (argument);
  9399. END Test.
  9400. negative: calling procedure with real parameter with character argument
  9401. MODULE Test;
  9402. VAR argument: CHAR;
  9403. PROCEDURE Procedure (value: REAL); END Procedure;
  9404. BEGIN Procedure (argument);
  9405. END Test.
  9406. positive: calling procedure with real parameter with short integer argument
  9407. MODULE Test;
  9408. VAR argument: SHORTINT;
  9409. PROCEDURE Procedure (value: REAL); END Procedure;
  9410. BEGIN Procedure (argument);
  9411. END Test.
  9412. positive: calling procedure with real parameter with integer argument
  9413. MODULE Test;
  9414. VAR argument: INTEGER;
  9415. PROCEDURE Procedure (value: REAL); END Procedure;
  9416. BEGIN Procedure (argument);
  9417. END Test.
  9418. positive: calling procedure with real parameter with long integer argument
  9419. MODULE Test;
  9420. VAR argument: LONGINT;
  9421. PROCEDURE Procedure (value: REAL); END Procedure;
  9422. BEGIN Procedure (argument);
  9423. END Test.
  9424. positive: calling procedure with real parameter with huge integer argument
  9425. MODULE Test;
  9426. VAR argument: HUGEINT;
  9427. PROCEDURE Procedure (value: REAL); END Procedure;
  9428. BEGIN Procedure (argument);
  9429. END Test.
  9430. positive: calling procedure with real parameter with real argument
  9431. MODULE Test;
  9432. VAR argument: REAL;
  9433. PROCEDURE Procedure (value: REAL); END Procedure;
  9434. BEGIN Procedure (argument);
  9435. END Test.
  9436. negative: calling procedure with real parameter with long real argument
  9437. MODULE Test;
  9438. VAR argument: LONGREAL;
  9439. PROCEDURE Procedure (value: REAL); END Procedure;
  9440. BEGIN Procedure (argument);
  9441. END Test.
  9442. negative: calling procedure with real parameter with set argument
  9443. MODULE Test;
  9444. VAR argument: SET;
  9445. PROCEDURE Procedure (value: REAL); END Procedure;
  9446. BEGIN Procedure (argument);
  9447. END Test.
  9448. negative: calling procedure with real parameter with array argument
  9449. MODULE Test;
  9450. VAR argument: ARRAY 10 OF CHAR;
  9451. PROCEDURE Procedure (value: REAL); END Procedure;
  9452. BEGIN Procedure (argument);
  9453. END Test.
  9454. negative: calling procedure with real parameter with record argument
  9455. MODULE Test;
  9456. VAR argument: RECORD END;
  9457. PROCEDURE Procedure (value: REAL); END Procedure;
  9458. BEGIN Procedure (argument);
  9459. END Test.
  9460. negative: calling procedure with real parameter with object argument
  9461. MODULE Test;
  9462. VAR argument: OBJECT END;
  9463. PROCEDURE Procedure (value: REAL); END Procedure;
  9464. BEGIN Procedure (argument);
  9465. END Test.
  9466. negative: calling procedure with real parameter with base object argument
  9467. MODULE Test;
  9468. VAR argument: OBJECT;
  9469. PROCEDURE Procedure (value: REAL); END Procedure;
  9470. BEGIN Procedure (argument);
  9471. END Test.
  9472. negative: calling procedure with real parameter with pointer to array argument
  9473. MODULE Test;
  9474. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9475. PROCEDURE Procedure (value: REAL); END Procedure;
  9476. BEGIN Procedure (argument);
  9477. END Test.
  9478. negative: calling procedure with real parameter with pointer to record argument
  9479. MODULE Test;
  9480. VAR argument: POINTER TO RECORD END;
  9481. PROCEDURE Procedure (value: REAL); END Procedure;
  9482. BEGIN Procedure (argument);
  9483. END Test.
  9484. negative: calling procedure with real parameter with procedure argument
  9485. MODULE Test;
  9486. VAR argument: PROCEDURE;
  9487. PROCEDURE Procedure (value: REAL); END Procedure;
  9488. BEGIN Procedure (argument);
  9489. END Test.
  9490. negative: calling procedure with long real parameter with boolean argument
  9491. MODULE Test;
  9492. VAR argument: BOOLEAN;
  9493. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9494. BEGIN Procedure (argument);
  9495. END Test.
  9496. negative: calling procedure with long real parameter with character argument
  9497. MODULE Test;
  9498. VAR argument: CHAR;
  9499. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9500. BEGIN Procedure (argument);
  9501. END Test.
  9502. positive: calling procedure with long real parameter with short integer argument
  9503. MODULE Test;
  9504. VAR argument: SHORTINT;
  9505. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9506. BEGIN Procedure (argument);
  9507. END Test.
  9508. positive: calling procedure with long real parameter with integer argument
  9509. MODULE Test;
  9510. VAR argument: INTEGER;
  9511. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9512. BEGIN Procedure (argument);
  9513. END Test.
  9514. positive: calling procedure with long real parameter with long integer argument
  9515. MODULE Test;
  9516. VAR argument: LONGINT;
  9517. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9518. BEGIN Procedure (argument);
  9519. END Test.
  9520. positive: calling procedure with long real parameter with huge integer argument
  9521. MODULE Test;
  9522. VAR argument: HUGEINT;
  9523. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9524. BEGIN Procedure (argument);
  9525. END Test.
  9526. positive: calling procedure with long real parameter with real argument
  9527. MODULE Test;
  9528. VAR argument: REAL;
  9529. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9530. BEGIN Procedure (argument);
  9531. END Test.
  9532. positive: calling procedure with long real parameter with long real argument
  9533. MODULE Test;
  9534. VAR argument: LONGREAL;
  9535. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9536. BEGIN Procedure (argument);
  9537. END Test.
  9538. negative: calling procedure with long real parameter with set argument
  9539. MODULE Test;
  9540. VAR argument: SET;
  9541. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9542. BEGIN Procedure (argument);
  9543. END Test.
  9544. negative: calling procedure with long real parameter with array argument
  9545. MODULE Test;
  9546. VAR argument: ARRAY 10 OF CHAR;
  9547. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9548. BEGIN Procedure (argument);
  9549. END Test.
  9550. negative: calling procedure with long real parameter with record argument
  9551. MODULE Test;
  9552. VAR argument: RECORD END;
  9553. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9554. BEGIN Procedure (argument);
  9555. END Test.
  9556. negative: calling procedure with long real parameter with object argument
  9557. MODULE Test;
  9558. VAR argument: OBJECT END;
  9559. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9560. BEGIN Procedure (argument);
  9561. END Test.
  9562. negative: calling procedure with long real parameter with base object argument
  9563. MODULE Test;
  9564. VAR argument: OBJECT;
  9565. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9566. BEGIN Procedure (argument);
  9567. END Test.
  9568. negative: calling procedure with long real parameter with pointer to array argument
  9569. MODULE Test;
  9570. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9571. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9572. BEGIN Procedure (argument);
  9573. END Test.
  9574. negative: calling procedure with long real parameter with pointer to record argument
  9575. MODULE Test;
  9576. VAR argument: POINTER TO RECORD END;
  9577. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9578. BEGIN Procedure (argument);
  9579. END Test.
  9580. negative: calling procedure with long real parameter with procedure argument
  9581. MODULE Test;
  9582. VAR argument: PROCEDURE;
  9583. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9584. BEGIN Procedure (argument);
  9585. END Test.
  9586. negative: calling procedure with set parameter with boolean argument
  9587. MODULE Test;
  9588. VAR argument: BOOLEAN;
  9589. PROCEDURE Procedure (value: SET); END Procedure;
  9590. BEGIN Procedure (argument);
  9591. END Test.
  9592. negative: calling procedure with set parameter with character argument
  9593. MODULE Test;
  9594. VAR argument: CHAR;
  9595. PROCEDURE Procedure (value: SET); END Procedure;
  9596. BEGIN Procedure (argument);
  9597. END Test.
  9598. negative: calling procedure with set parameter with short integer argument
  9599. MODULE Test;
  9600. VAR argument: SHORTINT;
  9601. PROCEDURE Procedure (value: SET); END Procedure;
  9602. BEGIN Procedure (argument);
  9603. END Test.
  9604. negative: calling procedure with set parameter with integer argument
  9605. MODULE Test;
  9606. VAR argument: INTEGER;
  9607. PROCEDURE Procedure (value: SET); END Procedure;
  9608. BEGIN Procedure (argument);
  9609. END Test.
  9610. negative: calling procedure with set parameter with long integer argument
  9611. MODULE Test;
  9612. VAR argument: LONGINT;
  9613. PROCEDURE Procedure (value: SET); END Procedure;
  9614. BEGIN Procedure (argument);
  9615. END Test.
  9616. negative: calling procedure with set parameter with huge integer argument
  9617. MODULE Test;
  9618. VAR argument: HUGEINT;
  9619. PROCEDURE Procedure (value: SET); END Procedure;
  9620. BEGIN Procedure (argument);
  9621. END Test.
  9622. negative: calling procedure with set parameter with real argument
  9623. MODULE Test;
  9624. VAR argument: REAL;
  9625. PROCEDURE Procedure (value: SET); END Procedure;
  9626. BEGIN Procedure (argument);
  9627. END Test.
  9628. negative: calling procedure with set parameter with long real argument
  9629. MODULE Test;
  9630. VAR argument: LONGREAL;
  9631. PROCEDURE Procedure (value: SET); END Procedure;
  9632. BEGIN Procedure (argument);
  9633. END Test.
  9634. positive: calling procedure with set parameter with set argument
  9635. MODULE Test;
  9636. VAR argument: SET;
  9637. PROCEDURE Procedure (value: SET); END Procedure;
  9638. BEGIN Procedure (argument);
  9639. END Test.
  9640. negative: calling procedure with set parameter with array argument
  9641. MODULE Test;
  9642. VAR argument: ARRAY 10 OF CHAR;
  9643. PROCEDURE Procedure (value: SET); END Procedure;
  9644. BEGIN Procedure (argument);
  9645. END Test.
  9646. negative: calling procedure with set parameter with record argument
  9647. MODULE Test;
  9648. VAR argument: RECORD END;
  9649. PROCEDURE Procedure (value: SET); END Procedure;
  9650. BEGIN Procedure (argument);
  9651. END Test.
  9652. negative: calling procedure with set parameter with object argument
  9653. MODULE Test;
  9654. VAR argument: OBJECT END;
  9655. PROCEDURE Procedure (value: SET); END Procedure;
  9656. BEGIN Procedure (argument);
  9657. END Test.
  9658. negative: calling procedure with set parameter with base object argument
  9659. MODULE Test;
  9660. VAR argument: OBJECT;
  9661. PROCEDURE Procedure (value: SET); END Procedure;
  9662. BEGIN Procedure (argument);
  9663. END Test.
  9664. negative: calling procedure with set parameter with pointer to array argument
  9665. MODULE Test;
  9666. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9667. PROCEDURE Procedure (value: SET); END Procedure;
  9668. BEGIN Procedure (argument);
  9669. END Test.
  9670. negative: calling procedure with set parameter with pointer to record argument
  9671. MODULE Test;
  9672. VAR argument: POINTER TO RECORD END;
  9673. PROCEDURE Procedure (value: SET); END Procedure;
  9674. BEGIN Procedure (argument);
  9675. END Test.
  9676. negative: calling procedure with set parameter with procedure argument
  9677. MODULE Test;
  9678. VAR argument: PROCEDURE;
  9679. PROCEDURE Procedure (value: SET); END Procedure;
  9680. BEGIN Procedure (argument);
  9681. END Test.
  9682. negative: calling procedure with array parameter with boolean argument
  9683. MODULE Test;
  9684. VAR argument: BOOLEAN;
  9685. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9686. BEGIN Procedure (argument);
  9687. END Test.
  9688. negative: calling procedure with array parameter with character argument
  9689. MODULE Test;
  9690. VAR argument: CHAR;
  9691. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9692. BEGIN Procedure (argument);
  9693. END Test.
  9694. negative: calling procedure with array parameter with short integer argument
  9695. MODULE Test;
  9696. VAR argument: SHORTINT;
  9697. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9698. BEGIN Procedure (argument);
  9699. END Test.
  9700. negative: calling procedure with array parameter with integer argument
  9701. MODULE Test;
  9702. VAR argument: INTEGER;
  9703. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9704. BEGIN Procedure (argument);
  9705. END Test.
  9706. negative: calling procedure with array parameter with long integer argument
  9707. MODULE Test;
  9708. VAR argument: LONGINT;
  9709. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9710. BEGIN Procedure (argument);
  9711. END Test.
  9712. negative: calling procedure with array parameter with huge integer argument
  9713. MODULE Test;
  9714. VAR argument: HUGEINT;
  9715. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9716. BEGIN Procedure (argument);
  9717. END Test.
  9718. negative: calling procedure with array parameter with real argument
  9719. MODULE Test;
  9720. VAR argument: REAL;
  9721. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9722. BEGIN Procedure (argument);
  9723. END Test.
  9724. negative: calling procedure with array parameter with long real argument
  9725. MODULE Test;
  9726. VAR argument: LONGREAL;
  9727. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9728. BEGIN Procedure (argument);
  9729. END Test.
  9730. negative: calling procedure with array parameter with set argument
  9731. MODULE Test;
  9732. VAR argument: SET;
  9733. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9734. BEGIN Procedure (argument);
  9735. END Test.
  9736. positive: calling procedure with array parameter with array argument
  9737. MODULE Test;
  9738. VAR argument: ARRAY 10 OF CHAR;
  9739. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9740. BEGIN Procedure (argument);
  9741. END Test.
  9742. negative: calling procedure with array parameter with longer array argument
  9743. MODULE Test;
  9744. VAR argument: ARRAY 20 OF CHAR;
  9745. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9746. BEGIN Procedure (argument);
  9747. END Test.
  9748. negative: calling procedure with array parameter with shorter array argument
  9749. MODULE Test;
  9750. VAR argument: ARRAY 10 OF CHAR;
  9751. PROCEDURE Procedure (value: ARRAY 20 OF CHAR); END Procedure;
  9752. BEGIN Procedure (argument);
  9753. END Test.
  9754. negative: calling procedure with array parameter with open array argument
  9755. MODULE Test;
  9756. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9757. PROCEDURE Test (argument: ARRAY OF CHAR); BEGIN Procedure (argument); END Test;
  9758. END Test.
  9759. negative: calling procedure with array parameter with record argument
  9760. MODULE Test;
  9761. VAR argument: RECORD END;
  9762. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9763. BEGIN Procedure (argument);
  9764. END Test.
  9765. negative: calling procedure with array parameter with object argument
  9766. MODULE Test;
  9767. VAR argument: OBJECT END;
  9768. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9769. BEGIN Procedure (argument);
  9770. END Test.
  9771. negative: calling procedure with array parameter with base object argument
  9772. MODULE Test;
  9773. VAR argument: OBJECT;
  9774. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9775. BEGIN Procedure (argument);
  9776. END Test.
  9777. negative: calling procedure with array parameter with pointer to array argument
  9778. MODULE Test;
  9779. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9780. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9781. BEGIN Procedure (argument);
  9782. END Test.
  9783. negative: calling procedure with array parameter with pointer to record argument
  9784. MODULE Test;
  9785. VAR argument: POINTER TO RECORD END;
  9786. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9787. BEGIN Procedure (argument);
  9788. END Test.
  9789. negative: calling procedure with array parameter with procedure argument
  9790. MODULE Test;
  9791. VAR argument: PROCEDURE;
  9792. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9793. BEGIN Procedure (argument);
  9794. END Test.
  9795. negative: calling procedure with open array parameter with boolean argument
  9796. MODULE Test;
  9797. VAR argument: BOOLEAN;
  9798. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9799. BEGIN Procedure (argument);
  9800. END Test.
  9801. negative: calling procedure with open array parameter with character argument
  9802. MODULE Test;
  9803. VAR argument: CHAR;
  9804. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9805. BEGIN Procedure (argument);
  9806. END Test.
  9807. negative: calling procedure with open array parameter with short integer argument
  9808. MODULE Test;
  9809. VAR argument: SHORTINT;
  9810. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9811. BEGIN Procedure (argument);
  9812. END Test.
  9813. negative: calling procedure with open array parameter with integer argument
  9814. MODULE Test;
  9815. VAR argument: INTEGER;
  9816. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9817. BEGIN Procedure (argument);
  9818. END Test.
  9819. negative: calling procedure with open array parameter with long integer argument
  9820. MODULE Test;
  9821. VAR argument: LONGINT;
  9822. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9823. BEGIN Procedure (argument);
  9824. END Test.
  9825. negative: calling procedure with open array parameter with huge integer argument
  9826. MODULE Test;
  9827. VAR argument: HUGEINT;
  9828. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9829. BEGIN Procedure (argument);
  9830. END Test.
  9831. negative: calling procedure with open array parameter with real argument
  9832. MODULE Test;
  9833. VAR argument: REAL;
  9834. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9835. BEGIN Procedure (argument);
  9836. END Test.
  9837. negative: calling procedure with open array parameter with long real argument
  9838. MODULE Test;
  9839. VAR argument: LONGREAL;
  9840. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9841. BEGIN Procedure (argument);
  9842. END Test.
  9843. negative: calling procedure with open array parameter with set argument
  9844. MODULE Test;
  9845. VAR argument: SET;
  9846. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9847. BEGIN Procedure (argument);
  9848. END Test.
  9849. positive: calling procedure with open array parameter with array argument
  9850. MODULE Test;
  9851. VAR argument: ARRAY 10 OF CHAR;
  9852. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9853. BEGIN Procedure (argument);
  9854. END Test.
  9855. positive: calling procedure with open array parameter with open array argument
  9856. MODULE Test;
  9857. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9858. PROCEDURE Test (argument: ARRAY OF CHAR); BEGIN Procedure (argument); END Test;
  9859. END Test.
  9860. negative: calling procedure with open array parameter with record argument
  9861. MODULE Test;
  9862. VAR argument: RECORD END;
  9863. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9864. BEGIN Procedure (argument);
  9865. END Test.
  9866. negative: calling procedure with open array parameter with object argument
  9867. MODULE Test;
  9868. VAR argument: OBJECT END;
  9869. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9870. BEGIN Procedure (argument);
  9871. END Test.
  9872. negative: calling procedure with open array parameter with base object argument
  9873. MODULE Test;
  9874. VAR argument: OBJECT;
  9875. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9876. BEGIN Procedure (argument);
  9877. END Test.
  9878. negative: calling procedure with open array parameter with pointer to array argument
  9879. MODULE Test;
  9880. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9881. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9882. BEGIN Procedure (argument);
  9883. END Test.
  9884. negative: calling procedure with open array parameter with pointer to record argument
  9885. MODULE Test;
  9886. VAR argument: POINTER TO RECORD END;
  9887. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9888. BEGIN Procedure (argument);
  9889. END Test.
  9890. negative: calling procedure with open array parameter with procedure argument
  9891. MODULE Test;
  9892. VAR argument: PROCEDURE;
  9893. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9894. BEGIN Procedure (argument);
  9895. END Test.
  9896. negative: calling procedure with record parameter with boolean argument
  9897. MODULE Test;
  9898. VAR argument: BOOLEAN;
  9899. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9900. BEGIN Procedure (argument);
  9901. END Test.
  9902. negative: calling procedure with record parameter with character argument
  9903. MODULE Test;
  9904. VAR argument: CHAR;
  9905. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9906. BEGIN Procedure (argument);
  9907. END Test.
  9908. negative: calling procedure with record parameter with short integer argument
  9909. MODULE Test;
  9910. VAR argument: SHORTINT;
  9911. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9912. BEGIN Procedure (argument);
  9913. END Test.
  9914. negative: calling procedure with record parameter with integer argument
  9915. MODULE Test;
  9916. VAR argument: INTEGER;
  9917. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9918. BEGIN Procedure (argument);
  9919. END Test.
  9920. negative: calling procedure with record parameter with long integer argument
  9921. MODULE Test;
  9922. VAR argument: LONGINT;
  9923. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9924. BEGIN Procedure (argument);
  9925. END Test.
  9926. negative: calling procedure with record parameter with huge integer argument
  9927. MODULE Test;
  9928. VAR argument: HUGEINT;
  9929. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9930. BEGIN Procedure (argument);
  9931. END Test.
  9932. negative: calling procedure with record parameter with real argument
  9933. MODULE Test;
  9934. VAR argument: REAL;
  9935. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9936. BEGIN Procedure (argument);
  9937. END Test.
  9938. negative: calling procedure with record parameter with long real argument
  9939. MODULE Test;
  9940. VAR argument: LONGREAL;
  9941. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9942. BEGIN Procedure (argument);
  9943. END Test.
  9944. negative: calling procedure with record parameter with set argument
  9945. MODULE Test;
  9946. VAR argument: SET;
  9947. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9948. BEGIN Procedure (argument);
  9949. END Test.
  9950. negative: calling procedure with record parameter with array argument
  9951. MODULE Test;
  9952. VAR argument: ARRAY 10 OF CHAR;
  9953. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9954. BEGIN Procedure (argument);
  9955. END Test.
  9956. positive: calling procedure with record parameter with record argument
  9957. MODULE Test;
  9958. TYPE Record = RECORD END;
  9959. VAR argument: Record;
  9960. PROCEDURE Procedure (value: Record); END Procedure;
  9961. BEGIN Procedure (argument);
  9962. END Test.
  9963. positive: calling procedure with record parameter with compatible record argument
  9964. MODULE Test;
  9965. TYPE Record = RECORD END;
  9966. VAR argument: RECORD (Record) END;
  9967. PROCEDURE Procedure (value: Record); END Procedure;
  9968. BEGIN Procedure (argument);
  9969. END Test.
  9970. negative: calling procedure with record parameter with incompatible record argument
  9971. MODULE Test;
  9972. TYPE Record = RECORD END;
  9973. VAR argument: Record;
  9974. PROCEDURE Procedure (value: RECORD (Record) END); END Procedure;
  9975. BEGIN Procedure (argument);
  9976. END Test.
  9977. negative: calling procedure with record parameter with object argument
  9978. MODULE Test;
  9979. VAR argument: OBJECT END;
  9980. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9981. BEGIN Procedure (argument);
  9982. END Test.
  9983. negative: calling procedure with record parameter with base object argument
  9984. MODULE Test;
  9985. VAR argument: OBJECT;
  9986. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9987. BEGIN Procedure (argument);
  9988. END Test.
  9989. negative: calling procedure with record parameter with pointer to array argument
  9990. MODULE Test;
  9991. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9992. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9993. BEGIN Procedure (argument);
  9994. END Test.
  9995. negative: calling procedure with record parameter with pointer to record argument
  9996. MODULE Test;
  9997. VAR argument: POINTER TO RECORD END;
  9998. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9999. BEGIN Procedure (argument);
  10000. END Test.
  10001. negative: calling procedure with record parameter with procedure argument
  10002. MODULE Test;
  10003. VAR argument: PROCEDURE;
  10004. PROCEDURE Procedure (value: RECORD END); END Procedure;
  10005. BEGIN Procedure (argument);
  10006. END Test.
  10007. negative: calling procedure with object parameter with boolean argument
  10008. MODULE Test;
  10009. VAR argument: BOOLEAN;
  10010. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10011. BEGIN Procedure (argument);
  10012. END Test.
  10013. negative: calling procedure with object parameter with character argument
  10014. MODULE Test;
  10015. VAR argument: CHAR;
  10016. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10017. BEGIN Procedure (argument);
  10018. END Test.
  10019. negative: calling procedure with object parameter with short integer argument
  10020. MODULE Test;
  10021. VAR argument: SHORTINT;
  10022. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10023. BEGIN Procedure (argument);
  10024. END Test.
  10025. negative: calling procedure with object parameter with integer argument
  10026. MODULE Test;
  10027. VAR argument: INTEGER;
  10028. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10029. BEGIN Procedure (argument);
  10030. END Test.
  10031. negative: calling procedure with object parameter with long integer argument
  10032. MODULE Test;
  10033. VAR argument: LONGINT;
  10034. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10035. BEGIN Procedure (argument);
  10036. END Test.
  10037. negative: calling procedure with object parameter with huge integer argument
  10038. MODULE Test;
  10039. VAR argument: HUGEINT;
  10040. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10041. BEGIN Procedure (argument);
  10042. END Test.
  10043. negative: calling procedure with object parameter with real argument
  10044. MODULE Test;
  10045. VAR argument: REAL;
  10046. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10047. BEGIN Procedure (argument);
  10048. END Test.
  10049. negative: calling procedure with object parameter with long real argument
  10050. MODULE Test;
  10051. VAR argument: LONGREAL;
  10052. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10053. BEGIN Procedure (argument);
  10054. END Test.
  10055. negative: calling procedure with object parameter with set argument
  10056. MODULE Test;
  10057. VAR argument: SET;
  10058. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10059. BEGIN Procedure (argument);
  10060. END Test.
  10061. negative: calling procedure with object parameter with array argument
  10062. MODULE Test;
  10063. VAR argument: ARRAY 10 OF CHAR;
  10064. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10065. BEGIN Procedure (argument);
  10066. END Test.
  10067. negative: calling procedure with object parameter with record argument
  10068. MODULE Test;
  10069. VAR argument: RECORD END;
  10070. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10071. BEGIN Procedure (argument);
  10072. END Test.
  10073. positive: calling procedure with object parameter with object argument
  10074. MODULE Test;
  10075. TYPE Object = OBJECT END Object;
  10076. VAR argument: Object;
  10077. PROCEDURE Procedure (value: Object); END Procedure;
  10078. BEGIN Procedure (argument);
  10079. END Test.
  10080. positive: calling procedure with object parameter with compatible object argument
  10081. MODULE Test;
  10082. TYPE Object = OBJECT END Object;
  10083. VAR argument: OBJECT (Object) END;
  10084. PROCEDURE Procedure (value: Object); END Procedure;
  10085. BEGIN Procedure (argument);
  10086. END Test.
  10087. negative: calling procedure with object parameter with incompatible object argument
  10088. MODULE Test;
  10089. TYPE Object = OBJECT END Object;
  10090. VAR argument: Object;
  10091. PROCEDURE Procedure (value: OBJECT (Object) END); END Procedure;
  10092. BEGIN Procedure (argument);
  10093. END Test.
  10094. negative: calling procedure with object parameter with base object argument
  10095. MODULE Test;
  10096. VAR argument: OBJECT;
  10097. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10098. BEGIN Procedure (argument);
  10099. END Test.
  10100. negative: calling procedure with object parameter with pointer to array argument
  10101. MODULE Test;
  10102. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10103. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10104. BEGIN Procedure (argument);
  10105. END Test.
  10106. negative: calling procedure with object parameter with pointer to record argument
  10107. MODULE Test;
  10108. VAR argument: POINTER TO RECORD END;
  10109. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10110. BEGIN Procedure (argument);
  10111. END Test.
  10112. negative: calling procedure with object parameter with procedure argument
  10113. MODULE Test;
  10114. VAR argument: PROCEDURE;
  10115. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10116. BEGIN Procedure (argument);
  10117. END Test.
  10118. negative: calling procedure with base object parameter with boolean argument
  10119. MODULE Test;
  10120. VAR argument: BOOLEAN;
  10121. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10122. BEGIN Procedure (argument);
  10123. END Test.
  10124. negative: calling procedure with base object parameter with character argument
  10125. MODULE Test;
  10126. VAR argument: CHAR;
  10127. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10128. BEGIN Procedure (argument);
  10129. END Test.
  10130. negative: calling procedure with base object parameter with short integer argument
  10131. MODULE Test;
  10132. VAR argument: SHORTINT;
  10133. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10134. BEGIN Procedure (argument);
  10135. END Test.
  10136. negative: calling procedure with base object parameter with integer argument
  10137. MODULE Test;
  10138. VAR argument: INTEGER;
  10139. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10140. BEGIN Procedure (argument);
  10141. END Test.
  10142. negative: calling procedure with base object parameter with long integer argument
  10143. MODULE Test;
  10144. VAR argument: LONGINT;
  10145. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10146. BEGIN Procedure (argument);
  10147. END Test.
  10148. negative: calling procedure with base object parameter with huge integer argument
  10149. MODULE Test;
  10150. VAR argument: HUGEINT;
  10151. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10152. BEGIN Procedure (argument);
  10153. END Test.
  10154. negative: calling procedure with base object parameter with real argument
  10155. MODULE Test;
  10156. VAR argument: REAL;
  10157. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10158. BEGIN Procedure (argument);
  10159. END Test.
  10160. negative: calling procedure with base object parameter with long real argument
  10161. MODULE Test;
  10162. VAR argument: LONGREAL;
  10163. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10164. BEGIN Procedure (argument);
  10165. END Test.
  10166. negative: calling procedure with base object parameter with set argument
  10167. MODULE Test;
  10168. VAR argument: SET;
  10169. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10170. BEGIN Procedure (argument);
  10171. END Test.
  10172. negative: calling procedure with base object parameter with array argument
  10173. MODULE Test;
  10174. VAR argument: ARRAY 10 OF CHAR;
  10175. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10176. BEGIN Procedure (argument);
  10177. END Test.
  10178. negative: calling procedure with base object parameter with record argument
  10179. MODULE Test;
  10180. VAR argument: RECORD END;
  10181. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10182. BEGIN Procedure (argument);
  10183. END Test.
  10184. positive: calling procedure with base object parameter with object argument
  10185. MODULE Test;
  10186. VAR argument: OBJECT END;
  10187. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10188. BEGIN Procedure (argument);
  10189. END Test.
  10190. positive: calling procedure with base object parameter with base object argument
  10191. MODULE Test;
  10192. VAR argument: OBJECT;
  10193. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10194. BEGIN Procedure (argument);
  10195. END Test.
  10196. positive: calling procedure with base object parameter with pointer to record argument
  10197. MODULE Test;
  10198. VAR argument: POINTER TO RECORD END;
  10199. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10200. BEGIN Procedure (argument);
  10201. END Test.
  10202. negative: calling procedure with base object parameter with pointer to array argument
  10203. MODULE Test;
  10204. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10205. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10206. BEGIN Procedure (argument);
  10207. END Test.
  10208. negative: calling procedure with base object parameter with procedure argument
  10209. MODULE Test;
  10210. VAR argument: PROCEDURE;
  10211. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10212. BEGIN Procedure (argument);
  10213. END Test.
  10214. negative: calling procedure with pointer to array parameter with boolean argument
  10215. MODULE Test;
  10216. VAR argument: BOOLEAN;
  10217. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10218. BEGIN Procedure (argument);
  10219. END Test.
  10220. negative: calling procedure with pointer to array parameter with character argument
  10221. MODULE Test;
  10222. VAR argument: CHAR;
  10223. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10224. BEGIN Procedure (argument);
  10225. END Test.
  10226. negative: calling procedure with pointer to array parameter with short integer argument
  10227. MODULE Test;
  10228. VAR argument: SHORTINT;
  10229. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10230. BEGIN Procedure (argument);
  10231. END Test.
  10232. negative: calling procedure with pointer to array parameter with integer argument
  10233. MODULE Test;
  10234. VAR argument: INTEGER;
  10235. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10236. BEGIN Procedure (argument);
  10237. END Test.
  10238. negative: calling procedure with pointer to array parameter with long integer argument
  10239. MODULE Test;
  10240. VAR argument: LONGINT;
  10241. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10242. BEGIN Procedure (argument);
  10243. END Test.
  10244. negative: calling procedure with pointer to array parameter with huge integer argument
  10245. MODULE Test;
  10246. VAR argument: HUGEINT;
  10247. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10248. BEGIN Procedure (argument);
  10249. END Test.
  10250. negative: calling procedure with pointer to array parameter with real argument
  10251. MODULE Test;
  10252. VAR argument: REAL;
  10253. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10254. BEGIN Procedure (argument);
  10255. END Test.
  10256. negative: calling procedure with pointer to array parameter with long real argument
  10257. MODULE Test;
  10258. VAR argument: LONGREAL;
  10259. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10260. BEGIN Procedure (argument);
  10261. END Test.
  10262. negative: calling procedure with pointer to array parameter with set argument
  10263. MODULE Test;
  10264. VAR argument: SET;
  10265. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10266. BEGIN Procedure (argument);
  10267. END Test.
  10268. negative: calling procedure with pointer to array parameter with array argument
  10269. MODULE Test;
  10270. VAR argument: ARRAY 10 OF CHAR;
  10271. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10272. BEGIN Procedure (argument);
  10273. END Test.
  10274. negative: calling procedure with pointer to array parameter with record argument
  10275. MODULE Test;
  10276. VAR argument: RECORD END;
  10277. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10278. BEGIN Procedure (argument);
  10279. END Test.
  10280. negative: calling procedure with pointer to array parameter with object argument
  10281. MODULE Test;
  10282. VAR argument: OBJECT END;
  10283. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10284. BEGIN Procedure (argument);
  10285. END Test.
  10286. negative: calling procedure with pointer to array parameter with base object argument
  10287. MODULE Test;
  10288. VAR argument: OBJECT;
  10289. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10290. BEGIN Procedure (argument);
  10291. END Test.
  10292. positive: calling procedure with pointer to array parameter with pointer to array argument
  10293. MODULE Test;
  10294. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10295. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10296. BEGIN Procedure (argument);
  10297. END Test.
  10298. negative: calling procedure with pointer to array parameter with pointer to record argument
  10299. MODULE Test;
  10300. VAR argument: POINTER TO RECORD END;
  10301. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10302. BEGIN Procedure (argument);
  10303. END Test.
  10304. negative: calling procedure with pointer to array parameter with procedure argument
  10305. MODULE Test;
  10306. VAR argument: PROCEDURE;
  10307. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10308. BEGIN Procedure (argument);
  10309. END Test.
  10310. negative: calling procedure with pointer to record parameter with boolean argument
  10311. MODULE Test;
  10312. VAR argument: BOOLEAN;
  10313. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10314. BEGIN Procedure (argument);
  10315. END Test.
  10316. negative: calling procedure with pointer to record parameter with character argument
  10317. MODULE Test;
  10318. VAR argument: CHAR;
  10319. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10320. BEGIN Procedure (argument);
  10321. END Test.
  10322. negative: calling procedure with pointer to record parameter with short integer argument
  10323. MODULE Test;
  10324. VAR argument: SHORTINT;
  10325. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10326. BEGIN Procedure (argument);
  10327. END Test.
  10328. negative: calling procedure with pointer to record parameter with integer argument
  10329. MODULE Test;
  10330. VAR argument: INTEGER;
  10331. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10332. BEGIN Procedure (argument);
  10333. END Test.
  10334. negative: calling procedure with pointer to record parameter with long integer argument
  10335. MODULE Test;
  10336. VAR argument: LONGINT;
  10337. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10338. BEGIN Procedure (argument);
  10339. END Test.
  10340. negative: calling procedure with pointer to record parameter with huge integer argument
  10341. MODULE Test;
  10342. VAR argument: HUGEINT;
  10343. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10344. BEGIN Procedure (argument);
  10345. END Test.
  10346. negative: calling procedure with pointer to record parameter with real argument
  10347. MODULE Test;
  10348. VAR argument: REAL;
  10349. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10350. BEGIN Procedure (argument);
  10351. END Test.
  10352. negative: calling procedure with pointer to record parameter with long real argument
  10353. MODULE Test;
  10354. VAR argument: LONGREAL;
  10355. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10356. BEGIN Procedure (argument);
  10357. END Test.
  10358. negative: calling procedure with pointer to record parameter with set argument
  10359. MODULE Test;
  10360. VAR argument: SET;
  10361. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10362. BEGIN Procedure (argument);
  10363. END Test.
  10364. negative: calling procedure with pointer to record parameter with array argument
  10365. MODULE Test;
  10366. VAR argument: ARRAY 10 OF CHAR;
  10367. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10368. BEGIN Procedure (argument);
  10369. END Test.
  10370. negative: calling procedure with pointer to record parameter with record argument
  10371. MODULE Test;
  10372. VAR argument: RECORD END;
  10373. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10374. BEGIN Procedure (argument);
  10375. END Test.
  10376. negative: calling procedure with pointer to record parameter with object argument
  10377. MODULE Test;
  10378. VAR argument: OBJECT END;
  10379. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10380. BEGIN Procedure (argument);
  10381. END Test.
  10382. negative: calling procedure with pointer to record parameter with base object argument
  10383. MODULE Test;
  10384. VAR argument: OBJECT;
  10385. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10386. BEGIN Procedure (argument);
  10387. END Test.
  10388. negative: calling procedure with pointer to record parameter with pointer to array argument
  10389. MODULE Test;
  10390. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10391. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10392. BEGIN Procedure (argument);
  10393. END Test.
  10394. positive: calling procedure with pointer to record parameter with pointer to record argument
  10395. MODULE Test;
  10396. TYPE Record = RECORD END;
  10397. VAR argument: POINTER TO Record;
  10398. PROCEDURE Procedure (value: POINTER TO Record); END Procedure;
  10399. BEGIN Procedure (argument);
  10400. END Test.
  10401. positive: calling procedure with pointer to record parameter with compatible pointer to record argument
  10402. MODULE Test;
  10403. TYPE Record = RECORD END;
  10404. VAR argument: POINTER TO RECORD (Record) END;
  10405. PROCEDURE Procedure (value: POINTER TO Record); END Procedure;
  10406. BEGIN Procedure (argument);
  10407. END Test.
  10408. negative: calling procedure with pointer to record parameter with incompatible pointer to record argument
  10409. MODULE Test;
  10410. TYPE Record = RECORD END;
  10411. VAR argument: POINTER TO Record;
  10412. PROCEDURE Procedure (value: POINTER TO RECORD (Record) END); END Procedure;
  10413. BEGIN Procedure (argument);
  10414. END Test.
  10415. negative: calling procedure with pointer to record parameter with procedure argument
  10416. MODULE Test;
  10417. VAR argument: PROCEDURE;
  10418. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10419. BEGIN Procedure (argument);
  10420. END Test.
  10421. negative: calling procedure with procedure parameter with boolean argument
  10422. MODULE Test;
  10423. VAR argument: BOOLEAN;
  10424. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10425. BEGIN Procedure (argument);
  10426. END Test.
  10427. negative: calling procedure with procedure parameter with character argument
  10428. MODULE Test;
  10429. VAR argument: CHAR;
  10430. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10431. BEGIN Procedure (argument);
  10432. END Test.
  10433. negative: calling procedure with procedure parameter with short integer argument
  10434. MODULE Test;
  10435. VAR argument: SHORTINT;
  10436. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10437. BEGIN Procedure (argument);
  10438. END Test.
  10439. negative: calling procedure with procedure parameter with integer argument
  10440. MODULE Test;
  10441. VAR argument: INTEGER;
  10442. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10443. BEGIN Procedure (argument);
  10444. END Test.
  10445. negative: calling procedure with procedure parameter with long integer argument
  10446. MODULE Test;
  10447. VAR argument: LONGINT;
  10448. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10449. BEGIN Procedure (argument);
  10450. END Test.
  10451. negative: calling procedure with procedure parameter with huge integer argument
  10452. MODULE Test;
  10453. VAR argument: HUGEINT;
  10454. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10455. BEGIN Procedure (argument);
  10456. END Test.
  10457. negative: calling procedure with procedure parameter with real argument
  10458. MODULE Test;
  10459. VAR argument: REAL;
  10460. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10461. BEGIN Procedure (argument);
  10462. END Test.
  10463. negative: calling procedure with procedure parameter with long real argument
  10464. MODULE Test;
  10465. VAR argument: LONGREAL;
  10466. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10467. BEGIN Procedure (argument);
  10468. END Test.
  10469. negative: calling procedure with procedure parameter with set argument
  10470. MODULE Test;
  10471. VAR argument: SET;
  10472. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10473. BEGIN Procedure (argument);
  10474. END Test.
  10475. negative: calling procedure with procedure parameter with array argument
  10476. MODULE Test;
  10477. VAR argument: ARRAY 10 OF CHAR;
  10478. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10479. BEGIN Procedure (argument);
  10480. END Test.
  10481. negative: calling procedure with procedure parameter with record argument
  10482. MODULE Test;
  10483. VAR argument: RECORD END;
  10484. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10485. BEGIN Procedure (argument);
  10486. END Test.
  10487. negative: calling procedure with procedure parameter with object argument
  10488. MODULE Test;
  10489. VAR argument: OBJECT END;
  10490. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10491. BEGIN Procedure (argument);
  10492. END Test.
  10493. negative: calling procedure with procedure parameter with base object argument
  10494. MODULE Test;
  10495. VAR argument: OBJECT;
  10496. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10497. BEGIN Procedure (argument);
  10498. END Test.
  10499. negative: calling procedure with procedure parameter with pointer to array argument
  10500. MODULE Test;
  10501. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10502. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10503. BEGIN Procedure (argument);
  10504. END Test.
  10505. negative: calling procedure with procedure parameter with pointer to record argument
  10506. MODULE Test;
  10507. VAR argument: POINTER TO RECORD END;
  10508. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10509. BEGIN Procedure (argument);
  10510. END Test.
  10511. positive: calling procedure with procedure parameter with procedure argument
  10512. MODULE Test;
  10513. VAR argument: PROCEDURE;
  10514. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10515. BEGIN Procedure (argument);
  10516. END Test.
  10517. positive: calling procedure with boolean variable parameter with boolean argument
  10518. MODULE Test;
  10519. VAR argument: BOOLEAN;
  10520. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10521. BEGIN Procedure (argument);
  10522. END Test.
  10523. negative: calling procedure with boolean variable parameter with character argument
  10524. MODULE Test;
  10525. VAR argument: CHAR;
  10526. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10527. BEGIN Procedure (argument);
  10528. END Test.
  10529. negative: calling procedure with boolean variable parameter with short integer argument
  10530. MODULE Test;
  10531. VAR argument: SHORTINT;
  10532. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10533. BEGIN Procedure (argument);
  10534. END Test.
  10535. negative: calling procedure with boolean variable parameter with integer argument
  10536. MODULE Test;
  10537. VAR argument: INTEGER;
  10538. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10539. BEGIN Procedure (argument);
  10540. END Test.
  10541. negative: calling procedure with boolean variable parameter with long integer argument
  10542. MODULE Test;
  10543. VAR argument: LONGINT;
  10544. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10545. BEGIN Procedure (argument);
  10546. END Test.
  10547. negative: calling procedure with boolean variable parameter with huge integer argument
  10548. MODULE Test;
  10549. VAR argument: HUGEINT;
  10550. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10551. BEGIN Procedure (argument);
  10552. END Test.
  10553. negative: calling procedure with boolean variable parameter with real argument
  10554. MODULE Test;
  10555. VAR argument: REAL;
  10556. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10557. BEGIN Procedure (argument);
  10558. END Test.
  10559. negative: calling procedure with boolean variable parameter with long real argument
  10560. MODULE Test;
  10561. VAR argument: LONGREAL;
  10562. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10563. BEGIN Procedure (argument);
  10564. END Test.
  10565. negative: calling procedure with boolean variable parameter with set argument
  10566. MODULE Test;
  10567. VAR argument: SET;
  10568. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10569. BEGIN Procedure (argument);
  10570. END Test.
  10571. negative: calling procedure with boolean variable parameter with array argument
  10572. MODULE Test;
  10573. VAR argument: ARRAY 10 OF CHAR;
  10574. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10575. BEGIN Procedure (argument);
  10576. END Test.
  10577. negative: calling procedure with boolean variable parameter with record argument
  10578. MODULE Test;
  10579. VAR argument: RECORD END;
  10580. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10581. BEGIN Procedure (argument);
  10582. END Test.
  10583. negative: calling procedure with boolean variable parameter with object argument
  10584. MODULE Test;
  10585. VAR argument: OBJECT END;
  10586. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10587. BEGIN Procedure (argument);
  10588. END Test.
  10589. negative: calling procedure with boolean variable parameter with base object argument
  10590. MODULE Test;
  10591. VAR argument: OBJECT;
  10592. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10593. BEGIN Procedure (argument);
  10594. END Test.
  10595. negative: calling procedure with boolean variable parameter with pointer to array argument
  10596. MODULE Test;
  10597. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10598. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10599. BEGIN Procedure (argument);
  10600. END Test.
  10601. negative: calling procedure with boolean variable parameter with pointer to record argument
  10602. MODULE Test;
  10603. VAR argument: POINTER TO RECORD END;
  10604. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10605. BEGIN Procedure (argument);
  10606. END Test.
  10607. negative: calling procedure with boolean variable parameter with procedure argument
  10608. MODULE Test;
  10609. VAR argument: PROCEDURE;
  10610. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10611. BEGIN Procedure (argument);
  10612. END Test.
  10613. negative: calling procedure with character variable parameter with boolean argument
  10614. MODULE Test;
  10615. VAR argument: BOOLEAN;
  10616. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10617. BEGIN Procedure (argument);
  10618. END Test.
  10619. positive: calling procedure with character variable parameter with character argument
  10620. MODULE Test;
  10621. VAR argument: CHAR;
  10622. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10623. BEGIN Procedure (argument);
  10624. END Test.
  10625. negative: calling procedure with character variable parameter with short integer argument
  10626. MODULE Test;
  10627. VAR argument: SHORTINT;
  10628. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10629. BEGIN Procedure (argument);
  10630. END Test.
  10631. negative: calling procedure with character variable parameter with integer argument
  10632. MODULE Test;
  10633. VAR argument: INTEGER;
  10634. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10635. BEGIN Procedure (argument);
  10636. END Test.
  10637. negative: calling procedure with character variable parameter with long integer argument
  10638. MODULE Test;
  10639. VAR argument: LONGINT;
  10640. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10641. BEGIN Procedure (argument);
  10642. END Test.
  10643. negative: calling procedure with character variable parameter with huge integer argument
  10644. MODULE Test;
  10645. VAR argument: HUGEINT;
  10646. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10647. BEGIN Procedure (argument);
  10648. END Test.
  10649. negative: calling procedure with character variable parameter with real argument
  10650. MODULE Test;
  10651. VAR argument: REAL;
  10652. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10653. BEGIN Procedure (argument);
  10654. END Test.
  10655. negative: calling procedure with character variable parameter with long real argument
  10656. MODULE Test;
  10657. VAR argument: LONGREAL;
  10658. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10659. BEGIN Procedure (argument);
  10660. END Test.
  10661. negative: calling procedure with character variable parameter with set argument
  10662. MODULE Test;
  10663. VAR argument: SET;
  10664. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10665. BEGIN Procedure (argument);
  10666. END Test.
  10667. negative: calling procedure with character variable parameter with array argument
  10668. MODULE Test;
  10669. VAR argument: ARRAY 10 OF CHAR;
  10670. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10671. BEGIN Procedure (argument);
  10672. END Test.
  10673. negative: calling procedure with character variable parameter with record argument
  10674. MODULE Test;
  10675. VAR argument: RECORD END;
  10676. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10677. BEGIN Procedure (argument);
  10678. END Test.
  10679. negative: calling procedure with character variable parameter with object argument
  10680. MODULE Test;
  10681. VAR argument: OBJECT END;
  10682. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10683. BEGIN Procedure (argument);
  10684. END Test.
  10685. negative: calling procedure with character variable parameter with base object argument
  10686. MODULE Test;
  10687. VAR argument: OBJECT;
  10688. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10689. BEGIN Procedure (argument);
  10690. END Test.
  10691. negative: calling procedure with character variable parameter with pointer to array argument
  10692. MODULE Test;
  10693. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10694. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10695. BEGIN Procedure (argument);
  10696. END Test.
  10697. negative: calling procedure with character variable parameter with pointer to record argument
  10698. MODULE Test;
  10699. VAR argument: POINTER TO RECORD END;
  10700. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10701. BEGIN Procedure (argument);
  10702. END Test.
  10703. negative: calling procedure with character variable parameter with procedure argument
  10704. MODULE Test;
  10705. VAR argument: PROCEDURE;
  10706. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10707. BEGIN Procedure (argument);
  10708. END Test.
  10709. negative: calling procedure with short integer variable parameter with boolean argument
  10710. MODULE Test;
  10711. VAR argument: BOOLEAN;
  10712. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10713. BEGIN Procedure (argument);
  10714. END Test.
  10715. negative: calling procedure with short integer variable parameter with character argument
  10716. MODULE Test;
  10717. VAR argument: CHAR;
  10718. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10719. BEGIN Procedure (argument);
  10720. END Test.
  10721. positive: calling procedure with short integer variable parameter with short integer argument
  10722. MODULE Test;
  10723. VAR argument: SHORTINT;
  10724. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10725. BEGIN Procedure (argument);
  10726. END Test.
  10727. negative: calling procedure with short integer variable parameter with integer argument
  10728. MODULE Test;
  10729. VAR argument: INTEGER;
  10730. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10731. BEGIN Procedure (argument);
  10732. END Test.
  10733. negative: calling procedure with short integer variable parameter with long integer argument
  10734. MODULE Test;
  10735. VAR argument: LONGINT;
  10736. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10737. BEGIN Procedure (argument);
  10738. END Test.
  10739. negative: calling procedure with short integer variable parameter with huge integer argument
  10740. MODULE Test;
  10741. VAR argument: HUGEINT;
  10742. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10743. BEGIN Procedure (argument);
  10744. END Test.
  10745. negative: calling procedure with short integer variable parameter with real argument
  10746. MODULE Test;
  10747. VAR argument: REAL;
  10748. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10749. BEGIN Procedure (argument);
  10750. END Test.
  10751. negative: calling procedure with short integer variable parameter with long real argument
  10752. MODULE Test;
  10753. VAR argument: LONGREAL;
  10754. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10755. BEGIN Procedure (argument);
  10756. END Test.
  10757. negative: calling procedure with short integer variable parameter with set argument
  10758. MODULE Test;
  10759. VAR argument: SET;
  10760. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10761. BEGIN Procedure (argument);
  10762. END Test.
  10763. negative: calling procedure with short integer variable parameter with array argument
  10764. MODULE Test;
  10765. VAR argument: ARRAY 10 OF CHAR;
  10766. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10767. BEGIN Procedure (argument);
  10768. END Test.
  10769. negative: calling procedure with short integer variable parameter with record argument
  10770. MODULE Test;
  10771. VAR argument: RECORD END;
  10772. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10773. BEGIN Procedure (argument);
  10774. END Test.
  10775. negative: calling procedure with short integer variable parameter with object argument
  10776. MODULE Test;
  10777. VAR argument: OBJECT END;
  10778. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10779. BEGIN Procedure (argument);
  10780. END Test.
  10781. negative: calling procedure with short integer variable parameter with base object argument
  10782. MODULE Test;
  10783. VAR argument: OBJECT;
  10784. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10785. BEGIN Procedure (argument);
  10786. END Test.
  10787. negative: calling procedure with short integer variable parameter with pointer to array argument
  10788. MODULE Test;
  10789. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10790. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10791. BEGIN Procedure (argument);
  10792. END Test.
  10793. negative: calling procedure with short integer variable parameter with pointer to record argument
  10794. MODULE Test;
  10795. VAR argument: POINTER TO RECORD END;
  10796. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10797. BEGIN Procedure (argument);
  10798. END Test.
  10799. negative: calling procedure with short integer variable parameter with procedure argument
  10800. MODULE Test;
  10801. VAR argument: PROCEDURE;
  10802. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10803. BEGIN Procedure (argument);
  10804. END Test.
  10805. negative: calling procedure with integer variable parameter with boolean argument
  10806. MODULE Test;
  10807. VAR argument: BOOLEAN;
  10808. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10809. BEGIN Procedure (argument);
  10810. END Test.
  10811. negative: calling procedure with integer variable parameter with character argument
  10812. MODULE Test;
  10813. VAR argument: CHAR;
  10814. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10815. BEGIN Procedure (argument);
  10816. END Test.
  10817. negative: calling procedure with integer variable parameter with short integer argument
  10818. MODULE Test;
  10819. VAR argument: SHORTINT;
  10820. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10821. BEGIN Procedure (argument);
  10822. END Test.
  10823. positive: calling procedure with integer variable parameter with integer argument
  10824. MODULE Test;
  10825. VAR argument: INTEGER;
  10826. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10827. BEGIN Procedure (argument);
  10828. END Test.
  10829. negative: calling procedure with integer variable parameter with long integer argument
  10830. MODULE Test;
  10831. VAR argument: LONGINT;
  10832. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10833. BEGIN Procedure (argument);
  10834. END Test.
  10835. negative: calling procedure with integer variable parameter with huge integer argument
  10836. MODULE Test;
  10837. VAR argument: HUGEINT;
  10838. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10839. BEGIN Procedure (argument);
  10840. END Test.
  10841. negative: calling procedure with integer variable parameter with real argument
  10842. MODULE Test;
  10843. VAR argument: REAL;
  10844. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10845. BEGIN Procedure (argument);
  10846. END Test.
  10847. negative: calling procedure with integer variable parameter with long real argument
  10848. MODULE Test;
  10849. VAR argument: LONGREAL;
  10850. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10851. BEGIN Procedure (argument);
  10852. END Test.
  10853. negative: calling procedure with integer variable parameter with set argument
  10854. MODULE Test;
  10855. VAR argument: SET;
  10856. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10857. BEGIN Procedure (argument);
  10858. END Test.
  10859. negative: calling procedure with integer variable parameter with array argument
  10860. MODULE Test;
  10861. VAR argument: ARRAY 10 OF CHAR;
  10862. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10863. BEGIN Procedure (argument);
  10864. END Test.
  10865. negative: calling procedure with integer variable parameter with record argument
  10866. MODULE Test;
  10867. VAR argument: RECORD END;
  10868. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10869. BEGIN Procedure (argument);
  10870. END Test.
  10871. negative: calling procedure with integer variable parameter with object argument
  10872. MODULE Test;
  10873. VAR argument: OBJECT END;
  10874. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10875. BEGIN Procedure (argument);
  10876. END Test.
  10877. negative: calling procedure with integer variable parameter with base object argument
  10878. MODULE Test;
  10879. VAR argument: OBJECT;
  10880. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10881. BEGIN Procedure (argument);
  10882. END Test.
  10883. negative: calling procedure with integer variable parameter with pointer to array argument
  10884. MODULE Test;
  10885. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10886. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10887. BEGIN Procedure (argument);
  10888. END Test.
  10889. negative: calling procedure with integer variable parameter with pointer to record argument
  10890. MODULE Test;
  10891. VAR argument: POINTER TO RECORD END;
  10892. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10893. BEGIN Procedure (argument);
  10894. END Test.
  10895. negative: calling procedure with integer variable parameter with procedure argument
  10896. MODULE Test;
  10897. VAR argument: PROCEDURE;
  10898. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10899. BEGIN Procedure (argument);
  10900. END Test.
  10901. negative: calling procedure with long integer variable parameter with boolean argument
  10902. MODULE Test;
  10903. VAR argument: BOOLEAN;
  10904. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10905. BEGIN Procedure (argument);
  10906. END Test.
  10907. negative: calling procedure with long integer variable parameter with character argument
  10908. MODULE Test;
  10909. VAR argument: CHAR;
  10910. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10911. BEGIN Procedure (argument);
  10912. END Test.
  10913. negative: calling procedure with long integer variable parameter with short integer argument
  10914. MODULE Test;
  10915. VAR argument: SHORTINT;
  10916. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10917. BEGIN Procedure (argument);
  10918. END Test.
  10919. negative: calling procedure with long integer variable parameter with integer argument
  10920. MODULE Test;
  10921. VAR argument: INTEGER;
  10922. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10923. BEGIN Procedure (argument);
  10924. END Test.
  10925. positive: calling procedure with long integer variable parameter with long integer argument
  10926. MODULE Test;
  10927. VAR argument: LONGINT;
  10928. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10929. BEGIN Procedure (argument);
  10930. END Test.
  10931. negative: calling procedure with long integer variable parameter with huge integer argument
  10932. MODULE Test;
  10933. VAR argument: HUGEINT;
  10934. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10935. BEGIN Procedure (argument);
  10936. END Test.
  10937. negative: calling procedure with long integer variable parameter with real argument
  10938. MODULE Test;
  10939. VAR argument: REAL;
  10940. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10941. BEGIN Procedure (argument);
  10942. END Test.
  10943. negative: calling procedure with long integer variable parameter with long real argument
  10944. MODULE Test;
  10945. VAR argument: LONGREAL;
  10946. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10947. BEGIN Procedure (argument);
  10948. END Test.
  10949. negative: calling procedure with long integer variable parameter with set argument
  10950. MODULE Test;
  10951. VAR argument: SET;
  10952. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10953. BEGIN Procedure (argument);
  10954. END Test.
  10955. negative: calling procedure with long integer variable parameter with array argument
  10956. MODULE Test;
  10957. VAR argument: ARRAY 10 OF CHAR;
  10958. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10959. BEGIN Procedure (argument);
  10960. END Test.
  10961. negative: calling procedure with long integer variable parameter with record argument
  10962. MODULE Test;
  10963. VAR argument: RECORD END;
  10964. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10965. BEGIN Procedure (argument);
  10966. END Test.
  10967. negative: calling procedure with long integer variable parameter with object argument
  10968. MODULE Test;
  10969. VAR argument: OBJECT END;
  10970. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10971. BEGIN Procedure (argument);
  10972. END Test.
  10973. negative: calling procedure with long integer variable parameter with base object argument
  10974. MODULE Test;
  10975. VAR argument: OBJECT;
  10976. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10977. BEGIN Procedure (argument);
  10978. END Test.
  10979. negative: calling procedure with long integer variable parameter with pointer to array argument
  10980. MODULE Test;
  10981. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10982. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10983. BEGIN Procedure (argument);
  10984. END Test.
  10985. negative: calling procedure with long integer variable parameter with pointer to record argument
  10986. MODULE Test;
  10987. VAR argument: POINTER TO RECORD END;
  10988. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10989. BEGIN Procedure (argument);
  10990. END Test.
  10991. negative: calling procedure with long integer variable parameter with procedure argument
  10992. MODULE Test;
  10993. VAR argument: PROCEDURE;
  10994. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10995. BEGIN Procedure (argument);
  10996. END Test.
  10997. negative: calling procedure with huge integer variable parameter with boolean argument
  10998. MODULE Test;
  10999. VAR argument: BOOLEAN;
  11000. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11001. BEGIN Procedure (argument);
  11002. END Test.
  11003. negative: calling procedure with huge integer variable parameter with character argument
  11004. MODULE Test;
  11005. VAR argument: CHAR;
  11006. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11007. BEGIN Procedure (argument);
  11008. END Test.
  11009. negative: calling procedure with huge integer variable parameter with short integer argument
  11010. MODULE Test;
  11011. VAR argument: SHORTINT;
  11012. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11013. BEGIN Procedure (argument);
  11014. END Test.
  11015. negative: calling procedure with huge integer variable parameter with integer argument
  11016. MODULE Test;
  11017. VAR argument: INTEGER;
  11018. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11019. BEGIN Procedure (argument);
  11020. END Test.
  11021. negative: calling procedure with huge integer variable parameter with long integer argument
  11022. MODULE Test;
  11023. VAR argument: LONGINT;
  11024. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11025. BEGIN Procedure (argument);
  11026. END Test.
  11027. positive: calling procedure with huge integer variable parameter with huge integer argument
  11028. MODULE Test;
  11029. VAR argument: HUGEINT;
  11030. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11031. BEGIN Procedure (argument);
  11032. END Test.
  11033. negative: calling procedure with huge integer variable parameter with real argument
  11034. MODULE Test;
  11035. VAR argument: REAL;
  11036. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11037. BEGIN Procedure (argument);
  11038. END Test.
  11039. negative: calling procedure with huge integer variable parameter with long real argument
  11040. MODULE Test;
  11041. VAR argument: LONGREAL;
  11042. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11043. BEGIN Procedure (argument);
  11044. END Test.
  11045. negative: calling procedure with huge integer variable parameter with set argument
  11046. MODULE Test;
  11047. VAR argument: SET;
  11048. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11049. BEGIN Procedure (argument);
  11050. END Test.
  11051. negative: calling procedure with huge integer variable parameter with array argument
  11052. MODULE Test;
  11053. VAR argument: ARRAY 10 OF CHAR;
  11054. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11055. BEGIN Procedure (argument);
  11056. END Test.
  11057. negative: calling procedure with huge integer variable parameter with record argument
  11058. MODULE Test;
  11059. VAR argument: RECORD END;
  11060. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11061. BEGIN Procedure (argument);
  11062. END Test.
  11063. negative: calling procedure with huge integer variable parameter with object argument
  11064. MODULE Test;
  11065. VAR argument: OBJECT END;
  11066. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11067. BEGIN Procedure (argument);
  11068. END Test.
  11069. negative: calling procedure with huge integer variable parameter with base object argument
  11070. MODULE Test;
  11071. VAR argument: OBJECT;
  11072. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11073. BEGIN Procedure (argument);
  11074. END Test.
  11075. negative: calling procedure with huge integer variable parameter with pointer to array argument
  11076. MODULE Test;
  11077. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11078. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11079. BEGIN Procedure (argument);
  11080. END Test.
  11081. negative: calling procedure with huge integer variable parameter with pointer to record argument
  11082. MODULE Test;
  11083. VAR argument: POINTER TO RECORD END;
  11084. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11085. BEGIN Procedure (argument);
  11086. END Test.
  11087. negative: calling procedure with huge integer variable parameter with procedure argument
  11088. MODULE Test;
  11089. VAR argument: PROCEDURE;
  11090. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11091. BEGIN Procedure (argument);
  11092. END Test.
  11093. negative: calling procedure with real variable parameter with boolean argument
  11094. MODULE Test;
  11095. VAR argument: BOOLEAN;
  11096. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11097. BEGIN Procedure (argument);
  11098. END Test.
  11099. negative: calling procedure with real variable parameter with character argument
  11100. MODULE Test;
  11101. VAR argument: CHAR;
  11102. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11103. BEGIN Procedure (argument);
  11104. END Test.
  11105. negative: calling procedure with real variable parameter with short integer argument
  11106. MODULE Test;
  11107. VAR argument: SHORTINT;
  11108. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11109. BEGIN Procedure (argument);
  11110. END Test.
  11111. negative: calling procedure with real variable parameter with integer argument
  11112. MODULE Test;
  11113. VAR argument: INTEGER;
  11114. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11115. BEGIN Procedure (argument);
  11116. END Test.
  11117. negative: calling procedure with real variable parameter with long integer argument
  11118. MODULE Test;
  11119. VAR argument: LONGINT;
  11120. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11121. BEGIN Procedure (argument);
  11122. END Test.
  11123. negative: calling procedure with real variable parameter with huge integer argument
  11124. MODULE Test;
  11125. VAR argument: HUGEINT;
  11126. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11127. BEGIN Procedure (argument);
  11128. END Test.
  11129. positive: calling procedure with real variable parameter with real argument
  11130. MODULE Test;
  11131. VAR argument: REAL;
  11132. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11133. BEGIN Procedure (argument);
  11134. END Test.
  11135. negative: calling procedure with real variable parameter with long real argument
  11136. MODULE Test;
  11137. VAR argument: LONGREAL;
  11138. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11139. BEGIN Procedure (argument);
  11140. END Test.
  11141. negative: calling procedure with real variable parameter with set argument
  11142. MODULE Test;
  11143. VAR argument: SET;
  11144. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11145. BEGIN Procedure (argument);
  11146. END Test.
  11147. negative: calling procedure with real variable parameter with array argument
  11148. MODULE Test;
  11149. VAR argument: ARRAY 10 OF CHAR;
  11150. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11151. BEGIN Procedure (argument);
  11152. END Test.
  11153. negative: calling procedure with real variable parameter with record argument
  11154. MODULE Test;
  11155. VAR argument: RECORD END;
  11156. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11157. BEGIN Procedure (argument);
  11158. END Test.
  11159. negative: calling procedure with real variable parameter with object argument
  11160. MODULE Test;
  11161. VAR argument: OBJECT END;
  11162. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11163. BEGIN Procedure (argument);
  11164. END Test.
  11165. negative: calling procedure with real variable parameter with base object argument
  11166. MODULE Test;
  11167. VAR argument: OBJECT;
  11168. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11169. BEGIN Procedure (argument);
  11170. END Test.
  11171. negative: calling procedure with real variable parameter with pointer to array argument
  11172. MODULE Test;
  11173. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11174. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11175. BEGIN Procedure (argument);
  11176. END Test.
  11177. negative: calling procedure with real variable parameter with pointer to record argument
  11178. MODULE Test;
  11179. VAR argument: POINTER TO RECORD END;
  11180. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11181. BEGIN Procedure (argument);
  11182. END Test.
  11183. negative: calling procedure with real variable parameter with procedure argument
  11184. MODULE Test;
  11185. VAR argument: PROCEDURE;
  11186. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11187. BEGIN Procedure (argument);
  11188. END Test.
  11189. negative: calling procedure with long real variable parameter with boolean argument
  11190. MODULE Test;
  11191. VAR argument: BOOLEAN;
  11192. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11193. BEGIN Procedure (argument);
  11194. END Test.
  11195. negative: calling procedure with long real variable parameter with character argument
  11196. MODULE Test;
  11197. VAR argument: CHAR;
  11198. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11199. BEGIN Procedure (argument);
  11200. END Test.
  11201. negative: calling procedure with long real variable parameter with short integer argument
  11202. MODULE Test;
  11203. VAR argument: SHORTINT;
  11204. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11205. BEGIN Procedure (argument);
  11206. END Test.
  11207. negative: calling procedure with long real variable parameter with integer argument
  11208. MODULE Test;
  11209. VAR argument: INTEGER;
  11210. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11211. BEGIN Procedure (argument);
  11212. END Test.
  11213. negative: calling procedure with long real variable parameter with long integer argument
  11214. MODULE Test;
  11215. VAR argument: LONGINT;
  11216. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11217. BEGIN Procedure (argument);
  11218. END Test.
  11219. negative: calling procedure with long real variable parameter with huge integer argument
  11220. MODULE Test;
  11221. VAR argument: HUGEINT;
  11222. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11223. BEGIN Procedure (argument);
  11224. END Test.
  11225. negative: calling procedure with long real variable parameter with real argument
  11226. MODULE Test;
  11227. VAR argument: REAL;
  11228. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11229. BEGIN Procedure (argument);
  11230. END Test.
  11231. positive: calling procedure with long real variable parameter with long real argument
  11232. MODULE Test;
  11233. VAR argument: LONGREAL;
  11234. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11235. BEGIN Procedure (argument);
  11236. END Test.
  11237. negative: calling procedure with long real variable parameter with set argument
  11238. MODULE Test;
  11239. VAR argument: SET;
  11240. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11241. BEGIN Procedure (argument);
  11242. END Test.
  11243. negative: calling procedure with long real variable parameter with array argument
  11244. MODULE Test;
  11245. VAR argument: ARRAY 10 OF CHAR;
  11246. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11247. BEGIN Procedure (argument);
  11248. END Test.
  11249. negative: calling procedure with long real variable parameter with record argument
  11250. MODULE Test;
  11251. VAR argument: RECORD END;
  11252. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11253. BEGIN Procedure (argument);
  11254. END Test.
  11255. negative: calling procedure with long real variable parameter with object argument
  11256. MODULE Test;
  11257. VAR argument: OBJECT END;
  11258. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11259. BEGIN Procedure (argument);
  11260. END Test.
  11261. negative: calling procedure with long real variable parameter with base object argument
  11262. MODULE Test;
  11263. VAR argument: OBJECT;
  11264. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11265. BEGIN Procedure (argument);
  11266. END Test.
  11267. negative: calling procedure with long real variable parameter with pointer to array argument
  11268. MODULE Test;
  11269. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11270. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11271. BEGIN Procedure (argument);
  11272. END Test.
  11273. negative: calling procedure with long real variable parameter with pointer to record argument
  11274. MODULE Test;
  11275. VAR argument: POINTER TO RECORD END;
  11276. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11277. BEGIN Procedure (argument);
  11278. END Test.
  11279. negative: calling procedure with long real variable parameter with procedure argument
  11280. MODULE Test;
  11281. VAR argument: PROCEDURE;
  11282. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11283. BEGIN Procedure (argument);
  11284. END Test.
  11285. negative: calling procedure with set variable parameter with boolean argument
  11286. MODULE Test;
  11287. VAR argument: BOOLEAN;
  11288. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11289. BEGIN Procedure (argument);
  11290. END Test.
  11291. negative: calling procedure with set variable parameter with character argument
  11292. MODULE Test;
  11293. VAR argument: CHAR;
  11294. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11295. BEGIN Procedure (argument);
  11296. END Test.
  11297. negative: calling procedure with set variable parameter with short integer argument
  11298. MODULE Test;
  11299. VAR argument: SHORTINT;
  11300. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11301. BEGIN Procedure (argument);
  11302. END Test.
  11303. negative: calling procedure with set variable parameter with integer argument
  11304. MODULE Test;
  11305. VAR argument: INTEGER;
  11306. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11307. BEGIN Procedure (argument);
  11308. END Test.
  11309. negative: calling procedure with set variable parameter with long integer argument
  11310. MODULE Test;
  11311. VAR argument: LONGINT;
  11312. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11313. BEGIN Procedure (argument);
  11314. END Test.
  11315. negative: calling procedure with set variable parameter with huge integer argument
  11316. MODULE Test;
  11317. VAR argument: HUGEINT;
  11318. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11319. BEGIN Procedure (argument);
  11320. END Test.
  11321. negative: calling procedure with set variable parameter with real argument
  11322. MODULE Test;
  11323. VAR argument: REAL;
  11324. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11325. BEGIN Procedure (argument);
  11326. END Test.
  11327. negative: calling procedure with set variable parameter with long real argument
  11328. MODULE Test;
  11329. VAR argument: LONGREAL;
  11330. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11331. BEGIN Procedure (argument);
  11332. END Test.
  11333. positive: calling procedure with set variable parameter with set argument
  11334. MODULE Test;
  11335. VAR argument: SET;
  11336. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11337. BEGIN Procedure (argument);
  11338. END Test.
  11339. negative: calling procedure with set variable parameter with array argument
  11340. MODULE Test;
  11341. VAR argument: ARRAY 10 OF CHAR;
  11342. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11343. BEGIN Procedure (argument);
  11344. END Test.
  11345. negative: calling procedure with set variable parameter with record argument
  11346. MODULE Test;
  11347. VAR argument: RECORD END;
  11348. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11349. BEGIN Procedure (argument);
  11350. END Test.
  11351. negative: calling procedure with set variable parameter with object argument
  11352. MODULE Test;
  11353. VAR argument: OBJECT END;
  11354. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11355. BEGIN Procedure (argument);
  11356. END Test.
  11357. negative: calling procedure with set variable parameter with base object argument
  11358. MODULE Test;
  11359. VAR argument: OBJECT;
  11360. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11361. BEGIN Procedure (argument);
  11362. END Test.
  11363. negative: calling procedure with set variable parameter with pointer to array argument
  11364. MODULE Test;
  11365. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11366. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11367. BEGIN Procedure (argument);
  11368. END Test.
  11369. negative: calling procedure with set variable parameter with pointer to record argument
  11370. MODULE Test;
  11371. VAR argument: POINTER TO RECORD END;
  11372. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11373. BEGIN Procedure (argument);
  11374. END Test.
  11375. negative: calling procedure with set variable parameter with procedure argument
  11376. MODULE Test;
  11377. VAR argument: PROCEDURE;
  11378. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11379. BEGIN Procedure (argument);
  11380. END Test.
  11381. negative: calling procedure with array variable parameter with boolean argument
  11382. MODULE Test;
  11383. VAR argument: BOOLEAN;
  11384. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11385. BEGIN Procedure (argument);
  11386. END Test.
  11387. negative: calling procedure with array variable parameter with character argument
  11388. MODULE Test;
  11389. VAR argument: CHAR;
  11390. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11391. BEGIN Procedure (argument);
  11392. END Test.
  11393. negative: calling procedure with array variable parameter with short integer argument
  11394. MODULE Test;
  11395. VAR argument: SHORTINT;
  11396. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11397. BEGIN Procedure (argument);
  11398. END Test.
  11399. negative: calling procedure with array variable parameter with integer argument
  11400. MODULE Test;
  11401. VAR argument: INTEGER;
  11402. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11403. BEGIN Procedure (argument);
  11404. END Test.
  11405. negative: calling procedure with array variable parameter with long integer argument
  11406. MODULE Test;
  11407. VAR argument: LONGINT;
  11408. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11409. BEGIN Procedure (argument);
  11410. END Test.
  11411. negative: calling procedure with array variable parameter with huge integer argument
  11412. MODULE Test;
  11413. VAR argument: HUGEINT;
  11414. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11415. BEGIN Procedure (argument);
  11416. END Test.
  11417. negative: calling procedure with array variable parameter with real argument
  11418. MODULE Test;
  11419. VAR argument: REAL;
  11420. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11421. BEGIN Procedure (argument);
  11422. END Test.
  11423. negative: calling procedure with array variable parameter with long real argument
  11424. MODULE Test;
  11425. VAR argument: LONGREAL;
  11426. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11427. BEGIN Procedure (argument);
  11428. END Test.
  11429. negative: calling procedure with array variable parameter with set argument
  11430. MODULE Test;
  11431. VAR argument: SET;
  11432. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11433. BEGIN Procedure (argument);
  11434. END Test.
  11435. positive: calling procedure with array variable parameter with array argument
  11436. MODULE Test;
  11437. VAR argument: ARRAY 10 OF CHAR;
  11438. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11439. BEGIN Procedure (argument);
  11440. END Test.
  11441. negative: calling procedure with array variable parameter with longer array argument
  11442. MODULE Test;
  11443. VAR argument: ARRAY 20 OF CHAR;
  11444. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11445. BEGIN Procedure (argument);
  11446. END Test.
  11447. negative: calling procedure with array variable parameter with record argument
  11448. MODULE Test;
  11449. VAR argument: RECORD END;
  11450. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11451. BEGIN Procedure (argument);
  11452. END Test.
  11453. negative: calling procedure with array variable parameter with object argument
  11454. MODULE Test;
  11455. VAR argument: OBJECT END;
  11456. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11457. BEGIN Procedure (argument);
  11458. END Test.
  11459. negative: calling procedure with array variable parameter with base object argument
  11460. MODULE Test;
  11461. VAR argument: OBJECT;
  11462. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11463. BEGIN Procedure (argument);
  11464. END Test.
  11465. negative: calling procedure with array variable parameter with pointer to array argument
  11466. MODULE Test;
  11467. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11468. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11469. BEGIN Procedure (argument);
  11470. END Test.
  11471. negative: calling procedure with array variable parameter with pointer to record argument
  11472. MODULE Test;
  11473. VAR argument: POINTER TO RECORD END;
  11474. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11475. BEGIN Procedure (argument);
  11476. END Test.
  11477. negative: calling procedure with array variable parameter with procedure argument
  11478. MODULE Test;
  11479. VAR argument: PROCEDURE;
  11480. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11481. BEGIN Procedure (argument);
  11482. END Test.
  11483. negative: calling procedure with open array variable parameter with boolean argument
  11484. MODULE Test;
  11485. VAR argument: BOOLEAN;
  11486. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11487. BEGIN Procedure (argument);
  11488. END Test.
  11489. negative: calling procedure with open array variable parameter with character argument
  11490. MODULE Test;
  11491. VAR argument: CHAR;
  11492. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11493. BEGIN Procedure (argument);
  11494. END Test.
  11495. negative: calling procedure with open array variable parameter with short integer argument
  11496. MODULE Test;
  11497. VAR argument: SHORTINT;
  11498. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11499. BEGIN Procedure (argument);
  11500. END Test.
  11501. negative: calling procedure with open array variable parameter with integer argument
  11502. MODULE Test;
  11503. VAR argument: INTEGER;
  11504. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11505. BEGIN Procedure (argument);
  11506. END Test.
  11507. negative: calling procedure with open array variable parameter with long integer argument
  11508. MODULE Test;
  11509. VAR argument: LONGINT;
  11510. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11511. BEGIN Procedure (argument);
  11512. END Test.
  11513. negative: calling procedure with open array variable parameter with huge integer argument
  11514. MODULE Test;
  11515. VAR argument: HUGEINT;
  11516. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11517. BEGIN Procedure (argument);
  11518. END Test.
  11519. negative: calling procedure with open array variable parameter with real argument
  11520. MODULE Test;
  11521. VAR argument: REAL;
  11522. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11523. BEGIN Procedure (argument);
  11524. END Test.
  11525. negative: calling procedure with open array variable parameter with long real argument
  11526. MODULE Test;
  11527. VAR argument: LONGREAL;
  11528. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11529. BEGIN Procedure (argument);
  11530. END Test.
  11531. negative: calling procedure with open array variable parameter with set argument
  11532. MODULE Test;
  11533. VAR argument: SET;
  11534. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11535. BEGIN Procedure (argument);
  11536. END Test.
  11537. positive: calling procedure with open array variable parameter with array argument
  11538. MODULE Test;
  11539. VAR argument: ARRAY 10 OF CHAR;
  11540. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11541. BEGIN Procedure (argument);
  11542. END Test.
  11543. negative: calling procedure with open array variable parameter with record argument
  11544. MODULE Test;
  11545. VAR argument: RECORD END;
  11546. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11547. BEGIN Procedure (argument);
  11548. END Test.
  11549. negative: calling procedure with open array variable parameter with object argument
  11550. MODULE Test;
  11551. VAR argument: OBJECT END;
  11552. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11553. BEGIN Procedure (argument);
  11554. END Test.
  11555. negative: calling procedure with open array variable parameter with base object argument
  11556. MODULE Test;
  11557. VAR argument: OBJECT;
  11558. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11559. BEGIN Procedure (argument);
  11560. END Test.
  11561. negative: calling procedure with open array variable parameter with pointer to array argument
  11562. MODULE Test;
  11563. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11564. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11565. BEGIN Procedure (argument);
  11566. END Test.
  11567. negative: calling procedure with open array variable parameter with pointer to record argument
  11568. MODULE Test;
  11569. VAR argument: POINTER TO RECORD END;
  11570. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11571. BEGIN Procedure (argument);
  11572. END Test.
  11573. negative: calling procedure with open array variable parameter with procedure argument
  11574. MODULE Test;
  11575. VAR argument: PROCEDURE;
  11576. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11577. BEGIN Procedure (argument);
  11578. END Test.
  11579. negative: calling procedure with record variable parameter with boolean argument
  11580. MODULE Test;
  11581. VAR argument: BOOLEAN;
  11582. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11583. BEGIN Procedure (argument);
  11584. END Test.
  11585. negative: calling procedure with record variable parameter with character argument
  11586. MODULE Test;
  11587. VAR argument: CHAR;
  11588. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11589. BEGIN Procedure (argument);
  11590. END Test.
  11591. negative: calling procedure with record variable parameter with short integer argument
  11592. MODULE Test;
  11593. VAR argument: SHORTINT;
  11594. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11595. BEGIN Procedure (argument);
  11596. END Test.
  11597. negative: calling procedure with record variable parameter with integer argument
  11598. MODULE Test;
  11599. VAR argument: INTEGER;
  11600. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11601. BEGIN Procedure (argument);
  11602. END Test.
  11603. negative: calling procedure with record variable parameter with long integer argument
  11604. MODULE Test;
  11605. VAR argument: LONGINT;
  11606. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11607. BEGIN Procedure (argument);
  11608. END Test.
  11609. negative: calling procedure with record variable parameter with huge integer argument
  11610. MODULE Test;
  11611. VAR argument: HUGEINT;
  11612. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11613. BEGIN Procedure (argument);
  11614. END Test.
  11615. negative: calling procedure with record variable parameter with real argument
  11616. MODULE Test;
  11617. VAR argument: REAL;
  11618. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11619. BEGIN Procedure (argument);
  11620. END Test.
  11621. negative: calling procedure with record variable parameter with long real argument
  11622. MODULE Test;
  11623. VAR argument: LONGREAL;
  11624. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11625. BEGIN Procedure (argument);
  11626. END Test.
  11627. negative: calling procedure with record variable parameter with set argument
  11628. MODULE Test;
  11629. VAR argument: SET;
  11630. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11631. BEGIN Procedure (argument);
  11632. END Test.
  11633. negative: calling procedure with record variable parameter with array argument
  11634. MODULE Test;
  11635. VAR argument: ARRAY 10 OF CHAR;
  11636. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11637. BEGIN Procedure (argument);
  11638. END Test.
  11639. positive: calling procedure with record variable parameter with record argument
  11640. MODULE Test;
  11641. TYPE Record = RECORD END;
  11642. VAR argument: Record;
  11643. PROCEDURE Procedure (VAR value: Record); END Procedure;
  11644. BEGIN Procedure (argument);
  11645. END Test.
  11646. positive: calling procedure with record variable parameter with compatible record argument
  11647. MODULE Test;
  11648. TYPE Record = RECORD END;
  11649. VAR argument: RECORD (Record) END;
  11650. PROCEDURE Procedure (VAR value: Record); END Procedure;
  11651. BEGIN Procedure (argument);
  11652. END Test.
  11653. negative: calling procedure with record variable parameter with incompatible record argument
  11654. MODULE Test;
  11655. TYPE Record = RECORD END;
  11656. VAR argument: Record;
  11657. PROCEDURE Procedure (VAR value: RECORD (Record) END); END Procedure;
  11658. BEGIN Procedure (argument);
  11659. END Test.
  11660. negative: calling procedure with record variable parameter with object argument
  11661. MODULE Test;
  11662. VAR argument: OBJECT END;
  11663. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11664. BEGIN Procedure (argument);
  11665. END Test.
  11666. negative: calling procedure with record variable parameter with base object argument
  11667. MODULE Test;
  11668. VAR argument: OBJECT;
  11669. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11670. BEGIN Procedure (argument);
  11671. END Test.
  11672. negative: calling procedure with record variable parameter with pointer to array argument
  11673. MODULE Test;
  11674. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11675. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11676. BEGIN Procedure (argument);
  11677. END Test.
  11678. negative: calling procedure with record variable parameter with pointer to record argument
  11679. MODULE Test;
  11680. VAR argument: POINTER TO RECORD END;
  11681. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11682. BEGIN Procedure (argument);
  11683. END Test.
  11684. negative: calling procedure with record variable parameter with procedure argument
  11685. MODULE Test;
  11686. VAR argument: PROCEDURE;
  11687. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11688. BEGIN Procedure (argument);
  11689. END Test.
  11690. negative: calling procedure with object variable parameter with boolean argument
  11691. MODULE Test;
  11692. VAR argument: BOOLEAN;
  11693. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11694. BEGIN Procedure (argument);
  11695. END Test.
  11696. negative: calling procedure with object variable parameter with character argument
  11697. MODULE Test;
  11698. VAR argument: CHAR;
  11699. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11700. BEGIN Procedure (argument);
  11701. END Test.
  11702. negative: calling procedure with object variable parameter with short integer argument
  11703. MODULE Test;
  11704. VAR argument: SHORTINT;
  11705. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11706. BEGIN Procedure (argument);
  11707. END Test.
  11708. negative: calling procedure with object variable parameter with integer argument
  11709. MODULE Test;
  11710. VAR argument: INTEGER;
  11711. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11712. BEGIN Procedure (argument);
  11713. END Test.
  11714. negative: calling procedure with object variable parameter with long integer argument
  11715. MODULE Test;
  11716. VAR argument: LONGINT;
  11717. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11718. BEGIN Procedure (argument);
  11719. END Test.
  11720. negative: calling procedure with object variable parameter with huge integer argument
  11721. MODULE Test;
  11722. VAR argument: HUGEINT;
  11723. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11724. BEGIN Procedure (argument);
  11725. END Test.
  11726. negative: calling procedure with object variable parameter with real argument
  11727. MODULE Test;
  11728. VAR argument: REAL;
  11729. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11730. BEGIN Procedure (argument);
  11731. END Test.
  11732. negative: calling procedure with object variable parameter with long real argument
  11733. MODULE Test;
  11734. VAR argument: LONGREAL;
  11735. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11736. BEGIN Procedure (argument);
  11737. END Test.
  11738. negative: calling procedure with object variable parameter with set argument
  11739. MODULE Test;
  11740. VAR argument: SET;
  11741. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11742. BEGIN Procedure (argument);
  11743. END Test.
  11744. negative: calling procedure with object variable parameter with array argument
  11745. MODULE Test;
  11746. VAR argument: ARRAY 10 OF CHAR;
  11747. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11748. BEGIN Procedure (argument);
  11749. END Test.
  11750. negative: calling procedure with object variable parameter with record argument
  11751. MODULE Test;
  11752. VAR argument: RECORD END;
  11753. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11754. BEGIN Procedure (argument);
  11755. END Test.
  11756. positive: calling procedure with object variable parameter with object argument
  11757. MODULE Test;
  11758. TYPE Object = OBJECT END Object;
  11759. VAR argument: Object;
  11760. PROCEDURE Procedure (VAR value: Object); END Procedure;
  11761. BEGIN Procedure (argument);
  11762. END Test.
  11763. negative: calling procedure with object variable parameter with compatible object argument
  11764. MODULE Test;
  11765. TYPE Object = OBJECT END Object;
  11766. VAR argument: OBJECT (Object) END;
  11767. PROCEDURE Procedure (VAR value: Object); END Procedure;
  11768. BEGIN Procedure (argument);
  11769. END Test.
  11770. negative: calling procedure with object variable parameter with incompatible object argument
  11771. MODULE Test;
  11772. TYPE Object = OBJECT END Object;
  11773. VAR argument: Object;
  11774. PROCEDURE Procedure (VAR value: OBJECT (Object) END); END Procedure;
  11775. BEGIN Procedure (argument);
  11776. END Test.
  11777. negative: calling procedure with object variable parameter with base object argument
  11778. MODULE Test;
  11779. VAR argument: OBJECT;
  11780. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11781. BEGIN Procedure (argument);
  11782. END Test.
  11783. negative: calling procedure with object variable parameter with pointer to array argument
  11784. MODULE Test;
  11785. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11786. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11787. BEGIN Procedure (argument);
  11788. END Test.
  11789. negative: calling procedure with object variable parameter with pointer to record argument
  11790. MODULE Test;
  11791. VAR argument: POINTER TO RECORD END;
  11792. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11793. BEGIN Procedure (argument);
  11794. END Test.
  11795. negative: calling procedure with object variable parameter with procedure argument
  11796. MODULE Test;
  11797. VAR argument: PROCEDURE;
  11798. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11799. BEGIN Procedure (argument);
  11800. END Test.
  11801. negative: calling procedure with base object variable parameter with boolean argument
  11802. MODULE Test;
  11803. VAR argument: BOOLEAN;
  11804. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11805. BEGIN Procedure (argument);
  11806. END Test.
  11807. negative: calling procedure with base object variable parameter with character argument
  11808. MODULE Test;
  11809. VAR argument: CHAR;
  11810. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11811. BEGIN Procedure (argument);
  11812. END Test.
  11813. negative: calling procedure with base object variable parameter with short integer argument
  11814. MODULE Test;
  11815. VAR argument: SHORTINT;
  11816. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11817. BEGIN Procedure (argument);
  11818. END Test.
  11819. negative: calling procedure with base object variable parameter with integer argument
  11820. MODULE Test;
  11821. VAR argument: INTEGER;
  11822. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11823. BEGIN Procedure (argument);
  11824. END Test.
  11825. negative: calling procedure with base object variable parameter with long integer argument
  11826. MODULE Test;
  11827. VAR argument: LONGINT;
  11828. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11829. BEGIN Procedure (argument);
  11830. END Test.
  11831. negative: calling procedure with base object variable parameter with huge integer argument
  11832. MODULE Test;
  11833. VAR argument: HUGEINT;
  11834. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11835. BEGIN Procedure (argument);
  11836. END Test.
  11837. negative: calling procedure with base object variable parameter with real argument
  11838. MODULE Test;
  11839. VAR argument: REAL;
  11840. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11841. BEGIN Procedure (argument);
  11842. END Test.
  11843. negative: calling procedure with base object variable parameter with long real argument
  11844. MODULE Test;
  11845. VAR argument: LONGREAL;
  11846. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11847. BEGIN Procedure (argument);
  11848. END Test.
  11849. negative: calling procedure with base object variable parameter with set argument
  11850. MODULE Test;
  11851. VAR argument: SET;
  11852. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11853. BEGIN Procedure (argument);
  11854. END Test.
  11855. negative: calling procedure with base object variable parameter with array argument
  11856. MODULE Test;
  11857. VAR argument: ARRAY 10 OF CHAR;
  11858. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11859. BEGIN Procedure (argument);
  11860. END Test.
  11861. negative: calling procedure with base object variable parameter with record argument
  11862. MODULE Test;
  11863. VAR argument: RECORD END;
  11864. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11865. BEGIN Procedure (argument);
  11866. END Test.
  11867. negative: calling procedure with base object variable parameter with object argument
  11868. MODULE Test;
  11869. VAR argument: OBJECT END;
  11870. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11871. BEGIN Procedure (argument);
  11872. END Test.
  11873. positive: calling procedure with base object variable parameter with base object argument
  11874. MODULE Test;
  11875. VAR argument: OBJECT;
  11876. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11877. BEGIN Procedure (argument);
  11878. END Test.
  11879. negative: calling procedure with base object variable parameter with pointer to array argument
  11880. MODULE Test;
  11881. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11882. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11883. BEGIN Procedure (argument);
  11884. END Test.
  11885. negative: calling procedure with base object variable parameter with pointer to record argument
  11886. MODULE Test;
  11887. VAR argument: POINTER TO RECORD END;
  11888. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11889. BEGIN Procedure (argument);
  11890. END Test.
  11891. negative: calling procedure with base object variable parameter with procedure argument
  11892. MODULE Test;
  11893. VAR argument: PROCEDURE;
  11894. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11895. BEGIN Procedure (argument);
  11896. END Test.
  11897. negative: calling procedure with pointer to array variable parameter with boolean argument
  11898. MODULE Test;
  11899. VAR argument: BOOLEAN;
  11900. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11901. BEGIN Procedure (argument);
  11902. END Test.
  11903. negative: calling procedure with pointer to array variable parameter with character argument
  11904. MODULE Test;
  11905. VAR argument: CHAR;
  11906. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11907. BEGIN Procedure (argument);
  11908. END Test.
  11909. negative: calling procedure with pointer to array variable parameter with short integer argument
  11910. MODULE Test;
  11911. VAR argument: SHORTINT;
  11912. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11913. BEGIN Procedure (argument);
  11914. END Test.
  11915. negative: calling procedure with pointer to array variable parameter with integer argument
  11916. MODULE Test;
  11917. VAR argument: INTEGER;
  11918. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11919. BEGIN Procedure (argument);
  11920. END Test.
  11921. negative: calling procedure with pointer to array variable parameter with long integer argument
  11922. MODULE Test;
  11923. VAR argument: LONGINT;
  11924. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11925. BEGIN Procedure (argument);
  11926. END Test.
  11927. negative: calling procedure with pointer to array variable parameter with huge integer argument
  11928. MODULE Test;
  11929. VAR argument: HUGEINT;
  11930. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11931. BEGIN Procedure (argument);
  11932. END Test.
  11933. negative: calling procedure with pointer to array variable parameter with real argument
  11934. MODULE Test;
  11935. VAR argument: REAL;
  11936. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11937. BEGIN Procedure (argument);
  11938. END Test.
  11939. negative: calling procedure with pointer to array variable parameter with long real argument
  11940. MODULE Test;
  11941. VAR argument: LONGREAL;
  11942. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11943. BEGIN Procedure (argument);
  11944. END Test.
  11945. negative: calling procedure with pointer to array variable parameter with set argument
  11946. MODULE Test;
  11947. VAR argument: SET;
  11948. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11949. BEGIN Procedure (argument);
  11950. END Test.
  11951. negative: calling procedure with pointer to array variable parameter with array argument
  11952. MODULE Test;
  11953. VAR argument: ARRAY 10 OF CHAR;
  11954. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11955. BEGIN Procedure (argument);
  11956. END Test.
  11957. negative: calling procedure with pointer to array variable parameter with record argument
  11958. MODULE Test;
  11959. VAR argument: RECORD END;
  11960. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11961. BEGIN Procedure (argument);
  11962. END Test.
  11963. negative: calling procedure with pointer to array variable parameter with object argument
  11964. MODULE Test;
  11965. VAR argument: OBJECT END;
  11966. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11967. BEGIN Procedure (argument);
  11968. END Test.
  11969. negative: calling procedure with pointer to array variable parameter with base object argument
  11970. MODULE Test;
  11971. VAR argument: OBJECT;
  11972. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11973. BEGIN Procedure (argument);
  11974. END Test.
  11975. positive: calling procedure with pointer to array variable parameter with pointer to array argument
  11976. MODULE Test;
  11977. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11978. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11979. BEGIN Procedure (argument);
  11980. END Test.
  11981. negative: calling procedure with pointer to array variable parameter with pointer to record argument
  11982. MODULE Test;
  11983. VAR argument: POINTER TO RECORD END;
  11984. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11985. BEGIN Procedure (argument);
  11986. END Test.
  11987. negative: calling procedure with pointer to array variable parameter with procedure argument
  11988. MODULE Test;
  11989. VAR argument: PROCEDURE;
  11990. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11991. BEGIN Procedure (argument);
  11992. END Test.
  11993. negative: calling procedure with pointer to record variable parameter with boolean argument
  11994. MODULE Test;
  11995. VAR argument: BOOLEAN;
  11996. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  11997. BEGIN Procedure (argument);
  11998. END Test.
  11999. negative: calling procedure with pointer to record variable parameter with character argument
  12000. MODULE Test;
  12001. VAR argument: CHAR;
  12002. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12003. BEGIN Procedure (argument);
  12004. END Test.
  12005. negative: calling procedure with pointer to record variable parameter with short integer argument
  12006. MODULE Test;
  12007. VAR argument: SHORTINT;
  12008. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12009. BEGIN Procedure (argument);
  12010. END Test.
  12011. negative: calling procedure with pointer to record variable parameter with integer argument
  12012. MODULE Test;
  12013. VAR argument: INTEGER;
  12014. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12015. BEGIN Procedure (argument);
  12016. END Test.
  12017. negative: calling procedure with pointer to record variable parameter with long integer argument
  12018. MODULE Test;
  12019. VAR argument: LONGINT;
  12020. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12021. BEGIN Procedure (argument);
  12022. END Test.
  12023. negative: calling procedure with pointer to record variable parameter with huge integer argument
  12024. MODULE Test;
  12025. VAR argument: HUGEINT;
  12026. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12027. BEGIN Procedure (argument);
  12028. END Test.
  12029. negative: calling procedure with pointer to record variable parameter with real argument
  12030. MODULE Test;
  12031. VAR argument: REAL;
  12032. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12033. BEGIN Procedure (argument);
  12034. END Test.
  12035. negative: calling procedure with pointer to record variable parameter with long real argument
  12036. MODULE Test;
  12037. VAR argument: LONGREAL;
  12038. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12039. BEGIN Procedure (argument);
  12040. END Test.
  12041. negative: calling procedure with pointer to record variable parameter with set argument
  12042. MODULE Test;
  12043. VAR argument: SET;
  12044. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12045. BEGIN Procedure (argument);
  12046. END Test.
  12047. negative: calling procedure with pointer to record variable parameter with array argument
  12048. MODULE Test;
  12049. VAR argument: ARRAY 10 OF CHAR;
  12050. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12051. BEGIN Procedure (argument);
  12052. END Test.
  12053. negative: calling procedure with pointer to record variable parameter with record argument
  12054. MODULE Test;
  12055. VAR argument: RECORD END;
  12056. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12057. BEGIN Procedure (argument);
  12058. END Test.
  12059. negative: calling procedure with pointer to record variable parameter with object argument
  12060. MODULE Test;
  12061. VAR argument: OBJECT END;
  12062. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12063. BEGIN Procedure (argument);
  12064. END Test.
  12065. negative: calling procedure with pointer to record variable parameter with base object argument
  12066. MODULE Test;
  12067. VAR argument: OBJECT;
  12068. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12069. BEGIN Procedure (argument);
  12070. END Test.
  12071. negative: calling procedure with pointer to record variable parameter with pointer to array argument
  12072. MODULE Test;
  12073. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  12074. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12075. BEGIN Procedure (argument);
  12076. END Test.
  12077. positive: calling procedure with pointer to record variable parameter with pointer to record argument
  12078. MODULE Test;
  12079. TYPE Record = RECORD END;
  12080. VAR argument: POINTER TO Record;
  12081. PROCEDURE Procedure (VAR value: POINTER TO Record); END Procedure;
  12082. BEGIN Procedure (argument);
  12083. END Test.
  12084. negative: calling procedure with pointer to record variable parameter with compatible pointer to record argument
  12085. MODULE Test;
  12086. TYPE Record = RECORD END;
  12087. VAR argument: POINTER TO RECORD (Record) END;
  12088. PROCEDURE Procedure (VAR value: POINTER TO Record); END Procedure;
  12089. BEGIN Procedure (argument);
  12090. END Test.
  12091. negative: calling procedure with pointer to record variable parameter with incompatible pointer to record argument
  12092. MODULE Test;
  12093. TYPE Record = RECORD END;
  12094. VAR argument: POINTER TO Record;
  12095. PROCEDURE Procedure (VAR value: POINTER TO RECORD (Record) END); END Procedure;
  12096. BEGIN Procedure (argument);
  12097. END Test.
  12098. negative: calling procedure with pointer to record variable parameter with procedure argument
  12099. MODULE Test;
  12100. VAR argument: PROCEDURE;
  12101. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12102. BEGIN Procedure (argument);
  12103. END Test.
  12104. negative: calling procedure with procedure variable parameter with boolean argument
  12105. MODULE Test;
  12106. VAR argument: BOOLEAN;
  12107. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12108. BEGIN Procedure (argument);
  12109. END Test.
  12110. negative: calling procedure with procedure variable parameter with character argument
  12111. MODULE Test;
  12112. VAR argument: CHAR;
  12113. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12114. BEGIN Procedure (argument);
  12115. END Test.
  12116. negative: calling procedure with procedure variable parameter with short integer argument
  12117. MODULE Test;
  12118. VAR argument: SHORTINT;
  12119. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12120. BEGIN Procedure (argument);
  12121. END Test.
  12122. negative: calling procedure with procedure variable parameter with integer argument
  12123. MODULE Test;
  12124. VAR argument: INTEGER;
  12125. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12126. BEGIN Procedure (argument);
  12127. END Test.
  12128. negative: calling procedure with procedure variable parameter with long integer argument
  12129. MODULE Test;
  12130. VAR argument: LONGINT;
  12131. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12132. BEGIN Procedure (argument);
  12133. END Test.
  12134. negative: calling procedure with procedure variable parameter with huge integer argument
  12135. MODULE Test;
  12136. VAR argument: HUGEINT;
  12137. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12138. BEGIN Procedure (argument);
  12139. END Test.
  12140. negative: calling procedure with procedure variable parameter with real argument
  12141. MODULE Test;
  12142. VAR argument: REAL;
  12143. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12144. BEGIN Procedure (argument);
  12145. END Test.
  12146. negative: calling procedure with procedure variable parameter with long real argument
  12147. MODULE Test;
  12148. VAR argument: LONGREAL;
  12149. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12150. BEGIN Procedure (argument);
  12151. END Test.
  12152. negative: calling procedure with procedure variable parameter with set argument
  12153. MODULE Test;
  12154. VAR argument: SET;
  12155. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12156. BEGIN Procedure (argument);
  12157. END Test.
  12158. negative: calling procedure with procedure variable parameter with array argument
  12159. MODULE Test;
  12160. VAR argument: ARRAY 10 OF CHAR;
  12161. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12162. BEGIN Procedure (argument);
  12163. END Test.
  12164. negative: calling procedure with procedure variable parameter with record argument
  12165. MODULE Test;
  12166. VAR argument: RECORD END;
  12167. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12168. BEGIN Procedure (argument);
  12169. END Test.
  12170. negative: calling procedure with procedure variable parameter with object argument
  12171. MODULE Test;
  12172. VAR argument: OBJECT END;
  12173. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12174. BEGIN Procedure (argument);
  12175. END Test.
  12176. negative: calling procedure with procedure variable parameter with base object argument
  12177. MODULE Test;
  12178. VAR argument: OBJECT;
  12179. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12180. BEGIN Procedure (argument);
  12181. END Test.
  12182. negative: calling procedure with procedure variable parameter with pointer to array argument
  12183. MODULE Test;
  12184. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  12185. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12186. BEGIN Procedure (argument);
  12187. END Test.
  12188. negative: calling procedure with procedure variable parameter with pointer to record argument
  12189. MODULE Test;
  12190. VAR argument: POINTER TO RECORD END;
  12191. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12192. BEGIN Procedure (argument);
  12193. END Test.
  12194. positive: calling procedure with procedure variable parameter with procedure argument
  12195. MODULE Test;
  12196. VAR argument: PROCEDURE;
  12197. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12198. BEGIN Procedure (argument);
  12199. END Test.
  12200. negative: calling procedure returning boolean
  12201. MODULE Test;
  12202. PROCEDURE Procedure (): BOOLEAN; END Procedure;
  12203. BEGIN Procedure ()
  12204. END Test.
  12205. positive: ignoring procedure call returning boolean
  12206. MODULE Test;
  12207. PROCEDURE Procedure (): BOOLEAN; END Procedure;
  12208. BEGIN IGNORE Procedure ()
  12209. END Test.
  12210. negative: calling procedure returning character
  12211. MODULE Test;
  12212. PROCEDURE Procedure (): CHAR; END Procedure;
  12213. BEGIN Procedure ()
  12214. END Test.
  12215. positive: ignoring procedure call returning character
  12216. MODULE Test;
  12217. PROCEDURE Procedure (): CHAR; END Procedure;
  12218. BEGIN IGNORE Procedure ()
  12219. END Test.
  12220. negative: calling procedure returning integer
  12221. MODULE Test;
  12222. PROCEDURE Procedure (): INTEGER; END Procedure;
  12223. BEGIN Procedure ()
  12224. END Test.
  12225. positive: ignoring procedure call returning integer
  12226. MODULE Test;
  12227. PROCEDURE Procedure (): INTEGER; END Procedure;
  12228. BEGIN IGNORE Procedure ()
  12229. END Test.
  12230. negative: calling procedure returning real
  12231. MODULE Test;
  12232. PROCEDURE Procedure (): REAL; END Procedure;
  12233. BEGIN Procedure ()
  12234. END Test.
  12235. positive: ignoring procedure call returning real
  12236. MODULE Test;
  12237. PROCEDURE Procedure (): REAL; END Procedure;
  12238. BEGIN IGNORE Procedure ()
  12239. END Test.
  12240. negative: calling procedure returning set
  12241. MODULE Test;
  12242. PROCEDURE Procedure (): SET; END Procedure;
  12243. BEGIN Procedure ()
  12244. END Test.
  12245. positive: ignoring procedure call returning set
  12246. MODULE Test;
  12247. PROCEDURE Procedure (): SET; END Procedure;
  12248. BEGIN IGNORE Procedure ()
  12249. END Test.
  12250. negative: calling procedure returning array
  12251. MODULE Test;
  12252. PROCEDURE Procedure (): ARRAY 10 OF CHAR; END Procedure;
  12253. BEGIN Procedure ()
  12254. END Test.
  12255. positive: ignoring procedure call returning array
  12256. MODULE Test;
  12257. PROCEDURE Procedure (): ARRAY 10 OF CHAR; END Procedure;
  12258. BEGIN IGNORE Procedure ()
  12259. END Test.
  12260. negative: calling procedure returning record
  12261. MODULE Test;
  12262. PROCEDURE Procedure (): RECORD END; END Procedure;
  12263. BEGIN Procedure ()
  12264. END Test.
  12265. positive: ignoring procedure call returning record
  12266. MODULE Test;
  12267. PROCEDURE Procedure (): RECORD END; END Procedure;
  12268. BEGIN IGNORE Procedure ()
  12269. END Test.
  12270. negative: calling procedure returning object
  12271. MODULE Test;
  12272. PROCEDURE Procedure (): OBJECT END; END Procedure;
  12273. BEGIN Procedure ()
  12274. END Test.
  12275. positive: ignoring procedure call returning object
  12276. MODULE Test;
  12277. PROCEDURE Procedure (): OBJECT END; END Procedure;
  12278. BEGIN IGNORE Procedure ()
  12279. END Test.
  12280. negative: calling procedure returning base object
  12281. MODULE Test;
  12282. PROCEDURE Procedure (): OBJECT; END Procedure;
  12283. BEGIN Procedure ()
  12284. END Test.
  12285. positive: ignoring procedure call returning base object
  12286. MODULE Test;
  12287. PROCEDURE Procedure (): OBJECT; END Procedure;
  12288. BEGIN IGNORE Procedure ()
  12289. END Test.
  12290. negative: calling procedure returning pointer to array
  12291. MODULE Test;
  12292. PROCEDURE Procedure (): POINTER TO ARRAY 10 OF CHAR; END Procedure;
  12293. BEGIN Procedure ()
  12294. END Test.
  12295. positive: ignoring procedure call returning pointer to array
  12296. MODULE Test;
  12297. PROCEDURE Procedure (): POINTER TO ARRAY 10 OF CHAR; END Procedure;
  12298. BEGIN IGNORE Procedure ()
  12299. END Test.
  12300. negative: calling procedure returning pointer to record
  12301. MODULE Test;
  12302. PROCEDURE Procedure (): POINTER TO ARRAY 10 OF RECORD END; END Procedure;
  12303. BEGIN Procedure ()
  12304. END Test.
  12305. positive: ignoring procedure call returning pointer to record
  12306. MODULE Test;
  12307. PROCEDURE Procedure (): POINTER TO ARRAY 10 OF RECORD END; END Procedure;
  12308. BEGIN IGNORE Procedure ()
  12309. END Test.
  12310. negative: calling procedure returning procedure
  12311. MODULE Test;
  12312. PROCEDURE Procedure (): PROCEDURE; END Procedure;
  12313. BEGIN Procedure ()
  12314. END Test.
  12315. positive: ignoring procedure call returning procedure
  12316. MODULE Test;
  12317. PROCEDURE Procedure (): PROCEDURE; END Procedure;
  12318. BEGIN IGNORE Procedure ()
  12319. END Test.
  12320. positive: calling procedure returning nothing
  12321. MODULE Test;
  12322. PROCEDURE Procedure (); END Procedure;
  12323. BEGIN Procedure; Procedure ()
  12324. END Test.
  12325. negative: ignoring procedure call returning nothing
  12326. MODULE Test;
  12327. PROCEDURE Procedure (); END Procedure;
  12328. BEGIN IGNORE Procedure ()
  12329. END Test.
  12330. # initializers
  12331. negative: initializer within module
  12332. MODULE Test;
  12333. PROCEDURE &Initializer; END Initializer;
  12334. END Test.
  12335. negative: initializer within procedure
  12336. MODULE Test;
  12337. PROCEDURE Procedure;
  12338. PROCEDURE &Initializer; END Initializer;
  12339. END Procedure;
  12340. END Test.
  12341. negative: initializer within nested procedure
  12342. MODULE Test;
  12343. PROCEDURE Procedure;
  12344. PROCEDURE Procedure;
  12345. PROCEDURE &Initializer; END Initializer;
  12346. END Procedure;
  12347. END Procedure;
  12348. END Test.
  12349. positive: initializer within object
  12350. MODULE Test;
  12351. TYPE Object = OBJECT
  12352. PROCEDURE &Initializer; END Initializer;
  12353. END Object;
  12354. END Test.
  12355. positive: initializer within object in procedure
  12356. MODULE Test;
  12357. PROCEDURE Procedure;
  12358. TYPE Object = OBJECT
  12359. PROCEDURE &Initializer; END Initializer;
  12360. END Object;
  12361. END Procedure;
  12362. END Test.
  12363. negative: initializer within procedure in object
  12364. MODULE Test;
  12365. TYPE Object = OBJECT
  12366. PROCEDURE Procedure;
  12367. PROCEDURE &Initializer; END Initializer;
  12368. END Procedure;
  12369. END Object;
  12370. END Test.
  12371. negative: initializer within nested procedure in object
  12372. MODULE Test;
  12373. TYPE Object = OBJECT
  12374. PROCEDURE Procedure;
  12375. PROCEDURE Procedure;
  12376. PROCEDURE &Initializer; END Initializer;
  12377. END Procedure;
  12378. END Procedure;
  12379. END Object;
  12380. END Test.
  12381. negative: two initializers in object
  12382. MODULE Test;
  12383. TYPE Object = OBJECT
  12384. PROCEDURE &Initializer1; END Initializer1;
  12385. PROCEDURE &Initializer2; END Initializer2;
  12386. END Object;
  12387. END Test.
  12388. negative: two initializers in object with same name
  12389. MODULE Test;
  12390. TYPE Object = OBJECT
  12391. PROCEDURE &Initializer; END Initializer;
  12392. PROCEDURE &Initializer; END Initializer;
  12393. END Object;
  12394. END Test.
  12395. positive: initializer without return type
  12396. MODULE Test;
  12397. TYPE Object = OBJECT
  12398. PROCEDURE &Initializer; END Initializer;
  12399. END Object;
  12400. END Test.
  12401. negative: initializer with return type
  12402. MODULE Test;
  12403. TYPE Object = OBJECT
  12404. PROCEDURE &Initializer (): Object; END Initializer;
  12405. END Object;
  12406. END Test.
  12407. positive: initializer with parameter
  12408. MODULE Test;
  12409. TYPE Object = OBJECT
  12410. PROCEDURE &Initializer (object: Object); END Initializer;
  12411. END Object;
  12412. END Test.
  12413. positive: initializer with parameters
  12414. MODULE Test;
  12415. TYPE Object = OBJECT
  12416. PROCEDURE &Initializer (a, b: Object); END Initializer;
  12417. END Object;
  12418. END Test.
  12419. # statement blocks
  12420. negative: invalid block modifier notag
  12421. MODULE Test;
  12422. BEGIN {NOTAG};
  12423. END Test.
  12424. negative: invalid block modifier delegate
  12425. MODULE Test;
  12426. BEGIN {DELEGATE};
  12427. END Test.
  12428. negative: repeated exclusive block modifier
  12429. MODULE Test;
  12430. BEGIN {EXCLUSIVE, EXCLUSIVE};
  12431. END Test.
  12432. negative: repeated active block modifier
  12433. MODULE Test;
  12434. TYPE Object = OBJECT
  12435. BEGIN {ACTIVE,ACTIVE}
  12436. END Object;
  12437. END Test.
  12438. positive: exclusive module body
  12439. MODULE Test;
  12440. BEGIN {EXCLUSIVE}
  12441. END Test.
  12442. positive: nested exclusive module body
  12443. MODULE Test;
  12444. BEGIN BEGIN {EXCLUSIVE} END
  12445. END Test.
  12446. negative: exclusive block in exclusive module body
  12447. MODULE Test;
  12448. BEGIN {EXCLUSIVE} BEGIN {EXCLUSIVE} END
  12449. END Test.
  12450. negative: exclusive block in active module body
  12451. MODULE Test;
  12452. BEGIN {ACTIVE} BEGIN {EXCLUSIVE} END
  12453. END Test.
  12454. positive: exclusive object body
  12455. MODULE Test;
  12456. TYPE Object = OBJECT
  12457. BEGIN {EXCLUSIVE}
  12458. END Object;
  12459. END Test.
  12460. positive: nested exclusive object body
  12461. MODULE Test;
  12462. TYPE Object = OBJECT
  12463. BEGIN BEGIN {EXCLUSIVE} END
  12464. END Object;
  12465. END Test.
  12466. negative: exclusive block in exclusive object body
  12467. MODULE Test;
  12468. TYPE Object = OBJECT
  12469. BEGIN {EXCLUSIVE} BEGIN {EXCLUSIVE} END
  12470. END Object;
  12471. END Test.
  12472. positive: exclusive block in active object body
  12473. MODULE Test;
  12474. TYPE Object = OBJECT
  12475. BEGIN {ACTIVE} BEGIN {EXCLUSIVE} END
  12476. END Object;
  12477. END Test.
  12478. positive: exclusive procedure body within module
  12479. MODULE Test;
  12480. PROCEDURE Procedure;
  12481. BEGIN {EXCLUSIVE}
  12482. END Procedure;
  12483. END Test.
  12484. positive: nested exclusive procedure body within module
  12485. MODULE Test;
  12486. PROCEDURE Procedure;
  12487. BEGIN BEGIN {EXCLUSIVE} END
  12488. END Procedure;
  12489. END Test.
  12490. negative: exclusive block in exclusive procedure body within module
  12491. MODULE Test;
  12492. PROCEDURE Procedure;
  12493. BEGIN {EXCLUSIVE} BEGIN {EXCLUSIVE} END
  12494. END Procedure;
  12495. END Test.
  12496. negative: exclusive block in active procedure body within module
  12497. MODULE Test;
  12498. PROCEDURE Procedure;
  12499. BEGIN {ACTIVE} BEGIN {EXCLUSIVE} END
  12500. END Procedure;
  12501. END Test.
  12502. positive: exclusive procedure body within object
  12503. MODULE Test;
  12504. TYPE Object = OBJECT
  12505. PROCEDURE Procedure;
  12506. BEGIN {EXCLUSIVE}
  12507. END Procedure;
  12508. END Object;
  12509. END Test.
  12510. positive: exclusive nested procedure body within object
  12511. MODULE Test;
  12512. TYPE Object = OBJECT
  12513. PROCEDURE Procedure;
  12514. BEGIN BEGIN {EXCLUSIVE} END
  12515. END Procedure;
  12516. END Object;
  12517. END Test.
  12518. negative: exclusive block in exclusive procedure body within object
  12519. MODULE Test;
  12520. TYPE Object = OBJECT
  12521. PROCEDURE Procedure;
  12522. BEGIN {EXCLUSIVE} BEGIN {EXCLUSIVE} END
  12523. END Procedure;
  12524. END Object;
  12525. END Test.
  12526. negative: exclusive block in active procedure body within object
  12527. MODULE Test;
  12528. TYPE Object = OBJECT
  12529. PROCEDURE Procedure;
  12530. BEGIN {ACTIVE} BEGIN {EXCLUSIVE} END
  12531. END Procedure;
  12532. END Object;
  12533. END Test.
  12534. negative: active module body
  12535. MODULE Test;
  12536. BEGIN {ACTIVE}
  12537. END Test.
  12538. negative: nested active module body
  12539. MODULE Test;
  12540. BEGIN BEGIN {ACTIVE} END
  12541. END Test.
  12542. negative: active block in active module body
  12543. MODULE Test;
  12544. BEGIN {ACTIVE} BEGIN {ACTIVE} END
  12545. END Test.
  12546. negative: active block in exclusive module body
  12547. MODULE Test;
  12548. BEGIN {EXCLUSIVE} BEGIN {ACTIVE} END
  12549. END Test.
  12550. positive: active object body
  12551. MODULE Test;
  12552. TYPE Object = OBJECT
  12553. BEGIN {ACTIVE}
  12554. END Object;
  12555. END Test.
  12556. negative: nested active object body
  12557. MODULE Test;
  12558. TYPE Object = OBJECT
  12559. BEGIN BEGIN {ACTIVE} END
  12560. END Object;
  12561. END Test.
  12562. negative: active block in active object body
  12563. MODULE Test;
  12564. TYPE Object = OBJECT
  12565. BEGIN {ACTIVE} BEGIN {ACTIVE} END
  12566. END Object;
  12567. END Test.
  12568. negative: active block in exclusive object body
  12569. MODULE Test;
  12570. TYPE Object = OBJECT
  12571. BEGIN {EXCLUSIVE} BEGIN {ACTIVE} END
  12572. END Object;
  12573. END Test.
  12574. negative: active procedure body within module
  12575. MODULE Test;
  12576. PROCEDURE Procedure;
  12577. BEGIN {ACTIVE}
  12578. END Procedure;
  12579. END Test.
  12580. negative: nested active procedure body within module
  12581. MODULE Test;
  12582. PROCEDURE Procedure;
  12583. BEGIN BEGIN {ACTIVE} END
  12584. END Procedure;
  12585. END Test.
  12586. negative: active block in active procedure body within module
  12587. MODULE Test;
  12588. PROCEDURE Procedure;
  12589. BEGIN {ACTIVE} BEGIN {ACTIVE} END
  12590. END Procedure;
  12591. END Test.
  12592. negative: active block in exclusive procedure body within module
  12593. MODULE Test;
  12594. PROCEDURE Procedure;
  12595. BEGIN {EXCLUSIVE} BEGIN {ACTIVE} END
  12596. END Procedure;
  12597. END Test.
  12598. negative: active procedure body within object
  12599. MODULE Test;
  12600. TYPE Object = OBJECT
  12601. PROCEDURE Procedure;
  12602. BEGIN {ACTIVE}
  12603. END Procedure;
  12604. END Object;
  12605. END Test.
  12606. negative: active nested procedure body within object
  12607. MODULE Test;
  12608. TYPE Object = OBJECT
  12609. PROCEDURE Procedure;
  12610. BEGIN BEGIN {ACTIVE} END
  12611. END Procedure;
  12612. END Object;
  12613. END Test.
  12614. negative: active block in active procedure body within object
  12615. MODULE Test;
  12616. TYPE Object = OBJECT
  12617. PROCEDURE Procedure;
  12618. BEGIN {ACTIVE} BEGIN {ACTIVE} END
  12619. END Procedure;
  12620. END Object;
  12621. END Test.
  12622. negative: active block in exclusive procedure body within object
  12623. MODULE Test;
  12624. TYPE Object = OBJECT
  12625. PROCEDURE Procedure;
  12626. BEGIN {EXCLUSIVE} BEGIN {ACTIVE} END
  12627. END Procedure;
  12628. END Object;
  12629. END Test.
  12630. negative: exclusive and active module body
  12631. MODULE Test;
  12632. BEGIN {EXCLUSIVE, ACTIVE}
  12633. END Test.
  12634. negative: nested exclusive and active module body
  12635. MODULE Test;
  12636. BEGIN BEGIN {EXCLUSIVE, ACTIVE} END
  12637. END Test.
  12638. negative: exclusive and active block in exclusive and active module body
  12639. MODULE Test;
  12640. BEGIN {EXCLUSIVE, ACTIVE} BEGIN {EXCLUSIVE, ACTIVE} END
  12641. END Test.
  12642. positive: exclusive and active object body
  12643. MODULE Test;
  12644. TYPE Object = OBJECT
  12645. BEGIN {EXCLUSIVE, ACTIVE}
  12646. END Object;
  12647. END Test.
  12648. negative: nested exclusive and active object body
  12649. MODULE Test;
  12650. TYPE Object = OBJECT
  12651. BEGIN BEGIN {EXCLUSIVE, ACTIVE} END
  12652. END Object;
  12653. END Test.
  12654. negative: exclusive and active block in exclusive and active object body
  12655. MODULE Test;
  12656. TYPE Object = OBJECT
  12657. BEGIN {EXCLUSIVE, ACTIVE} BEGIN {EXCLUSIVE, ACTIVE} END
  12658. END Object;
  12659. END Test.
  12660. negative: exclusive and active procedure body within module
  12661. MODULE Test;
  12662. PROCEDURE Procedure;
  12663. BEGIN {EXCLUSIVE, ACTIVE}
  12664. END Procedure;
  12665. END Test.
  12666. negative: nested exclusive and active procedure body within module
  12667. MODULE Test;
  12668. PROCEDURE Procedure;
  12669. BEGIN BEGIN {EXCLUSIVE, ACTIVE} END
  12670. END Procedure;
  12671. END Test.
  12672. negative: exclusive and active block in exclusive and active procedure body within module
  12673. MODULE Test;
  12674. PROCEDURE Procedure;
  12675. BEGIN {EXCLUSIVE, ACTIVE} BEGIN {EXCLUSIVE, ACTIVE} END
  12676. END Procedure;
  12677. END Test.
  12678. negative: exclusive and active procedure body within object
  12679. MODULE Test;
  12680. TYPE Object = OBJECT
  12681. PROCEDURE Procedure;
  12682. BEGIN {EXCLUSIVE, ACTIVE}
  12683. END Procedure;
  12684. END Object;
  12685. END Test.
  12686. negative: exclusive and active nested procedure body within object
  12687. MODULE Test;
  12688. TYPE Object = OBJECT
  12689. PROCEDURE Procedure;
  12690. BEGIN BEGIN {EXCLUSIVE, ACTIVE} END
  12691. END Procedure;
  12692. END Object;
  12693. END Test.
  12694. negative: exclusive and active block in exclusive and active procedure body within object
  12695. MODULE Test;
  12696. TYPE Object = OBJECT
  12697. PROCEDURE Procedure;
  12698. BEGIN {EXCLUSIVE, ACTIVE} BEGIN {EXCLUSIVE, ACTIVE} END
  12699. END Procedure;
  12700. END Object;
  12701. END Test.
  12702. # while statement
  12703. positive: while statement with constant true condition
  12704. MODULE Test;
  12705. BEGIN WHILE TRUE DO END;
  12706. END Test.
  12707. positive: while statement with constant false condition
  12708. MODULE Test;
  12709. BEGIN WHILE FALSE DO END;
  12710. END Test.
  12711. negative: while statement with constant condition of type character
  12712. MODULE Test;
  12713. BEGIN WHILE 'a' DO END;
  12714. END Test.
  12715. negative: while statement with constant condition of type integer
  12716. MODULE Test;
  12717. BEGIN WHILE 5 DO END;
  12718. END Test.
  12719. negative: while statement with constant condition of type real
  12720. MODULE Test;
  12721. BEGIN WHILE 4.5 DO END;
  12722. END Test.
  12723. negative: while statement with constant condition of type set
  12724. MODULE Test;
  12725. BEGIN WHILE {5} DO END;
  12726. END Test.
  12727. negative: while statement with constant condition of type string
  12728. MODULE Test;
  12729. BEGIN WHILE "condition" DO END;
  12730. END Test.
  12731. negative: while statement with constant condition of type nil pointer
  12732. MODULE Test;
  12733. BEGIN WHILE NIL DO END;
  12734. END Test.
  12735. positive: while statement with condition of type boolean
  12736. MODULE Test;
  12737. VAR condition: BOOLEAN;
  12738. BEGIN WHILE condition DO END;
  12739. END Test.
  12740. negative: while statement with condition of type character
  12741. MODULE Test;
  12742. VAR condition: CHAR;
  12743. BEGIN WHILE condition DO END;
  12744. END Test.
  12745. negative: while statement with condition of type short integer
  12746. MODULE Test;
  12747. VAR condition: SHORTINT;
  12748. BEGIN WHILE condition DO END;
  12749. END Test.
  12750. negative: while statement with condition of type integer
  12751. MODULE Test;
  12752. VAR condition: INTEGER;
  12753. BEGIN WHILE condition DO END;
  12754. END Test.
  12755. negative: while statement with condition of type long integer
  12756. MODULE Test;
  12757. VAR condition: LONGINT;
  12758. BEGIN WHILE condition DO END;
  12759. END Test.
  12760. negative: while statement with condition of type huge integer
  12761. MODULE Test;
  12762. VAR condition: HUGEINT;
  12763. BEGIN WHILE condition DO END;
  12764. END Test.
  12765. negative: while statement with condition of type real
  12766. MODULE Test;
  12767. VAR condition: REAL;
  12768. BEGIN WHILE condition DO END;
  12769. END Test.
  12770. negative: while statement with condition of type long real
  12771. MODULE Test;
  12772. VAR condition: LONGREAL;
  12773. BEGIN WHILE condition DO END;
  12774. END Test.
  12775. negative: while statement with condition of type set
  12776. MODULE Test;
  12777. VAR condition: SET;
  12778. BEGIN WHILE condition DO END;
  12779. END Test.
  12780. negative: while statement with condition of type array
  12781. MODULE Test;
  12782. VAR condition: ARRAY 10 OF CHAR;
  12783. BEGIN WHILE condition DO END;
  12784. END Test.
  12785. negative: while statement with condition of type record
  12786. MODULE Test;
  12787. VAR condition: RECORD END;
  12788. BEGIN WHILE condition DO END;
  12789. END Test.
  12790. negative: while statement with condition of type object
  12791. MODULE Test;
  12792. VAR condition: OBJECT;
  12793. BEGIN WHILE condition DO END;
  12794. END Test.
  12795. negative: while statement with condition of type pointer
  12796. MODULE Test;
  12797. VAR condition: POINTER TO RECORD END;
  12798. BEGIN WHILE condition DO END;
  12799. END Test.
  12800. negative: while statement with condition of type procedure
  12801. MODULE Test;
  12802. VAR condition: PROCEDURE;
  12803. BEGIN WHILE condition DO END;
  12804. END Test.
  12805. negative: while statement with import as condition
  12806. MODULE Test;
  12807. IMPORT condition := Dummy;
  12808. BEGIN WHILE condition DO END;
  12809. END Test.
  12810. negative: while statement with type as condition
  12811. MODULE Test;
  12812. TYPE condition = BOOLEAN;
  12813. BEGIN WHILE condition DO END;
  12814. END Test.
  12815. # repeat statement
  12816. positive: repeat statement with constant true condition
  12817. MODULE Test;
  12818. BEGIN REPEAT UNTIL TRUE;
  12819. END Test.
  12820. positive: repeat statement with constant false condition
  12821. MODULE Test;
  12822. BEGIN REPEAT UNTIL FALSE;
  12823. END Test.
  12824. negative: repeat statement with constant condition of type character
  12825. MODULE Test;
  12826. BEGIN REPEAT UNTIL 'a';
  12827. END Test.
  12828. negative: repeat statement with constant condition of type integer
  12829. MODULE Test;
  12830. BEGIN REPEAT UNTIL 5;
  12831. END Test.
  12832. negative: repeat statement with constant condition of type real
  12833. MODULE Test;
  12834. BEGIN REPEAT UNTIL 4.5;
  12835. END Test.
  12836. negative: repeat statement with constant condition of type set
  12837. MODULE Test;
  12838. BEGIN REPEAT UNTIL {5};
  12839. END Test.
  12840. negative: repeat statement with constant condition of type string
  12841. MODULE Test;
  12842. BEGIN REPEAT UNTIL "condition";
  12843. END Test.
  12844. negative: repeat statement with constant condition of type nil pointer
  12845. MODULE Test;
  12846. BEGIN REPEAT UNTIL NIL;
  12847. END Test.
  12848. positive: repeat statement with condition of type boolean
  12849. MODULE Test;
  12850. VAR condition: BOOLEAN;
  12851. BEGIN REPEAT UNTIL condition;
  12852. END Test.
  12853. negative: repeat statement with condition of type character
  12854. MODULE Test;
  12855. VAR condition: CHAR;
  12856. BEGIN REPEAT UNTIL condition;
  12857. END Test.
  12858. negative: repeat statement with condition of type short integer
  12859. MODULE Test;
  12860. VAR condition: SHORTINT;
  12861. BEGIN REPEAT UNTIL condition;
  12862. END Test.
  12863. negative: repeat statement with condition of type integer
  12864. MODULE Test;
  12865. VAR condition: INTEGER;
  12866. BEGIN REPEAT UNTIL condition;
  12867. END Test.
  12868. negative: repeat statement with condition of type long integer
  12869. MODULE Test;
  12870. VAR condition: LONGINT;
  12871. BEGIN REPEAT UNTIL condition;
  12872. END Test.
  12873. negative: repeat statement with condition of type huge integer
  12874. MODULE Test;
  12875. VAR condition: HUGEINT;
  12876. BEGIN REPEAT UNTIL condition;
  12877. END Test.
  12878. negative: repeat statement with condition of type real
  12879. MODULE Test;
  12880. VAR condition: REAL;
  12881. BEGIN REPEAT UNTIL condition;
  12882. END Test.
  12883. negative: repeat statement with condition of type long real
  12884. MODULE Test;
  12885. VAR condition: LONGREAL;
  12886. BEGIN REPEAT UNTIL condition;
  12887. END Test.
  12888. negative: repeat statement with condition of type set
  12889. MODULE Test;
  12890. VAR condition: SET;
  12891. BEGIN REPEAT UNTIL condition;
  12892. END Test.
  12893. negative: repeat statement with condition of type array
  12894. MODULE Test;
  12895. VAR condition: ARRAY 10 OF CHAR;
  12896. BEGIN REPEAT UNTIL condition;
  12897. END Test.
  12898. negative: repeat statement with condition of type record
  12899. MODULE Test;
  12900. VAR condition: RECORD END;
  12901. BEGIN REPEAT UNTIL condition;
  12902. END Test.
  12903. negative: repeat statement with condition of type object
  12904. MODULE Test;
  12905. VAR condition: OBJECT;
  12906. BEGIN REPEAT UNTIL condition;
  12907. END Test.
  12908. negative: repeat statement with condition of type pointer
  12909. MODULE Test;
  12910. VAR condition: POINTER TO RECORD END;
  12911. BEGIN REPEAT UNTIL condition;
  12912. END Test.
  12913. negative: repeat statement with condition of type procedure
  12914. MODULE Test;
  12915. VAR condition: PROCEDURE;
  12916. BEGIN REPEAT UNTIL condition;
  12917. END Test.
  12918. negative: repeat statement with import as condition
  12919. MODULE Test;
  12920. IMPORT condition := Dummy;
  12921. BEGIN REPEAT UNTIL condition;
  12922. END Test.
  12923. negative: repeat statement with type as condition
  12924. MODULE Test;
  12925. TYPE condition = BOOLEAN;
  12926. BEGIN REPEAT UNTIL condition;
  12927. END Test.
  12928. # await statement
  12929. positive: await statement in non-exclusive block
  12930. MODULE Test;
  12931. VAR condition: BOOLEAN;
  12932. BEGIN AWAIT (condition);
  12933. END Test.
  12934. positive: await statement in nested non-exclusive block
  12935. MODULE Test;
  12936. VAR condition: BOOLEAN;
  12937. BEGIN BEGIN AWAIT (condition) END;
  12938. END Test.
  12939. positive: await statement in exclusive block
  12940. MODULE Test;
  12941. VAR condition: BOOLEAN;
  12942. BEGIN {EXCLUSIVE} AWAIT (condition);
  12943. END Test.
  12944. positive: await statement in nested exclusive block
  12945. MODULE Test;
  12946. VAR condition: BOOLEAN;
  12947. BEGIN BEGIN {EXCLUSIVE} AWAIT (condition) END;
  12948. END Test.
  12949. positive: await statement within nested exclusive block
  12950. MODULE Test;
  12951. VAR condition: BOOLEAN;
  12952. BEGIN {EXCLUSIVE} BEGIN AWAIT (condition) END;
  12953. END Test.
  12954. negative: await statement with constant true condition
  12955. MODULE Test;
  12956. BEGIN {EXCLUSIVE} AWAIT (TRUE);
  12957. END Test.
  12958. negative: await statement with constant false condition
  12959. MODULE Test;
  12960. BEGIN {EXCLUSIVE} AWAIT (FALSE);
  12961. END Test.
  12962. negative: await statement with constant condition of type character
  12963. MODULE Test;
  12964. BEGIN {EXCLUSIVE} AWAIT ('a');
  12965. END Test.
  12966. negative: await statement with constant condition of type integer
  12967. MODULE Test;
  12968. BEGIN {EXCLUSIVE} AWAIT (5);
  12969. END Test.
  12970. negative: await statement with constant condition of type real
  12971. MODULE Test;
  12972. BEGIN {EXCLUSIVE} AWAIT (4.5);
  12973. END Test.
  12974. negative: await statement with constant condition of type set
  12975. MODULE Test;
  12976. BEGIN {EXCLUSIVE} AWAIT ({5});
  12977. END Test.
  12978. negative: await statement with constant condition of type string
  12979. MODULE Test;
  12980. BEGIN {EXCLUSIVE} AWAIT ("condition");
  12981. END Test.
  12982. negative: await statement with constant condition of type nil pointer
  12983. MODULE Test;
  12984. BEGIN {EXCLUSIVE} AWAIT (NIL);
  12985. END Test.
  12986. positive: await statement with condition of type boolean
  12987. MODULE Test;
  12988. VAR condition: BOOLEAN;
  12989. BEGIN {EXCLUSIVE} AWAIT (condition);
  12990. END Test.
  12991. negative: await statement with condition of type character
  12992. MODULE Test;
  12993. VAR condition: CHAR;
  12994. BEGIN {EXCLUSIVE} AWAIT (condition);
  12995. END Test.
  12996. negative: await statement with condition of type short integer
  12997. MODULE Test;
  12998. VAR condition: SHORTINT;
  12999. BEGIN {EXCLUSIVE} AWAIT (condition);
  13000. END Test.
  13001. negative: await statement with condition of type integer
  13002. MODULE Test;
  13003. VAR condition: INTEGER;
  13004. BEGIN {EXCLUSIVE} AWAIT (condition);
  13005. END Test.
  13006. negative: await statement with condition of type long integer
  13007. MODULE Test;
  13008. VAR condition: LONGINT;
  13009. BEGIN {EXCLUSIVE} AWAIT (condition);
  13010. END Test.
  13011. negative: await statement with condition of type huge integer
  13012. MODULE Test;
  13013. VAR condition: HUGEINT;
  13014. BEGIN {EXCLUSIVE} AWAIT (condition);
  13015. END Test.
  13016. negative: await statement with condition of type real
  13017. MODULE Test;
  13018. VAR condition: REAL;
  13019. BEGIN {EXCLUSIVE} AWAIT (condition);
  13020. END Test.
  13021. negative: await statement with condition of type long real
  13022. MODULE Test;
  13023. VAR condition: LONGREAL;
  13024. BEGIN {EXCLUSIVE} AWAIT (condition);
  13025. END Test.
  13026. negative: await statement with condition of type set
  13027. MODULE Test;
  13028. VAR condition: SET;
  13029. BEGIN {EXCLUSIVE} AWAIT (condition);
  13030. END Test.
  13031. negative: await statement with condition of type array
  13032. MODULE Test;
  13033. VAR condition: ARRAY 10 OF CHAR;
  13034. BEGIN {EXCLUSIVE} AWAIT (condition);
  13035. END Test.
  13036. negative: await statement with condition of type record
  13037. MODULE Test;
  13038. VAR condition: RECORD END;
  13039. BEGIN {EXCLUSIVE} AWAIT (condition);
  13040. END Test.
  13041. negative: await statement with condition of type object
  13042. MODULE Test;
  13043. VAR condition: OBJECT;
  13044. BEGIN {EXCLUSIVE} AWAIT (condition);
  13045. END Test.
  13046. negative: await statement with condition of type pointer
  13047. MODULE Test;
  13048. VAR condition: POINTER TO RECORD END;
  13049. BEGIN {EXCLUSIVE} AWAIT (condition);
  13050. END Test.
  13051. negative: await statement with condition of type procedure
  13052. MODULE Test;
  13053. VAR condition: PROCEDURE;
  13054. BEGIN {EXCLUSIVE} AWAIT (condition);
  13055. END Test.
  13056. negative: await statement with import as condition
  13057. MODULE Test;
  13058. IMPORT condition := Dummy;
  13059. BEGIN {EXCLUSIVE} AWAIT (condition);
  13060. END Test.
  13061. negative: await statement with type as condition
  13062. MODULE Test;
  13063. TYPE condition = BOOLEAN;
  13064. BEGIN {EXCLUSIVE} AWAIT (condition);
  13065. END Test.
  13066. # assignment statement
  13067. positive: constant boolean to variable boolean assignment
  13068. MODULE Test;
  13069. VAR result: BOOLEAN;
  13070. BEGIN result := TRUE;
  13071. END Test.
  13072. negative: constant boolean to temporary boolean assignment
  13073. MODULE Test;
  13074. VAR result: PROCEDURE (): BOOLEAN;
  13075. BEGIN result () := TRUE;
  13076. END Test.
  13077. negative: constant character to variable boolean assignment
  13078. MODULE Test;
  13079. VAR result: BOOLEAN;
  13080. BEGIN result := 'f';
  13081. END Test.
  13082. negative: constant short integer to variable boolean assignment
  13083. MODULE Test;
  13084. VAR result: BOOLEAN;
  13085. BEGIN result := 10H;
  13086. END Test.
  13087. negative: constant integer to variable boolean assignment
  13088. MODULE Test;
  13089. VAR result: BOOLEAN;
  13090. BEGIN result := 1000H;
  13091. END Test.
  13092. negative: constant long integer to variable boolean assignment
  13093. MODULE Test;
  13094. VAR result: BOOLEAN;
  13095. BEGIN result := 100000H;
  13096. END Test.
  13097. negative: constant huge integer to variable boolean assignment
  13098. MODULE Test;
  13099. VAR result: BOOLEAN;
  13100. BEGIN result := 10000000000H;
  13101. END Test.
  13102. negative: constant real to variable boolean assignment
  13103. MODULE Test;
  13104. VAR result: BOOLEAN;
  13105. BEGIN result := 5.4;
  13106. END Test.
  13107. negative: constant long real to variable boolean assignment
  13108. MODULE Test;
  13109. VAR result: BOOLEAN;
  13110. BEGIN result := 5.4D100;
  13111. END Test.
  13112. negative: constant set to variable boolean assignment
  13113. MODULE Test;
  13114. VAR result: BOOLEAN;
  13115. BEGIN result := {5};
  13116. END Test.
  13117. negative: string to variable boolean assignment
  13118. MODULE Test;
  13119. VAR result: BOOLEAN;
  13120. BEGIN result := "string";
  13121. END Test.
  13122. negative: nil pointer to variable boolean assignment
  13123. MODULE Test;
  13124. VAR result: BOOLEAN;
  13125. BEGIN result := NIL;
  13126. END Test.
  13127. negative: procedure to variable boolean assignment
  13128. MODULE Test;
  13129. VAR result: BOOLEAN;
  13130. PROCEDURE Procedure; END Procedure;
  13131. BEGIN result := Procedure;
  13132. END Test.
  13133. negative: constant boolean to variable character assignment
  13134. MODULE Test;
  13135. VAR result: CHAR;
  13136. BEGIN result := TRUE;
  13137. END Test.
  13138. positive: constant character to variable character assignment
  13139. MODULE Test;
  13140. VAR result: CHAR;
  13141. BEGIN result := 'f';
  13142. END Test.
  13143. negative: constant character to temporary character assignment
  13144. MODULE Test;
  13145. VAR result: PROCEDURE (): CHAR;
  13146. BEGIN result () := 'u';
  13147. END Test.
  13148. negative: constant short integer to variable character assignment
  13149. MODULE Test;
  13150. VAR result: CHAR;
  13151. BEGIN result := 10H;
  13152. END Test.
  13153. negative: constant integer to variable character assignment
  13154. MODULE Test;
  13155. VAR result: CHAR;
  13156. BEGIN result := 1000H;
  13157. END Test.
  13158. negative: constant long integer to variable character assignment
  13159. MODULE Test;
  13160. VAR result: CHAR;
  13161. BEGIN result := 100000H;
  13162. END Test.
  13163. negative: constant huge integer to variable character assignment
  13164. MODULE Test;
  13165. VAR result: CHAR;
  13166. BEGIN result := 10000000000H;
  13167. END Test.
  13168. negative: constant real to variable character assignment
  13169. MODULE Test;
  13170. VAR result: CHAR;
  13171. BEGIN result := 5.4;
  13172. END Test.
  13173. negative: constant long real to variable character assignment
  13174. MODULE Test;
  13175. VAR result: CHAR;
  13176. BEGIN result := 5.4D100;
  13177. END Test.
  13178. negative: constant set to variable character assignment
  13179. MODULE Test;
  13180. VAR result: CHAR;
  13181. BEGIN result := {5};
  13182. END Test.
  13183. negative: string to variable character assignment
  13184. MODULE Test;
  13185. VAR result: CHAR;
  13186. BEGIN result := "string";
  13187. END Test.
  13188. negative: nil pointer to variable character assignment
  13189. MODULE Test;
  13190. VAR result: CHAR;
  13191. BEGIN result := NIL;
  13192. END Test.
  13193. negative: procedure to variable character assignment
  13194. MODULE Test;
  13195. VAR result: CHAR;
  13196. PROCEDURE Procedure; END Procedure;
  13197. BEGIN result := Procedure;
  13198. END Test.
  13199. negative: constant boolean to variable short integer assignment
  13200. MODULE Test;
  13201. VAR result: SHORTINT;
  13202. BEGIN result := TRUE;
  13203. END Test.
  13204. negative: constant character to variable short integer assignment
  13205. MODULE Test;
  13206. VAR result: SHORTINT;
  13207. BEGIN result := 'f';
  13208. END Test.
  13209. positive: constant short integer to variable short integer assignment
  13210. MODULE Test;
  13211. VAR result: SHORTINT;
  13212. BEGIN result := 10H;
  13213. END Test.
  13214. negative: constant short integer to temporary short integer assignment
  13215. MODULE Test;
  13216. VAR result: PROCEDURE (): SHORTINT;
  13217. BEGIN result () := 10H;
  13218. END Test.
  13219. negative: constant integer to variable short integer assignment
  13220. MODULE Test;
  13221. VAR result: SHORTINT;
  13222. BEGIN result := 1000H;
  13223. END Test.
  13224. negative: constant long integer to variable short integer assignment
  13225. MODULE Test;
  13226. VAR result: SHORTINT;
  13227. BEGIN result := 100000H;
  13228. END Test.
  13229. negative: constant huge integer to variable short integer assignment
  13230. MODULE Test;
  13231. VAR result: SHORTINT;
  13232. BEGIN result := 10000000000H;
  13233. END Test.
  13234. negative: constant real to variable short integer assignment
  13235. MODULE Test;
  13236. VAR result: SHORTINT;
  13237. BEGIN result := 5.4;
  13238. END Test.
  13239. negative: constant long real to variable short integer assignment
  13240. MODULE Test;
  13241. VAR result: SHORTINT;
  13242. BEGIN result := 5.4D100;
  13243. END Test.
  13244. negative: constant set to variable short integer assignment
  13245. MODULE Test;
  13246. VAR result: SHORTINT;
  13247. BEGIN result := {5};
  13248. END Test.
  13249. negative: string to variable short integer assignment
  13250. MODULE Test;
  13251. VAR result: SHORTINT;
  13252. BEGIN result := "string";
  13253. END Test.
  13254. negative: nil pointer to variable short integer assignment
  13255. MODULE Test;
  13256. VAR result: SHORTINT;
  13257. BEGIN result := NIL;
  13258. END Test.
  13259. negative: procedure to variable short integer assignment
  13260. MODULE Test;
  13261. VAR result: SHORTINT;
  13262. PROCEDURE Procedure; END Procedure;
  13263. BEGIN result := Procedure;
  13264. END Test.
  13265. negative: constant boolean to variable integer assignment
  13266. MODULE Test;
  13267. VAR result: INTEGER;
  13268. BEGIN result := TRUE;
  13269. END Test.
  13270. negative: constant character to variable integer assignment
  13271. MODULE Test;
  13272. VAR result: INTEGER;
  13273. BEGIN result := 'f';
  13274. END Test.
  13275. positive: constant short integer to variable integer assignment
  13276. MODULE Test;
  13277. VAR result: INTEGER;
  13278. BEGIN result := 10H;
  13279. END Test.
  13280. negative: constant short integer to temporary integer assignment
  13281. MODULE Test;
  13282. VAR result: PROCEDURE (): INTEGER;
  13283. BEGIN result () := 10H;
  13284. END Test.
  13285. positive: constant integer to variable integer assignment
  13286. MODULE Test;
  13287. VAR result: INTEGER;
  13288. BEGIN result := 1000H;
  13289. END Test.
  13290. negative: constant integer to temporary integer assignment
  13291. MODULE Test;
  13292. VAR result: PROCEDURE (): INTEGER;
  13293. BEGIN result () := 1000H;
  13294. END Test.
  13295. negative: constant long integer to variable integer assignment
  13296. MODULE Test;
  13297. VAR result: INTEGER;
  13298. BEGIN result := 100000H;
  13299. END Test.
  13300. negative: constant huge integer to variable integer assignment
  13301. MODULE Test;
  13302. VAR result: INTEGER;
  13303. BEGIN result := 10000000000H;
  13304. END Test.
  13305. negative: constant real to variable integer assignment
  13306. MODULE Test;
  13307. VAR result: INTEGER;
  13308. BEGIN result := 5.4;
  13309. END Test.
  13310. negative: constant long real to variable integer assignment
  13311. MODULE Test;
  13312. VAR result: INTEGER;
  13313. BEGIN result := 5.4D100;
  13314. END Test.
  13315. negative: constant set to variable integer assignment
  13316. MODULE Test;
  13317. VAR result: INTEGER;
  13318. BEGIN result := {5};
  13319. END Test.
  13320. negative: string to variable integer assignment
  13321. MODULE Test;
  13322. VAR result: INTEGER;
  13323. BEGIN result := "string";
  13324. END Test.
  13325. negative: nil pointer to variable integer assignment
  13326. MODULE Test;
  13327. VAR result: INTEGER;
  13328. BEGIN result := NIL;
  13329. END Test.
  13330. negative: procedure to variable integer assignment
  13331. MODULE Test;
  13332. VAR result: INTEGER;
  13333. PROCEDURE Procedure; END Procedure;
  13334. BEGIN result := Procedure;
  13335. END Test.
  13336. negative: constant boolean to variable long integer assignment
  13337. MODULE Test;
  13338. VAR result: LONGINT;
  13339. BEGIN result := TRUE;
  13340. END Test.
  13341. negative: constant character to variable long integer assignment
  13342. MODULE Test;
  13343. VAR result: LONGINT;
  13344. BEGIN result := 'f';
  13345. END Test.
  13346. positive: constant short integer to variable long integer assignment
  13347. MODULE Test;
  13348. VAR result: LONGINT;
  13349. BEGIN result := 10H;
  13350. END Test.
  13351. negative: constant short integer to temporary long integer assignment
  13352. MODULE Test;
  13353. VAR result: PROCEDURE (): LONGINT;
  13354. BEGIN result () := 10H;
  13355. END Test.
  13356. positive: constant integer to variable long integer assignment
  13357. MODULE Test;
  13358. VAR result: LONGINT;
  13359. BEGIN result := 1000H;
  13360. END Test.
  13361. negative: constant integer to temporary long integer assignment
  13362. MODULE Test;
  13363. VAR result: PROCEDURE (): LONGINT;
  13364. BEGIN result () := 1000H;
  13365. END Test.
  13366. positive: constant long integer to variable long integer assignment
  13367. MODULE Test;
  13368. VAR result: LONGINT;
  13369. BEGIN result := 100000H;
  13370. END Test.
  13371. negative: constant long integer to temporary long integer assignment
  13372. MODULE Test;
  13373. VAR result: PROCEDURE (): LONGINT;
  13374. BEGIN result () := 100000H;
  13375. END Test.
  13376. negative: constant huge integer to variable long integer assignment
  13377. MODULE Test;
  13378. VAR result: LONGINT;
  13379. BEGIN result := 10000000000H;
  13380. END Test.
  13381. negative: constant real to variable long integer assignment
  13382. MODULE Test;
  13383. VAR result: LONGINT;
  13384. BEGIN result := 5.4;
  13385. END Test.
  13386. negative: constant long real to variable long integer assignment
  13387. MODULE Test;
  13388. VAR result: LONGINT;
  13389. BEGIN result := 5.4D100;
  13390. END Test.
  13391. negative: constant set to variable long integer assignment
  13392. MODULE Test;
  13393. VAR result: LONGINT;
  13394. BEGIN result := {5};
  13395. END Test.
  13396. negative: string to variable long integer assignment
  13397. MODULE Test;
  13398. VAR result: LONGINT;
  13399. BEGIN result := "string";
  13400. END Test.
  13401. negative: nil pointer to variable long integer assignment
  13402. MODULE Test;
  13403. VAR result: LONGINT;
  13404. BEGIN result := NIL;
  13405. END Test.
  13406. negative: procedure to variable long integer assignment
  13407. MODULE Test;
  13408. VAR result: LONGINT;
  13409. PROCEDURE Procedure; END Procedure;
  13410. BEGIN result := Procedure;
  13411. END Test.
  13412. negative: constant boolean to variable huge integer assignment
  13413. MODULE Test;
  13414. VAR result: HUGEINT;
  13415. BEGIN result := TRUE;
  13416. END Test.
  13417. negative: constant character to variable huge integer assignment
  13418. MODULE Test;
  13419. VAR result: HUGEINT;
  13420. BEGIN result := 'f';
  13421. END Test.
  13422. positive: constant short integer to variable huge integer assignment
  13423. MODULE Test;
  13424. VAR result: HUGEINT;
  13425. BEGIN result := 10H;
  13426. END Test.
  13427. negative: constant short integer to temporary huge integer assignment
  13428. MODULE Test;
  13429. VAR result: PROCEDURE (): HUGEINT;
  13430. BEGIN result () := 10H;
  13431. END Test.
  13432. positive: constant integer to variable huge integer assignment
  13433. MODULE Test;
  13434. VAR result: HUGEINT;
  13435. BEGIN result := 1000H;
  13436. END Test.
  13437. negative: constant integer to temporary huge integer assignment
  13438. MODULE Test;
  13439. VAR result: PROCEDURE (): HUGEINT;
  13440. BEGIN result () := 1000H;
  13441. END Test.
  13442. positive: constant long integer to variable huge integer assignment
  13443. MODULE Test;
  13444. VAR result: HUGEINT;
  13445. BEGIN result := 100000H;
  13446. END Test.
  13447. negative: constant long integer to temporary huge integer assignment
  13448. MODULE Test;
  13449. VAR result: PROCEDURE (): HUGEINT;
  13450. BEGIN result () := 100000H;
  13451. END Test.
  13452. positive: constant huge integer to variable huge integer assignment
  13453. MODULE Test;
  13454. VAR result: HUGEINT;
  13455. BEGIN result := 10000000000H;
  13456. END Test.
  13457. negative: constant huge integer to temporary huge integer assignment
  13458. MODULE Test;
  13459. VAR result: PROCEDURE (): HUGEINT;
  13460. BEGIN result () := 10000000000H;
  13461. END Test.
  13462. negative: constant real to variable huge integer assignment
  13463. MODULE Test;
  13464. VAR result: HUGEINT;
  13465. BEGIN result := 5.4;
  13466. END Test.
  13467. negative: constant long real to variable huge integer assignment
  13468. MODULE Test;
  13469. VAR result: HUGEINT;
  13470. BEGIN result := 5.4D100;
  13471. END Test.
  13472. negative: constant set to variable huge integer assignment
  13473. MODULE Test;
  13474. VAR result: HUGEINT;
  13475. BEGIN result := {5};
  13476. END Test.
  13477. negative: string to variable huge integer assignment
  13478. MODULE Test;
  13479. VAR result: HUGEINT;
  13480. BEGIN result := "string";
  13481. END Test.
  13482. negative: nil pointer to variable huge integer assignment
  13483. MODULE Test;
  13484. VAR result: HUGEINT;
  13485. BEGIN result := NIL;
  13486. END Test.
  13487. negative: procedure to variable huge integer assignment
  13488. MODULE Test;
  13489. VAR result: HUGEINT;
  13490. PROCEDURE Procedure; END Procedure;
  13491. BEGIN result := Procedure;
  13492. END Test.
  13493. negative: constant boolean to variable real assignment
  13494. MODULE Test;
  13495. VAR result: REAL;
  13496. BEGIN result := TRUE;
  13497. END Test.
  13498. negative: constant character to variable real assignment
  13499. MODULE Test;
  13500. VAR result: REAL;
  13501. BEGIN result := 'f';
  13502. END Test.
  13503. positive: constant short integer to variable real assignment
  13504. MODULE Test;
  13505. VAR result: REAL;
  13506. BEGIN result := 10H;
  13507. END Test.
  13508. negative: constant short integer to temporary real assignment
  13509. MODULE Test;
  13510. VAR result: PROCEDURE (): REAL;
  13511. BEGIN result () := 10H;
  13512. END Test.
  13513. positive: constant integer to variable real assignment
  13514. MODULE Test;
  13515. VAR result: REAL;
  13516. BEGIN result := 1000H;
  13517. END Test.
  13518. negative: constant integer to temporary real assignment
  13519. MODULE Test;
  13520. VAR result: PROCEDURE (): REAL;
  13521. BEGIN result () := 1000H;
  13522. END Test.
  13523. positive: constant long integer to variable real assignment
  13524. MODULE Test;
  13525. VAR result: REAL;
  13526. BEGIN result := 100000H;
  13527. END Test.
  13528. negative: constant long integer to temporary real assignment
  13529. MODULE Test;
  13530. VAR result: PROCEDURE (): REAL;
  13531. BEGIN result () := 100000H;
  13532. END Test.
  13533. positive: constant huge integer to variable real assignment
  13534. MODULE Test;
  13535. VAR result: REAL;
  13536. BEGIN result := 10000000000H;
  13537. END Test.
  13538. negative: constant huge integer to temporary real assignment
  13539. MODULE Test;
  13540. VAR result: PROCEDURE (): REAL;
  13541. BEGIN result () := 10000000000H;
  13542. END Test.
  13543. positive: constant real to variable real assignment
  13544. MODULE Test;
  13545. VAR result: REAL;
  13546. BEGIN result := 5.4;
  13547. END Test.
  13548. negative: constant real to temporary real assignment
  13549. MODULE Test;
  13550. VAR result: PROCEDURE (): REAL;
  13551. BEGIN result () := 5.4;
  13552. END Test.
  13553. negative: constant long real to variable real assignment
  13554. MODULE Test;
  13555. VAR result: REAL;
  13556. BEGIN result := 5.4D100;
  13557. END Test.
  13558. negative: constant set to variable real assignment
  13559. MODULE Test;
  13560. VAR result: REAL;
  13561. BEGIN result := {5};
  13562. END Test.
  13563. negative: string to variable real assignment
  13564. MODULE Test;
  13565. VAR result: REAL;
  13566. BEGIN result := "string";
  13567. END Test.
  13568. negative: nil pointer to variable real assignment
  13569. MODULE Test;
  13570. VAR result: REAL;
  13571. BEGIN result := NIL;
  13572. END Test.
  13573. negative: procedure to variable real assignment
  13574. MODULE Test;
  13575. VAR result: REAL;
  13576. PROCEDURE Procedure; END Procedure;
  13577. BEGIN result := Procedure;
  13578. END Test.
  13579. negative: constant boolean to variable long real assignment
  13580. MODULE Test;
  13581. VAR result: LONGREAL;
  13582. BEGIN result := TRUE;
  13583. END Test.
  13584. negative: constant character to variable long real assignment
  13585. MODULE Test;
  13586. VAR result: LONGREAL;
  13587. BEGIN result := 'f';
  13588. END Test.
  13589. positive: constant short integer to variable long real assignment
  13590. MODULE Test;
  13591. VAR result: LONGREAL;
  13592. BEGIN result := 10H;
  13593. END Test.
  13594. negative: constant short integer to temporary long real assignment
  13595. MODULE Test;
  13596. VAR result: PROCEDURE (): LONGREAL;
  13597. BEGIN result () := 10H;
  13598. END Test.
  13599. positive: constant integer to variable long real assignment
  13600. MODULE Test;
  13601. VAR result: LONGREAL;
  13602. BEGIN result := 1000H;
  13603. END Test.
  13604. negative: constant integer to temporary long real assignment
  13605. MODULE Test;
  13606. VAR result: PROCEDURE (): LONGREAL;
  13607. BEGIN result () := 1000H;
  13608. END Test.
  13609. positive: constant long integer to variable long real assignment
  13610. MODULE Test;
  13611. VAR result: LONGREAL;
  13612. BEGIN result := 100000H;
  13613. END Test.
  13614. negative: constant long integer to temporary long real assignment
  13615. MODULE Test;
  13616. VAR result: PROCEDURE (): LONGREAL;
  13617. BEGIN result () := 100000H;
  13618. END Test.
  13619. positive: constant huge integer to variable long real assignment
  13620. MODULE Test;
  13621. VAR result: LONGREAL;
  13622. BEGIN result := 10000000000H;
  13623. END Test.
  13624. negative: constant huge integer to temporary long real assignment
  13625. MODULE Test;
  13626. VAR result: PROCEDURE (): LONGREAL;
  13627. BEGIN result () := 10000000000H;
  13628. END Test.
  13629. positive: constant real to variable long real assignment
  13630. MODULE Test;
  13631. VAR result: LONGREAL;
  13632. BEGIN result := 5.4;
  13633. END Test.
  13634. negative: constant real to temporary long real assignment
  13635. MODULE Test;
  13636. VAR result: PROCEDURE (): LONGREAL;
  13637. BEGIN result () := 5.4;
  13638. END Test.
  13639. positive: constant long real to variable long real assignment
  13640. MODULE Test;
  13641. VAR result: LONGREAL;
  13642. BEGIN result := 5.4D100;
  13643. END Test.
  13644. negative: constant long real to temporary long real assignment
  13645. MODULE Test;
  13646. VAR result: PROCEDURE (): LONGREAL;
  13647. BEGIN result () := 5.4D100;
  13648. END Test.
  13649. negative: constant set to variable long real assignment
  13650. MODULE Test;
  13651. VAR result: LONGREAL;
  13652. BEGIN result := {5};
  13653. END Test.
  13654. negative: string to variable long real assignment
  13655. MODULE Test;
  13656. VAR result: LONGREAL;
  13657. BEGIN result := "string";
  13658. END Test.
  13659. negative: nil pointer to variable long real assignment
  13660. MODULE Test;
  13661. VAR result: LONGREAL;
  13662. BEGIN result := NIL;
  13663. END Test.
  13664. negative: procedure to variable long real assignment
  13665. MODULE Test;
  13666. VAR result: LONGREAL;
  13667. PROCEDURE Procedure; END Procedure;
  13668. BEGIN result := Procedure;
  13669. END Test.
  13670. negative: constant boolean to variable set assignment
  13671. MODULE Test;
  13672. VAR result: SET;
  13673. BEGIN result := TRUE;
  13674. END Test.
  13675. negative: constant character to variable set assignment
  13676. MODULE Test;
  13677. VAR result: SET;
  13678. BEGIN result := 'f';
  13679. END Test.
  13680. negative: constant short integer to variable set assignment
  13681. MODULE Test;
  13682. VAR result: SET;
  13683. BEGIN result := 10H;
  13684. END Test.
  13685. negative: constant integer to variable set assignment
  13686. MODULE Test;
  13687. VAR result: SET;
  13688. BEGIN result := 1000H;
  13689. END Test.
  13690. negative: constant long integer to variable set assignment
  13691. MODULE Test;
  13692. VAR result: SET;
  13693. BEGIN result := 100000H;
  13694. END Test.
  13695. negative: constant huge integer to variable set assignment
  13696. MODULE Test;
  13697. VAR result: SET;
  13698. BEGIN result := 10000000000H;
  13699. END Test.
  13700. negative: constant real to variable set assignment
  13701. MODULE Test;
  13702. VAR result: SET;
  13703. BEGIN result := 5.4;
  13704. END Test.
  13705. negative: constant long real to variable set assignment
  13706. MODULE Test;
  13707. VAR result: SET;
  13708. BEGIN result := 5.4D100;
  13709. END Test.
  13710. positive: constant set to variable set assignment
  13711. MODULE Test;
  13712. VAR result: SET;
  13713. BEGIN result := {5};
  13714. END Test.
  13715. negative: constant set to temporary set assignment
  13716. MODULE Test;
  13717. VAR result: PROCEDURE (): SET;
  13718. BEGIN result () := {5};
  13719. END Test.
  13720. negative: string to variable set assignment
  13721. MODULE Test;
  13722. VAR result: SET;
  13723. BEGIN result := "string";
  13724. END Test.
  13725. negative: nil pointer to variable set assignment
  13726. MODULE Test;
  13727. VAR result: SET;
  13728. BEGIN result := NIL;
  13729. END Test.
  13730. negative: procedure to variable set assignment
  13731. MODULE Test;
  13732. VAR result: SET;
  13733. PROCEDURE Procedure; END Procedure;
  13734. BEGIN result := Procedure;
  13735. END Test.
  13736. negative: constant boolean to variable array assignment
  13737. MODULE Test;
  13738. VAR result: ARRAY 10 OF CHAR;
  13739. BEGIN result := TRUE;
  13740. END Test.
  13741. #temporarily removed
  13742. #negative: constant character to variable array assignment
  13743. #
  13744. # MODULE Test;
  13745. # VAR result: ARRAY 10 OF CHAR;
  13746. # BEGIN result := 'f';
  13747. # END Test.
  13748. negative: constant short integer to variable array assignment
  13749. MODULE Test;
  13750. VAR result: ARRAY 10 OF CHAR;
  13751. BEGIN result := 10H;
  13752. END Test.
  13753. negative: constant integer to variable array assignment
  13754. MODULE Test;
  13755. VAR result: ARRAY 10 OF CHAR;
  13756. BEGIN result := 1000H;
  13757. END Test.
  13758. negative: constant long integer to variable array assignment
  13759. MODULE Test;
  13760. VAR result: ARRAY 10 OF CHAR;
  13761. BEGIN result := 100000H;
  13762. END Test.
  13763. negative: constant huge integer to variable array assignment
  13764. MODULE Test;
  13765. VAR result: ARRAY 10 OF CHAR;
  13766. BEGIN result := 10000000000H;
  13767. END Test.
  13768. negative: constant real to variable array assignment
  13769. MODULE Test;
  13770. VAR result: ARRAY 10 OF CHAR;
  13771. BEGIN result := 5.4;
  13772. END Test.
  13773. negative: constant long real to variable array assignment
  13774. MODULE Test;
  13775. VAR result: ARRAY 10 OF CHAR;
  13776. BEGIN result := 5.4D100;
  13777. END Test.
  13778. negative: constant set to variable array assignment
  13779. MODULE Test;
  13780. VAR result: ARRAY 10 OF CHAR;
  13781. BEGIN result := {5};
  13782. END Test.
  13783. negative: string to variable array of boolean assignment
  13784. MODULE Test;
  13785. VAR result: ARRAY 10 OF BOOLEAN;
  13786. BEGIN result := "string";
  13787. END Test.
  13788. positive: string to longer variable array of character assignment
  13789. MODULE Test;
  13790. VAR result: ARRAY 10 OF CHAR;
  13791. BEGIN result := "string";
  13792. END Test.
  13793. negative: string to longer temporary array of character assignment
  13794. MODULE Test;
  13795. VAR result: PROCEDURE (): ARRAY 10 OF CHAR;
  13796. BEGIN result () := "string";
  13797. END Test.
  13798. positive: string to variable array of character of equal size assignment
  13799. MODULE Test;
  13800. VAR result: ARRAY 7 OF CHAR;
  13801. BEGIN result := "string";
  13802. END Test.
  13803. negative: string to temporary array of equal size assignment
  13804. MODULE Test;
  13805. VAR result: PROCEDURE (): ARRAY 7 OF CHAR;
  13806. BEGIN result () := "string";
  13807. END Test.
  13808. negative: string to shorter variable array of character assignment
  13809. MODULE Test;
  13810. VAR result: ARRAY 6 OF CHAR;
  13811. BEGIN result := "string";
  13812. END Test.
  13813. negative: string to variable array of short integer assignment
  13814. MODULE Test;
  13815. VAR result: ARRAY 10 OF SHORTINT;
  13816. BEGIN result := "string";
  13817. END Test.
  13818. negative: string to variable array of integer assignment
  13819. MODULE Test;
  13820. VAR result: ARRAY 10 OF INTEGER;
  13821. BEGIN result := "string";
  13822. END Test.
  13823. negative: string to variable array of long integer assignment
  13824. MODULE Test;
  13825. VAR result: ARRAY 10 OF LONGINT;
  13826. BEGIN result := "string";
  13827. END Test.
  13828. negative: string to variable array of huge integer assignment
  13829. MODULE Test;
  13830. VAR result: ARRAY 10 OF HUGEINT;
  13831. BEGIN result := "string";
  13832. END Test.
  13833. negative: string to variable array of real assignment
  13834. MODULE Test;
  13835. VAR result: ARRAY 10 OF REAL;
  13836. BEGIN result := "string";
  13837. END Test.
  13838. negative: string to variable array of long real assignment
  13839. MODULE Test;
  13840. VAR result: ARRAY 10 OF LONGREAL;
  13841. BEGIN result := "string";
  13842. END Test.
  13843. negative: string to variable array of set assignment
  13844. MODULE Test;
  13845. VAR result: ARRAY 10 OF SET;
  13846. BEGIN result := "string";
  13847. END Test.
  13848. negative: string to variable array of array assignment
  13849. MODULE Test;
  13850. VAR result: ARRAY 10 OF ARRAY 10 OF CHAR;
  13851. BEGIN result := "string";
  13852. END Test.
  13853. negative: string to variable array of record assignment
  13854. MODULE Test;
  13855. VAR result: ARRAY 10 OF RECORD END;
  13856. BEGIN result := "string";
  13857. END Test.
  13858. negative: string to variable array of object assignment
  13859. MODULE Test;
  13860. VAR result: ARRAY 10 OF OBJECT END;
  13861. BEGIN result := "string";
  13862. END Test.
  13863. negative: string to variable array of pointer assignment
  13864. MODULE Test;
  13865. VAR result: ARRAY 10 OF POINTER TO RECORD END;
  13866. BEGIN result := "string";
  13867. END Test.
  13868. negative: string to variable array of procedure assignment
  13869. MODULE Test;
  13870. VAR result: ARRAY 10 OF PROCEDURE;
  13871. BEGIN result := "string";
  13872. END Test.
  13873. negative: nil pointer to variable array assignment
  13874. MODULE Test;
  13875. VAR result: ARRAY 10 OF CHAR;
  13876. BEGIN result := NIL;
  13877. END Test.
  13878. negative: procedure to variable array assignment
  13879. MODULE Test;
  13880. VAR result: ARRAY 10 OF PROCEDURE;
  13881. PROCEDURE Procedure; END Procedure;
  13882. BEGIN result := Procedure;
  13883. END Test.
  13884. negative: constant boolean to record assignment
  13885. MODULE Test;
  13886. VAR result: RECORD END;
  13887. BEGIN result := TRUE;
  13888. END Test.
  13889. negative: constant character to record assignment
  13890. MODULE Test;
  13891. VAR result: RECORD END;
  13892. BEGIN result := 'f';
  13893. END Test.
  13894. negative: constant short integer to record assignment
  13895. MODULE Test;
  13896. VAR result: RECORD END;
  13897. BEGIN result := 10H;
  13898. END Test.
  13899. negative: constant integer to record assignment
  13900. MODULE Test;
  13901. VAR result: RECORD END;
  13902. BEGIN result := 1000H;
  13903. END Test.
  13904. negative: constant long integer to record assignment
  13905. MODULE Test;
  13906. VAR result: RECORD END;
  13907. BEGIN result := 100000H;
  13908. END Test.
  13909. negative: constant huge integer to record assignment
  13910. MODULE Test;
  13911. VAR result: RECORD END;
  13912. BEGIN result := 10000000000H;
  13913. END Test.
  13914. negative: constant real to record assignment
  13915. MODULE Test;
  13916. VAR result: RECORD END;
  13917. BEGIN result := 5.4;
  13918. END Test.
  13919. negative: constant long real to record assignment
  13920. MODULE Test;
  13921. VAR result: RECORD END;
  13922. BEGIN result := 5.4D100;
  13923. END Test.
  13924. negative: constant set to record assignment
  13925. MODULE Test;
  13926. VAR result: RECORD END;
  13927. BEGIN result := {5};
  13928. END Test.
  13929. negative: string to record assignment
  13930. MODULE Test;
  13931. VAR result: RECORD END;
  13932. BEGIN result := "string";
  13933. END Test.
  13934. negative: nil pointer to record assignment
  13935. MODULE Test;
  13936. VAR result: RECORD END;
  13937. BEGIN result := NIL;
  13938. END Test.
  13939. negative: procedure to record assignment
  13940. MODULE Test;
  13941. VAR result: RECORD END;
  13942. PROCEDURE Procedure; END Procedure;
  13943. BEGIN result := Procedure;
  13944. END Test.
  13945. negative: constant boolean to object assignment
  13946. MODULE Test;
  13947. VAR result: OBJECT END;
  13948. BEGIN result := TRUE;
  13949. END Test.
  13950. negative: constant character to object assignment
  13951. MODULE Test;
  13952. VAR result: OBJECT END;
  13953. BEGIN result := 'f';
  13954. END Test.
  13955. negative: constant short integer to object assignment
  13956. MODULE Test;
  13957. VAR result: OBJECT END;
  13958. BEGIN result := 10H;
  13959. END Test.
  13960. negative: constant integer to object assignment
  13961. MODULE Test;
  13962. VAR result: OBJECT END;
  13963. BEGIN result := 1000H;
  13964. END Test.
  13965. negative: constant long integer to object assignment
  13966. MODULE Test;
  13967. VAR result: OBJECT END;
  13968. BEGIN result := 100000H;
  13969. END Test.
  13970. negative: constant huge integer to object assignment
  13971. MODULE Test;
  13972. VAR result: OBJECT END;
  13973. BEGIN result := 10000000000H;
  13974. END Test.
  13975. negative: constant real to object assignment
  13976. MODULE Test;
  13977. VAR result: OBJECT END;
  13978. BEGIN result := 5.4;
  13979. END Test.
  13980. negative: constant long real to object assignment
  13981. MODULE Test;
  13982. VAR result: OBJECT END;
  13983. BEGIN result := 5.4D100;
  13984. END Test.
  13985. negative: constant set to object assignment
  13986. MODULE Test;
  13987. VAR result: OBJECT END;
  13988. BEGIN result := {5};
  13989. END Test.
  13990. negative: string to object assignment
  13991. MODULE Test;
  13992. VAR result: OBJECT END;
  13993. BEGIN result := "string";
  13994. END Test.
  13995. positive: nil pointer to object assignment
  13996. MODULE Test;
  13997. VAR result: OBJECT END;
  13998. BEGIN result := NIL;
  13999. END Test.
  14000. negative: nil pointer to temporary object assignment
  14001. MODULE Test;
  14002. VAR result: PROCEDURE (): OBJECT END;
  14003. BEGIN result () := NIL;
  14004. END Test.
  14005. negative: procedure to object assignment
  14006. MODULE Test;
  14007. VAR result: OBJECT END;
  14008. PROCEDURE Procedure; END Procedure;
  14009. BEGIN result := Procedure;
  14010. END Test.
  14011. negative: constant boolean to pointer assignment
  14012. MODULE Test;
  14013. VAR result: POINTER TO RECORD END;
  14014. BEGIN result := TRUE;
  14015. END Test.
  14016. negative: constant character to pointer assignment
  14017. MODULE Test;
  14018. VAR result: POINTER TO RECORD END;
  14019. BEGIN result := 'f';
  14020. END Test.
  14021. negative: constant short integer to pointer assignment
  14022. MODULE Test;
  14023. VAR result: POINTER TO RECORD END;
  14024. BEGIN result := 10H;
  14025. END Test.
  14026. negative: constant integer to pointer assignment
  14027. MODULE Test;
  14028. VAR result: POINTER TO RECORD END;
  14029. BEGIN result := 1000H;
  14030. END Test.
  14031. negative: constant long integer to pointer assignment
  14032. MODULE Test;
  14033. VAR result: POINTER TO RECORD END;
  14034. BEGIN result := 100000H;
  14035. END Test.
  14036. negative: constant huge integer to pointer assignment
  14037. MODULE Test;
  14038. VAR result: POINTER TO RECORD END;
  14039. BEGIN result := 10000000000H;
  14040. END Test.
  14041. negative: constant real to pointer assignment
  14042. MODULE Test;
  14043. VAR result: POINTER TO RECORD END;
  14044. BEGIN result := 5.4;
  14045. END Test.
  14046. negative: constant long real to pointer assignment
  14047. MODULE Test;
  14048. VAR result: POINTER TO RECORD END;
  14049. BEGIN result := 5.4D100;
  14050. END Test.
  14051. negative: constant set to pointer assignment
  14052. MODULE Test;
  14053. VAR result: POINTER TO RECORD END;
  14054. BEGIN result := {5};
  14055. END Test.
  14056. negative: string to pointer assignment
  14057. MODULE Test;
  14058. VAR result: POINTER TO RECORD END;
  14059. BEGIN result := "string";
  14060. END Test.
  14061. positive: nil pointer to pointer assignment
  14062. MODULE Test;
  14063. VAR result: POINTER TO RECORD END;
  14064. BEGIN result := NIL;
  14065. END Test.
  14066. negative: nil pointer to temporary pointer assignment
  14067. MODULE Test;
  14068. VAR result: PROCEDURE (): POINTER TO RECORD END;
  14069. BEGIN result () := NIL;
  14070. END Test.
  14071. negative: procedure to pointer assignment
  14072. MODULE Test;
  14073. VAR result: POINTER TO RECORD END;
  14074. PROCEDURE Procedure; END Procedure;
  14075. BEGIN result := Procedure;
  14076. END Test.
  14077. negative: constant boolean to procedure assignment
  14078. MODULE Test;
  14079. VAR result: PROCEDURE;
  14080. BEGIN result := TRUE;
  14081. END Test.
  14082. negative: constant character to procedure assignment
  14083. MODULE Test;
  14084. VAR result: PROCEDURE;
  14085. BEGIN result := 'f';
  14086. END Test.
  14087. negative: constant short integer to procedure assignment
  14088. MODULE Test;
  14089. VAR result: PROCEDURE;
  14090. BEGIN result := 10H;
  14091. END Test.
  14092. negative: constant integer to procedure assignment
  14093. MODULE Test;
  14094. VAR result: PROCEDURE;
  14095. BEGIN result := 1000H;
  14096. END Test.
  14097. negative: constant long integer to procedure assignment
  14098. MODULE Test;
  14099. VAR result: PROCEDURE;
  14100. BEGIN result := 100000H;
  14101. END Test.
  14102. negative: constant huge integer to procedure assignment
  14103. MODULE Test;
  14104. VAR result: PROCEDURE;
  14105. BEGIN result := 10000000000H;
  14106. END Test.
  14107. negative: constant real to procedure assignment
  14108. MODULE Test;
  14109. VAR result: PROCEDURE;
  14110. BEGIN result := 5.4;
  14111. END Test.
  14112. negative: constant long real to procedure assignment
  14113. MODULE Test;
  14114. VAR result: PROCEDURE;
  14115. BEGIN result := 5.4D100;
  14116. END Test.
  14117. negative: constant set to procedure assignment
  14118. MODULE Test;
  14119. VAR result: PROCEDURE;
  14120. BEGIN result := {5};
  14121. END Test.
  14122. negative: string to procedure assignment
  14123. MODULE Test;
  14124. VAR result: PROCEDURE;
  14125. BEGIN result := "string";
  14126. END Test.
  14127. positive: nil pointer to procedure assignment
  14128. MODULE Test;
  14129. VAR result: PROCEDURE;
  14130. BEGIN result := NIL;
  14131. END Test.
  14132. negative: nil pointer to temporary procedure assignment
  14133. MODULE Test;
  14134. VAR result: PROCEDURE (): PROCEDURE;
  14135. BEGIN result () := NIL;
  14136. END Test.
  14137. positive: procedure with one equal parameter to procedure assignment
  14138. MODULE Test;
  14139. VAR result: PROCEDURE (a: INTEGER);
  14140. PROCEDURE Procedure (b: INTEGER); END Procedure;
  14141. BEGIN result := Procedure;
  14142. END Test.
  14143. negative: procedure with one compatible parameter to procedure assignment
  14144. MODULE Test;
  14145. VAR result: PROCEDURE (a: INTEGER);
  14146. PROCEDURE Procedure (b: LONGINT); END Procedure;
  14147. BEGIN result := Procedure;
  14148. END Test.
  14149. negative: procedure with one incompatible parameter to procedure assignment
  14150. MODULE Test;
  14151. VAR result: PROCEDURE (a: SET);
  14152. PROCEDURE Procedure (b: LONGINT); END Procedure;
  14153. BEGIN result := Procedure;
  14154. END Test.
  14155. negative: procedure with one equal variable parameter to procedure assignment
  14156. MODULE Test;
  14157. VAR result: PROCEDURE (VAR a: INTEGER);
  14158. PROCEDURE Procedure (b: INTEGER); END Procedure;
  14159. BEGIN result := Procedure;
  14160. END Test.
  14161. negative: procedure with one equal constant parameter to procedure assignment
  14162. MODULE Test;
  14163. VAR result: PROCEDURE (CONST a: INTEGER);
  14164. PROCEDURE Procedure (b: INTEGER); END Procedure;
  14165. BEGIN result := Procedure;
  14166. END Test.
  14167. positive: procedure with two equal parameters to procedure assignment
  14168. MODULE Test;
  14169. VAR result: PROCEDURE (a, b: INTEGER);
  14170. PROCEDURE Procedure (c, d: INTEGER); END Procedure;
  14171. BEGIN result := Procedure;
  14172. END Test.
  14173. negative: procedure with two compatible parameters to procedure assignment
  14174. MODULE Test;
  14175. VAR result: PROCEDURE (a, b: INTEGER);
  14176. PROCEDURE Procedure (c, d: LONGINT); END Procedure;
  14177. BEGIN result := Procedure;
  14178. END Test.
  14179. negative: procedure with two incompatible parameters to procedure assignment
  14180. MODULE Test;
  14181. VAR result: PROCEDURE (a, b: SET);
  14182. PROCEDURE Procedure (c, d: LONGINT); END Procedure;
  14183. BEGIN result := Procedure;
  14184. END Test.
  14185. negative: procedure with two equal variable parameters to procedure assignment
  14186. MODULE Test;
  14187. VAR result: PROCEDURE (VAR a, b: INTEGER);
  14188. PROCEDURE Procedure (c, d: INTEGER); END Procedure;
  14189. BEGIN result := Procedure;
  14190. END Test.
  14191. negative: procedure with two equal constant parameters to procedure assignment
  14192. MODULE Test;
  14193. VAR result: PROCEDURE (CONST a, b: INTEGER);
  14194. PROCEDURE Procedure (c, d: INTEGER); END Procedure;
  14195. BEGIN result := Procedure;
  14196. END Test.
  14197. positive: procedure with several equal parameters to procedure assignment
  14198. MODULE Test;
  14199. VAR result: PROCEDURE (CONST a: SET; VAR i: INTEGER; o: OBJECT);
  14200. PROCEDURE Procedure (CONST a: SET; VAR i: INTEGER; o: OBJECT); END Procedure;
  14201. BEGIN result := Procedure;
  14202. END Test.
  14203. positive: procedure with equal return type to procedure assignment
  14204. MODULE Test;
  14205. VAR result: PROCEDURE (): INTEGER;
  14206. PROCEDURE Procedure (): INTEGER; BEGIN RETURN 0 END Procedure;
  14207. BEGIN result := Procedure;
  14208. END Test.
  14209. negative: procedure with compatible return type to procedure assignment
  14210. MODULE Test;
  14211. VAR result: PROCEDURE (): LONGINT;
  14212. PROCEDURE Procedure (): INTEGER; BEGIN RETURN 0 END Procedure;
  14213. BEGIN result := Procedure;
  14214. END Test.
  14215. negative: procedure with incompatible return type to procedure assignment
  14216. MODULE Test;
  14217. VAR result: PROCEDURE (): SET;
  14218. PROCEDURE Procedure (): INTEGER; BEGIN RETURN 0 END Procedure;
  14219. BEGIN result := Procedure;
  14220. END Test.
  14221. positive: procedure with several equal parameters and equal return type to procedure assignment
  14222. MODULE Test;
  14223. TYPE Record = RECORD END;
  14224. VAR result: PROCEDURE (CONST a: SET; VAR i: INTEGER; o: OBJECT): POINTER TO Record;
  14225. PROCEDURE Procedure (CONST a: SET; VAR i: INTEGER; o: OBJECT): POINTER TO Record; END Procedure;
  14226. BEGIN result := Procedure;
  14227. END Test.
  14228. positive: dummy module for import assignments
  14229. MODULE Dummy; END Dummy.
  14230. negative: constant boolean to import assignment
  14231. MODULE Test;
  14232. IMPORT result := Dummy;
  14233. BEGIN result := TRUE;
  14234. END Test.
  14235. negative: constant character to import assignment
  14236. MODULE Test;
  14237. IMPORT result := Dummy;
  14238. BEGIN result := 'f';
  14239. END Test.
  14240. negative: constant short integer to import assignment
  14241. MODULE Test;
  14242. IMPORT result := Dummy;
  14243. BEGIN result := 10H;
  14244. END Test.
  14245. negative: constant integer to import assignment
  14246. MODULE Test;
  14247. IMPORT result := Dummy;
  14248. BEGIN result := 1000H;
  14249. END Test.
  14250. negative: constant long integer to import assignment
  14251. MODULE Test;
  14252. IMPORT result := Dummy;
  14253. BEGIN result := 100000H;
  14254. END Test.
  14255. negative: constant huge integer to import assignment
  14256. MODULE Test;
  14257. IMPORT result := Dummy;
  14258. BEGIN result := 10000000000H;
  14259. END Test.
  14260. negative: constant real to import assignment
  14261. MODULE Test;
  14262. IMPORT result := Dummy;
  14263. BEGIN result := 5.4;
  14264. END Test.
  14265. negative: constant long real to import assignment
  14266. MODULE Test;
  14267. IMPORT result := Dummy;
  14268. BEGIN result := 5.4D100;
  14269. END Test.
  14270. negative: constant set to import assignment
  14271. MODULE Test;
  14272. IMPORT result := Dummy;
  14273. BEGIN result := {5};
  14274. END Test.
  14275. negative: string to import assignment
  14276. MODULE Test;
  14277. IMPORT result := Dummy;
  14278. BEGIN result := "string";
  14279. END Test.
  14280. negative: nil pointer to import assignment
  14281. MODULE Test;
  14282. IMPORT result := Dummy;
  14283. BEGIN result := NIL;
  14284. END Test.
  14285. negative: procedure to import assignment
  14286. MODULE Test;
  14287. IMPORT result := Dummy;
  14288. PROCEDURE Procedure; END Procedure;
  14289. BEGIN result := Procedure;
  14290. END Test.
  14291. positive: nil pointer to references assignment
  14292. MODULE Test;
  14293. VAR o: OBJECT END; ob: OBJECT; ptr: POINTER TO RECORD END; p: PROCEDURE;
  14294. BEGIN o := NIL; ob := NIL; ptr := NIL; p := NIL;
  14295. END Test.
  14296. positive: indirect nil pointer to references assignment
  14297. MODULE Test;
  14298. CONST Nil = NIL;
  14299. VAR o: OBJECT END; ob: OBJECT; ptr: POINTER TO RECORD END; p: PROCEDURE;
  14300. BEGIN o := Nil; ob := Nil; ptr := Nil; p := Nil;
  14301. END Test.
  14302. positive: variable boolean to variable boolean assignment
  14303. MODULE Test;
  14304. VAR variable, result: BOOLEAN;
  14305. BEGIN result := variable;
  14306. END Test.
  14307. negative: variable boolean to temporary boolean assignment
  14308. MODULE Test;
  14309. VAR variable: BOOLEAN; result: PROCEDURE (): BOOLEAN;
  14310. BEGIN result () := variable;
  14311. END Test.
  14312. negative: variable character to variable boolean assignment
  14313. MODULE Test;
  14314. VAR variable: CHAR; result: BOOLEAN;
  14315. BEGIN result := variable;
  14316. END Test.
  14317. negative: variable short integer to variable boolean assignment
  14318. MODULE Test;
  14319. VAR variable: SHORTINT; result: BOOLEAN;
  14320. BEGIN result := variable;
  14321. END Test.
  14322. negative: variable integer to variable boolean assignment
  14323. MODULE Test;
  14324. VAR variable: INTEGER; result: BOOLEAN;
  14325. BEGIN result := variable;
  14326. END Test.
  14327. negative: variable long integer to variable boolean assignment
  14328. MODULE Test;
  14329. VAR variable: LONGINT; result: BOOLEAN;
  14330. BEGIN result := variable;
  14331. END Test.
  14332. negative: variable huge integer to variable boolean assignment
  14333. MODULE Test;
  14334. VAR variable: HUGEINT; result: BOOLEAN;
  14335. BEGIN result := variable;
  14336. END Test.
  14337. negative: variable real to variable boolean assignment
  14338. MODULE Test;
  14339. VAR variable: REAL; result: BOOLEAN;
  14340. BEGIN result := variable;
  14341. END Test.
  14342. negative: variable long real to variable boolean assignment
  14343. MODULE Test;
  14344. VAR variable: LONGREAL; result: BOOLEAN;
  14345. BEGIN result := variable;
  14346. END Test.
  14347. negative: variable set to variable boolean assignment
  14348. MODULE Test;
  14349. VAR variable: SET; result: BOOLEAN;
  14350. BEGIN result := variable;
  14351. END Test.
  14352. negative: array to variable boolean assignment
  14353. MODULE Test;
  14354. VAR variable: ARRAY 10 OF CHAR; result: BOOLEAN;
  14355. BEGIN result := variable;
  14356. END Test.
  14357. negative: record to variable boolean assignment
  14358. MODULE Test;
  14359. VAR variable: RECORD END; result: BOOLEAN;
  14360. BEGIN result := variable;
  14361. END Test.
  14362. negative: object to variable boolean assignment
  14363. MODULE Test;
  14364. VAR variable: OBJECT; result: BOOLEAN;
  14365. BEGIN result := variable;
  14366. END Test.
  14367. negative: pointer to variable boolean assignment
  14368. MODULE Test;
  14369. VAR variable: POINTER TO RECORD END; result: BOOLEAN;
  14370. BEGIN result := variable;
  14371. END Test.
  14372. negative: variable procedure to variable boolean assignment
  14373. MODULE Test;
  14374. VAR variable: PROCEDURE; result: BOOLEAN;
  14375. BEGIN result := variable;
  14376. END Test.
  14377. negative: import to variable boolean assignment
  14378. MODULE Test;
  14379. IMPORT variable := Dummy; VAR result: BOOLEAN;
  14380. BEGIN result := variable;
  14381. END Test.
  14382. negative: type to variable boolean assignment
  14383. MODULE Test;
  14384. TYPE Type = BOOLEAN; VAR result: Type;
  14385. BEGIN result := Type;
  14386. END Test.
  14387. negative: variable boolean to variable character assignment
  14388. MODULE Test;
  14389. VAR variable: BOOLEAN; result: CHAR;
  14390. BEGIN result := variable;
  14391. END Test.
  14392. positive: variable character to variable character assignment
  14393. MODULE Test;
  14394. VAR variable, result: CHAR;
  14395. BEGIN result := variable;
  14396. END Test.
  14397. negative: variable character to temporary character assignment
  14398. MODULE Test;
  14399. VAR variable: CHAR; result: PROCEDURE (): CHAR;
  14400. BEGIN result () := variable;
  14401. END Test.
  14402. negative: variable short integer to variable character assignment
  14403. MODULE Test;
  14404. VAR variable: SHORTINT; result: CHAR;
  14405. BEGIN result := variable;
  14406. END Test.
  14407. negative: variable integer to variable character assignment
  14408. MODULE Test;
  14409. VAR variable: INTEGER; result: CHAR;
  14410. BEGIN result := variable;
  14411. END Test.
  14412. negative: variable long integer to variable character assignment
  14413. MODULE Test;
  14414. VAR variable: LONGINT; result: CHAR;
  14415. BEGIN result := variable;
  14416. END Test.
  14417. negative: variable huge integer to variable character assignment
  14418. MODULE Test;
  14419. VAR variable: HUGEINT; result: CHAR;
  14420. BEGIN result := variable;
  14421. END Test.
  14422. negative: variable real to variable character assignment
  14423. MODULE Test;
  14424. VAR variable: REAL; result: CHAR;
  14425. BEGIN result := variable;
  14426. END Test.
  14427. negative: variable long real to variable character assignment
  14428. MODULE Test;
  14429. VAR variable: LONGREAL; result: CHAR;
  14430. BEGIN result := variable;
  14431. END Test.
  14432. negative: variable set to variable character assignment
  14433. MODULE Test;
  14434. VAR variable: SET; result: CHAR;
  14435. BEGIN result := variable;
  14436. END Test.
  14437. negative: array to variable character assignment
  14438. MODULE Test;
  14439. VAR variable: ARRAY 10 OF CHAR; result: CHAR;
  14440. BEGIN result := variable;
  14441. END Test.
  14442. negative: record to variable character assignment
  14443. MODULE Test;
  14444. VAR variable: RECORD END; result: CHAR;
  14445. BEGIN result := variable;
  14446. END Test.
  14447. negative: object to variable character assignment
  14448. MODULE Test;
  14449. VAR variable: OBJECT; result: CHAR;
  14450. BEGIN result := variable;
  14451. END Test.
  14452. negative: pointer to variable character assignment
  14453. MODULE Test;
  14454. VAR variable: POINTER TO RECORD END; result: CHAR;
  14455. BEGIN result := variable;
  14456. END Test.
  14457. negative: variable procedure to variable character assignment
  14458. MODULE Test;
  14459. VAR variable: PROCEDURE; result: CHAR;
  14460. BEGIN result := variable;
  14461. END Test.
  14462. negative: import to variable character assignment
  14463. MODULE Test;
  14464. IMPORT variable := Dummy; VAR result: CHAR;
  14465. BEGIN result := variable;
  14466. END Test.
  14467. negative: type to variable character assignment
  14468. MODULE Test;
  14469. TYPE Type = CHAR; VAR result: Type;
  14470. BEGIN result := Type;
  14471. END Test.
  14472. negative: variable boolean to variable short integer assignment
  14473. MODULE Test;
  14474. VAR variable: BOOLEAN; result: SHORTINT;
  14475. BEGIN result := variable;
  14476. END Test.
  14477. negative: variable character to variable short integer assignment
  14478. MODULE Test;
  14479. VAR variable: CHAR; result: SHORTINT;
  14480. BEGIN result := variable;
  14481. END Test.
  14482. positive: variable short integer to variable short integer assignment
  14483. MODULE Test;
  14484. VAR variable, result: SHORTINT;
  14485. BEGIN result := variable;
  14486. END Test.
  14487. negative: variable short integer to temporary short integer assignment
  14488. MODULE Test;
  14489. VAR variable: SHORTINT; result: PROCEDURE (): SHORTINT;
  14490. BEGIN result () := variable;
  14491. END Test.
  14492. negative: variable integer to variable short integer assignment
  14493. MODULE Test;
  14494. VAR variable: INTEGER; result: SHORTINT;
  14495. BEGIN result := variable;
  14496. END Test.
  14497. negative: variable long integer to variable short integer assignment
  14498. MODULE Test;
  14499. VAR variable: LONGINT; result: SHORTINT;
  14500. BEGIN result := variable;
  14501. END Test.
  14502. negative: variable huge integer to variable short integer assignment
  14503. MODULE Test;
  14504. VAR variable: HUGEINT; result: SHORTINT;
  14505. BEGIN result := variable;
  14506. END Test.
  14507. negative: variable real to variable short integer assignment
  14508. MODULE Test;
  14509. VAR variable: REAL; result: SHORTINT;
  14510. BEGIN result := variable;
  14511. END Test.
  14512. negative: variable long real to variable short integer assignment
  14513. MODULE Test;
  14514. VAR variable: LONGREAL; result: SHORTINT;
  14515. BEGIN result := variable;
  14516. END Test.
  14517. negative: variable set to variable short integer assignment
  14518. MODULE Test;
  14519. VAR variable: SET; result: SHORTINT;
  14520. BEGIN result := variable;
  14521. END Test.
  14522. negative: array to variable short integer assignment
  14523. MODULE Test;
  14524. VAR variable: ARRAY 10 OF CHAR; result: SHORTINT;
  14525. BEGIN result := variable;
  14526. END Test.
  14527. negative: record to variable short integer assignment
  14528. MODULE Test;
  14529. VAR variable: RECORD END; result: SHORTINT;
  14530. BEGIN result := variable;
  14531. END Test.
  14532. negative: object to variable short integer assignment
  14533. MODULE Test;
  14534. VAR variable: OBJECT; result: SHORTINT;
  14535. BEGIN result := variable;
  14536. END Test.
  14537. negative: pointer to variable short integer assignment
  14538. MODULE Test;
  14539. VAR variable: POINTER TO RECORD END; result: SHORTINT;
  14540. BEGIN result := variable;
  14541. END Test.
  14542. negative: variable procedure to variable short integer assignment
  14543. MODULE Test;
  14544. VAR variable: PROCEDURE; result: SHORTINT;
  14545. BEGIN result := variable;
  14546. END Test.
  14547. negative: import to variable short integer assignment
  14548. MODULE Test;
  14549. IMPORT variable := Dummy; VAR result: SHORTINT;
  14550. BEGIN result := variable;
  14551. END Test.
  14552. negative: type to variable short integer assignment
  14553. MODULE Test;
  14554. TYPE Type = SHORTINT; VAR result: Type;
  14555. BEGIN result := Type;
  14556. END Test.
  14557. negative: variable boolean to variable integer assignment
  14558. MODULE Test;
  14559. VAR variable: BOOLEAN; result: INTEGER;
  14560. BEGIN result := variable;
  14561. END Test.
  14562. negative: variable character to variable integer assignment
  14563. MODULE Test;
  14564. VAR variable: CHAR; result: INTEGER;
  14565. BEGIN result := variable;
  14566. END Test.
  14567. positive: variable short integer to variable integer assignment
  14568. MODULE Test;
  14569. VAR variable: SHORTINT; result: INTEGER;
  14570. BEGIN result := variable;
  14571. END Test.
  14572. negative: variable short integer to temporary integer assignment
  14573. MODULE Test;
  14574. VAR variable: SHORTINT; result: PROCEDURE (): INTEGER;
  14575. BEGIN result () := variable;
  14576. END Test.
  14577. positive: variable integer to variable integer assignment
  14578. MODULE Test;
  14579. VAR variable, result: INTEGER;
  14580. BEGIN result := variable;
  14581. END Test.
  14582. negative: variable integer to temporary integer assignment
  14583. MODULE Test;
  14584. VAR variable: INTEGER; result: PROCEDURE (): INTEGER;
  14585. BEGIN result () := variable;
  14586. END Test.
  14587. negative: variable long integer to variable integer assignment
  14588. MODULE Test;
  14589. VAR variable: LONGINT; result: INTEGER;
  14590. BEGIN result := variable;
  14591. END Test.
  14592. negative: variable huge integer to variable integer assignment
  14593. MODULE Test;
  14594. VAR variable: HUGEINT; result: INTEGER;
  14595. BEGIN result := variable;
  14596. END Test.
  14597. negative: variable real to variable integer assignment
  14598. MODULE Test;
  14599. VAR variable: REAL; result: INTEGER;
  14600. BEGIN result := variable;
  14601. END Test.
  14602. negative: variable long real to variable integer assignment
  14603. MODULE Test;
  14604. VAR variable: LONGREAL; result: INTEGER;
  14605. BEGIN result := variable;
  14606. END Test.
  14607. negative: variable set to variable integer assignment
  14608. MODULE Test;
  14609. VAR variable: SET; result: INTEGER;
  14610. BEGIN result := variable;
  14611. END Test.
  14612. negative: array to variable integer assignment
  14613. MODULE Test;
  14614. VAR variable: ARRAY 10 OF CHAR; result: INTEGER;
  14615. BEGIN result := variable;
  14616. END Test.
  14617. negative: record to variable integer assignment
  14618. MODULE Test;
  14619. VAR variable: RECORD END; result: INTEGER;
  14620. BEGIN result := variable;
  14621. END Test.
  14622. negative: object to variable integer assignment
  14623. MODULE Test;
  14624. VAR variable: OBJECT; result: INTEGER;
  14625. BEGIN result := variable;
  14626. END Test.
  14627. negative: pointer to variable integer assignment
  14628. MODULE Test;
  14629. VAR variable: POINTER TO RECORD END; result: INTEGER;
  14630. BEGIN result := variable;
  14631. END Test.
  14632. negative: variable eto variable integer assignment
  14633. MODULE Test;
  14634. VAR variable: PROCEDURE; result: INTEGER;
  14635. BEGIN result := variable;
  14636. END Test.
  14637. negative: import to variable integer assignment
  14638. MODULE Test;
  14639. IMPORT variable := Dummy; VAR result: INTEGER;
  14640. BEGIN result := variable;
  14641. END Test.
  14642. negative: type to variable integer assignment
  14643. MODULE Test;
  14644. TYPE Type = INTEGER; VAR result: Type;
  14645. BEGIN result := Type;
  14646. END Test.
  14647. negative: variable boolean to variable long integer assignment
  14648. MODULE Test;
  14649. VAR variable: BOOLEAN; result: LONGINT;
  14650. BEGIN result := variable;
  14651. END Test.
  14652. negative: variable character to variable long integer assignment
  14653. MODULE Test;
  14654. VAR variable: CHAR; result: LONGINT;
  14655. BEGIN result := variable;
  14656. END Test.
  14657. positive: variable short integer to variable long integer assignment
  14658. MODULE Test;
  14659. VAR variable: SHORTINT; result: LONGINT;
  14660. BEGIN result := variable;
  14661. END Test.
  14662. negative: variable short integer to temporary long integer assignment
  14663. MODULE Test;
  14664. VAR variable: SHORTINT; result: PROCEDURE (): LONGINT;
  14665. BEGIN result () := variable;
  14666. END Test.
  14667. positive: variable integer to variable long integer assignment
  14668. MODULE Test;
  14669. VAR variable: INTEGER; result: LONGINT;
  14670. BEGIN result := variable;
  14671. END Test.
  14672. negative: variable integer to temporary long integer assignment
  14673. MODULE Test;
  14674. VAR variable: INTEGER; result: PROCEDURE (): LONGINT;
  14675. BEGIN result () := variable;
  14676. END Test.
  14677. positive: variable long integer to variable long integer assignment
  14678. MODULE Test;
  14679. VAR variable, result: LONGINT;
  14680. BEGIN result := variable;
  14681. END Test.
  14682. negative: variable long integer to temporary long integer assignment
  14683. MODULE Test;
  14684. VAR variable: LONGINT; result: PROCEDURE (): LONGINT;
  14685. BEGIN result () := variable;
  14686. END Test.
  14687. negative: variable huge integer to variable long integer assignment
  14688. MODULE Test;
  14689. VAR variable: HUGEINT; result: LONGINT;
  14690. BEGIN result := variable;
  14691. END Test.
  14692. negative: variable real to variable long integer assignment
  14693. MODULE Test;
  14694. VAR variable: REAL; result: LONGINT;
  14695. BEGIN result := variable;
  14696. END Test.
  14697. negative: variable long real to variable long integer assignment
  14698. MODULE Test;
  14699. VAR variable: LONGREAL; result: LONGINT;
  14700. BEGIN result := variable;
  14701. END Test.
  14702. negative: variable set to variable long integer assignment
  14703. MODULE Test;
  14704. VAR variable: SET; result: LONGINT;
  14705. BEGIN result := variable;
  14706. END Test.
  14707. negative: array to variable long integer assignment
  14708. MODULE Test;
  14709. VAR variable: ARRAY 10 OF CHAR; result: LONGINT;
  14710. BEGIN result := variable;
  14711. END Test.
  14712. negative: record to variable long integer assignment
  14713. MODULE Test;
  14714. VAR variable: RECORD END; result: LONGINT;
  14715. BEGIN result := variable;
  14716. END Test.
  14717. negative: object to variable long integer assignment
  14718. MODULE Test;
  14719. VAR variable: OBJECT; result: LONGINT;
  14720. BEGIN result := variable;
  14721. END Test.
  14722. negative: pointer to variable long integer assignment
  14723. MODULE Test;
  14724. VAR variable: POINTER TO RECORD END; result: LONGINT;
  14725. BEGIN result := variable;
  14726. END Test.
  14727. negative: variable procedure to variable long integer assignment
  14728. MODULE Test;
  14729. VAR variable: PROCEDURE; result: LONGINT;
  14730. BEGIN result := variable;
  14731. END Test.
  14732. negative: import to variable long integer assignment
  14733. MODULE Test;
  14734. IMPORT variable := Dummy; VAR result: LONGINT;
  14735. BEGIN result := variable;
  14736. END Test.
  14737. negative: type to variable long integer assignment
  14738. MODULE Test;
  14739. TYPE Type = LONGINT; VAR result: Type;
  14740. BEGIN result := Type;
  14741. END Test.
  14742. negative: variable boolean to variable huge integer assignment
  14743. MODULE Test;
  14744. VAR variable: BOOLEAN; result: HUGEINT;
  14745. BEGIN result := variable;
  14746. END Test.
  14747. negative: variable character to variable huge integer assignment
  14748. MODULE Test;
  14749. VAR variable: CHAR; result: HUGEINT;
  14750. BEGIN result := variable;
  14751. END Test.
  14752. positive: variable short integer to variable huge integer assignment
  14753. MODULE Test;
  14754. VAR variable: SHORTINT; result: HUGEINT;
  14755. BEGIN result := variable;
  14756. END Test.
  14757. negative: variable short integer to temporary huge integer assignment
  14758. MODULE Test;
  14759. VAR variable: SHORTINT; result: PROCEDURE (): HUGEINT;
  14760. BEGIN result () := variable;
  14761. END Test.
  14762. positive: variable integer to variable huge integer assignment
  14763. MODULE Test;
  14764. VAR variable: INTEGER; result: HUGEINT;
  14765. BEGIN result := variable;
  14766. END Test.
  14767. negative: variable integer to temporary huge integer assignment
  14768. MODULE Test;
  14769. VAR variable: INTEGER; result: PROCEDURE (): HUGEINT;
  14770. BEGIN result () := variable;
  14771. END Test.
  14772. positive: variable long integer to variable huge integer assignment
  14773. MODULE Test;
  14774. VAR variable: LONGINT; result: HUGEINT;
  14775. BEGIN result := variable;
  14776. END Test.
  14777. negative: variable long integer to temporary huge integer assignment
  14778. MODULE Test;
  14779. VAR variable: LONGINT; result: PROCEDURE (): HUGEINT;
  14780. BEGIN result () := variable;
  14781. END Test.
  14782. positive: variable huge integer to variable huge integer assignment
  14783. MODULE Test;
  14784. VAR variable, result: HUGEINT;
  14785. BEGIN result := variable;
  14786. END Test.
  14787. negative: variable huge integer to temporary huge integer assignment
  14788. MODULE Test;
  14789. VAR variable: HUGEINT; result: PROCEDURE (): HUGEINT;
  14790. BEGIN result () := variable;
  14791. END Test.
  14792. negative: variable real to variable huge integer assignment
  14793. MODULE Test;
  14794. VAR variable: REAL; result: HUGEINT;
  14795. BEGIN result := variable;
  14796. END Test.
  14797. negative: variable long real to variable huge integer assignment
  14798. MODULE Test;
  14799. VAR variable: LONGREAL; result: HUGEINT;
  14800. BEGIN result := variable;
  14801. END Test.
  14802. negative: variable set to variable huge integer assignment
  14803. MODULE Test;
  14804. VAR variable: SET; result: HUGEINT;
  14805. BEGIN result := variable;
  14806. END Test.
  14807. negative: array to variable huge integer assignment
  14808. MODULE Test;
  14809. VAR variable: ARRAY 10 OF CHAR; result: HUGEINT;
  14810. BEGIN result := variable;
  14811. END Test.
  14812. negative: record to variable huge integer assignment
  14813. MODULE Test;
  14814. VAR variable: RECORD END; result: HUGEINT;
  14815. BEGIN result := variable;
  14816. END Test.
  14817. negative: object to variable huge integer assignment
  14818. MODULE Test;
  14819. VAR variable: OBJECT; result: HUGEINT;
  14820. BEGIN result := variable;
  14821. END Test.
  14822. negative: pointer to variable huge integer assignment
  14823. MODULE Test;
  14824. VAR variable: POINTER TO RECORD END; result: HUGEINT;
  14825. BEGIN result := variable;
  14826. END Test.
  14827. negative: variable procedure to variable huge integer assignment
  14828. MODULE Test;
  14829. VAR variable: PROCEDURE; result: HUGEINT;
  14830. BEGIN result := variable;
  14831. END Test.
  14832. negative: import to variable huge integer assignment
  14833. MODULE Test;
  14834. IMPORT variable := Dummy; VAR result: HUGEINT;
  14835. BEGIN result := variable;
  14836. END Test.
  14837. negative: type to variable huge integer assignment
  14838. MODULE Test;
  14839. TYPE Type = HUGEINT; VAR result: Type;
  14840. BEGIN result := Type;
  14841. END Test.
  14842. negative: variable boolean to variable real assignment
  14843. MODULE Test;
  14844. VAR variable: BOOLEAN; result: REAL;
  14845. BEGIN result := variable;
  14846. END Test.
  14847. negative: variable character to variable real assignment
  14848. MODULE Test;
  14849. VAR variable: CHAR; result: REAL;
  14850. BEGIN result := variable;
  14851. END Test.
  14852. positive: variable short integer to variable real assignment
  14853. MODULE Test;
  14854. VAR variable: SHORTINT; result: REAL;
  14855. BEGIN result := variable;
  14856. END Test.
  14857. negative: variable short integer to temporary real assignment
  14858. MODULE Test;
  14859. VAR variable: SHORTINT; result: PROCEDURE (): REAL;
  14860. BEGIN result () := variable;
  14861. END Test.
  14862. positive: variable integer to variable real assignment
  14863. MODULE Test;
  14864. VAR variable: INTEGER; result: REAL;
  14865. BEGIN result := variable;
  14866. END Test.
  14867. negative: variable integer to temporary real assignment
  14868. MODULE Test;
  14869. VAR variable: INTEGER; result: PROCEDURE (): REAL;
  14870. BEGIN result () := variable;
  14871. END Test.
  14872. positive: variable long integer to variable real assignment
  14873. MODULE Test;
  14874. VAR variable: LONGINT; result: REAL;
  14875. BEGIN result := variable;
  14876. END Test.
  14877. negative: variable long integer to temporary real assignment
  14878. MODULE Test;
  14879. VAR variable: LONGINT; result: PROCEDURE (): REAL;
  14880. BEGIN result () := variable;
  14881. END Test.
  14882. positive: variable huge integer to variable real assignment
  14883. MODULE Test;
  14884. VAR variable: HUGEINT; result: REAL;
  14885. BEGIN result := variable;
  14886. END Test.
  14887. negative: variable huge integer to temporary real assignment
  14888. MODULE Test;
  14889. VAR variable: HUGEINT; result: PROCEDURE (): REAL;
  14890. BEGIN result () := variable;
  14891. END Test.
  14892. positive: variable real to variable real assignment
  14893. MODULE Test;
  14894. VAR variable, result: REAL;
  14895. BEGIN result := variable;
  14896. END Test.
  14897. negative: variable real to temporary real assignment
  14898. MODULE Test;
  14899. VAR variable: REAL; result: PROCEDURE (): REAL;
  14900. BEGIN result () := variable;
  14901. END Test.
  14902. negative: variable long real to variable real assignment
  14903. MODULE Test;
  14904. VAR variable: LONGREAL; result: REAL;
  14905. BEGIN result := variable;
  14906. END Test.
  14907. negative: variable set to variable real assignment
  14908. MODULE Test;
  14909. VAR variable: SET; result: REAL;
  14910. BEGIN result := variable;
  14911. END Test.
  14912. negative: array to variable real assignment
  14913. MODULE Test;
  14914. VAR variable: ARRAY 10 OF CHAR; result: REAL;
  14915. BEGIN result := variable;
  14916. END Test.
  14917. negative: record to variable real assignment
  14918. MODULE Test;
  14919. VAR variable: RECORD END; result: REAL;
  14920. BEGIN result := variable;
  14921. END Test.
  14922. negative: object to variable real assignment
  14923. MODULE Test;
  14924. VAR variable: OBJECT; result: REAL;
  14925. BEGIN result := variable;
  14926. END Test.
  14927. negative: pointer to variable real assignment
  14928. MODULE Test;
  14929. VAR variable: POINTER TO RECORD END; result: REAL;
  14930. BEGIN result := variable;
  14931. END Test.
  14932. negative: variable procedure to variable real assignment
  14933. MODULE Test;
  14934. VAR variable: PROCEDURE; result: REAL;
  14935. BEGIN result := variable;
  14936. END Test.
  14937. negative: import to variable real assignment
  14938. MODULE Test;
  14939. IMPORT variable := Dummy; VAR result: REAL;
  14940. BEGIN result := variable;
  14941. END Test.
  14942. negative: type to variable real assignment
  14943. MODULE Test;
  14944. TYPE Type = REAL; VAR result: Type;
  14945. BEGIN result := Type;
  14946. END Test.
  14947. negative: variable boolean to variable long real assignment
  14948. MODULE Test;
  14949. VAR variable: BOOLEAN; result: LONGREAL;
  14950. BEGIN result := variable;
  14951. END Test.
  14952. negative: variable character to variable long real assignment
  14953. MODULE Test;
  14954. VAR variable: CHAR; result: LONGREAL;
  14955. BEGIN result := variable;
  14956. END Test.
  14957. positive: variable short integer to variable long real assignment
  14958. MODULE Test;
  14959. VAR variable: SHORTINT; result: LONGREAL;
  14960. BEGIN result := variable;
  14961. END Test.
  14962. negative: variable short integer to temporary long real assignment
  14963. MODULE Test;
  14964. VAR variable: SHORTINT; result: PROCEDURE (): LONGREAL;
  14965. BEGIN result () := variable;
  14966. END Test.
  14967. positive: variable integer to variable long real assignment
  14968. MODULE Test;
  14969. VAR variable: INTEGER; result: LONGREAL;
  14970. BEGIN result := variable;
  14971. END Test.
  14972. negative: variable integer to temporary long real assignment
  14973. MODULE Test;
  14974. VAR variable: INTEGER; result: PROCEDURE (): LONGREAL;
  14975. BEGIN result () := variable;
  14976. END Test.
  14977. positive: variable long integer to variable long real assignment
  14978. MODULE Test;
  14979. VAR variable: LONGINT; result: LONGREAL;
  14980. BEGIN result := variable;
  14981. END Test.
  14982. negative: variable long integer to temporary long real assignment
  14983. MODULE Test;
  14984. VAR variable: LONGINT; result: PROCEDURE (): LONGREAL;
  14985. BEGIN result () := variable;
  14986. END Test.
  14987. positive: variable huge integer to variable long real assignment
  14988. MODULE Test;
  14989. VAR variable: HUGEINT; result: LONGREAL;
  14990. BEGIN result := variable;
  14991. END Test.
  14992. negative: variable huge integer to temporary long real assignment
  14993. MODULE Test;
  14994. VAR variable: HUGEINT; result: PROCEDURE (): LONGREAL;
  14995. BEGIN result () := variable;
  14996. END Test.
  14997. positive: variable real to variable long real assignment
  14998. MODULE Test;
  14999. VAR variable: REAL; result: LONGREAL;
  15000. BEGIN result := variable;
  15001. END Test.
  15002. negative: variable real to temporary long real assignment
  15003. MODULE Test;
  15004. VAR variable: REAL; result: PROCEDURE (): LONGREAL;
  15005. BEGIN result () := variable;
  15006. END Test.
  15007. positive: variable long real to variable long real assignment
  15008. MODULE Test;
  15009. VAR variable, result: LONGREAL;
  15010. BEGIN result := variable;
  15011. END Test.
  15012. negative: variable long real to temporary long real assignment
  15013. MODULE Test;
  15014. VAR variable: REAL; result: PROCEDURE (): LONGREAL;
  15015. BEGIN result () := variable;
  15016. END Test.
  15017. negative: variable set to variable long real assignment
  15018. MODULE Test;
  15019. VAR variable: SET; result: LONGREAL;
  15020. BEGIN result := variable;
  15021. END Test.
  15022. negative: array to variable long real assignment
  15023. MODULE Test;
  15024. VAR variable: ARRAY 10 OF CHAR; result: LONGREAL;
  15025. BEGIN result := variable;
  15026. END Test.
  15027. negative: record to variable long real assignment
  15028. MODULE Test;
  15029. VAR variable: RECORD END; result: LONGREAL;
  15030. BEGIN result := variable;
  15031. END Test.
  15032. negative: object to variable long real assignment
  15033. MODULE Test;
  15034. VAR variable: OBJECT; result: LONGREAL;
  15035. BEGIN result := variable;
  15036. END Test.
  15037. negative: pointer to variable long real assignment
  15038. MODULE Test;
  15039. VAR variable: POINTER TO RECORD END; result: LONGREAL;
  15040. BEGIN result := variable;
  15041. END Test.
  15042. negative: variable procedure to variable long real assignment
  15043. MODULE Test;
  15044. VAR variable: PROCEDURE; result: LONGREAL;
  15045. BEGIN result := variable;
  15046. END Test.
  15047. negative: import to variable long real assignment
  15048. MODULE Test;
  15049. IMPORT variable := Dummy; VAR result: LONGREAL;
  15050. BEGIN result := variable;
  15051. END Test.
  15052. negative: type to variable long real assignment
  15053. MODULE Test;
  15054. TYPE Type = LONGREAL; VAR result: Type;
  15055. BEGIN result := Type;
  15056. END Test.
  15057. negative: variable boolean to variable set assignment
  15058. MODULE Test;
  15059. VAR variable: BOOLEAN; result: SET;
  15060. BEGIN result := variable;
  15061. END Test.
  15062. negative: variable character to variable set assignment
  15063. MODULE Test;
  15064. VAR variable: CHAR; result: SET;
  15065. BEGIN result := variable;
  15066. END Test.
  15067. negative: variable short integer to variable set assignment
  15068. MODULE Test;
  15069. VAR variable: SHORTINT; result: SET;
  15070. BEGIN result := variable;
  15071. END Test.
  15072. negative: variable integer to variable set assignment
  15073. MODULE Test;
  15074. VAR variable: INTEGER; result: SET;
  15075. BEGIN result := variable;
  15076. END Test.
  15077. negative: variable long integer to variable set assignment
  15078. MODULE Test;
  15079. VAR variable: LONGINT; result: SET;
  15080. BEGIN result := variable;
  15081. END Test.
  15082. negative: variable huge integer to variable set assignment
  15083. MODULE Test;
  15084. VAR variable: HUGEINT; result: SET;
  15085. BEGIN result := variable;
  15086. END Test.
  15087. negative: variable real to variable set assignment
  15088. MODULE Test;
  15089. VAR variable: REAL; result: SET;
  15090. BEGIN result := variable;
  15091. END Test.
  15092. negative: variable long real to variable set assignment
  15093. MODULE Test;
  15094. VAR variable: LONGREAL; result: SET;
  15095. BEGIN result := variable;
  15096. END Test.
  15097. positive: variable set to variable set assignment
  15098. MODULE Test;
  15099. VAR variable, result: SET;
  15100. BEGIN result := variable;
  15101. END Test.
  15102. negative: variable set to temporary set assignment
  15103. MODULE Test;
  15104. VAR variable: SET; result: PROCEDURE (): SET;
  15105. BEGIN result () := variable;
  15106. END Test.
  15107. negative: array to variable set assignment
  15108. MODULE Test;
  15109. VAR variable: ARRAY 10 OF CHAR; result: SET;
  15110. BEGIN result := variable;
  15111. END Test.
  15112. negative: record to variable set assignment
  15113. MODULE Test;
  15114. VAR variable: RECORD END; result: SET;
  15115. BEGIN result := variable;
  15116. END Test.
  15117. negative: object to variable set assignment
  15118. MODULE Test;
  15119. VAR variable: OBJECT; result: SET;
  15120. BEGIN result := variable;
  15121. END Test.
  15122. negative: pointer to variable set assignment
  15123. MODULE Test;
  15124. VAR variable: POINTER TO RECORD END; result: SET;
  15125. BEGIN result := variable;
  15126. END Test.
  15127. negative: variable procedure to variable set assignment
  15128. MODULE Test;
  15129. VAR variable: PROCEDURE; result: SET;
  15130. BEGIN result := variable;
  15131. END Test.
  15132. negative: import to variable set assignment
  15133. MODULE Test;
  15134. IMPORT variable := Dummy; VAR result: SET;
  15135. BEGIN result := variable;
  15136. END Test.
  15137. negative: type to variable set assignment
  15138. MODULE Test;
  15139. TYPE Type = SET; VAR result: Type;
  15140. BEGIN result := Type;
  15141. END Test.
  15142. negative: variable boolean to array assignment
  15143. MODULE Test;
  15144. VAR variable: BOOLEAN; result: ARRAY 10 OF CHAR;
  15145. BEGIN result := variable;
  15146. END Test.
  15147. negative: variable character to array assignment
  15148. MODULE Test;
  15149. VAR variable: CHAR; result: ARRAY 10 OF CHAR;
  15150. BEGIN result := variable;
  15151. END Test.
  15152. negative: variable short integer to array assignment
  15153. MODULE Test;
  15154. VAR variable: SHORTINT; result: ARRAY 10 OF CHAR;
  15155. BEGIN result := variable;
  15156. END Test.
  15157. negative: variable integer to array assignment
  15158. MODULE Test;
  15159. VAR variable: INTEGER; result: ARRAY 10 OF CHAR;
  15160. BEGIN result := variable;
  15161. END Test.
  15162. negative: variable long integer to array assignment
  15163. MODULE Test;
  15164. VAR variable: LONGINT; result: ARRAY 10 OF CHAR;
  15165. BEGIN result := variable;
  15166. END Test.
  15167. negative: variable huge integer to array assignment
  15168. MODULE Test;
  15169. VAR variable: HUGEINT; result: ARRAY 10 OF CHAR;
  15170. BEGIN result := variable;
  15171. END Test.
  15172. negative: variable real to array assignment
  15173. MODULE Test;
  15174. VAR variable: REAL; result: ARRAY 10 OF CHAR;
  15175. BEGIN result := variable;
  15176. END Test.
  15177. negative: variable long real to array assignment
  15178. MODULE Test;
  15179. VAR variable: LONGREAL; result: ARRAY 10 OF CHAR;
  15180. BEGIN result := variable;
  15181. END Test.
  15182. negative: variable set to array assignment
  15183. MODULE Test;
  15184. VAR variable: SET; result: ARRAY 10 OF CHAR;
  15185. BEGIN result := variable;
  15186. END Test.
  15187. positive: array of boolean to array of boolean assignment
  15188. MODULE Test;
  15189. VAR variable, result: ARRAY 10 OF BOOLEAN;
  15190. BEGIN result := variable;
  15191. END Test.
  15192. negative: array of boolean to temporary array of boolean assignment
  15193. MODULE Test;
  15194. VAR variable: ARRAY 10 OF BOOLEAN; result: PROCEDURE (): ARRAY 10 OF BOOLEAN;
  15195. BEGIN result () := variable;
  15196. END Test.
  15197. negative: array of boolean to longer array of boolean assignment
  15198. MODULE Test;
  15199. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 20 OF BOOLEAN;
  15200. BEGIN result := variable;
  15201. END Test.
  15202. negative: array of boolean to shorter array of boolean assignment
  15203. MODULE Test;
  15204. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 5 OF BOOLEAN;
  15205. BEGIN result := variable;
  15206. END Test.
  15207. negative: array of boolean to open array of boolean assignment
  15208. MODULE Test;
  15209. PROCEDURE Procedure (VAR result: ARRAY OF BOOLEAN);
  15210. VAR variable: ARRAY 10 OF BOOLEAN;
  15211. BEGIN result := variable;
  15212. END Procedure;
  15213. END Test.
  15214. negative: open array of boolean to array of boolean assignment
  15215. MODULE Test;
  15216. PROCEDURE Procedure (VAR variable: ARRAY OF BOOLEAN);
  15217. VAR result: ARRAY 10 OF BOOLEAN;
  15218. BEGIN result := variable;
  15219. END Procedure;
  15220. END Test.
  15221. negative: array of boolean to dereferenced open array of boolean assignment
  15222. MODULE Test;
  15223. VAR variable: ARRAY 10 OF BOOLEAN; result: POINTER TO ARRAY OF BOOLEAN;
  15224. BEGIN result^ := variable;
  15225. END Test.
  15226. negative: array of character to array of boolean assignment
  15227. MODULE Test;
  15228. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF BOOLEAN;
  15229. BEGIN result := variable;
  15230. END Test.
  15231. negative: array of short integer to array of boolean assignment
  15232. MODULE Test;
  15233. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF BOOLEAN;
  15234. BEGIN result := variable;
  15235. END Test.
  15236. negative: array of integer to array of boolean assignment
  15237. MODULE Test;
  15238. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF BOOLEAN;
  15239. BEGIN result := variable;
  15240. END Test.
  15241. negative: array of long integer to array of boolean assignment
  15242. MODULE Test;
  15243. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF BOOLEAN;
  15244. BEGIN result := variable;
  15245. END Test.
  15246. negative: array of huge integer to array of boolean assignment
  15247. MODULE Test;
  15248. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF BOOLEAN;
  15249. BEGIN result := variable;
  15250. END Test.
  15251. negative: array of real to array of boolean assignment
  15252. MODULE Test;
  15253. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF BOOLEAN;
  15254. BEGIN result := variable;
  15255. END Test.
  15256. negative: array of long real to array of boolean assignment
  15257. MODULE Test;
  15258. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF BOOLEAN;
  15259. BEGIN result := variable;
  15260. END Test.
  15261. negative: array of set to array of boolean assignment
  15262. MODULE Test;
  15263. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF BOOLEAN;
  15264. BEGIN result := variable;
  15265. END Test.
  15266. negative: array of array to array of boolean assignment
  15267. MODULE Test;
  15268. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF BOOLEAN;
  15269. BEGIN result := variable;
  15270. END Test.
  15271. negative: array of record to array of boolean assignment
  15272. MODULE Test;
  15273. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF BOOLEAN;
  15274. BEGIN result := variable;
  15275. END Test.
  15276. negative: array of object to array of boolean assignment
  15277. MODULE Test;
  15278. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF BOOLEAN;
  15279. BEGIN result := variable;
  15280. END Test.
  15281. negative: array of pointer to array of boolean assignment
  15282. MODULE Test;
  15283. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF BOOLEAN;
  15284. BEGIN result := variable;
  15285. END Test.
  15286. negative: array of procedure to array of boolean assignment
  15287. MODULE Test;
  15288. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF BOOLEAN;
  15289. BEGIN result := variable;
  15290. END Test.
  15291. negative: array of boolean to array of character assignment
  15292. MODULE Test;
  15293. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF CHAR;
  15294. BEGIN result := variable;
  15295. END Test.
  15296. positive: array of character to array of character assignment
  15297. MODULE Test;
  15298. VAR variable, result: ARRAY 10 OF CHAR;
  15299. BEGIN result := variable;
  15300. END Test.
  15301. negative: array of character to temporary array of character assignment
  15302. MODULE Test;
  15303. VAR variable: ARRAY 10 OF CHAR; result: PROCEDURE (): ARRAY 10 OF CHAR;
  15304. BEGIN result () := variable;
  15305. END Test.
  15306. negative: array of character to longer array of character assignment
  15307. MODULE Test;
  15308. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 20 OF CHAR;
  15309. BEGIN result := variable;
  15310. END Test.
  15311. negative: array of character to shorter array of character assignment
  15312. MODULE Test;
  15313. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 5 OF CHAR;
  15314. BEGIN result := variable;
  15315. END Test.
  15316. negative: array of character to open array of character assignment
  15317. MODULE Test;
  15318. PROCEDURE Procedure (VAR result: ARRAY OF CHAR);
  15319. VAR variable: ARRAY 10 OF CHAR;
  15320. BEGIN result := variable;
  15321. END Procedure;
  15322. END Test.
  15323. positive: string to open array of character assignment
  15324. MODULE Test;
  15325. PROCEDURE Procedure (VAR result: ARRAY OF CHAR);
  15326. BEGIN result := "string";
  15327. END Procedure;
  15328. END Test.
  15329. negative: open array of character to array of character assignment
  15330. MODULE Test;
  15331. PROCEDURE Procedure (VAR variable: ARRAY OF CHAR);
  15332. VAR result: ARRAY 10 OF CHAR;
  15333. BEGIN result := variable;
  15334. END Procedure;
  15335. END Test.
  15336. negative: array of character to dereferenced open array of character assignment
  15337. MODULE Test;
  15338. VAR variable: ARRAY 10 OF CHAR; result: POINTER TO ARRAY OF CHAR;
  15339. BEGIN result^ := variable;
  15340. END Test.
  15341. positive: string to dereferenced open array of character assignment
  15342. MODULE Test;
  15343. VAR result: POINTER TO ARRAY OF CHAR;
  15344. BEGIN result^ := "string";
  15345. END Test.
  15346. negative: array of short integer to array of character assignment
  15347. MODULE Test;
  15348. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF CHAR;
  15349. BEGIN result := variable;
  15350. END Test.
  15351. negative: array of integer to array of character assignment
  15352. MODULE Test;
  15353. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF CHAR;
  15354. BEGIN result := variable;
  15355. END Test.
  15356. negative: array of long integer to array of character assignment
  15357. MODULE Test;
  15358. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF CHAR;
  15359. BEGIN result := variable;
  15360. END Test.
  15361. negative: array of huge integer to array of character assignment
  15362. MODULE Test;
  15363. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF CHAR;
  15364. BEGIN result := variable;
  15365. END Test.
  15366. negative: array of real to array of character assignment
  15367. MODULE Test;
  15368. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF CHAR;
  15369. BEGIN result := variable;
  15370. END Test.
  15371. negative: array of long real to array of character assignment
  15372. MODULE Test;
  15373. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF CHAR;
  15374. BEGIN result := variable;
  15375. END Test.
  15376. negative: array of set to array of character assignment
  15377. MODULE Test;
  15378. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF CHAR;
  15379. BEGIN result := variable;
  15380. END Test.
  15381. negative: array of array to array of character assignment
  15382. MODULE Test;
  15383. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF CHAR;
  15384. BEGIN result := variable;
  15385. END Test.
  15386. negative: array of record to array of character assignment
  15387. MODULE Test;
  15388. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF CHAR;
  15389. BEGIN result := variable;
  15390. END Test.
  15391. negative: array of object to array of character assignment
  15392. MODULE Test;
  15393. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF CHAR;
  15394. BEGIN result := variable;
  15395. END Test.
  15396. negative: array of pointer to array of character assignment
  15397. MODULE Test;
  15398. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF CHAR;
  15399. BEGIN result := variable;
  15400. END Test.
  15401. negative: array of procedure to array of character assignment
  15402. MODULE Test;
  15403. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF CHAR;
  15404. BEGIN result := variable;
  15405. END Test.
  15406. negative: array of boolean to array of short integer assignment
  15407. MODULE Test;
  15408. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF SHORTINT;
  15409. BEGIN result := variable;
  15410. END Test.
  15411. negative: array of character to array of short integer assignment
  15412. MODULE Test;
  15413. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF SHORTINT;
  15414. BEGIN result := variable;
  15415. END Test.
  15416. positive: array of short integer to array of short integer assignment
  15417. MODULE Test;
  15418. VAR variable, result: ARRAY 10 OF SHORTINT;
  15419. BEGIN result := variable;
  15420. END Test.
  15421. negative: array of short integer to temporary array of short integer assignment
  15422. MODULE Test;
  15423. VAR variable: ARRAY 10 OF SHORTINT; result: PROCEDURE (): ARRAY 10 OF SHORTINT;
  15424. BEGIN result () := variable;
  15425. END Test.
  15426. negative: array of short integer to longer array of short integer assignment
  15427. MODULE Test;
  15428. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 20 OF SHORTINT;
  15429. BEGIN result := variable;
  15430. END Test.
  15431. negative: array of short integer to shorter array of short integer assignment
  15432. MODULE Test;
  15433. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 5 OF SHORTINT;
  15434. BEGIN result := variable;
  15435. END Test.
  15436. negative: array of short integer to open array of short integer assignment
  15437. MODULE Test;
  15438. PROCEDURE Procedure (VAR result: ARRAY OF SHORTINT);
  15439. VAR variable: ARRAY 10 OF SHORTINT;
  15440. BEGIN result := variable;
  15441. END Procedure;
  15442. END Test.
  15443. negative: open array of short integer to array of short integer assignment
  15444. MODULE Test;
  15445. PROCEDURE Procedure (VAR variable: ARRAY OF SHORTINT);
  15446. VAR result: ARRAY 10 OF SHORTINT;
  15447. BEGIN result := variable;
  15448. END Procedure;
  15449. END Test.
  15450. negative: array of short integer to dereferenced open array of short integer assignment
  15451. MODULE Test;
  15452. VAR variable: ARRAY 10 OF SHORTINT; result: POINTER TO ARRAY OF SHORTINT;
  15453. BEGIN result^ := variable;
  15454. END Test.
  15455. negative: array of integer to array of short integer assignment
  15456. MODULE Test;
  15457. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF SHORTINT;
  15458. BEGIN result := variable;
  15459. END Test.
  15460. negative: array of long integer to array of short integer assignment
  15461. MODULE Test;
  15462. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF SHORTINT;
  15463. BEGIN result := variable;
  15464. END Test.
  15465. negative: array of huge integer to array of short integer assignment
  15466. MODULE Test;
  15467. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF SHORTINT;
  15468. BEGIN result := variable;
  15469. END Test.
  15470. negative: array of real to array of short integer assignment
  15471. MODULE Test;
  15472. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF SHORTINT;
  15473. BEGIN result := variable;
  15474. END Test.
  15475. negative: array of long real to array of short integer assignment
  15476. MODULE Test;
  15477. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF SHORTINT;
  15478. BEGIN result := variable;
  15479. END Test.
  15480. negative: array of set to array of short integer assignment
  15481. MODULE Test;
  15482. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF SHORTINT;
  15483. BEGIN result := variable;
  15484. END Test.
  15485. negative: array of array to array of short integer assignment
  15486. MODULE Test;
  15487. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF SHORTINT;
  15488. BEGIN result := variable;
  15489. END Test.
  15490. negative: array of record to array of short integer assignment
  15491. MODULE Test;
  15492. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF SHORTINT;
  15493. BEGIN result := variable;
  15494. END Test.
  15495. negative: array of object to array of short integer assignment
  15496. MODULE Test;
  15497. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF SHORTINT;
  15498. BEGIN result := variable;
  15499. END Test.
  15500. negative: array of pointer to array of short integer assignment
  15501. MODULE Test;
  15502. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF SHORTINT;
  15503. BEGIN result := variable;
  15504. END Test.
  15505. negative: array of procedure to array of short integer assignment
  15506. MODULE Test;
  15507. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF SHORTINT;
  15508. BEGIN result := variable;
  15509. END Test.
  15510. negative: array of boolean to array of integer assignment
  15511. MODULE Test;
  15512. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF INTEGER;
  15513. BEGIN result := variable;
  15514. END Test.
  15515. negative: array of character to array of integer assignment
  15516. MODULE Test;
  15517. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF INTEGER;
  15518. BEGIN result := variable;
  15519. END Test.
  15520. negative: array of short integer to array of integer assignment
  15521. MODULE Test;
  15522. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF INTEGER;
  15523. BEGIN result := variable;
  15524. END Test.
  15525. positive: array of integer to array of integer assignment
  15526. MODULE Test;
  15527. VAR variable, result: ARRAY 10 OF INTEGER;
  15528. BEGIN result := variable;
  15529. END Test.
  15530. negative: array of integer to temporary array of integer assignment
  15531. MODULE Test;
  15532. VAR variable: ARRAY 10 OF INTEGER; result: PROCEDURE (): ARRAY 10 OF INTEGER;
  15533. BEGIN result () := variable;
  15534. END Test.
  15535. negative: array of integer to longer array of integer assignment
  15536. MODULE Test;
  15537. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 20 OF INTEGER;
  15538. BEGIN result := variable;
  15539. END Test.
  15540. negative: array of integer to shorter array of integer assignment
  15541. MODULE Test;
  15542. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 5 OF INTEGER;
  15543. BEGIN result := variable;
  15544. END Test.
  15545. negative: array of integer to open array of integer assignment
  15546. MODULE Test;
  15547. PROCEDURE Procedure (VAR result: ARRAY OF INTEGER);
  15548. VAR variable: ARRAY 10 OF INTEGER;
  15549. BEGIN result := variable;
  15550. END Procedure;
  15551. END Test.
  15552. negative: open array of integer to array of integer assignment
  15553. MODULE Test;
  15554. PROCEDURE Procedure (VAR variable: ARRAY OF INTEGER);
  15555. VAR result: ARRAY 10 OF INTEGER;
  15556. BEGIN result := variable;
  15557. END Procedure;
  15558. END Test.
  15559. negative: array of integer to dereferenced open array of integer assignment
  15560. MODULE Test;
  15561. VAR variable: ARRAY 10 OF INTEGER; result: POINTER TO ARRAY OF INTEGER;
  15562. BEGIN result^ := variable;
  15563. END Test.
  15564. negative: array of long integer to array of integer assignment
  15565. MODULE Test;
  15566. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF INTEGER;
  15567. BEGIN result := variable;
  15568. END Test.
  15569. negative: array of huge integer to array of integer assignment
  15570. MODULE Test;
  15571. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF INTEGER;
  15572. BEGIN result := variable;
  15573. END Test.
  15574. negative: array of real to array of integer assignment
  15575. MODULE Test;
  15576. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF INTEGER;
  15577. BEGIN result := variable;
  15578. END Test.
  15579. negative: array of long real to array of integer assignment
  15580. MODULE Test;
  15581. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF INTEGER;
  15582. BEGIN result := variable;
  15583. END Test.
  15584. negative: array of set to array of integer assignment
  15585. MODULE Test;
  15586. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF INTEGER;
  15587. BEGIN result := variable;
  15588. END Test.
  15589. negative: array of array to array of integer assignment
  15590. MODULE Test;
  15591. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF INTEGER;
  15592. BEGIN result := variable;
  15593. END Test.
  15594. negative: array of record to array of integer assignment
  15595. MODULE Test;
  15596. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF INTEGER;
  15597. BEGIN result := variable;
  15598. END Test.
  15599. negative: array of object to array of integer assignment
  15600. MODULE Test;
  15601. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF INTEGER;
  15602. BEGIN result := variable;
  15603. END Test.
  15604. negative: array of pointer to array of integer assignment
  15605. MODULE Test;
  15606. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF INTEGER;
  15607. BEGIN result := variable;
  15608. END Test.
  15609. negative: array of procedure to array of integer assignment
  15610. MODULE Test;
  15611. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF INTEGER;
  15612. BEGIN result := variable;
  15613. END Test.
  15614. negative: array of boolean to array of long integer assignment
  15615. MODULE Test;
  15616. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF LONGINT;
  15617. BEGIN result := variable;
  15618. END Test.
  15619. negative: array of character to array of long integer assignment
  15620. MODULE Test;
  15621. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF LONGINT;
  15622. BEGIN result := variable;
  15623. END Test.
  15624. negative: array of short integer to array of long integer assignment
  15625. MODULE Test;
  15626. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF LONGINT;
  15627. BEGIN result := variable;
  15628. END Test.
  15629. negative: array of integer to array of long integer assignment
  15630. MODULE Test;
  15631. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF LONGINT;
  15632. BEGIN result := variable;
  15633. END Test.
  15634. positive: array of long integer to array of long integer assignment
  15635. MODULE Test;
  15636. VAR variable, result: ARRAY 10 OF LONGINT;
  15637. BEGIN result := variable;
  15638. END Test.
  15639. negative: array of long integer to temporary array of long integer assignment
  15640. MODULE Test;
  15641. VAR variable: ARRAY 10 OF LONGINT; result: PROCEDURE (): ARRAY 10 OF LONGINT;
  15642. BEGIN result () := variable;
  15643. END Test.
  15644. negative: array of long integer to longer array of long integer assignment
  15645. MODULE Test;
  15646. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 20 OF LONGINT;
  15647. BEGIN result := variable;
  15648. END Test.
  15649. negative: array of long integer to shorter array of long integer assignment
  15650. MODULE Test;
  15651. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 5 OF LONGINT;
  15652. BEGIN result := variable;
  15653. END Test.
  15654. negative: array of long integer to open array of long integer assignment
  15655. MODULE Test;
  15656. PROCEDURE Procedure (VAR result: ARRAY OF LONGINT);
  15657. VAR variable: ARRAY 10 OF LONGINT;
  15658. BEGIN result := variable;
  15659. END Procedure;
  15660. END Test.
  15661. negative: open array of long integer to array of long integer assignment
  15662. MODULE Test;
  15663. PROCEDURE Procedure (VAR variable: ARRAY OF LONGINT);
  15664. VAR result: ARRAY 10 OF LONGINT;
  15665. BEGIN result := variable;
  15666. END Procedure;
  15667. END Test.
  15668. negative: array of long integer to dereferenced open array of long integer assignment
  15669. MODULE Test;
  15670. VAR variable: ARRAY 10 OF LONGINT; result: POINTER TO ARRAY OF LONGINT;
  15671. BEGIN result^ := variable;
  15672. END Test.
  15673. negative: array of huge integer to array of long integer assignment
  15674. MODULE Test;
  15675. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF LONGINT;
  15676. BEGIN result := variable;
  15677. END Test.
  15678. negative: array of real to array of long integer assignment
  15679. MODULE Test;
  15680. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF LONGINT;
  15681. BEGIN result := variable;
  15682. END Test.
  15683. negative: array of long real to array of long integer assignment
  15684. MODULE Test;
  15685. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF LONGINT;
  15686. BEGIN result := variable;
  15687. END Test.
  15688. negative: array of set to array of long integer assignment
  15689. MODULE Test;
  15690. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF LONGINT;
  15691. BEGIN result := variable;
  15692. END Test.
  15693. negative: array of array to array of long integer assignment
  15694. MODULE Test;
  15695. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF LONGINT;
  15696. BEGIN result := variable;
  15697. END Test.
  15698. negative: array of record to array of long integer assignment
  15699. MODULE Test;
  15700. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF LONGINT;
  15701. BEGIN result := variable;
  15702. END Test.
  15703. negative: array of object to array of long integer assignment
  15704. MODULE Test;
  15705. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF LONGINT;
  15706. BEGIN result := variable;
  15707. END Test.
  15708. negative: array of pointer to array of long integer assignment
  15709. MODULE Test;
  15710. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF LONGINT;
  15711. BEGIN result := variable;
  15712. END Test.
  15713. negative: array of procedure to array of long integer assignment
  15714. MODULE Test;
  15715. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF LONGINT;
  15716. BEGIN result := variable;
  15717. END Test.
  15718. negative: array of boolean to array of huge integer assignment
  15719. MODULE Test;
  15720. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF HUGEINT;
  15721. BEGIN result := variable;
  15722. END Test.
  15723. negative: array of character to array of huge integer assignment
  15724. MODULE Test;
  15725. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF HUGEINT;
  15726. BEGIN result := variable;
  15727. END Test.
  15728. negative: array of short integer to array of huge integer assignment
  15729. MODULE Test;
  15730. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF HUGEINT;
  15731. BEGIN result := variable;
  15732. END Test.
  15733. negative: array of integer to array of huge integer assignment
  15734. MODULE Test;
  15735. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF HUGEINT;
  15736. BEGIN result := variable;
  15737. END Test.
  15738. negative: array of long integer to array of huge integer assignment
  15739. MODULE Test;
  15740. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF HUGEINT;
  15741. BEGIN result := variable;
  15742. END Test.
  15743. positive: array of huge integer to array of huge integer assignment
  15744. MODULE Test;
  15745. VAR variable, result: ARRAY 10 OF HUGEINT;
  15746. BEGIN result := variable;
  15747. END Test.
  15748. negative: array of huge integer to temporary array of huge integer assignment
  15749. MODULE Test;
  15750. VAR variable: ARRAY 10 OF HUGEINT; result: PROCEDURE (): ARRAY 10 OF HUGEINT;
  15751. BEGIN result () := variable;
  15752. END Test.
  15753. negative: array of huge integer to longer array of huge integer assignment
  15754. MODULE Test;
  15755. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 20 OF HUGEINT;
  15756. BEGIN result := variable;
  15757. END Test.
  15758. negative: array of huge integer to shorter array of huge integer assignment
  15759. MODULE Test;
  15760. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 5 OF HUGEINT;
  15761. BEGIN result := variable;
  15762. END Test.
  15763. negative: array of huge integer to open array of huge integer assignment
  15764. MODULE Test;
  15765. PROCEDURE Procedure (VAR result: ARRAY OF HUGEINT);
  15766. VAR variable: ARRAY 10 OF HUGEINT;
  15767. BEGIN result := variable;
  15768. END Procedure;
  15769. END Test.
  15770. negative: open array of huge integer to array of huge integer assignment
  15771. MODULE Test;
  15772. PROCEDURE Procedure (VAR variable: ARRAY OF HUGEINT);
  15773. VAR result: ARRAY 10 OF HUGEINT;
  15774. BEGIN result := variable;
  15775. END Procedure;
  15776. END Test.
  15777. negative: array of huge integer to dereferenced open array of huge integer assignment
  15778. MODULE Test;
  15779. VAR variable: ARRAY 10 OF HUGEINT; result: POINTER TO ARRAY OF HUGEINT;
  15780. BEGIN result^ := variable;
  15781. END Test.
  15782. negative: array of real to array of huge integer assignment
  15783. MODULE Test;
  15784. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF HUGEINT;
  15785. BEGIN result := variable;
  15786. END Test.
  15787. negative: array of long real to array of huge integer assignment
  15788. MODULE Test;
  15789. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF HUGEINT;
  15790. BEGIN result := variable;
  15791. END Test.
  15792. negative: array of set to array of huge integer assignment
  15793. MODULE Test;
  15794. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF HUGEINT;
  15795. BEGIN result := variable;
  15796. END Test.
  15797. negative: array of array to array of huge integer assignment
  15798. MODULE Test;
  15799. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF HUGEINT;
  15800. BEGIN result := variable;
  15801. END Test.
  15802. negative: array of record to array of huge integer assignment
  15803. MODULE Test;
  15804. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF HUGEINT;
  15805. BEGIN result := variable;
  15806. END Test.
  15807. negative: array of object to array of huge integer assignment
  15808. MODULE Test;
  15809. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF HUGEINT;
  15810. BEGIN result := variable;
  15811. END Test.
  15812. negative: array of pointer to array of huge integer assignment
  15813. MODULE Test;
  15814. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF HUGEINT;
  15815. BEGIN result := variable;
  15816. END Test.
  15817. negative: array of procedure to array of huge integer assignment
  15818. MODULE Test;
  15819. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF HUGEINT;
  15820. BEGIN result := variable;
  15821. END Test.
  15822. negative: array of boolean to array of real assignment
  15823. MODULE Test;
  15824. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF REAL;
  15825. BEGIN result := variable;
  15826. END Test.
  15827. negative: array of character to array of real assignment
  15828. MODULE Test;
  15829. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF REAL;
  15830. BEGIN result := variable;
  15831. END Test.
  15832. negative: array of short integer to array of real assignment
  15833. MODULE Test;
  15834. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF REAL;
  15835. BEGIN result := variable;
  15836. END Test.
  15837. negative: array of integer to array of real assignment
  15838. MODULE Test;
  15839. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF REAL;
  15840. BEGIN result := variable;
  15841. END Test.
  15842. negative: array of long integer to array of real assignment
  15843. MODULE Test;
  15844. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF REAL;
  15845. BEGIN result := variable;
  15846. END Test.
  15847. negative: array of huge integer to array of real assignment
  15848. MODULE Test;
  15849. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF REAL;
  15850. BEGIN result := variable;
  15851. END Test.
  15852. positive: array of real to array of real assignment
  15853. MODULE Test;
  15854. VAR variable, result: ARRAY 10 OF REAL;
  15855. BEGIN result := variable;
  15856. END Test.
  15857. negative: array of real to temporary array of real assignment
  15858. MODULE Test;
  15859. VAR variable: ARRAY 10 OF SHORTINT; result: PROCEDURE (): ARRAY 10 OF SHORTINT;
  15860. BEGIN result () := variable;
  15861. END Test.
  15862. negative: array of real to longer array of real assignment
  15863. MODULE Test;
  15864. VAR variable: ARRAY 10 OF REAL; result: ARRAY 20 OF REAL;
  15865. BEGIN result := variable;
  15866. END Test.
  15867. negative: array of real to shorter array of real assignment
  15868. MODULE Test;
  15869. VAR variable: ARRAY 10 OF REAL; result: ARRAY 5 OF REAL;
  15870. BEGIN result := variable;
  15871. END Test.
  15872. negative: array of real to open array of real assignment
  15873. MODULE Test;
  15874. PROCEDURE Procedure (VAR result: ARRAY OF REAL);
  15875. VAR variable: ARRAY 10 OF REAL;
  15876. BEGIN result := variable;
  15877. END Procedure;
  15878. END Test.
  15879. negative: open array of real to array of real assignment
  15880. MODULE Test;
  15881. PROCEDURE Procedure (VAR variable: ARRAY OF REAL);
  15882. VAR result: ARRAY 10 OF REAL;
  15883. BEGIN result := variable;
  15884. END Procedure;
  15885. END Test.
  15886. negative: array of real to dereferenced open array of real assignment
  15887. MODULE Test;
  15888. VAR variable: ARRAY 10 OF REAL; result: POINTER TO ARRAY OF REAL;
  15889. BEGIN result^ := variable;
  15890. END Test.
  15891. negative: array of long real to array of real assignment
  15892. MODULE Test;
  15893. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF REAL;
  15894. BEGIN result := variable;
  15895. END Test.
  15896. negative: array of set to array of real assignment
  15897. MODULE Test;
  15898. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF REAL;
  15899. BEGIN result := variable;
  15900. END Test.
  15901. negative: array of array to array of real assignment
  15902. MODULE Test;
  15903. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF REAL;
  15904. BEGIN result := variable;
  15905. END Test.
  15906. negative: array of record to array of real assignment
  15907. MODULE Test;
  15908. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF REAL;
  15909. BEGIN result := variable;
  15910. END Test.
  15911. negative: array of object to array of real assignment
  15912. MODULE Test;
  15913. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF REAL;
  15914. BEGIN result := variable;
  15915. END Test.
  15916. negative: array of pointer to array of real assignment
  15917. MODULE Test;
  15918. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF REAL;
  15919. BEGIN result := variable;
  15920. END Test.
  15921. negative: array of procedure to array of real assignment
  15922. MODULE Test;
  15923. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF REAL;
  15924. BEGIN result := variable;
  15925. END Test.
  15926. negative: array of boolean to array of long real assignment
  15927. MODULE Test;
  15928. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF LONGREAL;
  15929. BEGIN result := variable;
  15930. END Test.
  15931. negative: array of character to array of long real assignment
  15932. MODULE Test;
  15933. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF LONGREAL;
  15934. BEGIN result := variable;
  15935. END Test.
  15936. negative: array of short integer to array of long real assignment
  15937. MODULE Test;
  15938. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF LONGREAL;
  15939. BEGIN result := variable;
  15940. END Test.
  15941. negative: array of integer to array of long real assignment
  15942. MODULE Test;
  15943. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF LONGREAL;
  15944. BEGIN result := variable;
  15945. END Test.
  15946. negative: array of long integer to array of long real assignment
  15947. MODULE Test;
  15948. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF LONGREAL;
  15949. BEGIN result := variable;
  15950. END Test.
  15951. negative: array of huge integer to array of long real assignment
  15952. MODULE Test;
  15953. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF LONGREAL;
  15954. BEGIN result := variable;
  15955. END Test.
  15956. negative: array of real to array of long real assignment
  15957. MODULE Test;
  15958. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF LONGREAL;
  15959. BEGIN result := variable;
  15960. END Test.
  15961. positive: array of long real to array of long real assignment
  15962. MODULE Test;
  15963. VAR variable, result: ARRAY 10 OF LONGREAL;
  15964. BEGIN result := variable;
  15965. END Test.
  15966. negative: array of long real to temporary array of long real assignment
  15967. MODULE Test;
  15968. VAR variable: ARRAY 10 OF LONGREAL; result: PROCEDURE (): ARRAY 10 OF LONGREAL;
  15969. BEGIN result () := variable;
  15970. END Test.
  15971. negative: array of long real to longer array of long real assignment
  15972. MODULE Test;
  15973. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 20 OF LONGREAL;
  15974. BEGIN result := variable;
  15975. END Test.
  15976. negative: array of long real to shorter array of long real assignment
  15977. MODULE Test;
  15978. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 5 OF LONGREAL;
  15979. BEGIN result := variable;
  15980. END Test.
  15981. negative: array of long real to open array of long real assignment
  15982. MODULE Test;
  15983. PROCEDURE Procedure (VAR result: ARRAY OF LONGREAL);
  15984. VAR variable: ARRAY 10 OF LONGREAL;
  15985. BEGIN result := variable;
  15986. END Procedure;
  15987. END Test.
  15988. negative: open array of long real to array of long real assignment
  15989. MODULE Test;
  15990. PROCEDURE Procedure (VAR variable: ARRAY OF LONGREAL);
  15991. VAR result: ARRAY 10 OF LONGREAL;
  15992. BEGIN result := variable;
  15993. END Procedure;
  15994. END Test.
  15995. negative: array of long real to dereferenced open array of long real assignment
  15996. MODULE Test;
  15997. VAR variable: ARRAY 10 OF LONGREAL; result: POINTER TO ARRAY OF LONGREAL;
  15998. BEGIN result^ := variable;
  15999. END Test.
  16000. negative: array of set to array of long real assignment
  16001. MODULE Test;
  16002. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF LONGREAL;
  16003. BEGIN result := variable;
  16004. END Test.
  16005. negative: array of array to array of long real assignment
  16006. MODULE Test;
  16007. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF LONGREAL;
  16008. BEGIN result := variable;
  16009. END Test.
  16010. negative: array of record to array of long real assignment
  16011. MODULE Test;
  16012. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF LONGREAL;
  16013. BEGIN result := variable;
  16014. END Test.
  16015. negative: array of object to array of long real assignment
  16016. MODULE Test;
  16017. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF LONGREAL;
  16018. BEGIN result := variable;
  16019. END Test.
  16020. negative: array of pointer to array of long real assignment
  16021. MODULE Test;
  16022. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF LONGREAL;
  16023. BEGIN result := variable;
  16024. END Test.
  16025. negative: array of procedure to array of long real assignment
  16026. MODULE Test;
  16027. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF LONGREAL;
  16028. BEGIN result := variable;
  16029. END Test.
  16030. negative: array of boolean to array of set assignment
  16031. MODULE Test;
  16032. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF SET;
  16033. BEGIN result := variable;
  16034. END Test.
  16035. negative: array of character to array of set assignment
  16036. MODULE Test;
  16037. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF SET;
  16038. BEGIN result := variable;
  16039. END Test.
  16040. negative: array of short integer to array of set assignment
  16041. MODULE Test;
  16042. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF SET;
  16043. BEGIN result := variable;
  16044. END Test.
  16045. negative: array of integer to array of set assignment
  16046. MODULE Test;
  16047. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF SET;
  16048. BEGIN result := variable;
  16049. END Test.
  16050. negative: array of long integer to array of set assignment
  16051. MODULE Test;
  16052. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF SET;
  16053. BEGIN result := variable;
  16054. END Test.
  16055. negative: array of huge integer to array of set assignment
  16056. MODULE Test;
  16057. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF SET;
  16058. BEGIN result := variable;
  16059. END Test.
  16060. negative: array of real to array of set assignment
  16061. MODULE Test;
  16062. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF SET;
  16063. BEGIN result := variable;
  16064. END Test.
  16065. negative: array of long real to array of set assignment
  16066. MODULE Test;
  16067. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF SET;
  16068. BEGIN result := variable;
  16069. END Test.
  16070. positive: array of set to array of set assignment
  16071. MODULE Test;
  16072. VAR variable, result: ARRAY 10 OF SET;
  16073. BEGIN result := variable;
  16074. END Test.
  16075. negative: array of set to longer array of set assignment
  16076. MODULE Test;
  16077. VAR variable: ARRAY 10 OF SET; result: ARRAY 20 OF SET;
  16078. BEGIN result := variable;
  16079. END Test.
  16080. negative: array of set to shorter array of set assignment
  16081. MODULE Test;
  16082. VAR variable: ARRAY 10 OF SET; result: ARRAY 5 OF SET;
  16083. BEGIN result := variable;
  16084. END Test.
  16085. negative: array of set to open array of set assignment
  16086. MODULE Test;
  16087. PROCEDURE Procedure (VAR result: ARRAY OF SET);
  16088. VAR variable: ARRAY 10 OF SET;
  16089. BEGIN result := variable;
  16090. END Procedure;
  16091. END Test.
  16092. negative: open array of set to array of set assignment
  16093. MODULE Test;
  16094. PROCEDURE Procedure (VAR variable: ARRAY OF SET);
  16095. VAR result: ARRAY 10 OF SET;
  16096. BEGIN result := variable;
  16097. END Procedure;
  16098. END Test.
  16099. negative: array of set to dereferenced open array of set assignment
  16100. MODULE Test;
  16101. VAR variable: ARRAY 10 OF SET; result: POINTER TO ARRAY OF SET;
  16102. BEGIN result^ := variable;
  16103. END Test.
  16104. negative: array of array to array of set assignment
  16105. MODULE Test;
  16106. VAR variable: ARRAY 10 OF ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF SET;
  16107. BEGIN result := variable;
  16108. END Test.
  16109. negative: array of record to array of set assignment
  16110. MODULE Test;
  16111. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF SET;
  16112. BEGIN result := variable;
  16113. END Test.
  16114. negative: array of object to array of set assignment
  16115. MODULE Test;
  16116. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF SET;
  16117. BEGIN result := variable;
  16118. END Test.
  16119. negative: array of pointer to array of set assignment
  16120. MODULE Test;
  16121. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF SET;
  16122. BEGIN result := variable;
  16123. END Test.
  16124. negative: array of procedure to array of set assignment
  16125. MODULE Test;
  16126. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF SET;
  16127. BEGIN result := variable;
  16128. END Test.
  16129. negative: array of boolean to array of array assignment
  16130. MODULE Test;
  16131. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF ARRAY 10 OF SET;
  16132. BEGIN result := variable;
  16133. END Test.
  16134. negative: array of character to array of array assignment
  16135. MODULE Test;
  16136. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF ARRAY 10 OF SET;
  16137. BEGIN result := variable;
  16138. END Test.
  16139. negative: array of short integer to array of array assignment
  16140. MODULE Test;
  16141. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF ARRAY 10 OF SET;
  16142. BEGIN result := variable;
  16143. END Test.
  16144. negative: array of integer to array of array assignment
  16145. MODULE Test;
  16146. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF ARRAY 10 OF SET;
  16147. BEGIN result := variable;
  16148. END Test.
  16149. negative: array of long integer to array of array assignment
  16150. MODULE Test;
  16151. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF ARRAY 10 OF SET;
  16152. BEGIN result := variable;
  16153. END Test.
  16154. negative: array of huge integer to array of array assignment
  16155. MODULE Test;
  16156. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF ARRAY 10 OF SET;
  16157. BEGIN result := variable;
  16158. END Test.
  16159. negative: array of real to array of array assignment
  16160. MODULE Test;
  16161. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF ARRAY 10 OF SET;
  16162. BEGIN result := variable;
  16163. END Test.
  16164. negative: array of long real to array of array assignment
  16165. MODULE Test;
  16166. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF ARRAY 10 OF SET;
  16167. BEGIN result := variable;
  16168. END Test.
  16169. negative: array of set of array assignment
  16170. MODULE Test;
  16171. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF ARRAY 10 OF SET;
  16172. BEGIN result := variable;
  16173. END Test.
  16174. positive: array of array to array of array assignment
  16175. MODULE Test;
  16176. VAR variable, result: ARRAY 10 OF ARRAY 10 OF SET;
  16177. BEGIN result := variable;
  16178. END Test.
  16179. negative: array of array to temporary array of array assignment
  16180. MODULE Test;
  16181. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: PROCEDURE (): ARRAY 10 OF ARRAY 10 OF SET;
  16182. BEGIN result () := variable;
  16183. END Test.
  16184. negative: array of array to longer array of array assignment
  16185. MODULE Test;
  16186. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 20 OF ARRAY 10 OF SET;
  16187. BEGIN result := variable;
  16188. END Test.
  16189. negative: array of array to shorter array of array assignment
  16190. MODULE Test;
  16191. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 5 OF ARRAY 10 OF SET;
  16192. BEGIN result := variable;
  16193. END Test.
  16194. negative: array of array to open array of array assignment
  16195. MODULE Test;
  16196. PROCEDURE Procedure (VAR result: ARRAY OF ARRAY 10 OF SET);
  16197. VAR variable: ARRAY 10 OF ARRAY 10 OF SET;
  16198. BEGIN result := variable;
  16199. END Procedure;
  16200. END Test.
  16201. negative: open array of array to array of array assignment
  16202. MODULE Test;
  16203. PROCEDURE Procedure (VAR variable: ARRAY OF ARRAY 10 OF SET);
  16204. VAR result: ARRAY 10 OF ARRAY 10 OF SET;
  16205. BEGIN result := variable;
  16206. END Procedure;
  16207. END Test.
  16208. negative: array of array to dereferenced open array of array assignment
  16209. MODULE Test;
  16210. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: POINTER TO ARRAY OF ARRAY 10 OF SET;
  16211. BEGIN result^ := variable;
  16212. END Test.
  16213. negative: array of record to array of array assignment
  16214. MODULE Test;
  16215. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF ARRAY 10 OF SET;
  16216. BEGIN result := variable;
  16217. END Test.
  16218. negative: array of object to array of array assignment
  16219. MODULE Test;
  16220. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF ARRAY 10 OF SET;
  16221. BEGIN result := variable;
  16222. END Test.
  16223. negative: array of pointer to array of array assignment
  16224. MODULE Test;
  16225. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF ARRAY 10 OF SET;
  16226. BEGIN result := variable;
  16227. END Test.
  16228. negative: array of procedure to array of array assignment
  16229. MODULE Test;
  16230. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF ARRAY 10 OF SET;
  16231. BEGIN result := variable;
  16232. END Test.
  16233. negative: array of boolean to array of record assignment
  16234. MODULE Test;
  16235. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF RECORD END;
  16236. BEGIN result := variable;
  16237. END Test.
  16238. negative: array of character to array of record assignment
  16239. MODULE Test;
  16240. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF RECORD END;
  16241. BEGIN result := variable;
  16242. END Test.
  16243. negative: array of short integer to array of record assignment
  16244. MODULE Test;
  16245. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF RECORD END;
  16246. BEGIN result := variable;
  16247. END Test.
  16248. negative: array of integer to array of record assignment
  16249. MODULE Test;
  16250. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF RECORD END;
  16251. BEGIN result := variable;
  16252. END Test.
  16253. negative: array of long integer to array of record assignment
  16254. MODULE Test;
  16255. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF RECORD END;
  16256. BEGIN result := variable;
  16257. END Test.
  16258. negative: array of huge integer to array of record assignment
  16259. MODULE Test;
  16260. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF RECORD END;
  16261. BEGIN result := variable;
  16262. END Test.
  16263. negative: array of real to array of record assignment
  16264. MODULE Test;
  16265. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF RECORD END;
  16266. BEGIN result := variable;
  16267. END Test.
  16268. negative: array of long real to array of record assignment
  16269. MODULE Test;
  16270. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF RECORD END;
  16271. BEGIN result := variable;
  16272. END Test.
  16273. negative: array of set to array of record assignment
  16274. MODULE Test;
  16275. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF RECORD END;
  16276. BEGIN result := variable;
  16277. END Test.
  16278. negative: array of array to array of record assignment
  16279. MODULE Test;
  16280. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF RECORD END;
  16281. BEGIN result := variable;
  16282. END Test.
  16283. positive: array of record to array of record assignment
  16284. MODULE Test;
  16285. VAR variable, result: ARRAY 10 OF RECORD END;
  16286. BEGIN result := variable;
  16287. END Test.
  16288. negative: array of record to temporary array of record assignment
  16289. MODULE Test;
  16290. TYPE Record = RECORD END;
  16291. VAR variable: ARRAY 10 OF Record; result: PROCEDURE (): ARRAY 10 OF Record;
  16292. BEGIN result () := variable;
  16293. END Test.
  16294. negative: array of record to longer array of record assignment
  16295. MODULE Test;
  16296. TYPE Record = RECORD END;
  16297. VAR variable: ARRAY 10 OF Record; result: ARRAY 20 OF Record;
  16298. BEGIN result := variable;
  16299. END Test.
  16300. negative: array of record to shorter array of record assignment
  16301. MODULE Test;
  16302. TYPE Record = RECORD END;
  16303. VAR variable: ARRAY 10 OF Record; result: ARRAY 5 OF Record;
  16304. BEGIN result := variable;
  16305. END Test.
  16306. negative: array of record to open array of record assignment
  16307. MODULE Test;
  16308. TYPE Record = RECORD END;
  16309. PROCEDURE Procedure (VAR result: ARRAY OF Record);
  16310. VAR variable: ARRAY 10 OF Record;
  16311. BEGIN result := variable;
  16312. END Procedure;
  16313. END Test.
  16314. negative: open array of record to array of record assignment
  16315. MODULE Test;
  16316. TYPE Record = RECORD END;
  16317. PROCEDURE Procedure (VAR variable: ARRAY OF Record);
  16318. VAR result: ARRAY 10 OF Record;
  16319. BEGIN result := variable;
  16320. END Procedure;
  16321. END Test.
  16322. negative: array of record to dereferenced open array of record assignment
  16323. MODULE Test;
  16324. TYPE Record = RECORD END;
  16325. VAR variable: ARRAY 10 OF Record; result: POINTER TO ARRAY OF Record;
  16326. BEGIN result^ := variable;
  16327. END Test.
  16328. negative: array of object to array of record assignment
  16329. MODULE Test;
  16330. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF RECORD END;
  16331. BEGIN result := variable;
  16332. END Test.
  16333. negative: array of pointer to array of record assignment
  16334. MODULE Test;
  16335. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF RECORD END;
  16336. BEGIN result := variable;
  16337. END Test.
  16338. negative: array of procedure to array of record assignment
  16339. MODULE Test;
  16340. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF RECORD END;
  16341. BEGIN result := variable;
  16342. END Test.
  16343. negative: array of boolean to array of object assignment
  16344. MODULE Test;
  16345. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF OBJECT END;
  16346. BEGIN result := variable;
  16347. END Test.
  16348. negative: array of character to array of object assignment
  16349. MODULE Test;
  16350. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF OBJECT END;
  16351. BEGIN result := variable;
  16352. END Test.
  16353. negative: array of short integer to array of object assignment
  16354. MODULE Test;
  16355. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF OBJECT END;
  16356. BEGIN result := variable;
  16357. END Test.
  16358. negative: array of integer to array of object assignment
  16359. MODULE Test;
  16360. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF OBJECT END;
  16361. BEGIN result := variable;
  16362. END Test.
  16363. negative: array of long integer to array of object assignment
  16364. MODULE Test;
  16365. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF OBJECT END;
  16366. BEGIN result := variable;
  16367. END Test.
  16368. negative: array of huge integer to array of object assignment
  16369. MODULE Test;
  16370. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF OBJECT END;
  16371. BEGIN result := variable;
  16372. END Test.
  16373. negative: array of real to array of object assignment
  16374. MODULE Test;
  16375. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF OBJECT END;
  16376. BEGIN result := variable;
  16377. END Test.
  16378. negative: array of long real to array of object assignment
  16379. MODULE Test;
  16380. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF OBJECT END;
  16381. BEGIN result := variable;
  16382. END Test.
  16383. negative: array of set to array of object assignment
  16384. MODULE Test;
  16385. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF OBJECT END;
  16386. BEGIN result := variable;
  16387. END Test.
  16388. negative: array of array to array of object assignment
  16389. MODULE Test;
  16390. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF OBJECT END;
  16391. BEGIN result := variable;
  16392. END Test.
  16393. negative: array of record to array of object assignment
  16394. MODULE Test;
  16395. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF OBJECT END;
  16396. BEGIN result := variable;
  16397. END Test.
  16398. positive: array of object to array of object assignment
  16399. MODULE Test;
  16400. VAR variable, result: ARRAY 10 OF OBJECT END;
  16401. BEGIN result := variable;
  16402. END Test.
  16403. negative: array of object to temporary array of object assignment
  16404. MODULE Test;
  16405. TYPE Object = OBJECT END Object;
  16406. VAR variable: ARRAY 10 OF Object; result: PROCEDURE (): ARRAY 10 OF Object;
  16407. BEGIN result () := variable;
  16408. END Test.
  16409. negative: array of object to longer array of object assignment
  16410. MODULE Test;
  16411. TYPE Object = OBJECT END Object;
  16412. VAR variable: ARRAY 10 OF Object; result: ARRAY 20 OF Object;
  16413. BEGIN result := variable;
  16414. END Test.
  16415. negative: array of object to shorter array of object assignment
  16416. MODULE Test;
  16417. TYPE Object = OBJECT END Object;
  16418. VAR variable: ARRAY 10 OF Object; result: ARRAY 5 OF Object;
  16419. BEGIN result := variable;
  16420. END Test.
  16421. negative: array of object to open array of object assignment
  16422. MODULE Test;
  16423. TYPE Object = OBJECT END Object;
  16424. PROCEDURE Procedure (VAR result: ARRAY OF Object);
  16425. VAR variable: ARRAY 10 OF Object;
  16426. BEGIN result := variable;
  16427. END Procedure;
  16428. END Test.
  16429. negative: open array of object to array of object assignment
  16430. MODULE Test;
  16431. TYPE Object = OBJECT END Object;
  16432. PROCEDURE Procedure (VAR variable: ARRAY OF Object);
  16433. VAR result: ARRAY 10 OF Object;
  16434. BEGIN result := variable;
  16435. END Procedure;
  16436. END Test.
  16437. negative: array of object to dereferenced open array of object assignment
  16438. MODULE Test;
  16439. TYPE Object = OBJECT END Object;
  16440. VAR variable: ARRAY 10 OF Object; result: POINTER TO ARRAY OF Object;
  16441. BEGIN result^ := variable;
  16442. END Test.
  16443. negative: array of pointer to array of object assignment
  16444. MODULE Test;
  16445. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF OBJECT END;
  16446. BEGIN result := variable;
  16447. END Test.
  16448. negative: array of procedure to array of object assignment
  16449. MODULE Test;
  16450. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF OBJECT END;
  16451. BEGIN result := variable;
  16452. END Test.
  16453. negative: array of boolean to array of pointer assignment
  16454. MODULE Test;
  16455. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF POINTER TO RECORD END;
  16456. BEGIN result := variable;
  16457. END Test.
  16458. negative: array of character to array of pointer assignment
  16459. MODULE Test;
  16460. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF POINTER TO RECORD END;
  16461. BEGIN result := variable;
  16462. END Test.
  16463. negative: array of short integer to array of pointer assignment
  16464. MODULE Test;
  16465. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF POINTER TO RECORD END;
  16466. BEGIN result := variable;
  16467. END Test.
  16468. negative: array of integer to array of pointer assignment
  16469. MODULE Test;
  16470. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF POINTER TO RECORD END;
  16471. BEGIN result := variable;
  16472. END Test.
  16473. negative: array of long integer to array of pointer assignment
  16474. MODULE Test;
  16475. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF POINTER TO RECORD END;
  16476. BEGIN result := variable;
  16477. END Test.
  16478. negative: array of huge integer to array of pointer assignment
  16479. MODULE Test;
  16480. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF POINTER TO RECORD END;
  16481. BEGIN result := variable;
  16482. END Test.
  16483. negative: array of real to array of pointer assignment
  16484. MODULE Test;
  16485. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF POINTER TO RECORD END;
  16486. BEGIN result := variable;
  16487. END Test.
  16488. negative: array of long real to array of pointer assignment
  16489. MODULE Test;
  16490. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF POINTER TO RECORD END;
  16491. BEGIN result := variable;
  16492. END Test.
  16493. negative: array of set to array of pointer assignment
  16494. MODULE Test;
  16495. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF POINTER TO RECORD END;
  16496. BEGIN result := variable;
  16497. END Test.
  16498. negative: array of array to array of pointer assignment
  16499. MODULE Test;
  16500. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF POINTER TO RECORD END;
  16501. BEGIN result := variable;
  16502. END Test.
  16503. negative: array of record to array of pointer assignment
  16504. MODULE Test;
  16505. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF POINTER TO RECORD END;
  16506. BEGIN result := variable;
  16507. END Test.
  16508. negative: array of object to array of pointer assignment
  16509. MODULE Test;
  16510. VAR variable: ARRAY 10 OF OBJECT END; result: ARRAY 10 OF POINTER TO RECORD END;
  16511. BEGIN result := variable;
  16512. END Test.
  16513. positive: array of pointer to array of pointer assignment
  16514. MODULE Test;
  16515. VAR variable, result: ARRAY 10 OF POINTER TO RECORD END;
  16516. BEGIN result := variable;
  16517. END Test.
  16518. negative: array of pointer to temporary array of pointer assignment
  16519. MODULE Test;
  16520. TYPE Record = RECORD END;
  16521. VAR variable: ARRAY 10 OF POINTER TO Record; result: PROCEDURE (): ARRAY 10 OF POINTER TO Record;
  16522. BEGIN result () := variable;
  16523. END Test.
  16524. negative: array of pointer to longer array of pointer assignment
  16525. MODULE Test;
  16526. TYPE Pointer = POINTER TO RECORD END;
  16527. VAR variable: ARRAY 10 OF Pointer; result: ARRAY 20 OF Pointer;
  16528. BEGIN result := variable;
  16529. END Test.
  16530. negative: array of pointer to shorter array of pointer assignment
  16531. MODULE Test;
  16532. TYPE Pointer = POINTER TO RECORD END;
  16533. VAR variable: ARRAY 10 OF Pointer; result: ARRAY 5 OF Pointer;
  16534. BEGIN result := variable;
  16535. END Test.
  16536. negative: array of pointer to open array of pointer assignment
  16537. MODULE Test;
  16538. TYPE Pointer = POINTER TO RECORD END;
  16539. PROCEDURE Procedure (VAR result: ARRAY OF Pointer);
  16540. VAR variable: ARRAY 10 OF Pointer;
  16541. BEGIN result := variable;
  16542. END Procedure;
  16543. END Test.
  16544. negative: open array of pointer to array of pointer assignment
  16545. MODULE Test;
  16546. TYPE Pointer = POINTER TO RECORD END;
  16547. PROCEDURE Procedure (VAR variable: ARRAY OF Pointer);
  16548. VAR result: ARRAY 10 OF Pointer;
  16549. BEGIN result := variable;
  16550. END Procedure;
  16551. END Test.
  16552. negative: array of pointer to dereferenced open array of pointer assignment
  16553. MODULE Test;
  16554. TYPE Pointer = POINTER TO RECORD END;
  16555. VAR variable: ARRAY 10 OF Pointer; result: POINTER TO ARRAY OF Pointer;
  16556. BEGIN result^ := variable;
  16557. END Test.
  16558. negative: array of procedure to array of pointer assignment
  16559. MODULE Test;
  16560. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF POINTER TO RECORD END;
  16561. BEGIN result := variable;
  16562. END Test.
  16563. negative: array of boolean to array of procedure assignment
  16564. MODULE Test;
  16565. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF PROCEDURE;
  16566. BEGIN result := variable;
  16567. END Test.
  16568. negative: array of character to array of procedure assignment
  16569. MODULE Test;
  16570. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF PROCEDURE;
  16571. BEGIN result := variable;
  16572. END Test.
  16573. negative: array of short integer to array of procedure assignment
  16574. MODULE Test;
  16575. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF PROCEDURE;
  16576. BEGIN result := variable;
  16577. END Test.
  16578. negative: array of integer to array of procedure assignment
  16579. MODULE Test;
  16580. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF PROCEDURE;
  16581. BEGIN result := variable;
  16582. END Test.
  16583. negative: array of long integer to array of procedure assignment
  16584. MODULE Test;
  16585. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF PROCEDURE;
  16586. BEGIN result := variable;
  16587. END Test.
  16588. negative: array of huge integer to array of procedure assignment
  16589. MODULE Test;
  16590. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF PROCEDURE;
  16591. BEGIN result := variable;
  16592. END Test.
  16593. negative: array of real to array of procedure assignment
  16594. MODULE Test;
  16595. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF PROCEDURE;
  16596. BEGIN result := variable;
  16597. END Test.
  16598. negative: array of long real to array of procedure assignment
  16599. MODULE Test;
  16600. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF PROCEDURE;
  16601. BEGIN result := variable;
  16602. END Test.
  16603. negative: array of set to array of procedure assignment
  16604. MODULE Test;
  16605. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF PROCEDURE;
  16606. BEGIN result := variable;
  16607. END Test.
  16608. negative: array of array to array of procedure assignment
  16609. MODULE Test;
  16610. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF PROCEDURE;
  16611. BEGIN result := variable;
  16612. END Test.
  16613. negative: array of record to array of procedure assignment
  16614. MODULE Test;
  16615. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF PROCEDURE;
  16616. BEGIN result := variable;
  16617. END Test.
  16618. negative: array of object to array of procedure assignment
  16619. MODULE Test;
  16620. VAR variable: ARRAY 10 OF OBJECT END; result: ARRAY 10 OF PROCEDURE;
  16621. BEGIN result := variable;
  16622. END Test.
  16623. negative: array of pointer to array of procedure assignment
  16624. MODULE Test;
  16625. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF PROCEDURE;
  16626. BEGIN result := variable;
  16627. END Test.
  16628. positive: array of procedure to array of procedure assignment
  16629. MODULE Test;
  16630. VAR variable, result: ARRAY 10 OF PROCEDURE;
  16631. BEGIN result := variable;
  16632. END Test.
  16633. negative: array of procedure to temporary array of procedure assignment
  16634. MODULE Test;
  16635. VAR variable: ARRAY 10 OF PROCEDURE; result: PROCEDURE (): ARRAY 10 OF PROCEDURE;
  16636. BEGIN result () := variable;
  16637. END Test.
  16638. negative: array of procedure to longer array of procedure assignment
  16639. MODULE Test;
  16640. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 20 OF PROCEDURE;
  16641. BEGIN result := variable;
  16642. END Test.
  16643. negative: array of procedure to shorter array of procedure assignment
  16644. MODULE Test;
  16645. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 5 OF PROCEDURE;
  16646. BEGIN result := variable;
  16647. END Test.
  16648. negative: array of procedure to open array of procedure assignment
  16649. MODULE Test;
  16650. PROCEDURE Procedure (VAR result: ARRAY OF PROCEDURE);
  16651. VAR variable: ARRAY 10 OF PROCEDURE;
  16652. BEGIN result := variable;
  16653. END Procedure;
  16654. END Test.
  16655. negative: open array of procedure to array of procedure assignment
  16656. MODULE Test;
  16657. PROCEDURE Procedure (VAR variable: ARRAY OF PROCEDURE);
  16658. VAR result: ARRAY 10 OF PROCEDURE;
  16659. BEGIN result := variable;
  16660. END Procedure;
  16661. END Test.
  16662. negative: array of procedure to dereferenced open array of procedure assignment
  16663. MODULE Test;
  16664. VAR variable: ARRAY 10 OF PROCEDURE; result: POINTER TO ARRAY OF PROCEDURE;
  16665. BEGIN result^ := variable;
  16666. END Test.
  16667. negative: record to array assignment
  16668. MODULE Test;
  16669. VAR variable: RECORD END; result: ARRAY 10 OF CHAR;
  16670. BEGIN result := variable;
  16671. END Test.
  16672. negative: object to array assignment
  16673. MODULE Test;
  16674. VAR variable: OBJECT; result: ARRAY 10 OF CHAR;
  16675. BEGIN result := variable;
  16676. END Test.
  16677. negative: pointer to array assignment
  16678. MODULE Test;
  16679. VAR variable: POINTER TO RECORD END; result: ARRAY 10 OF CHAR;
  16680. BEGIN result := variable;
  16681. END Test.
  16682. negative: variable procedure to array assignment
  16683. MODULE Test;
  16684. VAR variable: PROCEDURE; result: ARRAY 10 OF CHAR;
  16685. BEGIN result := variable;
  16686. END Test.
  16687. negative: import to array assignment
  16688. MODULE Test;
  16689. IMPORT variable := Dummy; VAR result: ARRAY 10 OF CHAR;
  16690. BEGIN result := variable;
  16691. END Test.
  16692. negative: type to variable array assignment
  16693. MODULE Test;
  16694. TYPE Type = ARRAY 10 OF CHAR; VAR result: Type;
  16695. BEGIN result := Type;
  16696. END Test.
  16697. negative: variable boolean to record assignment
  16698. MODULE Test;
  16699. VAR variable: BOOLEAN; result: RECORD END;
  16700. BEGIN result := variable;
  16701. END Test.
  16702. negative: variable character to record assignment
  16703. MODULE Test;
  16704. VAR variable: CHAR; result: RECORD END;
  16705. BEGIN result := variable;
  16706. END Test.
  16707. negative: variable short integer to record assignment
  16708. MODULE Test;
  16709. VAR variable: SHORTINT; result: RECORD END;
  16710. BEGIN result := variable;
  16711. END Test.
  16712. negative: variable integer to record assignment
  16713. MODULE Test;
  16714. VAR variable: INTEGER; result: RECORD END;
  16715. BEGIN result := variable;
  16716. END Test.
  16717. negative: variable long integer to record assignment
  16718. MODULE Test;
  16719. VAR variable: LONGINT; result: RECORD END;
  16720. BEGIN result := variable;
  16721. END Test.
  16722. negative: variable huge integer to record assignment
  16723. MODULE Test;
  16724. VAR variable: HUGEINT; result: RECORD END;
  16725. BEGIN result := variable;
  16726. END Test.
  16727. negative: variable real to record assignment
  16728. MODULE Test;
  16729. VAR variable: REAL; result: RECORD END;
  16730. BEGIN result := variable;
  16731. END Test.
  16732. negative: variable long real to record assignment
  16733. MODULE Test;
  16734. VAR variable: LONGREAL; result: RECORD END;
  16735. BEGIN result := variable;
  16736. END Test.
  16737. negative: variable set to record assignment
  16738. MODULE Test;
  16739. VAR variable: LONGREAL; result: RECORD END;
  16740. BEGIN result := variable;
  16741. END Test.
  16742. negative: array to record assignment
  16743. MODULE Test;
  16744. VAR variable: ARRAY 10 OF CHAR; result: RECORD END;
  16745. BEGIN result := variable;
  16746. END Test.
  16747. positive: record to same record assignment
  16748. MODULE Test;
  16749. VAR variable, result: RECORD END;
  16750. BEGIN result := variable;
  16751. END Test.
  16752. negative: record to same temporary record assignment
  16753. MODULE Test;
  16754. TYPE Record = RECORD END;
  16755. VAR variable: Record; result: PROCEDURE (): Record;
  16756. BEGIN result () := variable;
  16757. END Test.
  16758. negative: record to different record assignment
  16759. MODULE Test;
  16760. VAR variable: RECORD END; result: RECORD END;
  16761. BEGIN result := variable;
  16762. END Test.
  16763. positive: extended record to base record assignment
  16764. MODULE Test;
  16765. TYPE Record = RECORD END;
  16766. VAR variable: RECORD (Record) END; result: Record;
  16767. BEGIN result := variable;
  16768. END Test.
  16769. negative: base record to extended record assignment
  16770. MODULE Test;
  16771. TYPE Record = RECORD END;
  16772. VAR variable: Record; result: RECORD (Record) END;
  16773. BEGIN result := variable;
  16774. END Test.
  16775. positive: record parameter to same record assignment
  16776. MODULE Test;
  16777. PROCEDURE Procedure (parameter, result: RECORD END);
  16778. BEGIN result := parameter;
  16779. END Procedure;
  16780. END Test.
  16781. negative: record parameter to different record assignment
  16782. MODULE Test;
  16783. PROCEDURE Procedure (parameter: RECORD END; result: RECORD END);
  16784. BEGIN result := parameter;
  16785. END Procedure;
  16786. END Test.
  16787. positive: extended record parameter to base record assignment
  16788. MODULE Test;
  16789. TYPE Record = RECORD END;
  16790. PROCEDURE Procedure (parameter: RECORD (Record) END; result: Record);
  16791. BEGIN result := parameter;
  16792. END Procedure;
  16793. END Test.
  16794. negative: base record parameter to extended record assignment
  16795. MODULE Test;
  16796. TYPE Record = RECORD END;
  16797. PROCEDURE Procedure (parameter: Record; result: RECORD (Record) END);
  16798. BEGIN result := parameter;
  16799. END Procedure;
  16800. END Test.
  16801. negative: object to record assignment
  16802. MODULE Test;
  16803. VAR variable: OBJECT; result: RECORD END;
  16804. BEGIN result := variable;
  16805. END Test.
  16806. negative: pointer to record assignment
  16807. MODULE Test;
  16808. TYPE Record = RECORD END;
  16809. VAR variable: POINTER TO Record; result: Record;
  16810. BEGIN result := variable;
  16811. END Test.
  16812. negative: variable procedure to record assignment
  16813. MODULE Test;
  16814. VAR variable: PROCEDURE; result: RECORD END;
  16815. BEGIN result := variable;
  16816. END Test.
  16817. negative: import to record assignment
  16818. MODULE Test;
  16819. IMPORT variable := Dummy; VAR result: RECORD END;
  16820. BEGIN result := variable;
  16821. END Test.
  16822. negative: type to variable record assignment
  16823. MODULE Test;
  16824. TYPE Type = RECORD END; VAR result: Type;
  16825. BEGIN result := Type;
  16826. END Test.
  16827. negative: variable boolean to object assignment
  16828. MODULE Test;
  16829. VAR variable: BOOLEAN; result: OBJECT END;
  16830. BEGIN result := variable;
  16831. END Test.
  16832. negative: variable character to object assignment
  16833. MODULE Test;
  16834. VAR variable: CHAR; result: OBJECT END;
  16835. BEGIN result := variable;
  16836. END Test.
  16837. negative: variable short integer to object assignment
  16838. MODULE Test;
  16839. VAR variable: SHORTINT; result: OBJECT END;
  16840. BEGIN result := variable;
  16841. END Test.
  16842. negative: variable integer to object assignment
  16843. MODULE Test;
  16844. VAR variable: INTEGER; result: OBJECT END;
  16845. BEGIN result := variable;
  16846. END Test.
  16847. negative: variable long integer to object assignment
  16848. MODULE Test;
  16849. VAR variable: LONGINT; result: OBJECT END;
  16850. BEGIN result := variable;
  16851. END Test.
  16852. negative: variable huge integer to object assignment
  16853. MODULE Test;
  16854. VAR variable: HUGEINT; result: OBJECT END;
  16855. BEGIN result := variable;
  16856. END Test.
  16857. negative: variable real to object assignment
  16858. MODULE Test;
  16859. VAR variable: REAL; result: OBJECT END;
  16860. BEGIN result := variable;
  16861. END Test.
  16862. negative: variable long real to object assignment
  16863. MODULE Test;
  16864. VAR variable: LONGREAL; result: OBJECT END;
  16865. BEGIN result := variable;
  16866. END Test.
  16867. negative: variable set to object assignment
  16868. MODULE Test;
  16869. VAR variable: LONGREAL; result: OBJECT END;
  16870. BEGIN result := variable;
  16871. END Test.
  16872. negative: array to object assignment
  16873. MODULE Test;
  16874. VAR variable: ARRAY 10 OF CHAR; result: OBJECT END;
  16875. BEGIN result := variable;
  16876. END Test.
  16877. negative: record to object assignment
  16878. MODULE Test;
  16879. VAR variable: RECORD END; result: OBJECT END;
  16880. BEGIN result := variable;
  16881. END Test.
  16882. positive: object to same object assignment
  16883. MODULE Test;
  16884. VAR variable, result: OBJECT END;
  16885. BEGIN result := variable;
  16886. END Test.
  16887. negative: obbject to same temporary object assignment
  16888. MODULE Test;
  16889. TYPE Object = OBJECT END Object;
  16890. VAR variable: Object; result: PROCEDURE (): Object;
  16891. BEGIN result () := variable;
  16892. END Test.
  16893. negative: object to different object assignment
  16894. MODULE Test;
  16895. VAR variable: OBJECT END; result: OBJECT END;
  16896. BEGIN result := variable;
  16897. END Test.
  16898. positive: extended object to base object assignment
  16899. MODULE Test;
  16900. TYPE Object = OBJECT END Object;
  16901. VAR variable: OBJECT (Object) END; result: Object;
  16902. BEGIN result := variable;
  16903. END Test.
  16904. negative: base object to extended object assignment
  16905. MODULE Test;
  16906. TYPE Object = OBJECT END Object;
  16907. VAR variable: Object; result: OBJECT (Object) END;
  16908. BEGIN result := variable;
  16909. END Test.
  16910. positive: object to basic object assignment
  16911. MODULE Test;
  16912. VAR variable: OBJECT END; result: OBJECT;
  16913. BEGIN result := variable;
  16914. END Test.
  16915. negative: basic object to object assignment
  16916. MODULE Test;
  16917. VAR variable: OBJECT; result: OBJECT END;
  16918. BEGIN result := variable;
  16919. END Test.
  16920. negative: pointer to object assignment
  16921. MODULE Test;
  16922. VAR variable: POINTER TO RECORD END; result: OBJECT END;
  16923. BEGIN result := variable;
  16924. END Test.
  16925. negative: variable procedure to object assignment
  16926. MODULE Test;
  16927. VAR variable: PROCEDURE; result: OBJECT END;
  16928. BEGIN result := variable;
  16929. END Test.
  16930. negative: import to object assignment
  16931. MODULE Test;
  16932. IMPORT variable := Dummy; VAR result: OBJECT END;
  16933. BEGIN result := variable;
  16934. END Test.
  16935. negative: variable boolean to pointer assignment
  16936. MODULE Test;
  16937. VAR variable: BOOLEAN; result: POINTER TO RECORD END;
  16938. BEGIN result := variable;
  16939. END Test.
  16940. negative: variable character to pointer assignment
  16941. MODULE Test;
  16942. VAR variable: CHAR; result: POINTER TO RECORD END;
  16943. BEGIN result := variable;
  16944. END Test.
  16945. negative: variable short integer to pointer assignment
  16946. MODULE Test;
  16947. VAR variable: SHORTINT; result: POINTER TO RECORD END;
  16948. BEGIN result := variable;
  16949. END Test.
  16950. negative: variable integer to pointer assignment
  16951. MODULE Test;
  16952. VAR variable: INTEGER; result: POINTER TO RECORD END;
  16953. BEGIN result := variable;
  16954. END Test.
  16955. negative: variable long integer to pointer assignment
  16956. MODULE Test;
  16957. VAR variable: LONGINT; result: POINTER TO RECORD END;
  16958. BEGIN result := variable;
  16959. END Test.
  16960. negative: variable huge integer to pointer assignment
  16961. MODULE Test;
  16962. VAR variable: HUGEINT; result: POINTER TO RECORD END;
  16963. BEGIN result := variable;
  16964. END Test.
  16965. negative: variable real to pointer assignment
  16966. MODULE Test;
  16967. VAR variable: REAL; result: POINTER TO RECORD END;
  16968. BEGIN result := variable;
  16969. END Test.
  16970. negative: variable long real to pointer assignment
  16971. MODULE Test;
  16972. VAR variable: LONGREAL; result: POINTER TO RECORD END;
  16973. BEGIN result := variable;
  16974. END Test.
  16975. negative: variable set to pointer assignment
  16976. MODULE Test;
  16977. VAR variable: LONGREAL; result: POINTER TO RECORD END;
  16978. BEGIN result := variable;
  16979. END Test.
  16980. negative: array to pointer assignment
  16981. MODULE Test;
  16982. VAR variable: ARRAY 10 OF CHAR; result: POINTER TO RECORD END;
  16983. BEGIN result := variable;
  16984. END Test.
  16985. negative: record to pointer assignment
  16986. MODULE Test;
  16987. VAR variable: RECORD END; result: POINTER TO RECORD END;
  16988. BEGIN result := variable;
  16989. END Test.
  16990. negative: object to pointer assignment
  16991. MODULE Test;
  16992. VAR variable: OBJECT END; result: POINTER TO RECORD END;
  16993. BEGIN result := variable;
  16994. END Test.
  16995. positive: pointer to same pointer assignment
  16996. MODULE Test;
  16997. VAR variable, result: POINTER TO RECORD END;
  16998. BEGIN result := variable;
  16999. END Test.
  17000. negative: pointer to same temporary pointer assignment
  17001. MODULE Test;
  17002. TYPE Pointer = POINTER TO RECORD END;
  17003. VAR variable: Pointer; result: PROCEDURE (): Pointer;
  17004. BEGIN result () := variable;
  17005. END Test.
  17006. positive: pointer to array of same pointer to same pointer assignment
  17007. MODULE Test;
  17008. TYPE Pointer = POINTER TO ARRAY 10 OF Pointer;
  17009. VAR variable, result: Pointer;
  17010. BEGIN result := variable;
  17011. END Test.
  17012. positive: pointers to array of same pointer to same pointer assignment
  17013. MODULE Test;
  17014. TYPE A = POINTER TO ARRAY 10 OF B;
  17015. TYPE B = POINTER TO ARRAY 10 OF C;
  17016. TYPE C = POINTER TO ARRAY 10 OF D;
  17017. TYPE D = POINTER TO ARRAY 10 OF A;
  17018. VAR variable: A; result: B;
  17019. BEGIN result := variable;
  17020. END Test.
  17021. positive: pointer to open array of same pointer to same pointer assignment
  17022. MODULE Test;
  17023. TYPE Pointer = POINTER TO ARRAY OF Pointer;
  17024. VAR variable, result: Pointer;
  17025. BEGIN result := variable;
  17026. END Test.
  17027. positive: pointers to open array of same pointer to same pointer assignment
  17028. MODULE Test;
  17029. TYPE A = POINTER TO ARRAY 10 OF B;
  17030. TYPE B = POINTER TO ARRAY 10 OF C;
  17031. TYPE C = POINTER TO ARRAY 10 OF D;
  17032. TYPE D = POINTER TO ARRAY 10 OF A;
  17033. VAR variable: A; result: B;
  17034. BEGIN result := variable;
  17035. END Test.
  17036. positive: pointer to different pointer assignment
  17037. MODULE Test;
  17038. TYPE Record = RECORD END;
  17039. VAR variable: POINTER TO Record; result: POINTER TO Record;
  17040. BEGIN result := variable;
  17041. END Test.
  17042. positive: extended pointer to base pointer assignment
  17043. MODULE Test;
  17044. TYPE Record = RECORD END;
  17045. VAR variable: POINTER TO RECORD (Record) END; result: POINTER TO Record;
  17046. BEGIN result := variable;
  17047. END Test.
  17048. negative: base pointer to extended pointer assignment
  17049. MODULE Test;
  17050. TYPE Record = RECORD END;
  17051. VAR variable: POINTER TO Record; result: POINTER TO RECORD (Record) END;
  17052. BEGIN result := variable;
  17053. END Test.
  17054. negative: pointer to array to pointer to record assignment
  17055. MODULE Test;
  17056. VAR variable: POINTER TO ARRAY 10 OF CHAR; result: POINTER TO RECORD END;
  17057. BEGIN result := variable;
  17058. END Test.
  17059. negative: pointer to record to pointer to array assignment
  17060. MODULE Test;
  17061. VAR variable: POINTER TO RECORD END; result: POINTER TO ARRAY 10 OF CHAR;
  17062. BEGIN result := variable;
  17063. END Test.
  17064. positive: pointer to array to pointer to array assignment
  17065. MODULE Test;
  17066. VAR variable, result: POINTER TO ARRAY 10 OF CHAR;
  17067. BEGIN result := variable;
  17068. END Test.
  17069. negative: pointer to array to temporary pointer to array assignment
  17070. MODULE Test;
  17071. TYPE Pointer = POINTER TO ARRAY 10 OF CHAR;
  17072. VAR variable: Pointer; result: PROCEDURE (): Pointer;
  17073. BEGIN result () := variable;
  17074. END Test.
  17075. negative: pointer to array to pointer to longer array assignment
  17076. MODULE Test;
  17077. VAR variable: POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 20 OF CHAR;
  17078. BEGIN result := variable;
  17079. END Test.
  17080. negative: pointer to array to pointer to shorter array assignment
  17081. MODULE Test;
  17082. VAR variable: POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 5 OF CHAR;
  17083. BEGIN result := variable;
  17084. END Test.
  17085. negative: variable procedure to pointer assignment
  17086. MODULE Test;
  17087. VAR variable: PROCEDURE; result: POINTER TO RECORD END;
  17088. BEGIN result := variable;
  17089. END Test.
  17090. negative: import to pointer assignment
  17091. MODULE Test;
  17092. IMPORT variable := Dummy; VAR result: POINTER TO RECORD END;
  17093. BEGIN result := variable;
  17094. END Test.
  17095. negative: type to variable pointer assignment
  17096. MODULE Test;
  17097. TYPE Type = POINTER TO RECORD END; VAR result: Type;
  17098. BEGIN result := Type;
  17099. END Test.
  17100. negative: variable boolean to procedure assignment
  17101. MODULE Test;
  17102. VAR variable: BOOLEAN; result: PROCEDURE;
  17103. BEGIN result := variable;
  17104. END Test.
  17105. negative: variable character to procedure assignment
  17106. MODULE Test;
  17107. VAR variable: CHAR; result: PROCEDURE;
  17108. BEGIN result := variable;
  17109. END Test.
  17110. negative: variable short integer to procedure assignment
  17111. MODULE Test;
  17112. VAR variable: SHORTINT; result: PROCEDURE;
  17113. BEGIN result := variable;
  17114. END Test.
  17115. negative: variable integer to procedure assignment
  17116. MODULE Test;
  17117. VAR variable: INTEGER; result: PROCEDURE;
  17118. BEGIN result := variable;
  17119. END Test.
  17120. negative: variable long integer to procedure assignment
  17121. MODULE Test;
  17122. VAR variable: LONGINT; result: PROCEDURE;
  17123. BEGIN result := variable;
  17124. END Test.
  17125. negative: variable huge integer to procedure assignment
  17126. MODULE Test;
  17127. VAR variable: HUGEINT; result: PROCEDURE;
  17128. BEGIN result := variable;
  17129. END Test.
  17130. negative: variable real to procedure assignment
  17131. MODULE Test;
  17132. VAR variable: REAL; result: PROCEDURE;
  17133. BEGIN result := variable;
  17134. END Test.
  17135. negative: variable long real to procedure assignment
  17136. MODULE Test;
  17137. VAR variable: LONGREAL; result: PROCEDURE;
  17138. BEGIN result := variable;
  17139. END Test.
  17140. negative: variable set to procedure assignment
  17141. MODULE Test;
  17142. VAR variable: LONGREAL; result: PROCEDURE;
  17143. BEGIN result := variable;
  17144. END Test.
  17145. negative: array to procedure assignment
  17146. MODULE Test;
  17147. VAR variable: ARRAY 10 OF CHAR; result: PROCEDURE;
  17148. BEGIN result := variable;
  17149. END Test.
  17150. negative: record to procedure assignment
  17151. MODULE Test;
  17152. VAR variable: RECORD END; result: PROCEDURE;
  17153. BEGIN result := variable;
  17154. END Test.
  17155. negative: object to procedure assignment
  17156. MODULE Test;
  17157. VAR variable: OBJECT END; result: PROCEDURE;
  17158. BEGIN result := variable;
  17159. END Test.
  17160. negative: pointer to procedure assignment
  17161. MODULE Test;
  17162. VAR variable: POINTER TO RECORD END; result: PROCEDURE;
  17163. BEGIN result := variable;
  17164. END Test.
  17165. positive: variable procedure to variable procedure assignment
  17166. MODULE Test;
  17167. VAR variable, result: PROCEDURE;
  17168. BEGIN result := variable;
  17169. END Test.
  17170. negative: variable procedure to temporary procedure assignment
  17171. MODULE Test;
  17172. VAR variable: PROCEDURE; result: PROCEDURE (): PROCEDURE;
  17173. BEGIN result () := variable;
  17174. END Test.
  17175. positive: procedure to variable procedure assignment
  17176. MODULE Test;
  17177. VAR result: PROCEDURE;
  17178. PROCEDURE variable; END variable;
  17179. BEGIN result := variable;
  17180. END Test.
  17181. negative: variable procedure to procedure assignment
  17182. MODULE Test;
  17183. VAR variable: PROCEDURE;
  17184. PROCEDURE result; END result;
  17185. BEGIN result := variable;
  17186. END Test.
  17187. negative: procedure to procedure assignment
  17188. MODULE Test;
  17189. PROCEDURE variable; END variable;
  17190. PROCEDURE result; END result;
  17191. BEGIN result := variable;
  17192. END Test.
  17193. positive: variable procedure to variable procedure with same parameter assignment
  17194. MODULE Test;
  17195. VAR variable: PROCEDURE (integer: INTEGER); result: PROCEDURE (integer: INTEGER);
  17196. BEGIN result := variable;
  17197. END Test.
  17198. positive: procedure to variable procedure with same parameter assignment
  17199. MODULE Test;
  17200. VAR result: PROCEDURE (integer: INTEGER);
  17201. PROCEDURE variable (integer: INTEGER); END variable;
  17202. BEGIN result := variable;
  17203. END Test.
  17204. negative: variable procedure to variable procedure with compatible parameter assignment
  17205. MODULE Test;
  17206. VAR variable: PROCEDURE (object: OBJECT END); result: PROCEDURE (object: OBJECT);
  17207. BEGIN result := variable;
  17208. END Test.
  17209. negative: procedure to variable procedure with compatible parameter assignment
  17210. MODULE Test;
  17211. VAR result: PROCEDURE (object: OBJECT);
  17212. PROCEDURE variable (object: OBJECT END); END variable;
  17213. BEGIN result := variable;
  17214. END Test.
  17215. negative: variable procedure to variable procedure with incompatible parameter assignment
  17216. MODULE Test;
  17217. VAR variable: PROCEDURE (object: OBJECT END); result: PROCEDURE (object: OBJECT END);
  17218. BEGIN result := variable;
  17219. END Test.
  17220. negative: procedure to variable procedure with incompatible parameter assignment
  17221. MODULE Test;
  17222. VAR result: PROCEDURE (object: OBJECT END);
  17223. PROCEDURE variable (object: OBJECT END); END variable;
  17224. BEGIN result := variable;
  17225. END Test.
  17226. positive: variable procedure to variable procedure with same return type assignment
  17227. MODULE Test;
  17228. VAR variable: PROCEDURE (): INTEGER; result: PROCEDURE (): INTEGER;
  17229. BEGIN result := variable;
  17230. END Test.
  17231. positive: procedure to variable procedure with same return type assignment
  17232. MODULE Test;
  17233. VAR result: PROCEDURE (): INTEGER;
  17234. PROCEDURE variable (): INTEGER; END variable;
  17235. BEGIN result := variable;
  17236. END Test.
  17237. negative: variable procedure to variable procedure with compatible return type assignment
  17238. MODULE Test;
  17239. VAR variable: PROCEDURE (): OBJECT END; result: PROCEDURE (): OBJECT;
  17240. BEGIN result := variable;
  17241. END Test.
  17242. negative: procedure to variable procedure with compatible return type assignment
  17243. MODULE Test;
  17244. VAR result: PROCEDURE (): OBJECT;
  17245. PROCEDURE variable (): OBJECT END; END variable;
  17246. BEGIN result := variable;
  17247. END Test.
  17248. negative: variable procedure to variable procedure with incompatible return type assignment
  17249. MODULE Test;
  17250. VAR variable: PROCEDURE (): OBJECT END; result: PROCEDURE (): OBJECT END;
  17251. BEGIN result := variable;
  17252. END Test.
  17253. negative: procedure to variable procedure with incompatible return type assignment
  17254. MODULE Test;
  17255. VAR result: PROCEDURE (): OBJECT END;
  17256. PROCEDURE variable (): OBJECT END; END variable;
  17257. BEGIN result := variable;
  17258. END Test.
  17259. positive: variable procedure to variable procedure with parameter of same procedure type assignment
  17260. MODULE Test;
  17261. TYPE Procedure = PROCEDURE (procedure: Procedure);
  17262. VAR variable: Procedure; result: Procedure;
  17263. BEGIN result := variable;
  17264. END Test.
  17265. positive: procedure to variable procedure with parameter of same procedure type assignment
  17266. MODULE Test;
  17267. TYPE Procedure = PROCEDURE (procedure: Procedure);
  17268. VAR result: Procedure;
  17269. PROCEDURE variable (procedure: Procedure); END variable;
  17270. BEGIN result := variable;
  17271. END Test.
  17272. positive: variable procedure to variable procedure with parameter of same procedure types assignment
  17273. MODULE Test;
  17274. TYPE A = PROCEDURE (b: B);
  17275. TYPE B = PROCEDURE (c: C);
  17276. TYPE C = PROCEDURE (d: D);
  17277. TYPE D = PROCEDURE (a: A);
  17278. VAR variable: A; result: B;
  17279. BEGIN result := variable;
  17280. END Test.
  17281. positive: procedure to variable procedure with parameter of same procedure types assignment
  17282. MODULE Test;
  17283. TYPE A = PROCEDURE (b: B);
  17284. TYPE B = PROCEDURE (c: C);
  17285. TYPE C = PROCEDURE (d: D);
  17286. TYPE D = PROCEDURE (a: A);
  17287. VAR result: A;
  17288. PROCEDURE variable (procedure: A); END variable;
  17289. BEGIN result := variable;
  17290. END Test.
  17291. positive: variable procedure to variable procedure with return of same procedure type assignment
  17292. MODULE Test;
  17293. TYPE Procedure = PROCEDURE (): Procedure;
  17294. VAR variable: Procedure; result: Procedure;
  17295. BEGIN result := variable;
  17296. END Test.
  17297. positive: procedure to variable procedure with return of same procedure type assignment
  17298. MODULE Test;
  17299. TYPE Procedure = PROCEDURE (): Procedure;
  17300. VAR result: Procedure;
  17301. PROCEDURE variable (): Procedure; END variable;
  17302. BEGIN result := variable;
  17303. END Test.
  17304. positive: variable procedure to variable procedure with return of same procedure types assignment
  17305. MODULE Test;
  17306. TYPE A = PROCEDURE (): B;
  17307. TYPE B = PROCEDURE (): C;
  17308. TYPE C = PROCEDURE (): D;
  17309. TYPE D = PROCEDURE (): A;
  17310. VAR variable: A; result: B;
  17311. BEGIN result := variable;
  17312. END Test.
  17313. positive: procedure to variable procedure with return of same procedure types assignment
  17314. MODULE Test;
  17315. TYPE A = PROCEDURE (): B;
  17316. TYPE B = PROCEDURE (): C;
  17317. TYPE C = PROCEDURE (): D;
  17318. TYPE D = PROCEDURE (): A;
  17319. VAR result: A;
  17320. PROCEDURE variable (): A; END variable;
  17321. BEGIN result := variable;
  17322. END Test.
  17323. positive: global procedure to global variable procedure assignment
  17324. MODULE Test;
  17325. VAR result: PROCEDURE;
  17326. PROCEDURE variable; END variable;
  17327. BEGIN result := variable;
  17328. END Test.
  17329. negative: nested procedure to global variable procedure assignment
  17330. MODULE Test;
  17331. VAR result: PROCEDURE;
  17332. PROCEDURE Procedure;
  17333. PROCEDURE variable; END variable;
  17334. BEGIN result := variable;
  17335. END Procedure;
  17336. END Test.
  17337. positive: global procedure to nested variable procedure assignment
  17338. MODULE Test;
  17339. PROCEDURE variable; END variable;
  17340. PROCEDURE Procedure;
  17341. VAR result: PROCEDURE;
  17342. BEGIN result := variable;
  17343. END Procedure;
  17344. END Test.
  17345. negative: nested procedure to nested variable procedure assignment
  17346. MODULE Test;
  17347. PROCEDURE Procedure;
  17348. VAR result: PROCEDURE;
  17349. PROCEDURE variable; END variable;
  17350. BEGIN result := variable;
  17351. END Procedure;
  17352. END Test.
  17353. negative: procedure in object to global variable procedure assignment
  17354. MODULE Test;
  17355. VAR result: PROCEDURE;
  17356. VAR object: OBJECT PROCEDURE variable; END variable; END;
  17357. BEGIN result := object.variable;
  17358. END Test.
  17359. negative: nested procedure in object to global variable procedure assignment
  17360. MODULE Test;
  17361. VAR object: OBJECT VAR result: PROCEDURE; PROCEDURE Procedure; PROCEDURE variable; END variable; BEGIN result := variable; END Procedure; END;
  17362. END Test.
  17363. negative: procedure in object to nested variable procedure assignment
  17364. MODULE Test;
  17365. VAR result: PROCEDURE;
  17366. VAR object: OBJECT PROCEDURE variable; END variable; END;
  17367. BEGIN result := object.variable;
  17368. END Test.
  17369. negative: nested procedure in object to nested variable procedure assignment
  17370. MODULE Test;
  17371. VAR object: OBJECT VAR result: PROCEDURE; PROCEDURE Procedure; PROCEDURE variable; END variable; BEGIN result := variable; END Procedure; END;
  17372. END Test.
  17373. negative: import to procedure assignment
  17374. MODULE Test;
  17375. IMPORT variable := Dummy; VAR result: PROCEDURE;
  17376. BEGIN result := variable;
  17377. END Test.
  17378. negative: type to variable procedure assignment
  17379. MODULE Test;
  17380. TYPE Type = PROCEDURE; VAR result: Type;
  17381. BEGIN result := Type;
  17382. END Test.
  17383. negative: variable boolean to import assignment
  17384. MODULE Test;
  17385. IMPORT result := Dummy;
  17386. VAR variable: BOOLEAN;
  17387. BEGIN result := variable;
  17388. END Test.
  17389. negative: variable character to import assignment
  17390. MODULE Test;
  17391. IMPORT result := Dummy;
  17392. VAR variable: CHAR;
  17393. BEGIN result := variable;
  17394. END Test.
  17395. negative: variable short integer to import assignment
  17396. MODULE Test;
  17397. IMPORT result := Dummy;
  17398. VAR variable: SHORTINT;
  17399. BEGIN result := variable;
  17400. END Test.
  17401. negative: variable integer to import assignment
  17402. MODULE Test;
  17403. IMPORT result := Dummy;
  17404. VAR variable: INTEGER;
  17405. BEGIN result := variable;
  17406. END Test.
  17407. negative: variable long integer to import assignment
  17408. MODULE Test;
  17409. IMPORT result := Dummy;
  17410. VAR variable: LONGINT;
  17411. BEGIN result := variable;
  17412. END Test.
  17413. negative: variable huge integer to import assignment
  17414. MODULE Test;
  17415. IMPORT result := Dummy;
  17416. VAR variable: HUGEINT;
  17417. BEGIN result := variable;
  17418. END Test.
  17419. negative: variable real to import assignment
  17420. MODULE Test;
  17421. IMPORT result := Dummy;
  17422. VAR variable: REAL;
  17423. BEGIN result := variable;
  17424. END Test.
  17425. negative: variable long real to import assignment
  17426. MODULE Test;
  17427. IMPORT result := Dummy;
  17428. VAR variable: LONGREAL;
  17429. BEGIN result := variable;
  17430. END Test.
  17431. negative: variable set to import assignment
  17432. MODULE Test;
  17433. IMPORT result := Dummy;
  17434. VAR variable: LONGREAL;
  17435. BEGIN result := variable;
  17436. END Test.
  17437. negative: array to import assignment
  17438. MODULE Test;
  17439. IMPORT result := Dummy;
  17440. VAR variable: ARRAY 10 OF CHAR;
  17441. BEGIN result := variable;
  17442. END Test.
  17443. negative: record to import assignment
  17444. MODULE Test;
  17445. IMPORT result := Dummy;
  17446. VAR variable: RECORD END;
  17447. BEGIN result := variable;
  17448. END Test.
  17449. negative: object to import assignment
  17450. MODULE Test;
  17451. IMPORT result := Dummy;
  17452. VAR variable: OBJECT END;
  17453. BEGIN result := variable;
  17454. END Test.
  17455. negative: pointer to import assignment
  17456. MODULE Test;
  17457. IMPORT result := Dummy;
  17458. VAR variable: POINTER TO RECORD END;
  17459. BEGIN result := variable;
  17460. END Test.
  17461. negative: variable procedure to import assignment
  17462. MODULE Test;
  17463. IMPORT result := Dummy;
  17464. VAR variable: PROCEDURE;
  17465. BEGIN result := variable;
  17466. END Test.
  17467. negative: import to import assignment
  17468. MODULE Test;
  17469. IMPORT variable := Dummy, result := Dummy;
  17470. BEGIN result := variable;
  17471. END Test.
  17472. negative: type to import assignment
  17473. MODULE Test;
  17474. IMPORT result := Dummy; TYPE Type = BOOLEAN;
  17475. BEGIN result := Type;
  17476. END Test.
  17477. negative: variable boolean to type assignment
  17478. MODULE Test;
  17479. TYPE result = BOOLEAN; VAR variable: result;
  17480. BEGIN result := variable;
  17481. END Test.
  17482. negative: variable character to type assignment
  17483. MODULE Test;
  17484. TYPE result = CHAR; VAR variable: result;
  17485. BEGIN result := variable;
  17486. END Test.
  17487. negative: variable short integer to type assignment
  17488. MODULE Test;
  17489. TYPE result = SHORTINT; VAR variable: result;
  17490. BEGIN result := variable;
  17491. END Test.
  17492. negative: variable integer to type assignment
  17493. MODULE Test;
  17494. TYPE result = INTEGER; VAR variable: result;
  17495. BEGIN result := variable;
  17496. END Test.
  17497. negative: variable long integer to type assignment
  17498. MODULE Test;
  17499. TYPE result = LONGINT; VAR variable: result;
  17500. BEGIN result := variable;
  17501. END Test.
  17502. negative: variable huge integer to type assignment
  17503. MODULE Test;
  17504. TYPE result = HUGEINT; VAR variable: result;
  17505. BEGIN result := variable;
  17506. END Test.
  17507. negative: variable real to type assignment
  17508. MODULE Test;
  17509. TYPE result = REAL; VAR variable: result;
  17510. BEGIN result := variable;
  17511. END Test.
  17512. negative: variable long real to type assignment
  17513. MODULE Test;
  17514. TYPE result = LONGREAL; VAR variable: result;
  17515. BEGIN result := variable;
  17516. END Test.
  17517. negative: variable set to type assignment
  17518. MODULE Test;
  17519. TYPE result = SET; VAR variable: result;
  17520. BEGIN result := variable;
  17521. END Test.
  17522. negative: array to type assignment
  17523. MODULE Test;
  17524. TYPE result = ARRAY 10 OF CHAR; VAR variable: result;
  17525. BEGIN result := variable;
  17526. END Test.
  17527. negative: record to type assignment
  17528. MODULE Test;
  17529. TYPE result = RECORD END; VAR variable: result;
  17530. BEGIN result := variable;
  17531. END Test.
  17532. negative: object to type assignment
  17533. MODULE Test;
  17534. TYPE result = OBJECT END result; VAR variable: result;
  17535. BEGIN result := variable;
  17536. END Test.
  17537. negative: pointer to type assignment
  17538. MODULE Test;
  17539. TYPE result = POINTER TO RECORD END; VAR variable: result;
  17540. BEGIN result := variable;
  17541. END Test.
  17542. negative: variable procedure to type assignment
  17543. MODULE Test;
  17544. TYPE result = PROCEDURE; VAR variable: result;
  17545. BEGIN result := variable;
  17546. END Test.
  17547. negative: import to type assignment
  17548. MODULE Test;
  17549. IMPORT variable := Dummy; TYPE result = BOOLEAN;
  17550. BEGIN result := variable;
  17551. END Test.
  17552. # variable booleans
  17553. negative: arithmetic negation on variable boolean
  17554. MODULE Test;
  17555. VAR boolean, result: BOOLEAN;
  17556. BEGIN result := -boolean;
  17557. END Test.
  17558. positive: logical negation on variable boolean
  17559. MODULE Test;
  17560. VAR boolean, result: BOOLEAN;
  17561. BEGIN result := ~boolean;
  17562. END Test.
  17563. positive: multiple logical negations on variable boolean
  17564. MODULE Test;
  17565. VAR boolean, result: BOOLEAN;
  17566. BEGIN result := ~~~~boolean;
  17567. END Test.
  17568. negative: dereferencing variable boolean
  17569. MODULE Test;
  17570. VAR boolean, result: BOOLEAN;
  17571. BEGIN result := boolean^;
  17572. END Test.
  17573. negative: addition on variable booleans
  17574. MODULE Test;
  17575. VAR boolean, result: BOOLEAN;
  17576. BEGIN result := boolean + boolean;
  17577. END Test.
  17578. negative: subtraction on variable booleans
  17579. MODULE Test;
  17580. VAR boolean, result: BOOLEAN;
  17581. BEGIN result := boolean - boolean
  17582. END Test.
  17583. negative: multiplication on variable booleans
  17584. MODULE Test;
  17585. VAR boolean, result: BOOLEAN;
  17586. BEGIN result := boolean * boolean
  17587. END Test.
  17588. negative: integer division on variable booleans
  17589. MODULE Test;
  17590. VAR boolean: BOOLEAN; result: INTEGER;
  17591. BEGIN result := boolean DIV boolean
  17592. END Test.
  17593. negative: real division on variable booleans
  17594. MODULE Test;
  17595. VAR boolean: BOOLEAN; result: REAL;
  17596. BEGIN result := boolean / boolean
  17597. END Test.
  17598. negative: modulo on variable booleans
  17599. MODULE Test;
  17600. VAR boolean: BOOLEAN; result: INTEGER;
  17601. BEGIN result := boolean MOD boolean
  17602. END Test.
  17603. positive: equal relation on variable booleans
  17604. MODULE Test;
  17605. VAR boolean, result: BOOLEAN;
  17606. BEGIN result := boolean = boolean
  17607. END Test.
  17608. positive: unequal relation on variable booleans
  17609. MODULE Test;
  17610. VAR boolean, result: BOOLEAN;
  17611. BEGIN result := boolean # boolean
  17612. END Test.
  17613. negative: less relation on variable booleans
  17614. MODULE Test;
  17615. VAR boolean, result: BOOLEAN;
  17616. BEGIN result := boolean < boolean
  17617. END Test.
  17618. negative: less or equal relation on variable booleans
  17619. MODULE Test;
  17620. VAR boolean, result: BOOLEAN;
  17621. BEGIN result := boolean <= boolean
  17622. END Test.
  17623. negative: greater relation on variable booleans
  17624. MODULE Test;
  17625. VAR boolean, result: BOOLEAN;
  17626. BEGIN result := boolean > boolean
  17627. END Test.
  17628. negative: greater or equal relation on variable booleans
  17629. MODULE Test;
  17630. VAR boolean, result: BOOLEAN;
  17631. BEGIN result := boolean >= boolean
  17632. END Test.
  17633. negative: set membership on variable booleans
  17634. MODULE Test;
  17635. VAR boolean, result: BOOLEAN;
  17636. BEGIN result := boolean IN boolean
  17637. END Test.
  17638. negative: type test on variable booleans
  17639. MODULE Test;
  17640. VAR boolean, result: BOOLEAN;
  17641. BEGIN result := boolean IS boolean
  17642. END Test.
  17643. negative: type test on variable boolean
  17644. MODULE Test;
  17645. VAR boolean, result: BOOLEAN;
  17646. BEGIN result := boolean IS BOOLEAN
  17647. END Test.
  17648. negative: type test on boolean type
  17649. MODULE Test;
  17650. TYPE Type = BOOLEAN;
  17651. VAR boolean: Type; result: BOOLEAN;
  17652. BEGIN result := boolean IS Type
  17653. END Test.
  17654. negative: type guard on variable booleans
  17655. MODULE Test;
  17656. VAR boolean, result: BOOLEAN;
  17657. BEGIN result := boolean(boolean)
  17658. END Test.
  17659. negative: type guard on variable boolean
  17660. MODULE Test;
  17661. VAR boolean, result: BOOLEAN;
  17662. BEGIN result := boolean(BOOLEAN)
  17663. END Test.
  17664. negative: type guard on boolean type
  17665. MODULE Test;
  17666. TYPE Type = BOOLEAN;
  17667. VAR boolean, result: Type;
  17668. BEGIN result := boolean(Type)
  17669. END Test.
  17670. positive: logical and on variable booleans
  17671. MODULE Test;
  17672. VAR boolean, result: BOOLEAN;
  17673. BEGIN result := boolean & boolean
  17674. END Test.
  17675. positive: logical or on variable booleans
  17676. MODULE Test;
  17677. VAR boolean, result: BOOLEAN;
  17678. BEGIN result := boolean OR boolean
  17679. END Test.
  17680. negative: ordinal value of variable boolean
  17681. MODULE Test;
  17682. VAR boolean: BOOLEAN; result: INTEGER;
  17683. BEGIN result := ORD (boolean)
  17684. END Test.
  17685. negative: character value of variable boolean
  17686. MODULE Test;
  17687. VAR boolean: BOOLEAN; result: CHAR;
  17688. BEGIN result := CHR (boolean)
  17689. END Test.
  17690. negative: absolute value of variable boolean
  17691. MODULE Test;
  17692. VAR boolean, result: BOOLEAN;
  17693. BEGIN result := ABS (boolean)
  17694. END Test.
  17695. negative: odd test on variable boolean
  17696. MODULE Test;
  17697. VAR boolean, result: BOOLEAN;
  17698. BEGIN result := ODD (boolean)
  17699. END Test.
  17700. negative: capital letter of variable boolean
  17701. MODULE Test;
  17702. VAR boolean: BOOLEAN; result: CHAR;
  17703. BEGIN result := CAP (boolean)
  17704. END Test.
  17705. negative: arithmetic shift of variable booleans
  17706. MODULE Test;
  17707. VAR boolean, result: BOOLEAN;
  17708. BEGIN result := ASH (boolean, boolean)
  17709. END Test.
  17710. negative: short on variable boolean
  17711. MODULE Test;
  17712. VAR boolean, result: BOOLEAN;
  17713. BEGIN result := SHORT (boolean)
  17714. END Test.
  17715. negative: long on variable boolean
  17716. MODULE Test;
  17717. VAR boolean, result: BOOLEAN;
  17718. BEGIN result := LONG (boolean)
  17719. END Test.
  17720. negative: entier on variable boolean
  17721. MODULE Test;
  17722. VAR boolean, result: BOOLEAN;
  17723. BEGIN result := ENTIER (boolean)
  17724. END Test.
  17725. negative: unary length of variable boolean
  17726. MODULE Test;
  17727. VAR boolean: BOOLEAN; result: LONGINT;
  17728. BEGIN result := LEN (boolean)
  17729. END Test.
  17730. negative: binary length of variable boolean
  17731. MODULE Test;
  17732. VAR boolean: BOOLEAN; result: LONGINT;
  17733. BEGIN result := LEN (boolean, 0)
  17734. END Test.
  17735. negative: indexing variable boolean
  17736. MODULE Test;
  17737. VAR boolean: BOOLEAN; result: CHAR;
  17738. BEGIN result := boolean[0]
  17739. END Test.
  17740. negative: variable boolean as index
  17741. MODULE Test;
  17742. VAR array: ARRAY 10 OF CHAR; result: CHAR; boolean: BOOLEAN;
  17743. BEGIN result := array[boolean]
  17744. END Test.
  17745. negative: member selection on variable boolean
  17746. MODULE Test;
  17747. VAR boolean, result: BOOLEAN;
  17748. BEGIN result := boolean.member
  17749. END Test.
  17750. negative: calling variable boolean
  17751. MODULE Test;
  17752. VAR boolean: BOOLEAN;
  17753. BEGIN boolean
  17754. END Test.
  17755. # variable characters
  17756. negative: arithmetic negation on variable character
  17757. MODULE Test;
  17758. VAR character, result: CHAR;
  17759. BEGIN result := -character;
  17760. END Test.
  17761. negative: logical negation on variable character
  17762. MODULE Test;
  17763. VAR character: CHAR; result: BOOLEAN;
  17764. BEGIN result := ~character;
  17765. END Test.
  17766. negative: dereferencing variable character
  17767. MODULE Test;
  17768. VAR character, result: CHAR;
  17769. BEGIN result := character^;
  17770. END Test.
  17771. negative: addition on variable characters
  17772. MODULE Test;
  17773. VAR character, result: CHAR;
  17774. BEGIN result := character + character;
  17775. END Test.
  17776. negative: subtraction on variable characters
  17777. MODULE Test;
  17778. VAR character, result: CHAR;
  17779. BEGIN result := character - character
  17780. END Test.
  17781. negative: multiplication on variable characters
  17782. MODULE Test;
  17783. VAR character, result: CHAR;
  17784. BEGIN result := character * character
  17785. END Test.
  17786. negative: integer division on variable characters
  17787. MODULE Test;
  17788. VAR character: CHAR; result: INTEGER;
  17789. BEGIN result := character DIV character
  17790. END Test.
  17791. negative: real division on variable characters
  17792. MODULE Test;
  17793. VAR character: CHAR; result: REAL;
  17794. BEGIN result := character / character
  17795. END Test.
  17796. negative: modulo on variable characters
  17797. MODULE Test;
  17798. VAR character: CHAR; result: INTEGER;
  17799. BEGIN result := character MOD character
  17800. END Test.
  17801. positive: equal relation on variable characters
  17802. MODULE Test;
  17803. VAR character: CHAR; result: BOOLEAN;
  17804. BEGIN result := character = character
  17805. END Test.
  17806. positive: unequal relation on variable characters
  17807. MODULE Test;
  17808. VAR character: CHAR; result: BOOLEAN;
  17809. BEGIN result := character # character
  17810. END Test.
  17811. positive: less relation on variable characters
  17812. MODULE Test;
  17813. VAR character: CHAR; result: BOOLEAN;
  17814. BEGIN result := character < character
  17815. END Test.
  17816. positive: less or equal relation on variable characters
  17817. MODULE Test;
  17818. VAR character: CHAR; result: BOOLEAN;
  17819. BEGIN result := character <= character
  17820. END Test.
  17821. positive: greater relation on variable characters
  17822. MODULE Test;
  17823. VAR character: CHAR; result: BOOLEAN;
  17824. BEGIN result := character > character
  17825. END Test.
  17826. positive: greater or equal relation on variable characters
  17827. MODULE Test;
  17828. VAR character: CHAR; result: BOOLEAN;
  17829. BEGIN result := character >= character
  17830. END Test.
  17831. negative: set membership on variable characters
  17832. MODULE Test;
  17833. VAR character: CHAR; result: BOOLEAN;
  17834. BEGIN result := character IN character
  17835. END Test.
  17836. negative: type test on variable characters
  17837. MODULE Test;
  17838. VAR character: CHAR; result: BOOLEAN;
  17839. BEGIN result := character IS character
  17840. END Test.
  17841. negative: type test on variable character
  17842. MODULE Test;
  17843. VAR character: CHAR; result: BOOLEAN;
  17844. BEGIN result := character IS CHAR
  17845. END Test.
  17846. negative: type test on character type
  17847. MODULE Test;
  17848. TYPE Type = CHAR;
  17849. VAR character: Type; result: BOOLEAN;
  17850. BEGIN result := character IS Type
  17851. END Test.
  17852. negative: type guard on variable characters
  17853. MODULE Test;
  17854. VAR character, result: CHAR;
  17855. BEGIN result := character(character)
  17856. END Test.
  17857. negative: type guard on variable character
  17858. MODULE Test;
  17859. VAR character, result: CHAR;
  17860. BEGIN result := character(CHAR)
  17861. END Test.
  17862. negative: type guard on character type
  17863. MODULE Test;
  17864. TYPE Type = CHAR;
  17865. VAR character, result: Type;
  17866. BEGIN result := character(Type)
  17867. END Test.
  17868. negative: logical and on variable characters
  17869. MODULE Test;
  17870. VAR character: CHAR; result: BOOLEAN;
  17871. BEGIN result := character & character
  17872. END Test.
  17873. negative: logical or on variable characters
  17874. MODULE Test;
  17875. VAR character: CHAR; result: BOOLEAN;
  17876. BEGIN result := character OR character
  17877. END Test.
  17878. positive: ordinal value of variable character
  17879. MODULE Test;
  17880. VAR character: CHAR; result: INTEGER;
  17881. BEGIN result := ORD (character)
  17882. END Test.
  17883. negative: character value of variable character
  17884. MODULE Test;
  17885. VAR character, result: CHAR;
  17886. BEGIN result := CHR (character)
  17887. END Test.
  17888. negative: absolute value of variable character
  17889. MODULE Test;
  17890. VAR character, result: CHAR;
  17891. BEGIN result := ABS (character)
  17892. END Test.
  17893. negative: odd test on variable character
  17894. MODULE Test;
  17895. VAR character: CHAR; result: BOOLEAN;
  17896. BEGIN result := ODD (character)
  17897. END Test.
  17898. positive: capital letter of variable character
  17899. MODULE Test;
  17900. VAR character, result: CHAR;
  17901. BEGIN result := CAP (character)
  17902. END Test.
  17903. negative: arithmetic shift of variable characters
  17904. MODULE Test;
  17905. VAR character, result: CHAR;
  17906. BEGIN result := ASH (character, character)
  17907. END Test.
  17908. negative: short on variable character
  17909. MODULE Test;
  17910. VAR character, result: CHAR;
  17911. BEGIN result := SHORT (character)
  17912. END Test.
  17913. negative: long on variable character
  17914. MODULE Test;
  17915. VAR character, result: CHAR;
  17916. BEGIN result := LONG (character)
  17917. END Test.
  17918. negative: entier on variable character
  17919. MODULE Test;
  17920. VAR character, result: CHAR;
  17921. BEGIN result := ENTIER (character)
  17922. END Test.
  17923. negative: unary length of variable character
  17924. MODULE Test;
  17925. VAR character: CHAR; result: LONGINT;
  17926. BEGIN result := LEN (character)
  17927. END Test.
  17928. negative: binary length of variable character
  17929. MODULE Test;
  17930. VAR character: CHAR; result: LONGINT;
  17931. BEGIN result := LEN (character, 0)
  17932. END Test.
  17933. negative: indexing variable character
  17934. MODULE Test;
  17935. VAR character, result: CHAR;
  17936. BEGIN result := character[0]
  17937. END Test.
  17938. negative: variable character as index
  17939. MODULE Test;
  17940. VAR array: ARRAY 10 OF CHAR; result, character: CHAR;
  17941. BEGIN result := array[character]
  17942. END Test.
  17943. negative: member selection on variable character
  17944. MODULE Test;
  17945. VAR character, result: CHAR;
  17946. BEGIN result := character.member
  17947. END Test.
  17948. negative: calling variable character
  17949. MODULE Test;
  17950. VAR character: CHAR;
  17951. BEGIN character
  17952. END Test.
  17953. # variable integers
  17954. positive: arithmetic negation on variable integer
  17955. MODULE Test;
  17956. VAR integer, result: INTEGER;
  17957. BEGIN result := -integer;
  17958. END Test.
  17959. positive: multiple arithmetic negations on variable integer
  17960. MODULE Test;
  17961. VAR integer, result: INTEGER;
  17962. BEGIN result := -(-(-integer));
  17963. END Test.
  17964. negative: logical negation on variable integer
  17965. MODULE Test;
  17966. VAR integer: INTEGER; result: BOOLEAN;
  17967. BEGIN result := ~integer;
  17968. END Test.
  17969. negative: dereferencing variable integer
  17970. MODULE Test;
  17971. VAR integer, result: INTEGER;
  17972. BEGIN result := integer^;
  17973. END Test.
  17974. positive: addition on variable integers
  17975. MODULE Test;
  17976. VAR integer, result: INTEGER;
  17977. BEGIN result := integer + integer;
  17978. END Test.
  17979. positive: subtraction on variable integers
  17980. MODULE Test;
  17981. VAR integer, result: INTEGER;
  17982. BEGIN result := integer - integer
  17983. END Test.
  17984. positive: multiplication on variable integers
  17985. MODULE Test;
  17986. VAR integer, result: INTEGER;
  17987. BEGIN result := integer * integer
  17988. END Test.
  17989. positive: integer division on variable integers
  17990. MODULE Test;
  17991. VAR integer, result: INTEGER;
  17992. BEGIN result := integer DIV integer
  17993. END Test.
  17994. positive: real division on variable integers
  17995. MODULE Test;
  17996. VAR integer: INTEGER; result: REAL;
  17997. BEGIN result := integer / integer
  17998. END Test.
  17999. positive: modulo on variable integers
  18000. MODULE Test;
  18001. VAR integer, result: INTEGER;
  18002. BEGIN result := integer MOD integer
  18003. END Test.
  18004. positive: equal relation on variable integers
  18005. MODULE Test;
  18006. VAR integer: INTEGER; result: BOOLEAN;
  18007. BEGIN result := integer = integer
  18008. END Test.
  18009. positive: unequal relation on variable integers
  18010. MODULE Test;
  18011. VAR integer: INTEGER; result: BOOLEAN;
  18012. BEGIN result := integer # integer
  18013. END Test.
  18014. positive: less relation on variable integers
  18015. MODULE Test;
  18016. VAR integer: INTEGER; result: BOOLEAN;
  18017. BEGIN result := integer < integer
  18018. END Test.
  18019. positive: less or equal relation on variable integers
  18020. MODULE Test;
  18021. VAR integer: INTEGER; result: BOOLEAN;
  18022. BEGIN result := integer <= integer
  18023. END Test.
  18024. positive: greater relation on variable integers
  18025. MODULE Test;
  18026. VAR integer: INTEGER; result: BOOLEAN;
  18027. BEGIN result := integer > integer
  18028. END Test.
  18029. positive: greater or equal relation on variable integers
  18030. MODULE Test;
  18031. VAR integer: INTEGER; result: BOOLEAN;
  18032. BEGIN result := integer >= integer
  18033. END Test.
  18034. negative: set membership on variable integers
  18035. MODULE Test;
  18036. VAR integer: INTEGER; result: BOOLEAN;
  18037. BEGIN result := integer IN integer
  18038. END Test.
  18039. negative: type test on variable integers
  18040. MODULE Test;
  18041. VAR integer: INTEGER; result: BOOLEAN;
  18042. BEGIN result := integer IS integer
  18043. END Test.
  18044. negative: type test on variable integer
  18045. MODULE Test;
  18046. VAR integer: INTEGER; result: BOOLEAN;
  18047. BEGIN result := integer IS INTEGER
  18048. END Test.
  18049. negative: type test on integer type
  18050. MODULE Test;
  18051. TYPE Type = INTEGER;
  18052. VAR integer: Type; result: BOOLEAN;
  18053. BEGIN result := integer IS Type
  18054. END Test.
  18055. negative: type guard on variable integers
  18056. MODULE Test;
  18057. VAR integer, result: INTEGER;
  18058. BEGIN result := integer(integer)
  18059. END Test.
  18060. negative: type guard on variable integer
  18061. MODULE Test;
  18062. VAR integer, result: INTEGER;
  18063. BEGIN result := integer(INTEGER)
  18064. END Test.
  18065. negative: type guard on integer type
  18066. MODULE Test;
  18067. TYPE Type = INTEGER;
  18068. VAR integer, result: Type;
  18069. BEGIN result := integer(Type)
  18070. END Test.
  18071. negative: logical and on variable integers
  18072. MODULE Test;
  18073. VAR integer: INTEGER; result: BOOLEAN;
  18074. BEGIN result := integer & integer
  18075. END Test.
  18076. negative: logical or on variable integers
  18077. MODULE Test;
  18078. VAR integer: INTEGER; result: BOOLEAN;
  18079. BEGIN result := integer OR integer
  18080. END Test.
  18081. negative: ordinal value of variable integer
  18082. MODULE Test;
  18083. VAR integer, result: INTEGER;
  18084. BEGIN result := ORD (integer)
  18085. END Test.
  18086. positive: character value of variable integer
  18087. MODULE Test;
  18088. VAR integer: INTEGER; result: CHAR;
  18089. BEGIN result := CHR (integer)
  18090. END Test.
  18091. positive: absolute value of variable integer
  18092. MODULE Test;
  18093. VAR integer, result: INTEGER;
  18094. BEGIN result := ABS (integer)
  18095. END Test.
  18096. positive: odd test on variable integer
  18097. MODULE Test;
  18098. VAR integer: INTEGER; result: BOOLEAN;
  18099. BEGIN result := ODD (integer)
  18100. END Test.
  18101. negative: capital letter of variable integer
  18102. MODULE Test;
  18103. VAR integer: INTEGER; result: CHAR;
  18104. BEGIN result := CAP (integer)
  18105. END Test.
  18106. positive: arithmetic shift of variable integers
  18107. MODULE Test;
  18108. VAR integer: INTEGER; result: LONGINT;
  18109. BEGIN result := ASH (integer, integer)
  18110. END Test.
  18111. negative: short on variable short integer
  18112. MODULE Test;
  18113. VAR shortint, result: SHORTINT;
  18114. BEGIN result := SHORT (shortint)
  18115. END Test.
  18116. positive: short on variable integer
  18117. MODULE Test;
  18118. VAR integer, result: INTEGER;
  18119. BEGIN result := SHORT (integer)
  18120. END Test.
  18121. positive: short on variable long integer
  18122. MODULE Test;
  18123. VAR longint, result: LONGINT;
  18124. BEGIN result := SHORT (longint)
  18125. END Test.
  18126. positive: short on variable huge integer
  18127. MODULE Test;
  18128. VAR hugeint, result: HUGEINT;
  18129. BEGIN result := SHORT (hugeint)
  18130. END Test.
  18131. positive: long on variable short integer
  18132. MODULE Test;
  18133. VAR shortint, result: SHORTINT;
  18134. BEGIN result := SHORT (LONG (shortint))
  18135. END Test.
  18136. positive: long on variable integer
  18137. MODULE Test;
  18138. VAR integer, result: INTEGER;
  18139. BEGIN result := SHORT (LONG (integer))
  18140. END Test.
  18141. positive: long on variable long integer
  18142. MODULE Test;
  18143. VAR longint, result: LONGINT;
  18144. BEGIN result := SHORT (LONG (longint))
  18145. END Test.
  18146. negative: long on variable huge integer
  18147. MODULE Test;
  18148. VAR hugeint, result: HUGEINT;
  18149. BEGIN result := SHORT (LONG (hugeint))
  18150. END Test.
  18151. negative: entier on variable integer
  18152. MODULE Test;
  18153. VAR integer, result: LONGINT;
  18154. BEGIN result := ENTIER (integer)
  18155. END Test.
  18156. negative: unary length of variable integer
  18157. MODULE Test;
  18158. VAR integer: INTEGER; result: LONGINT;
  18159. BEGIN result := LEN (integer)
  18160. END Test.
  18161. negative: binary length of variable integer
  18162. MODULE Test;
  18163. VAR integer: INTEGER; result: LONGINT;
  18164. BEGIN result := LEN (integer, 0)
  18165. END Test.
  18166. negative: indexing variable integer
  18167. MODULE Test;
  18168. VAR integer: INTEGER; result: CHAR;
  18169. BEGIN result := integer[0]
  18170. END Test.
  18171. positive: variable integer as index
  18172. MODULE Test;
  18173. VAR array: ARRAY 10 OF CHAR; result: CHAR; integer: INTEGER;
  18174. BEGIN result := array[integer]
  18175. END Test.
  18176. positive: variable integer as index in two-dimensional array
  18177. MODULE Test;
  18178. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR; integer: INTEGER;
  18179. BEGIN result := array[integer, integer]
  18180. END Test.
  18181. positive: variable integer as index in two-dimensional open array
  18182. MODULE Test;
  18183. PROCEDURE Procedure (CONST array: ARRAY OF ARRAY OF CHAR);
  18184. VAR result: CHAR; integer: INTEGER;
  18185. BEGIN result := array[integer, integer]; result := array[integer][integer]
  18186. END Procedure;
  18187. END Test.
  18188. negative: member selection on variable integer
  18189. MODULE Test;
  18190. VAR integer, result: INTEGER;
  18191. BEGIN result := integer.member
  18192. END Test.
  18193. negative: calling variable integer
  18194. MODULE Test;
  18195. VAR integer: INTEGER;
  18196. BEGIN integer
  18197. END Test.
  18198. # variable reals
  18199. positive: arithmetic negation on variable real
  18200. MODULE Test;
  18201. VAR real, result: REAL;
  18202. BEGIN result := -real;
  18203. END Test.
  18204. positive: multiple arithmetic negations on variable real
  18205. MODULE Test;
  18206. VAR real, result: REAL;
  18207. BEGIN result := -(-(-real));
  18208. END Test.
  18209. negative: logical negation on variable real
  18210. MODULE Test;
  18211. VAR real: REAL; result: BOOLEAN;
  18212. BEGIN result := ~real;
  18213. END Test.
  18214. negative: dereferencing variable real
  18215. MODULE Test;
  18216. VAR real, result: REAL;
  18217. BEGIN result := real^;
  18218. END Test.
  18219. positive: addition on variable reals
  18220. MODULE Test;
  18221. VAR real, result: REAL;
  18222. BEGIN result := real + real;
  18223. END Test.
  18224. positive: subtraction on variable reals
  18225. MODULE Test;
  18226. VAR real, result: REAL;
  18227. BEGIN result := real - real
  18228. END Test.
  18229. positive: multiplication on variable reals
  18230. MODULE Test;
  18231. VAR real, result: REAL;
  18232. BEGIN result := real * real
  18233. END Test.
  18234. negative: integer division on variable reals
  18235. MODULE Test;
  18236. VAR real: REAL; result: INTEGER;
  18237. BEGIN result := real DIV real
  18238. END Test.
  18239. positive: real division on variable reals
  18240. MODULE Test;
  18241. VAR real, result: REAL;
  18242. BEGIN result := real / real
  18243. END Test.
  18244. negative: modulo on variable reals
  18245. MODULE Test;
  18246. VAR real: REAL; result: INTEGER;
  18247. BEGIN result := real MOD real
  18248. END Test.
  18249. positive: equal relation on variable reals
  18250. MODULE Test;
  18251. VAR real: REAL; result: BOOLEAN;
  18252. BEGIN result := real = real
  18253. END Test.
  18254. positive: unequal relation on variable reals
  18255. MODULE Test;
  18256. VAR real: REAL; result: BOOLEAN;
  18257. BEGIN result := real # real
  18258. END Test.
  18259. positive: less relation on variable reals
  18260. MODULE Test;
  18261. VAR real: REAL; result: BOOLEAN;
  18262. BEGIN result := real < real
  18263. END Test.
  18264. positive: less or equal relation on variable reals
  18265. MODULE Test;
  18266. VAR real: REAL; result: BOOLEAN;
  18267. BEGIN result := real <= real
  18268. END Test.
  18269. positive: greater relation on variable reals
  18270. MODULE Test;
  18271. VAR real: REAL; result: BOOLEAN;
  18272. BEGIN result := real > real
  18273. END Test.
  18274. positive: greater or equal relation on variable reals
  18275. MODULE Test;
  18276. VAR real: REAL; result: BOOLEAN;
  18277. BEGIN result := real >= real
  18278. END Test.
  18279. negative: set membership on variable reals
  18280. MODULE Test;
  18281. VAR real: REAL; result: BOOLEAN;
  18282. BEGIN result := real IN real
  18283. END Test.
  18284. negative: type test on variable reals
  18285. MODULE Test;
  18286. VAR real: REAL; result: BOOLEAN;
  18287. BEGIN result := real IS real
  18288. END Test.
  18289. negative: type test on variable real
  18290. MODULE Test;
  18291. VAR real: REAL; result: BOOLEAN;
  18292. BEGIN result := real IS REAL
  18293. END Test.
  18294. negative: type test on real type
  18295. MODULE Test;
  18296. TYPE Type = REAL;
  18297. VAR real: Type; result: BOOLEAN;
  18298. BEGIN result := real IS Type
  18299. END Test.
  18300. negative: type guard on variable reals
  18301. MODULE Test;
  18302. VAR real, result: REAL;
  18303. BEGIN result := real(real)
  18304. END Test.
  18305. negative: type guard on variable real
  18306. MODULE Test;
  18307. VAR real, result: REAL;
  18308. BEGIN result := real(REAL)
  18309. END Test.
  18310. negative: type guard on real type
  18311. MODULE Test;
  18312. TYPE Type = REAL;
  18313. VAR real: Type; result: BOOLEAN;
  18314. BEGIN result := real(Type)
  18315. END Test.
  18316. negative: logical and on variable reals
  18317. MODULE Test;
  18318. VAR real: REAL; result: BOOLEAN;
  18319. BEGIN result := real & real
  18320. END Test.
  18321. negative: logical or on variable reals
  18322. MODULE Test;
  18323. VAR real: REAL; result: BOOLEAN;
  18324. BEGIN result := real OR real
  18325. END Test.
  18326. negative: ordinal value of variable real
  18327. MODULE Test;
  18328. VAR real: REAL; result: INTEGER;
  18329. BEGIN result := ORD (real)
  18330. END Test.
  18331. negative: character value of variable real
  18332. MODULE Test;
  18333. VAR real: REAL; result: CHAR;
  18334. BEGIN result := CHR (real)
  18335. END Test.
  18336. positive: absolute value of variable real
  18337. MODULE Test;
  18338. VAR real, result: REAL;
  18339. BEGIN result := ABS (real)
  18340. END Test.
  18341. negative: odd test on variable real
  18342. MODULE Test;
  18343. VAR real: REAL; result: BOOLEAN;
  18344. BEGIN result := ODD (real)
  18345. END Test.
  18346. negative: capital letter of variable real
  18347. MODULE Test;
  18348. VAR real: REAL; result: CHAR;
  18349. BEGIN result := CAP (real)
  18350. END Test.
  18351. negative: arithmetic shift of variable reals
  18352. MODULE Test;
  18353. VAR real, result: REAL;
  18354. BEGIN result := ASH (real, real)
  18355. END Test.
  18356. negative: short on variable real
  18357. MODULE Test;
  18358. VAR real, result: REAL;
  18359. BEGIN result := SHORT (real)
  18360. END Test.
  18361. positive: short on variable long real
  18362. MODULE Test;
  18363. VAR longreal, result: LONGREAL;
  18364. BEGIN result := SHORT (longreal)
  18365. END Test.
  18366. positive: long on variable real
  18367. MODULE Test;
  18368. VAR real, result: REAL;
  18369. BEGIN result := SHORT (LONG (real))
  18370. END Test.
  18371. negative: long on variable long real
  18372. MODULE Test;
  18373. VAR longreal, result: LONGREAL;
  18374. BEGIN result := SHORT (LONG (longreal))
  18375. END Test.
  18376. positive: entier on variable real
  18377. MODULE Test;
  18378. VAR real, result: REAL;
  18379. BEGIN result := ENTIER (real)
  18380. END Test.
  18381. positive: entier on variable long real
  18382. MODULE Test;
  18383. VAR longreal, result: LONGREAL;
  18384. BEGIN result := ENTIER (longreal)
  18385. END Test.
  18386. negative: unary length of variable real
  18387. MODULE Test;
  18388. VAR real: REAL; result: LONGINT;
  18389. BEGIN result := LEN (real)
  18390. END Test.
  18391. negative: binary length of variable real
  18392. MODULE Test;
  18393. VAR real: REAL; result: LONGINT;
  18394. BEGIN result := LEN (real, 0)
  18395. END Test.
  18396. negative: indexing variable real
  18397. MODULE Test;
  18398. VAR real: REAL; result: CHAR;
  18399. BEGIN result := real[0]
  18400. END Test.
  18401. negative: variable real as index
  18402. MODULE Test;
  18403. VAR array: ARRAY 10 OF CHAR; result: CHAR; real: REAL;
  18404. BEGIN result := array[real]
  18405. END Test.
  18406. negative: member selection on variable real
  18407. MODULE Test;
  18408. VAR real, result: REAL;
  18409. BEGIN result := real.member
  18410. END Test.
  18411. negative: calling variable real
  18412. MODULE Test;
  18413. VAR real: REAL;
  18414. BEGIN real
  18415. END Test.
  18416. # variable set
  18417. negative: variable boolean as set element
  18418. MODULE Test;
  18419. VAR boolean: BOOLEAN; result: SET;
  18420. BEGIN result := {boolean};
  18421. END Test.
  18422. negative: variable character as set element
  18423. MODULE Test;
  18424. VAR character: CHAR; result: SET;
  18425. BEGIN result := {character};
  18426. END Test.
  18427. positive: variable integer variable as set element
  18428. MODULE Test;
  18429. VAR integer: INTEGER; result: SET;
  18430. BEGIN result := {integer};
  18431. END Test.
  18432. negative: variable real as set element
  18433. MODULE Test;
  18434. VAR real: REAL; result: SET;
  18435. BEGIN result := {real};
  18436. END Test.
  18437. negative: variable set as set element
  18438. MODULE Test;
  18439. VAR set, result: SET;
  18440. BEGIN result := {set};
  18441. END Test.
  18442. positive: several equal variable set elements
  18443. MODULE Test;
  18444. VAR integer: INTEGER; result: SET;
  18445. BEGIN result := {integer, integer, integer};
  18446. END Test.
  18447. positive: several different variable set elements
  18448. MODULE Test;
  18449. VAR integer: INTEGER; result: SET;
  18450. BEGIN result := {integer, integer, integer};
  18451. END Test.
  18452. positive: variable set element range
  18453. MODULE Test;
  18454. VAR integer: INTEGER; result: SET;
  18455. BEGIN result := {integer..integer};
  18456. END Test.
  18457. positive: variable set element range with single element
  18458. MODULE Test;
  18459. VAR integer: INTEGER; result: SET;
  18460. BEGIN result := {integer..integer};
  18461. END Test.
  18462. positive: empty variable set element range
  18463. MODULE Test;
  18464. VAR integer: INTEGER; result: SET;
  18465. BEGIN result := {integer..integer};
  18466. END Test.
  18467. positive: complement on variable set
  18468. MODULE Test;
  18469. VAR set, result: SET;
  18470. BEGIN result := -set;
  18471. END Test.
  18472. positive: multiple complements on variable set
  18473. MODULE Test;
  18474. VAR set, result: SET;
  18475. BEGIN result := -(-(-set));
  18476. END Test.
  18477. negative: logical negation on variable set
  18478. MODULE Test;
  18479. VAR set: SET; result: BOOLEAN;
  18480. BEGIN result := ~set;
  18481. END Test.
  18482. negative: dereferencing variable set
  18483. MODULE Test;
  18484. VAR set, result: SET;
  18485. BEGIN result := set^;
  18486. END Test.
  18487. positive: union on variable sets
  18488. MODULE Test;
  18489. VAR set, result: SET;
  18490. BEGIN result := set + set;
  18491. END Test.
  18492. positive: difference on variable sets
  18493. MODULE Test;
  18494. VAR set, result: SET;
  18495. BEGIN result := set - set
  18496. END Test.
  18497. positive: intersection on variable sets
  18498. MODULE Test;
  18499. VAR set, result: SET;
  18500. BEGIN result := set * set
  18501. END Test.
  18502. negative: integer division on variable sets
  18503. MODULE Test;
  18504. VAR set: SET; result: INTEGER;
  18505. BEGIN result := set DIV set
  18506. END Test.
  18507. positive: symmetric difference on variable sets
  18508. MODULE Test;
  18509. VAR set, result: SET;
  18510. BEGIN result := set / set
  18511. END Test.
  18512. negative: modulo on variable sets
  18513. MODULE Test;
  18514. VAR set: SET; result: INTEGER;
  18515. BEGIN result := set MOD set
  18516. END Test.
  18517. positive: equal relation on variable sets
  18518. MODULE Test;
  18519. VAR set: SET; result: BOOLEAN;
  18520. BEGIN result := set = set
  18521. END Test.
  18522. positive: unequal relation on variable sets
  18523. MODULE Test;
  18524. VAR set: SET; result: BOOLEAN;
  18525. BEGIN result := set # set
  18526. END Test.
  18527. positive: less relation on variable sets
  18528. MODULE Test;
  18529. VAR set: SET; result: BOOLEAN;
  18530. BEGIN result := set < set
  18531. END Test.
  18532. positive: less or equal relation on variable sets
  18533. MODULE Test;
  18534. VAR set: SET; result: BOOLEAN;
  18535. BEGIN result := set <= set
  18536. END Test.
  18537. positive: greater relation on variable sets
  18538. MODULE Test;
  18539. VAR set: SET; result: BOOLEAN;
  18540. BEGIN result := set > set
  18541. END Test.
  18542. positive: greater or equal relation on variable sets
  18543. MODULE Test;
  18544. VAR set: SET; result: BOOLEAN;
  18545. BEGIN result := set >= set
  18546. END Test.
  18547. negative: set membership on variable sets
  18548. MODULE Test;
  18549. VAR set: SET; result: BOOLEAN;
  18550. BEGIN result := set IN set
  18551. END Test.
  18552. positive: set membership on integer and variable set
  18553. MODULE Test;
  18554. VAR integer: INTEGER; set: SET; result: BOOLEAN;
  18555. BEGIN result := integer IN set
  18556. END Test.
  18557. negative: type test on variable sets
  18558. MODULE Test;
  18559. VAR set: SET; result: BOOLEAN;
  18560. BEGIN result := set IS set
  18561. END Test.
  18562. negative: type test on variable set
  18563. MODULE Test;
  18564. VAR set: SET; result: BOOLEAN;
  18565. BEGIN result := set IS SET
  18566. END Test.
  18567. negative: type test on set type
  18568. MODULE Test;
  18569. TYPE Type = SET;
  18570. VAR set: Type; result: BOOLEAN;
  18571. BEGIN result := set IS Type
  18572. END Test.
  18573. negative: type guard on variable sets
  18574. MODULE Test;
  18575. VAR set, result: SET;
  18576. BEGIN result := set(set)
  18577. END Test.
  18578. negative: type guard on variable set
  18579. MODULE Test;
  18580. VAR set, result: SET;
  18581. BEGIN result := set(SET)
  18582. END Test.
  18583. negative: type guard on set type
  18584. MODULE Test;
  18585. TYPE Type = SET;
  18586. VAR set, result: Type;
  18587. BEGIN result := set(Type)
  18588. END Test.
  18589. negative: logical and on variable sets
  18590. MODULE Test;
  18591. VAR set: SET; result: BOOLEAN;
  18592. BEGIN result := set & set
  18593. END Test.
  18594. negative: logical or on variable sets
  18595. MODULE Test;
  18596. VAR set: SET; result: BOOLEAN;
  18597. BEGIN result := set OR set
  18598. END Test.
  18599. negative: ordinal value of variable set
  18600. MODULE Test;
  18601. VAR set: SET; result: INTEGER;
  18602. BEGIN result := ORD (set)
  18603. END Test.
  18604. negative: character value of variable set
  18605. MODULE Test;
  18606. VAR set: SET; result: CHAR;
  18607. BEGIN result := CHR (set)
  18608. END Test.
  18609. negative: absolute value of variable set
  18610. MODULE Test;
  18611. VAR set, result: SET;
  18612. BEGIN result := ABS (set)
  18613. END Test.
  18614. negative: odd test on variable set
  18615. MODULE Test;
  18616. VAR set: SET; result: BOOLEAN;
  18617. BEGIN result := ODD (set)
  18618. END Test.
  18619. negative: capital letter of variable set
  18620. MODULE Test;
  18621. VAR set: SET; result: CHAR;
  18622. BEGIN result := CAP (set)
  18623. END Test.
  18624. negative: arithmetic shift of variable sets
  18625. MODULE Test;
  18626. VAR set, result: SET;
  18627. BEGIN result := ASH (set, set)
  18628. END Test.
  18629. negative: short on variable set
  18630. MODULE Test;
  18631. VAR set, result: SET;
  18632. BEGIN result := SHORT (set)
  18633. END Test.
  18634. negative: long on variable set
  18635. MODULE Test;
  18636. VAR set, result: SET;
  18637. BEGIN result := LONG (set)
  18638. END Test.
  18639. negative: entier on variable set
  18640. MODULE Test;
  18641. VAR set, result: SET;
  18642. BEGIN result := ENTIER (set)
  18643. END Test.
  18644. negative: unary length of variable set
  18645. MODULE Test;
  18646. VAR set: SET; result: LONGINT;
  18647. BEGIN result := LEN (set)
  18648. END Test.
  18649. negative: binary length of variable set
  18650. MODULE Test;
  18651. VAR set: SET; result: LONGINT;
  18652. BEGIN result := LEN (set, 0)
  18653. END Test.
  18654. negative: indexing variable set
  18655. MODULE Test;
  18656. VAR set: SET; result: CHAR;
  18657. BEGIN result := set[0]
  18658. END Test.
  18659. negative: variable set as index
  18660. MODULE Test;
  18661. VAR array: ARRAY 10 OF CHAR; result: CHAR; set: SET;
  18662. BEGIN result := array[set]
  18663. END Test.
  18664. negative: member selection on variable set
  18665. MODULE Test;
  18666. VAR set, result: SET;
  18667. BEGIN result := set.member
  18668. END Test.
  18669. negative: calling variable set
  18670. MODULE Test;
  18671. VAR set: SET;
  18672. BEGIN set
  18673. END Test.
  18674. # variable arrays
  18675. negative: arithmetic negation on variable array
  18676. MODULE Test;
  18677. VAR array, result: ARRAY 10 OF SET;
  18678. BEGIN result := -array;
  18679. END Test.
  18680. negative: logical negation on variable array
  18681. MODULE Test;
  18682. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18683. BEGIN result := ~array;
  18684. END Test.
  18685. negative: dereferencing variable array
  18686. MODULE Test;
  18687. VAR array, result: ARRAY 10 OF SET;
  18688. BEGIN result := array^;
  18689. END Test.
  18690. negative: addition on variable arrays
  18691. MODULE Test;
  18692. VAR array, result: ARRAY 10 OF SET;
  18693. BEGIN result := array + array;
  18694. END Test.
  18695. negative: subtraction on variable arrays
  18696. MODULE Test;
  18697. VAR array, result: ARRAY 10 OF SET;
  18698. BEGIN result := array - array
  18699. END Test.
  18700. negative: multiplication on variable arrays
  18701. MODULE Test;
  18702. VAR array, result: ARRAY 10 OF SET;
  18703. BEGIN result := array * array
  18704. END Test.
  18705. negative: integer division on variable arrays
  18706. MODULE Test;
  18707. VAR array: ARRAY 10 OF SET; result: INTEGER;
  18708. BEGIN result := array DIV array
  18709. END Test.
  18710. negative: real division on variable arrays
  18711. MODULE Test;
  18712. VAR array: ARRAY 10 OF SET; result: REAL;
  18713. BEGIN result := array / array
  18714. END Test.
  18715. negative: modulo on variable arrays
  18716. MODULE Test;
  18717. VAR array: ARRAY 10 OF SET; result: INTEGER;
  18718. BEGIN result := array MOD array
  18719. END Test.
  18720. negative: equal relation on variable arrays
  18721. MODULE Test;
  18722. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18723. BEGIN result := array = array
  18724. END Test.
  18725. positive: equal relation on variable arrays of character
  18726. MODULE Test;
  18727. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18728. BEGIN result := array = array
  18729. END Test.
  18730. positive: equal relation on variable array of character and string
  18731. MODULE Test;
  18732. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18733. BEGIN result := array = "string"
  18734. END Test.
  18735. negative: unequal relation on variable arrays
  18736. MODULE Test;
  18737. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18738. BEGIN result := array # array
  18739. END Test.
  18740. positive: unequal relation on variable arrays of character
  18741. MODULE Test;
  18742. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18743. BEGIN result := array # array
  18744. END Test.
  18745. positive: unequal relation on variable array of character and string
  18746. MODULE Test;
  18747. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18748. BEGIN result := array # "string"
  18749. END Test.
  18750. negative: less relation on variable arrays
  18751. MODULE Test;
  18752. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18753. BEGIN result := array < array
  18754. END Test.
  18755. positive: less relation on variable arrays of character
  18756. MODULE Test;
  18757. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18758. BEGIN result := array < array
  18759. END Test.
  18760. positive: less relation on variable array of character and string
  18761. MODULE Test;
  18762. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18763. BEGIN result := array < "string"
  18764. END Test.
  18765. negative: less or equal relation on variable arrays
  18766. MODULE Test;
  18767. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18768. BEGIN result := array <= array
  18769. END Test.
  18770. positive: less or equal relation on variable arrays of character
  18771. MODULE Test;
  18772. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18773. BEGIN result := array <= array
  18774. END Test.
  18775. positive: less or equal relation on variable array of character and string
  18776. MODULE Test;
  18777. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18778. BEGIN result := array <= "string"
  18779. END Test.
  18780. negative: greater relation on variable arrays
  18781. MODULE Test;
  18782. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18783. BEGIN result := array > array
  18784. END Test.
  18785. positive: greater relation on variable arrays of character
  18786. MODULE Test;
  18787. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18788. BEGIN result := array > array
  18789. END Test.
  18790. positive: greater relation on variable array of character and string
  18791. MODULE Test;
  18792. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18793. BEGIN result := array > "string"
  18794. END Test.
  18795. negative: greater or equal relation on variable arrays
  18796. MODULE Test;
  18797. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18798. BEGIN result := array >= array
  18799. END Test.
  18800. positive: greater or equal relation on variable arrays of character
  18801. MODULE Test;
  18802. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18803. BEGIN result := array >= array
  18804. END Test.
  18805. positive: greater or equal relation on variable array of character and string
  18806. MODULE Test;
  18807. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18808. BEGIN result := array >= "string"
  18809. END Test.
  18810. negative: set membership on variable arrays
  18811. MODULE Test;
  18812. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18813. BEGIN result := array IN array
  18814. END Test.
  18815. negative: type test on variable arrays
  18816. MODULE Test;
  18817. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18818. BEGIN result := array IS array
  18819. END Test.
  18820. negative: type test on variable array
  18821. MODULE Test;
  18822. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18823. BEGIN result := array IS ARRAY 10 OF SET
  18824. END Test.
  18825. negative: type test on array type
  18826. MODULE Test;
  18827. TYPE Type = ARRAY 10 OF SET;
  18828. VAR array: Type; result: BOOLEAN;
  18829. BEGIN result := array IS Type
  18830. END Test.
  18831. negative: type guard on variable arrays
  18832. MODULE Test;
  18833. VAR array, result: ARRAY 10 OF SET;
  18834. BEGIN result := array(array)
  18835. END Test.
  18836. negative: type guard on variable array
  18837. MODULE Test;
  18838. VAR array, result: ARRAY 10 OF SET;
  18839. BEGIN result := array(ARRAY 10 OF SET)
  18840. END Test.
  18841. negative: type guard on array type
  18842. MODULE Test;
  18843. TYPE Type = ARRAY 10 OF SET;
  18844. VAR array, result: Type;
  18845. BEGIN result := array(Type)
  18846. END Test.
  18847. negative: logical and on variable arrays
  18848. MODULE Test;
  18849. VAR array, result: ARRAY 10 OF SET;
  18850. BEGIN result := array & array
  18851. END Test.
  18852. negative: logical or on variable arrays
  18853. MODULE Test;
  18854. VAR array, result: ARRAY 10 OF SET;
  18855. BEGIN result := array OR array
  18856. END Test.
  18857. negative: ordinal value of variable array
  18858. MODULE Test;
  18859. VAR array: ARRAY 10 OF SET; result: INTEGER;
  18860. BEGIN result := ORD (array)
  18861. END Test.
  18862. negative: character value of variable array
  18863. MODULE Test;
  18864. VAR array: ARRAY 10 OF SET; result: CHAR;
  18865. BEGIN result := CHR (array)
  18866. END Test.
  18867. negative: absolute value of variable array
  18868. MODULE Test;
  18869. VAR array, result: ARRAY 10 OF SET;
  18870. BEGIN result := ABS (array)
  18871. END Test.
  18872. negative: odd test on variable array
  18873. MODULE Test;
  18874. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18875. BEGIN result := ODD (array)
  18876. END Test.
  18877. negative: capital letter of variable array
  18878. MODULE Test;
  18879. VAR array: ARRAY 10 OF SET; result: CHAR;
  18880. BEGIN result := CAP (array)
  18881. END Test.
  18882. negative: arithmetic shift of variable arrays
  18883. MODULE Test;
  18884. VAR array, result: ARRAY 10 OF SET;
  18885. BEGIN result := ASH (array, array)
  18886. END Test.
  18887. negative: short on variable array
  18888. MODULE Test;
  18889. VAR array, result: ARRAY 10 OF SET;
  18890. BEGIN result := SHORT (array)
  18891. END Test.
  18892. negative: long on variable array
  18893. MODULE Test;
  18894. VAR array, result: ARRAY 10 OF SET;
  18895. BEGIN result := LONG (array)
  18896. END Test.
  18897. negative: entier on variable array
  18898. MODULE Test;
  18899. VAR array, result: ARRAY 10 OF SET;
  18900. BEGIN result := ENTIER (array)
  18901. END Test.
  18902. positive: unary length of variable array
  18903. MODULE Test;
  18904. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18905. BEGIN result := LEN (array); ASSERT (LEN (array) = 10);
  18906. END Test.
  18907. positive: unary length of variable array as short integer
  18908. MODULE Test;
  18909. VAR array: ARRAY 10 OF CHAR; result: SHORTINT;
  18910. BEGIN result := LEN (array);
  18911. END Test.
  18912. positive: unary length of variable array as integer
  18913. MODULE Test;
  18914. VAR array: ARRAY 10 OF CHAR; result: INTEGER;
  18915. BEGIN result := LEN (array);
  18916. END Test.
  18917. positive: unary length of variable array as long integer
  18918. MODULE Test;
  18919. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18920. BEGIN result := LEN (array);
  18921. END Test.
  18922. positive: unary length of variable array as huge integer
  18923. MODULE Test;
  18924. VAR array: ARRAY 10 OF CHAR; result: HUGEINT;
  18925. BEGIN result := LEN (array);
  18926. END Test.
  18927. positive: unary length of variable open array
  18928. MODULE Test;
  18929. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18930. VAR result: LONGINT;
  18931. BEGIN result := LEN (array)
  18932. END Procedure
  18933. END Test.
  18934. negative: unary length of variable open array as short integer
  18935. MODULE Test;
  18936. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18937. VAR result: SHORTINT;
  18938. BEGIN result := LEN (array)
  18939. END Procedure
  18940. END Test.
  18941. negative: unary length of variable open array as integer
  18942. MODULE Test;
  18943. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18944. VAR result: INTEGER;
  18945. BEGIN result := LEN (array)
  18946. END Procedure
  18947. END Test.
  18948. positive: unary length of variable open array as long integer
  18949. MODULE Test;
  18950. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18951. VAR result: LONGINT;
  18952. BEGIN result := LEN (array)
  18953. END Procedure
  18954. END Test.
  18955. positive: unary length of variable open array as huge integer
  18956. MODULE Test;
  18957. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18958. VAR result: HUGEINT;
  18959. BEGIN result := LEN (array)
  18960. END Procedure
  18961. END Test.
  18962. positive: unary length of two-dimensional variable array
  18963. MODULE Test;
  18964. CONST Length = LEN (array);
  18965. VAR array: ARRAY 10, 20 OF CHAR; result: LONGINT;
  18966. BEGIN result := LEN (array); ASSERT (Length = 10);
  18967. END Test.
  18968. positive: unary length of two-dimensional variable open array
  18969. MODULE Test;
  18970. PROCEDURE Procedure (array: ARRAY OF ARRAY OF CHAR);
  18971. VAR result: LONGINT;
  18972. BEGIN result := LEN (array);
  18973. END Procedure;
  18974. END Test.
  18975. negative: unary length of array as its size
  18976. MODULE Test;
  18977. VAR a: ARRAY LEN (a) OF CHAR;
  18978. END Test.
  18979. negative: indirect unary length of array as its size
  18980. MODULE Test;
  18981. CONST Length = LEN (a)
  18982. VAR a: ARRAY Length OF CHAR;
  18983. END Test.
  18984. positive: unary length of array as size of another array
  18985. MODULE Test;
  18986. VAR a: ARRAY 10 OF CHAR; b: ARRAY LEN (a) OF CHAR;
  18987. BEGIN a := b;
  18988. END Test.
  18989. positive: indirect unary array as size of another array
  18990. MODULE Test;
  18991. CONST Length = LEN (a)
  18992. VAR a: ARRAY 10 OF CHAR; b: ARRAY Length OF CHAR;
  18993. BEGIN a := b;
  18994. END Test.
  18995. positive: binary length of variable array
  18996. MODULE Test;
  18997. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18998. BEGIN result := LEN (array); ASSERT (LEN (array, 0) = 10); ASSERT (LEN (array, 0) = LEN (array));
  18999. END Test.
  19000. positive: constant binary length of variable array as short integer
  19001. MODULE Test;
  19002. VAR array: ARRAY 10 OF CHAR; result: SHORTINT;
  19003. BEGIN result := LEN (array, 0);
  19004. END Test.
  19005. positive: constant binary length of variable array as integer
  19006. MODULE Test;
  19007. VAR array: ARRAY 10 OF CHAR; result: INTEGER;
  19008. BEGIN result := LEN (array, 0);
  19009. END Test.
  19010. positive: constant binary length of variable array as long integer
  19011. MODULE Test;
  19012. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  19013. BEGIN result := LEN (array, 0);
  19014. END Test.
  19015. positive: constant binary length of variable array as huge integer
  19016. MODULE Test;
  19017. VAR array: ARRAY 10 OF CHAR; result: HUGEINT;
  19018. BEGIN result := LEN (array, 0);
  19019. END Test.
  19020. negative: binary length of variable array with negative dimension index
  19021. MODULE Test;
  19022. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  19023. BEGIN result := LEN (array, -1);
  19024. END Test.
  19025. negative: binary length of variable array with invalid dimension index
  19026. MODULE Test;
  19027. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  19028. BEGIN result := LEN (array, 1);
  19029. END Test.
  19030. positive: binary length of variable array with variable dimension index
  19031. MODULE Test;
  19032. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: INTEGER;
  19033. BEGIN result := LEN (array, dimension);
  19034. END Test.
  19035. negative: binary length of variable array with boolean as dimension index
  19036. MODULE Test;
  19037. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: BOOLEAN;
  19038. BEGIN result := LEN (array, dimension);
  19039. END Test.
  19040. negative: binary length of variable array with character as dimension index
  19041. MODULE Test;
  19042. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: CHAR;
  19043. BEGIN result := LEN (array, dimension);
  19044. END Test.
  19045. positive: binary length of variable array with integer as dimension index
  19046. MODULE Test;
  19047. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: INTEGER;
  19048. BEGIN result := LEN (array, dimension);
  19049. END Test.
  19050. negative: binary length of variable array with real as dimension index
  19051. MODULE Test;
  19052. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: REAL;
  19053. BEGIN result := LEN (array, dimension);
  19054. END Test.
  19055. negative: binary length of variable array with set as dimension index
  19056. MODULE Test;
  19057. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: SET;
  19058. BEGIN result := LEN (array, dimension);
  19059. END Test.
  19060. negative: binary length of variable array with constant string as dimension index
  19061. MODULE Test;
  19062. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  19063. BEGIN result := LEN (array, "index");
  19064. END Test.
  19065. negative: binary length of variable array with nil pointer as dimension index
  19066. MODULE Test;
  19067. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  19068. BEGIN result := LEN (array, NIL);
  19069. END Test.
  19070. positive: binary length of two-dimensional variable array
  19071. MODULE Test;
  19072. CONST Length0 = LEN (array, 0); Length1 = LEN (array, 1)
  19073. VAR array: ARRAY 10, 20 OF CHAR; result: LONGINT;
  19074. BEGIN result := LEN (array, 0); ASSERT (Length0 = 10); ASSERT (Length1 = 20);
  19075. END Test.
  19076. positive: binary length of two-dimensional variable open array
  19077. MODULE Test;
  19078. PROCEDURE Procedure (array: ARRAY OF ARRAY OF CHAR);
  19079. VAR result: LONGINT;
  19080. BEGIN result := LEN (array, 0); result := LEN (array, 1);
  19081. END Procedure;
  19082. END Test.
  19083. negative: binary length of array as its size
  19084. MODULE Test;
  19085. VAR array: ARRAY LEN (array, 0), LEN (array, 1) OF CHAR;
  19086. END Test.
  19087. negative: indirect binary length of array as its size
  19088. MODULE Test;
  19089. CONST Length0 = LEN (array, 0); Length1 = LEN (array, 1)
  19090. VAR array: ARRAY Length0, Length1 OF CHAR;
  19091. END Test.
  19092. positive: binary length of array as size of another array
  19093. MODULE Test;
  19094. VAR a: ARRAY 10, 20 OF CHAR; b: ARRAY LEN (a, 0), LEN (a, 1) OF CHAR;
  19095. BEGIN a := b;
  19096. END Test.
  19097. positive: indirect binary array as size of another array
  19098. MODULE Test;
  19099. CONST Length0 = LEN (a, 0); Length1 = LEN (a, 1)
  19100. VAR a: ARRAY 10, 20 OF CHAR; b: ARRAY Length0, Length1 OF CHAR;
  19101. BEGIN a := b;
  19102. END Test.
  19103. positive: array length constants
  19104. MODULE Test;
  19105. CONST
  19106. ls1=LEN(s1,0);
  19107. ls20=LEN(s2,0);
  19108. ls21=LEN(s2,1);
  19109. lp1=LEN(p1);
  19110. lp20=LEN(p2,0);
  19111. lp21=LEN(p2,1);
  19112. lp31=LEN(p3,1);
  19113. lp32=LEN(p3,2);
  19114. VAR
  19115. s1: ARRAY 2 OF CHAR;
  19116. s2: ARRAY 2 OF ARRAY 12 OF CHAR;
  19117. p1: POINTER TO ARRAY 2 OF CHAR;
  19118. p2: POINTER TO ARRAY 2 OF ARRAY 12 OF CHAR;
  19119. p3: POINTER TO ARRAY OF ARRAY 2 OF ARRAY 12 OF CHAR;
  19120. BEGIN
  19121. ASSERT(ls1=2);
  19122. ASSERT(ls20=2);
  19123. ASSERT(ls21=12);
  19124. ASSERT(lp1=2);
  19125. ASSERT(lp20=2);
  19126. ASSERT(lp21=12);
  19127. ASSERT(lp31=2);
  19128. ASSERT(lp32=12);
  19129. END Test.
  19130. positive: binary length of variable open array
  19131. MODULE Test;
  19132. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19133. VAR result: LONGINT;
  19134. BEGIN result := LEN (array, 0);
  19135. END Procedure;
  19136. END Test.
  19137. negative: binary length of variable open array as short integer
  19138. MODULE Test;
  19139. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19140. VAR result: SHORTINT;
  19141. BEGIN result := LEN (array, 0);
  19142. END Procedure;
  19143. END Test.
  19144. negative: binary length of variable open array as integer
  19145. MODULE Test;
  19146. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19147. VAR result: INTEGER;
  19148. BEGIN result := LEN (array, 0);
  19149. END Procedure;
  19150. END Test.
  19151. positive: binary length of variable open array as long integer
  19152. MODULE Test;
  19153. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19154. VAR result: LONGINT;
  19155. BEGIN result := LEN (array);
  19156. END Procedure;
  19157. END Test.
  19158. positive: binary length of variable open array as huge integer
  19159. MODULE Test;
  19160. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19161. VAR result: HUGEINT;
  19162. BEGIN result := LEN (array);
  19163. END Procedure;
  19164. END Test.
  19165. positive: indexing variable boolean array
  19166. MODULE Test;
  19167. VAR array: ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  19168. BEGIN result := array[0]
  19169. END Test.
  19170. positive: indexing temporary boolean array
  19171. MODULE Test;
  19172. VAR array: PROCEDURE (): ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  19173. BEGIN result := array()[0]
  19174. END Test.
  19175. negative: changing indexed temporary boolean array
  19176. MODULE Test;
  19177. VAR array: PROCEDURE (): ARRAY 10 OF BOOLEAN;
  19178. BEGIN array()[0] := TRUE;
  19179. END Test.
  19180. positive: indexing variable character array
  19181. MODULE Test;
  19182. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  19183. BEGIN result := array[0]
  19184. END Test.
  19185. positive: indexing temporary character array
  19186. MODULE Test;
  19187. VAR array: PROCEDURE (): ARRAY 10 OF CHAR; result: CHAR;
  19188. BEGIN result := array()[0]
  19189. END Test.
  19190. negative: changing indexed temporary character array
  19191. MODULE Test;
  19192. VAR array: PROCEDURE (): ARRAY 10 OF CHAR;
  19193. BEGIN array()[0] := '0';
  19194. END Test.
  19195. positive: indexing variable integer array
  19196. MODULE Test;
  19197. VAR array: ARRAY 10 OF INTEGER; result: INTEGER;
  19198. BEGIN result := array[0]
  19199. END Test.
  19200. positive: indexing temporary integer array
  19201. MODULE Test;
  19202. VAR array: PROCEDURE (): ARRAY 10 OF INTEGER; result: INTEGER;
  19203. BEGIN result := array()[0]
  19204. END Test.
  19205. negative: changing indexed temporary integer array
  19206. MODULE Test;
  19207. VAR array: PROCEDURE (): ARRAY 10 OF INTEGER;
  19208. BEGIN array()[0] := 5;
  19209. END Test.
  19210. positive: indexing variable real array
  19211. MODULE Test;
  19212. VAR array: ARRAY 10 OF REAL; result: REAL;
  19213. BEGIN result := array[0]
  19214. END Test.
  19215. positive: indexing temporary real array
  19216. MODULE Test;
  19217. VAR array: PROCEDURE (): ARRAY 10 OF REAL; result: REAL;
  19218. BEGIN result := array()[0]
  19219. END Test.
  19220. negative: changing indexed temporary real array
  19221. MODULE Test;
  19222. VAR array: PROCEDURE (): ARRAY 10 OF REAL;
  19223. BEGIN array()[0] := 5.0;
  19224. END Test.
  19225. positive: indexing variable set array
  19226. MODULE Test;
  19227. VAR array: ARRAY 10 OF SET; result: SET;
  19228. BEGIN result := array[0]
  19229. END Test.
  19230. positive: indexing temporary set array
  19231. MODULE Test;
  19232. VAR array: PROCEDURE (): ARRAY 10 OF SET; result: SET;
  19233. BEGIN result := array()[0]
  19234. END Test.
  19235. negative: changing indexed temporary set array
  19236. MODULE Test;
  19237. VAR array: PROCEDURE (): ARRAY 10 OF SET;
  19238. BEGIN array()[0] := {5};
  19239. END Test.
  19240. positive: indexing variable array of array
  19241. MODULE Test;
  19242. VAR array: ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  19243. BEGIN result := array[0]
  19244. END Test.
  19245. positive: indexing temporary array of array
  19246. MODULE Test;
  19247. VAR array: PROCEDURE (): ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  19248. BEGIN result := array()[0]
  19249. END Test.
  19250. negative: changing indexed temporary array of array
  19251. MODULE Test;
  19252. VAR array: PROCEDURE (): ARRAY 10 OF ARRAY 10 OF CHAR; value: ARRAY 10 OF CHAR;
  19253. BEGIN array()[0] := value;
  19254. END Test.
  19255. positive: indexing variable record array
  19256. MODULE Test;
  19257. TYPE Record = RECORD END;
  19258. VAR array: ARRAY 10 OF Record; result: Record;
  19259. BEGIN result := array[0]
  19260. END Test.
  19261. positive: indexing temporary record array
  19262. MODULE Test;
  19263. TYPE Record = RECORD END;
  19264. VAR array: PROCEDURE (): ARRAY 10 OF Record; result: Record;
  19265. BEGIN result := array()[0]
  19266. END Test.
  19267. negative: changing indexed temporary record array
  19268. MODULE Test;
  19269. TYPE Record = RECORD END;
  19270. VAR array: PROCEDURE (): ARRAY 10 OF Record; value: Record;
  19271. BEGIN array()[0] := value;
  19272. END Test.
  19273. negative: changing member of indexed temporary record array
  19274. MODULE Test;
  19275. TYPE Record = RECORD i: INTEGER END;
  19276. VAR array: PROCEDURE (): ARRAY 10 OF Record;
  19277. BEGIN array()[0].i := 5;
  19278. END Test.
  19279. positive: indexing variable object array
  19280. MODULE Test;
  19281. TYPE Object = OBJECT END Object;
  19282. VAR array: ARRAY 10 OF Object; result: Object;
  19283. BEGIN result := array[0]
  19284. END Test.
  19285. positive: indexing temporary object array
  19286. MODULE Test;
  19287. TYPE Object = OBJECT END Object;
  19288. VAR array: PROCEDURE (): ARRAY 10 OF Object; result: Object;
  19289. BEGIN result := array()[0]
  19290. END Test.
  19291. negative: changing indexed temporary object array
  19292. MODULE Test;
  19293. TYPE Object = OBJECT END Object;
  19294. VAR array: PROCEDURE (): ARRAY 10 OF Object; value: Object;
  19295. BEGIN array()[0] := value;
  19296. END Test.
  19297. positive: changing member of indexed temporary object array
  19298. MODULE Test;
  19299. TYPE Object = OBJECT VAR i: INTEGER END Object;
  19300. VAR array: PROCEDURE (): ARRAY 10 OF Object;
  19301. BEGIN array()[0].i := 5;
  19302. END Test.
  19303. positive: indexing variable base object array
  19304. MODULE Test;
  19305. VAR array: ARRAY 10 OF OBJECT; result: OBJECT;
  19306. BEGIN result := array[0]
  19307. END Test.
  19308. positive: indexing temporary base object array
  19309. MODULE Test;
  19310. VAR array: PROCEDURE (): ARRAY 10 OF OBJECT; result: OBJECT;
  19311. BEGIN result := array()[0]
  19312. END Test.
  19313. negative: changing indexed temporary base object array
  19314. MODULE Test;
  19315. VAR array: PROCEDURE (): ARRAY 10 OF OBJECT; value: OBJECT;
  19316. BEGIN array()[0] := value;
  19317. END Test.
  19318. positive: indexing variable pointer to array array
  19319. MODULE Test;
  19320. VAR array: ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  19321. BEGIN result := array[0]
  19322. END Test.
  19323. positive: indexing temporary pointer to array array
  19324. MODULE Test;
  19325. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  19326. BEGIN result := array()[0]
  19327. END Test.
  19328. negative: changing indexed temporary pointer to array array
  19329. MODULE Test;
  19330. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; value: POINTER TO ARRAY 10 OF CHAR;
  19331. BEGIN array()[0] := value;
  19332. END Test.
  19333. positive: changing element of indexed temporary pointer to array array
  19334. MODULE Test;
  19335. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR;
  19336. BEGIN array()[0][0] := 'f';
  19337. END Test.
  19338. positive: indexing variable array of pointer to record
  19339. MODULE Test;
  19340. TYPE Record = RECORD END;
  19341. VAR array: ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  19342. BEGIN result := array[0]
  19343. END Test.
  19344. positive: indexing temporary array of pointer to record
  19345. MODULE Test;
  19346. TYPE Record = RECORD END;
  19347. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  19348. BEGIN result := array()[0]
  19349. END Test.
  19350. negative: changing indexed temporary array of pointer to record
  19351. MODULE Test;
  19352. TYPE Record = RECORD END;
  19353. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO Record; value: POINTER TO Record;
  19354. BEGIN array()[0] := value;
  19355. END Test.
  19356. positive: changing element of indexed temporary array of pointer to record
  19357. MODULE Test;
  19358. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO RECORD i: INTEGER END;
  19359. BEGIN array()[0].i := 5;
  19360. END Test.
  19361. positive: indexing variable procedure array
  19362. MODULE Test;
  19363. VAR array: ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  19364. BEGIN result := array[0]
  19365. END Test.
  19366. positive: indexing temporary procedure array
  19367. MODULE Test;
  19368. VAR array: PROCEDURE (): ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  19369. BEGIN result := array()[0]
  19370. END Test.
  19371. negative: changing indexed temporary procedure array
  19372. MODULE Test;
  19373. VAR array: PROCEDURE (): ARRAY 10 OF PROCEDURE; value: PROCEDURE;
  19374. BEGIN array()[0] := value;
  19375. END Test.
  19376. negative: variable array as index
  19377. MODULE Test;
  19378. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  19379. BEGIN result := array[array]
  19380. END Test.
  19381. negative: member selection on variable array
  19382. MODULE Test;
  19383. VAR array, result: ARRAY 10 OF CHAR;
  19384. BEGIN result := array.member
  19385. END Test.
  19386. negative: calling variable array
  19387. MODULE Test;
  19388. VAR array: ARRAY 10 OF CHAR;
  19389. BEGIN array
  19390. END Test.
  19391. # variable records
  19392. negative: arithmetic negation on variable record
  19393. MODULE Test;
  19394. VAR record, result: RECORD END;
  19395. BEGIN result := -record;
  19396. END Test.
  19397. negative: logical negation on variable record
  19398. MODULE Test;
  19399. VAR record, result: RECORD END;
  19400. BEGIN result := ~record;
  19401. END Test.
  19402. negative: dereferencing variable record
  19403. MODULE Test;
  19404. VAR record, result: RECORD END;
  19405. BEGIN result := record^;
  19406. END Test.
  19407. negative: addition on variable records
  19408. MODULE Test;
  19409. VAR record, result: RECORD END;
  19410. BEGIN result := record + record;
  19411. END Test.
  19412. negative: subtraction on variable records
  19413. MODULE Test;
  19414. VAR record, result: RECORD END;
  19415. BEGIN result := record - record
  19416. END Test.
  19417. negative: multiplication on variable records
  19418. MODULE Test;
  19419. VAR record, result: RECORD END;
  19420. BEGIN result := record * record
  19421. END Test.
  19422. negative: integer division on variable records
  19423. MODULE Test;
  19424. VAR record: RECORD END; result: INTEGER;
  19425. BEGIN result := record DIV record
  19426. END Test.
  19427. negative: real division on variable records
  19428. MODULE Test;
  19429. VAR record: RECORD END; result: REAL;
  19430. BEGIN result := record / record
  19431. END Test.
  19432. negative: modulo on variable records
  19433. MODULE Test;
  19434. VAR record: RECORD END; result: INTEGER;
  19435. BEGIN result := record MOD record
  19436. END Test.
  19437. negative: equal relation on variable records
  19438. MODULE Test;
  19439. VAR record: RECORD END; result: BOOLEAN;
  19440. BEGIN result := record = record
  19441. END Test.
  19442. negative: unequal relation on variable records
  19443. MODULE Test;
  19444. VAR record: RECORD END; result: BOOLEAN;
  19445. BEGIN result := record # record
  19446. END Test.
  19447. negative: less relation on variable records
  19448. MODULE Test;
  19449. VAR record: RECORD END; result: BOOLEAN;
  19450. BEGIN result := record < record
  19451. END Test.
  19452. negative: less or equal relation on variable records
  19453. MODULE Test;
  19454. VAR record: RECORD END; result: BOOLEAN;
  19455. BEGIN result := record <= record
  19456. END Test.
  19457. negative: greater relation on variable records
  19458. MODULE Test;
  19459. VAR record: RECORD END; result: BOOLEAN;
  19460. BEGIN result := record > record
  19461. END Test.
  19462. negative: greater or equal relation on variable records
  19463. MODULE Test;
  19464. VAR record: RECORD END; result: BOOLEAN;
  19465. BEGIN result := record >= record
  19466. END Test.
  19467. negative: set membership on variable records
  19468. MODULE Test;
  19469. VAR record: RECORD END; result: BOOLEAN;
  19470. BEGIN result := record IN record
  19471. END Test.
  19472. negative: type test on variable records
  19473. MODULE Test;
  19474. VAR record: RECORD END; result: BOOLEAN;
  19475. BEGIN result := record IS record
  19476. END Test.
  19477. negative: type test on variable record
  19478. MODULE Test;
  19479. VAR record: RECORD END; result: BOOLEAN;
  19480. BEGIN result := record IS RECORD END
  19481. END Test.
  19482. positive: type test on same record type
  19483. MODULE Test;
  19484. TYPE Type = RECORD END;
  19485. VAR record: Type; result: BOOLEAN;
  19486. BEGIN result := record IS Type
  19487. END Test.
  19488. positive: type test on extending record type
  19489. MODULE Test;
  19490. TYPE Record = RECORD END; Type = RECORD (Record) END;
  19491. VAR record: Record; result: BOOLEAN;
  19492. BEGIN result := record IS Type
  19493. END Test.
  19494. negative: type test on extended record type
  19495. MODULE Test;
  19496. TYPE Record = RECORD END; Type = Record;
  19497. VAR record: RECORD (Record) END; result: BOOLEAN;
  19498. BEGIN result := record IS Type
  19499. END Test.
  19500. negative: type test on incompatible record type
  19501. MODULE Test;
  19502. TYPE Type = RECORD END;
  19503. VAR record: RECORD END; result: BOOLEAN;
  19504. BEGIN result := record IS Type
  19505. END Test.
  19506. negative: type guard on variable records
  19507. MODULE Test;
  19508. PROCEDURE Procedure (VAR record, result: RECORD END);
  19509. BEGIN result := record(record)
  19510. END Procedure;
  19511. END Test.
  19512. negative: type guard on variable record
  19513. MODULE Test;
  19514. PROCEDURE Procedure (VAR record, result: RECORD END);
  19515. BEGIN result := record(RECORD END)
  19516. END Procedure;
  19517. END Test.
  19518. positive: type guard on same record type
  19519. MODULE Test;
  19520. TYPE Type = RECORD END;
  19521. PROCEDURE Procedure (VAR record, result: Type);
  19522. BEGIN result := record(Type)
  19523. END Procedure;
  19524. END Test.
  19525. positive: type guard on extending record type
  19526. MODULE Test;
  19527. TYPE Record = RECORD END; Type = RECORD (Record) END;
  19528. PROCEDURE Procedure (VAR record: Record; result: Type);
  19529. BEGIN result := record(Type)
  19530. END Procedure;
  19531. END Test.
  19532. negative: type guard on static extending record type
  19533. MODULE Test;
  19534. TYPE Record = RECORD END; Type = RECORD (Record) END;
  19535. VAR record: Record; result: Type;
  19536. BEGIN result := record(Type)
  19537. END Test.
  19538. negative: type guard on extended record type
  19539. MODULE Test;
  19540. TYPE Record = RECORD END; Type = Record;
  19541. PROCEDURE Procedure (VAR record: RECORD (Record) END; result: Type);
  19542. BEGIN result := record(Type)
  19543. END Procedure;
  19544. END Test.
  19545. negative: type guard on incompatible record type
  19546. MODULE Test;
  19547. TYPE Type = RECORD END;
  19548. PROCEDURE Procedure (VAR record: RECORD END; result: Type);
  19549. BEGIN result := record(Type)
  19550. END Procedure;
  19551. END Test.
  19552. negative: logical and on variable records
  19553. MODULE Test;
  19554. VAR record, result: RECORD END;
  19555. BEGIN result := record & record
  19556. END Test.
  19557. negative: logical or on variable records
  19558. MODULE Test;
  19559. VAR record, result: RECORD END;
  19560. BEGIN result := record OR record
  19561. END Test.
  19562. negative: ordinal value of variable record
  19563. MODULE Test;
  19564. VAR record: RECORD END; result: INTEGER;
  19565. BEGIN result := ORD (record)
  19566. END Test.
  19567. negative: character value of variable record
  19568. MODULE Test;
  19569. VAR record: RECORD END; result: CHAR;
  19570. BEGIN result := CHR (record)
  19571. END Test.
  19572. negative: absolute value of variable record
  19573. MODULE Test;
  19574. VAR record, result: RECORD END;
  19575. BEGIN result := ABS (record)
  19576. END Test.
  19577. negative: odd test on variable record
  19578. MODULE Test;
  19579. VAR record: RECORD END; result: BOOLEAN;
  19580. BEGIN result := ODD (record)
  19581. END Test.
  19582. negative: capital letter of variable record
  19583. MODULE Test;
  19584. VAR record: RECORD END; result: CHAR;
  19585. BEGIN result := CAP (record)
  19586. END Test.
  19587. negative: arithmetic shift of variable records
  19588. MODULE Test;
  19589. VAR record, result: RECORD END;
  19590. BEGIN result := ASH (record, record)
  19591. END Test.
  19592. negative: short on variable record
  19593. MODULE Test;
  19594. VAR record, result: RECORD END;
  19595. BEGIN result := SHORT (record)
  19596. END Test.
  19597. negative: long on variable record
  19598. MODULE Test;
  19599. VAR record, result: RECORD END;
  19600. BEGIN result := LONG (record)
  19601. END Test.
  19602. negative: entier on variable record
  19603. MODULE Test;
  19604. VAR record, result: RECORD END;
  19605. BEGIN result := ENTIER (record)
  19606. END Test.
  19607. negative: unary length of variable record
  19608. MODULE Test;
  19609. VAR record: RECORD END; result: LONGINT;
  19610. BEGIN result := LEN (record)
  19611. END Test.
  19612. negative: binary length of variable record
  19613. MODULE Test;
  19614. VAR record: RECORD END; result: LONGINT;
  19615. BEGIN result := LEN (record, 0)
  19616. END Test.
  19617. negative: indexing variable record
  19618. MODULE Test;
  19619. VAR record: RECORD END; result: CHAR;
  19620. BEGIN result := record[0]
  19621. END Test.
  19622. negative: variable record as index
  19623. MODULE Test;
  19624. VAR array: ARRAY 10 OF CHAR; result: CHAR; record: RECORD END;
  19625. BEGIN result := array[record]
  19626. END Test.
  19627. positive: member selection on variable record
  19628. MODULE Test;
  19629. VAR record: RECORD member: SET END; result: SET;
  19630. BEGIN result := record.member
  19631. END Test.
  19632. positive: member modification on variable record
  19633. MODULE Test;
  19634. VAR record: RECORD member: SET END; value: SET;
  19635. BEGIN record.member := value
  19636. END Test.
  19637. positive: member selection on temporary record
  19638. MODULE Test;
  19639. VAR record: PROCEDURE (): RECORD member: SET END; result: SET;
  19640. BEGIN result := record ().member
  19641. END Test.
  19642. negative: member modification on temporary record
  19643. MODULE Test;
  19644. VAR record: PROCEDURE (): RECORD member: SET END; value: SET;
  19645. BEGIN record ().member := value
  19646. END Test.
  19647. negative: calling variable record
  19648. MODULE Test;
  19649. VAR record: RECORD END;
  19650. BEGIN record
  19651. END Test.
  19652. # variable objects
  19653. negative: arithmetic negation on variable object
  19654. MODULE Test;
  19655. VAR object, result: OBJECT END;
  19656. BEGIN result := -object;
  19657. END Test.
  19658. negative: logical negation on variable object
  19659. MODULE Test;
  19660. VAR object, result: OBJECT END;
  19661. BEGIN result := ~object;
  19662. END Test.
  19663. negative: dereferencing variable object
  19664. MODULE Test;
  19665. VAR object, result: OBJECT END;
  19666. BEGIN result := object^;
  19667. END Test.
  19668. negative: addition on variable objects
  19669. MODULE Test;
  19670. VAR object, result: OBJECT END;
  19671. BEGIN result := object + object;
  19672. END Test.
  19673. negative: subtraction on variable objects
  19674. MODULE Test;
  19675. VAR object, result: OBJECT END;
  19676. BEGIN result := object - object
  19677. END Test.
  19678. negative: multiplication on variable objects
  19679. MODULE Test;
  19680. VAR object, result: OBJECT END;
  19681. BEGIN result := object * object
  19682. END Test.
  19683. negative: integer division on variable objects
  19684. MODULE Test;
  19685. VAR object: OBJECT END; result: INTEGER;
  19686. BEGIN result := object DIV object
  19687. END Test.
  19688. negative: real division on variable objects
  19689. MODULE Test;
  19690. VAR object: OBJECT END; result: REAL;
  19691. BEGIN result := object / object
  19692. END Test.
  19693. negative: modulo on variable objects
  19694. MODULE Test;
  19695. VAR object: OBJECT END; result: INTEGER;
  19696. BEGIN result := object MOD object
  19697. END Test.
  19698. positive: equal relation on variable objects
  19699. MODULE Test;
  19700. VAR object: OBJECT END; result: BOOLEAN;
  19701. BEGIN result := object = object
  19702. END Test.
  19703. positive: equal relation on compatible variable objects
  19704. MODULE Test;
  19705. TYPE Object = OBJECT END Object;
  19706. VAR object1: Object; object2: OBJECT (Object) END; result: BOOLEAN;
  19707. BEGIN result := (object1 = object1) OR (object2 = object1)
  19708. END Test.
  19709. negative: equal relation on incompatible variable objects
  19710. MODULE Test;
  19711. VAR object1: OBJECT END; object2: OBJECT END; result: BOOLEAN;
  19712. BEGIN result := (object1 = object1) OR (object2 = object1)
  19713. END Test.
  19714. positive: unequal relation on variable objects
  19715. MODULE Test;
  19716. VAR object: OBJECT END; result: BOOLEAN;
  19717. BEGIN result := object # object
  19718. END Test.
  19719. positive: unequal relation on compatible variable objects
  19720. MODULE Test;
  19721. TYPE Object = OBJECT END Object;
  19722. VAR object1: Object; object2: OBJECT (Object) END; result: BOOLEAN;
  19723. BEGIN result := (object1 # object1) OR (object2 # object1)
  19724. END Test.
  19725. negative: unequal relation on incompatible variable objects
  19726. MODULE Test;
  19727. VAR object1: OBJECT END; object2: OBJECT END; result: BOOLEAN;
  19728. BEGIN result := (object1 # object1) OR (object2 # object1)
  19729. END Test.
  19730. negative: less relation on variable objects
  19731. MODULE Test;
  19732. VAR object: OBJECT END; result: BOOLEAN;
  19733. BEGIN result := object < object
  19734. END Test.
  19735. negative: less or equal relation on variable objects
  19736. MODULE Test;
  19737. VAR object: OBJECT END; result: BOOLEAN;
  19738. BEGIN result := object <= object
  19739. END Test.
  19740. negative: greater relation on variable objects
  19741. MODULE Test;
  19742. VAR object: OBJECT END; result: BOOLEAN;
  19743. BEGIN result := object > object
  19744. END Test.
  19745. negative: greater or equal relation on variable objects
  19746. MODULE Test;
  19747. VAR object: OBJECT END; result: BOOLEAN;
  19748. BEGIN result := object >= object
  19749. END Test.
  19750. negative: set membership on variable objects
  19751. MODULE Test;
  19752. VAR object: OBJECT END; result: BOOLEAN;
  19753. BEGIN result := object IN object
  19754. END Test.
  19755. negative: type test on variable objects
  19756. MODULE Test;
  19757. VAR object: OBJECT END; result: BOOLEAN;
  19758. BEGIN result := object IS object
  19759. END Test.
  19760. negative: type test on variable object
  19761. MODULE Test;
  19762. VAR object: OBJECT END; result: BOOLEAN;
  19763. BEGIN result := object IS OBJECT;
  19764. END Test.
  19765. positive: type test on same object type
  19766. MODULE Test;
  19767. TYPE Type = OBJECT END Type;
  19768. VAR object: Type; result: BOOLEAN;
  19769. BEGIN result := object IS Type
  19770. END Test.
  19771. positive: type test on extending object type
  19772. MODULE Test;
  19773. TYPE Object = OBJECT END Object; Type = OBJECT (Object) END Type;
  19774. VAR object: Object; result: BOOLEAN;
  19775. BEGIN result := object IS Type
  19776. END Test.
  19777. negative: type test on extended object type
  19778. MODULE Test;
  19779. TYPE Object = OBJECT END Object; Type = Object;
  19780. VAR object: OBJECT (Object) END; result: BOOLEAN;
  19781. BEGIN result := object IS Type
  19782. END Test.
  19783. negative: type test on incompatible object type
  19784. MODULE Test;
  19785. TYPE Type = OBJECT END Type;
  19786. VAR object: OBJECT END; result: BOOLEAN;
  19787. BEGIN result := object IS Type
  19788. END Test.
  19789. positive: type test on self and same object type
  19790. MODULE Test;
  19791. TYPE Object = OBJECT
  19792. VAR result: BOOLEAN;
  19793. BEGIN result := SELF IS Type
  19794. END Object;
  19795. TYPE Type = Object;
  19796. END Test.
  19797. positive: type test on self and extending object type
  19798. MODULE Test;
  19799. TYPE Object = OBJECT
  19800. VAR result: BOOLEAN;
  19801. BEGIN result := SELF IS Type
  19802. END Object;
  19803. TYPE Type = OBJECT (Object) END Type;
  19804. END Test.
  19805. negative: type test on self and extended object type
  19806. MODULE Test;
  19807. TYPE Object = OBJECT (Type)
  19808. VAR result: BOOLEAN;
  19809. BEGIN result := SELF IS Type
  19810. END Object;
  19811. TYPE Type = OBJECT END Type;
  19812. END Test.
  19813. negative: type guard on variable objects
  19814. MODULE Test;
  19815. VAR object, result: OBJECT END;
  19816. BEGIN result := object(object)
  19817. END Test.
  19818. negative: type guard on variable object
  19819. MODULE Test;
  19820. TYPE Type = OBJECT;
  19821. VAR object, result: OBJECT END;
  19822. BEGIN result := object(Type)
  19823. END Test.
  19824. positive: type guard on same object type
  19825. MODULE Test;
  19826. TYPE Type = OBJECT END Type;
  19827. VAR object, result: Type;
  19828. BEGIN result := object(Type)
  19829. END Test.
  19830. positive: type guard on extending object type
  19831. MODULE Test;
  19832. TYPE Object = OBJECT END Object; Type = OBJECT (Object) END Type;
  19833. VAR object: Object; result: Type;
  19834. BEGIN result := object(Type)
  19835. END Test.
  19836. negative: type guard on extended object type
  19837. MODULE Test;
  19838. TYPE Object = OBJECT END Object; Type = Object;
  19839. VAR object: OBJECT (Object) END; result: Type;
  19840. BEGIN result := object(Type)
  19841. END Test.
  19842. negative: type guard on incompatible object type
  19843. MODULE Test;
  19844. TYPE Type = OBJECT END Type;
  19845. VAR object: OBJECT END; result: Type;
  19846. BEGIN result := object(Type)
  19847. END Test.
  19848. positive: type guard on self and same object type
  19849. MODULE Test;
  19850. TYPE Object = OBJECT
  19851. VAR result: Type;
  19852. BEGIN result := SELF(Type)
  19853. END Object;
  19854. TYPE Type = Object;
  19855. END Test.
  19856. positive: type guard on self and extending object type
  19857. MODULE Test;
  19858. TYPE Object = OBJECT
  19859. VAR result: Type;
  19860. BEGIN result := SELF(Type)
  19861. END Object;
  19862. TYPE Type = OBJECT (Object) END Type;
  19863. END Test.
  19864. negative: type guard on self and extended object type
  19865. MODULE Test;
  19866. TYPE Object = OBJECT (Type)
  19867. VAR result: Type;
  19868. BEGIN result := SELF(Type)
  19869. END Object;
  19870. TYPE Type = OBJECT END Type;
  19871. END Test.
  19872. negative: logical and on variable objects
  19873. MODULE Test;
  19874. VAR object, result: OBJECT END;
  19875. BEGIN result := object & object
  19876. END Test.
  19877. negative: logical or on variable objects
  19878. MODULE Test;
  19879. VAR object, result: OBJECT END;
  19880. BEGIN result := object OR object
  19881. END Test.
  19882. negative: ordinal value of variable object
  19883. MODULE Test;
  19884. VAR object: OBJECT END; result: INTEGER;
  19885. BEGIN result := ORD (object)
  19886. END Test.
  19887. negative: character value of variable object
  19888. MODULE Test;
  19889. VAR object: OBJECT END; result: CHAR;
  19890. BEGIN result := CHR (object)
  19891. END Test.
  19892. negative: absolute value of variable object
  19893. MODULE Test;
  19894. VAR object, result: OBJECT END;
  19895. BEGIN result := ABS (object)
  19896. END Test.
  19897. negative: odd test on variable object
  19898. MODULE Test;
  19899. VAR object: OBJECT END; result: BOOLEAN;
  19900. BEGIN result := ODD (object)
  19901. END Test.
  19902. negative: capital letter of variable object
  19903. MODULE Test;
  19904. VAR object: OBJECT END; result: CHAR;
  19905. BEGIN result := CAP (object)
  19906. END Test.
  19907. negative: arithmetic shift of variable objects
  19908. MODULE Test;
  19909. VAR object, result: OBJECT END;
  19910. BEGIN result := ASH (object, object)
  19911. END Test.
  19912. negative: short on variable object
  19913. MODULE Test;
  19914. VAR object, result: OBJECT END;
  19915. BEGIN result := SHORT (object)
  19916. END Test.
  19917. negative: long on variable object
  19918. MODULE Test;
  19919. VAR object, result: OBJECT END;
  19920. BEGIN result := LONG (object)
  19921. END Test.
  19922. negative: entier on variable object
  19923. MODULE Test;
  19924. VAR object, result: OBJECT END;
  19925. BEGIN result := ENTIER (object)
  19926. END Test.
  19927. negative: unary length of variable object
  19928. MODULE Test;
  19929. VAR object: OBJECT END; result: LONGINT;
  19930. BEGIN result := LEN (object)
  19931. END Test.
  19932. negative: binary length of variable object
  19933. MODULE Test;
  19934. VAR object: OBJECT END; result: LONGINT;
  19935. BEGIN result := LEN (object, 0)
  19936. END Test.
  19937. negative: indexing variable object
  19938. MODULE Test;
  19939. VAR object: OBJECT END; result: CHAR;
  19940. BEGIN result := object[0]
  19941. END Test.
  19942. negative: variable object as index
  19943. MODULE Test;
  19944. VAR array: ARRAY 10 OF CHAR; result: CHAR; object: OBJECT END;
  19945. BEGIN result := array[object]
  19946. END Test.
  19947. positive: member selection on variable object
  19948. MODULE Test;
  19949. VAR object: OBJECT VAR member: SET END; result: SET;
  19950. BEGIN result := object.member
  19951. END Test.
  19952. positive: member modification on variable object
  19953. MODULE Test;
  19954. VAR object: OBJECT VAR member: SET END; value: SET;
  19955. BEGIN object.member := value
  19956. END Test.
  19957. positive: member selection on temporary object
  19958. MODULE Test;
  19959. VAR object: PROCEDURE (): OBJECT VAR member: SET END; result: SET;
  19960. BEGIN result := object ().member
  19961. END Test.
  19962. positive: member modification on temporary object
  19963. MODULE Test;
  19964. VAR record: PROCEDURE (): OBJECT VAR member: SET END; value: SET;
  19965. BEGIN record ().member := value
  19966. END Test.
  19967. negative: calling variable object
  19968. MODULE Test;
  19969. VAR object: OBJECT END;
  19970. BEGIN object
  19971. END Test.
  19972. # variable base objects
  19973. negative: arithmetic negation on variable base object
  19974. MODULE Test;
  19975. VAR object, result: OBJECT;
  19976. BEGIN result := -object;
  19977. END Test.
  19978. negative: logical negation on variable base object
  19979. MODULE Test;
  19980. VAR object, result: OBJECT;
  19981. BEGIN result := ~object;
  19982. END Test.
  19983. negative: dereferencing variable base object
  19984. MODULE Test;
  19985. VAR object, result: OBJECT;
  19986. BEGIN result := object^;
  19987. END Test.
  19988. negative: addition on variable base objects
  19989. MODULE Test;
  19990. VAR object, result: OBJECT;
  19991. BEGIN result := object + object;
  19992. END Test.
  19993. negative: subtraction on variable base objects
  19994. MODULE Test;
  19995. VAR object, result: OBJECT;
  19996. BEGIN result := object - object
  19997. END Test.
  19998. negative: multiplication on variable base objects
  19999. MODULE Test;
  20000. VAR object, result: OBJECT;
  20001. BEGIN result := object * object
  20002. END Test.
  20003. negative: integer division on variable base objects
  20004. MODULE Test;
  20005. VAR object: OBJECT; result: INTEGER;
  20006. BEGIN result := object DIV object
  20007. END Test.
  20008. negative: real division on variable base objects
  20009. MODULE Test;
  20010. VAR object: OBJECT; result: REAL;
  20011. BEGIN result := object / object
  20012. END Test.
  20013. negative: modulo on variable base objects
  20014. MODULE Test;
  20015. VAR object: OBJECT; result: INTEGER;
  20016. BEGIN result := object MOD object
  20017. END Test.
  20018. positive: equal relation on variable base objects
  20019. MODULE Test;
  20020. VAR object: OBJECT; result: BOOLEAN;
  20021. BEGIN result := object = object
  20022. END Test.
  20023. positive: equal relation on compatible variable base objects
  20024. MODULE Test;
  20025. VAR object1: OBJECT; object2: OBJECT END; result: BOOLEAN;
  20026. BEGIN result := (object1 = object1) OR (object2 = object1)
  20027. END Test.
  20028. positive: unequal relation on variable base objects
  20029. MODULE Test;
  20030. VAR object: OBJECT; result: BOOLEAN;
  20031. BEGIN result := object # object
  20032. END Test.
  20033. positive: unequal relation on compatible variable base objects
  20034. MODULE Test;
  20035. VAR object1: OBJECT; object2: OBJECT END; result: BOOLEAN;
  20036. BEGIN result := (object1 # object1) OR (object2 # object1)
  20037. END Test.
  20038. negative: less relation on variable base objects
  20039. MODULE Test;
  20040. VAR object: OBJECT; result: BOOLEAN;
  20041. BEGIN result := object < object
  20042. END Test.
  20043. negative: less or equal relation on variable base objects
  20044. MODULE Test;
  20045. VAR object: OBJECT; result: BOOLEAN;
  20046. BEGIN result := object <= object
  20047. END Test.
  20048. negative: greater relation on variable base objects
  20049. MODULE Test;
  20050. VAR object: OBJECT; result: BOOLEAN;
  20051. BEGIN result := object > object
  20052. END Test.
  20053. negative: greater or equal relation on variable base objects
  20054. MODULE Test;
  20055. VAR object: OBJECT; result: BOOLEAN;
  20056. BEGIN result := object >= object
  20057. END Test.
  20058. negative: set membership on variable base objects
  20059. MODULE Test;
  20060. VAR object: OBJECT; result: BOOLEAN;
  20061. BEGIN result := object IN object
  20062. END Test.
  20063. negative: type test on variable base objects
  20064. MODULE Test;
  20065. VAR object: OBJECT; result: BOOLEAN;
  20066. BEGIN result := object IS object
  20067. END Test.
  20068. negative: type test on variable base object
  20069. MODULE Test;
  20070. VAR object: OBJECT; result: BOOLEAN;
  20071. BEGIN result := object IS OBJECT;
  20072. END Test.
  20073. positive: type test on base object type
  20074. MODULE Test;
  20075. TYPE Type = OBJECT;
  20076. VAR object: Type; result: BOOLEAN;
  20077. BEGIN result := object IS Type
  20078. END Test.
  20079. positive: type test on extending base object type
  20080. MODULE Test;
  20081. TYPE Type = OBJECT END Type;
  20082. VAR object: OBJECT; result: BOOLEAN;
  20083. BEGIN result := object IS Type
  20084. END Test.
  20085. negative: type test on extended base object type
  20086. MODULE Test;
  20087. TYPE Type = OBJECT;
  20088. VAR object: OBJECT END; result: BOOLEAN;
  20089. BEGIN result := object IS Type
  20090. END Test.
  20091. negative: type guard on variable base objects
  20092. MODULE Test;
  20093. VAR object, result: OBJECT;
  20094. BEGIN result := object(object)
  20095. END Test.
  20096. negative: type guard on variable base object
  20097. MODULE Test;
  20098. VAR object, result: OBJECT;
  20099. BEGIN result := object(OBJECT);
  20100. END Test.
  20101. positive: type guard on base object type
  20102. MODULE Test;
  20103. TYPE Type = OBJECT;
  20104. VAR object, result: Type;
  20105. BEGIN result := object(Type)
  20106. END Test.
  20107. positive: type guard on extending base object type
  20108. MODULE Test;
  20109. TYPE Type = OBJECT END Type;
  20110. VAR object: OBJECT; result: Type;
  20111. BEGIN result := object(Type)
  20112. END Test.
  20113. negative: type guard on extended base object type
  20114. MODULE Test;
  20115. TYPE Type = OBJECT;
  20116. VAR object: OBJECT END; result: Type;
  20117. BEGIN result := object(Type)
  20118. END Test.
  20119. negative: logical and on variable base objects
  20120. MODULE Test;
  20121. VAR object, result: OBJECT;
  20122. BEGIN result := object & object
  20123. END Test.
  20124. negative: logical or on variable base objects
  20125. MODULE Test;
  20126. VAR object, result: OBJECT;
  20127. BEGIN result := object OR object
  20128. END Test.
  20129. negative: ordinal value of variable base object
  20130. MODULE Test;
  20131. VAR object: OBJECT; result: INTEGER;
  20132. BEGIN result := ORD (object)
  20133. END Test.
  20134. negative: character value of variable base object
  20135. MODULE Test;
  20136. VAR object: OBJECT; result: CHAR;
  20137. BEGIN result := CHR (object)
  20138. END Test.
  20139. negative: absolute value of variable base object
  20140. MODULE Test;
  20141. VAR object, result: OBJECT;
  20142. BEGIN result := ABS (object)
  20143. END Test.
  20144. negative: odd test on variable base object
  20145. MODULE Test;
  20146. VAR object: OBJECT; result: BOOLEAN;
  20147. BEGIN result := ODD (object)
  20148. END Test.
  20149. negative: capital letter of variable base object
  20150. MODULE Test;
  20151. VAR object: OBJECT; result: CHAR;
  20152. BEGIN result := CAP (object)
  20153. END Test.
  20154. negative: arithmetic shift of variable base objects
  20155. MODULE Test;
  20156. VAR object, result: OBJECT;
  20157. BEGIN result := ASH (object, object)
  20158. END Test.
  20159. negative: short on variable base object
  20160. MODULE Test;
  20161. VAR object, result: OBJECT;
  20162. BEGIN result := SHORT (object)
  20163. END Test.
  20164. negative: long on variable base object
  20165. MODULE Test;
  20166. VAR object, result: OBJECT;
  20167. BEGIN result := LONG (object)
  20168. END Test.
  20169. negative: entier on variable base object
  20170. MODULE Test;
  20171. VAR object, result: OBJECT;
  20172. BEGIN result := ENTIER (object)
  20173. END Test.
  20174. negative: unary length of variable base object
  20175. MODULE Test;
  20176. VAR object: OBJECT; result: LONGINT;
  20177. BEGIN result := LEN (object)
  20178. END Test.
  20179. negative: binary length of variable base object
  20180. MODULE Test;
  20181. VAR object: OBJECT; result: LONGINT;
  20182. BEGIN result := LEN (object, 0)
  20183. END Test.
  20184. negative: indexing variable base object
  20185. MODULE Test;
  20186. VAR object: OBJECT; result: CHAR;
  20187. BEGIN result := object[0]
  20188. END Test.
  20189. negative: variable base object as index
  20190. MODULE Test;
  20191. VAR array: ARRAY 10 OF CHAR; result: CHAR; object: OBJECT;
  20192. BEGIN result := array[object]
  20193. END Test.
  20194. negative: member selection on variable base object
  20195. MODULE Test;
  20196. VAR object, result: OBJECT;
  20197. BEGIN result := object.member
  20198. END Test.
  20199. negative: calling variable base object
  20200. MODULE Test;
  20201. VAR object: OBJECT;
  20202. BEGIN object
  20203. END Test.
  20204. # variable pointers to record
  20205. negative: arithmetic negation on variable pointer to record
  20206. MODULE Test;
  20207. VAR pointer, result: POINTER TO RECORD END;
  20208. BEGIN result := -pointer;
  20209. END Test.
  20210. negative: logical negation on variable pointer to record
  20211. MODULE Test;
  20212. VAR pointer, result: POINTER TO RECORD END;
  20213. BEGIN result := ~pointer;
  20214. END Test.
  20215. positive: dereferencing variable pointer to record
  20216. MODULE Test;
  20217. TYPE Record = RECORD END;
  20218. VAR pointer: POINTER TO Record; result: Record;
  20219. BEGIN result := pointer^;
  20220. END Test.
  20221. negative: addition on variable pointers to record
  20222. MODULE Test;
  20223. VAR pointer, result: POINTER TO RECORD END;
  20224. BEGIN result := pointer + pointer;
  20225. END Test.
  20226. negative: subtraction on variable pointers to record
  20227. MODULE Test;
  20228. VAR pointer, result: POINTER TO RECORD END;
  20229. BEGIN result := pointer - pointer
  20230. END Test.
  20231. negative: multiplication on variable pointers to record
  20232. MODULE Test;
  20233. VAR pointer, result: POINTER TO RECORD END;
  20234. BEGIN result := pointer * pointer
  20235. END Test.
  20236. negative: integer division on variable pointers to record
  20237. MODULE Test;
  20238. VAR pointer: POINTER TO RECORD END; result: INTEGER;
  20239. BEGIN result := pointer DIV pointer
  20240. END Test.
  20241. negative: real division on variable pointers to record
  20242. MODULE Test;
  20243. VAR pointer: POINTER TO RECORD END; result: REAL;
  20244. BEGIN result := pointer / pointer
  20245. END Test.
  20246. negative: modulo on variable pointers to record
  20247. MODULE Test;
  20248. VAR pointer: POINTER TO RECORD END; result: INTEGER;
  20249. BEGIN result := pointer MOD pointer
  20250. END Test.
  20251. positive: equal relation on variable pointers to record
  20252. MODULE Test;
  20253. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20254. BEGIN result := pointer = pointer
  20255. END Test.
  20256. positive: equal relation on compatible variable pointers to record
  20257. MODULE Test;
  20258. TYPE Record = RECORD END;
  20259. VAR pointer1: POINTER TO Record; pointer2: POINTER TO RECORD (Record) END; result: BOOLEAN;
  20260. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20261. END Test.
  20262. negative: equal relation on incompatible variable pointers to record
  20263. MODULE Test;
  20264. VAR pointer1: POINTER TO RECORD END; pointer2: POINTER TO RECORD END; result: BOOLEAN;
  20265. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20266. END Test.
  20267. negative: equal relation on incompatible variable pointers to record and array
  20268. MODULE Test;
  20269. VAR pointer1: POINTER TO RECORD END; pointer2: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20270. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20271. END Test.
  20272. positive: unequal relation on variable pointers to record
  20273. MODULE Test;
  20274. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20275. BEGIN result := pointer # pointer
  20276. END Test.
  20277. positive: unequal relation on compatible variable pointers to record
  20278. MODULE Test;
  20279. TYPE Record = RECORD END;
  20280. VAR pointer1: POINTER TO Record; pointer2: POINTER TO RECORD (Record) END; result: BOOLEAN;
  20281. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20282. END Test.
  20283. negative: unequal relation on incompatible variable pointers to record
  20284. MODULE Test;
  20285. VAR pointer1: POINTER TO RECORD END; pointer2: POINTER TO RECORD END; result: BOOLEAN;
  20286. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20287. END Test.
  20288. negative: unequal relation on incompatible variable pointers to record and array
  20289. MODULE Test;
  20290. VAR pointer1: POINTER TO RECORD END; pointer2: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20291. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20292. END Test.
  20293. negative: less relation on variable pointers to record
  20294. MODULE Test;
  20295. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20296. BEGIN result := pointer < pointer
  20297. END Test.
  20298. negative: less or equal relation on variable pointers to record
  20299. MODULE Test;
  20300. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20301. BEGIN result := pointer <= pointer
  20302. END Test.
  20303. negative: greater relation on variable pointers to record
  20304. MODULE Test;
  20305. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20306. BEGIN result := pointer > pointer
  20307. END Test.
  20308. negative: greater or equal relation on variable pointers to record
  20309. MODULE Test;
  20310. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20311. BEGIN result := pointer >= pointer
  20312. END Test.
  20313. negative: set membership on variable pointers to record
  20314. MODULE Test;
  20315. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20316. BEGIN result := pointer IN pointer
  20317. END Test.
  20318. negative: type test on variable pointers to record
  20319. MODULE Test;
  20320. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20321. BEGIN result := pointer IS pointer
  20322. END Test.
  20323. negative: type test on variable pointer to record
  20324. MODULE Test;
  20325. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20326. BEGIN result := pointer IS POINTER TO RECORD END
  20327. END Test.
  20328. positive: type test on same pointer to record type
  20329. MODULE Test;
  20330. TYPE Type = POINTER TO RECORD END;
  20331. VAR pointer: Type; result: BOOLEAN;
  20332. BEGIN result := pointer IS Type
  20333. END Test.
  20334. positive: type test on extending pointer to record type
  20335. MODULE Test;
  20336. TYPE Record = RECORD END; Type = POINTER TO RECORD (Record) END;
  20337. VAR pointer: POINTER TO Record; result: BOOLEAN;
  20338. BEGIN result := pointer IS Type
  20339. END Test.
  20340. negative: type test on extended pointer to record type
  20341. MODULE Test;
  20342. TYPE Record = RECORD END; Type = POINTER TO Record;
  20343. VAR pointer: POINTER TO RECORD (Record) END; result: BOOLEAN;
  20344. BEGIN result := pointer IS Type
  20345. END Test.
  20346. negative: type test on incompatible pointer to record type
  20347. MODULE Test;
  20348. TYPE Type = POINTER TO RECORD END;
  20349. VAR record: POINTER TO RECORD END; result: BOOLEAN;
  20350. BEGIN result := record IS Type
  20351. END Test.
  20352. negative: type guard on variable pointers to record
  20353. MODULE Test;
  20354. VAR pointer, result: POINTER TO RECORD END;
  20355. BEGIN result := pointer(pointer)
  20356. END Test.
  20357. negative: type guard on variable pointer to record
  20358. MODULE Test;
  20359. VAR pointer, result: POINTER TO RECORD END;
  20360. BEGIN result := pointer(POINTER TO RECORD END)
  20361. END Test.
  20362. positive: type guard on same pointer to record type
  20363. MODULE Test;
  20364. TYPE Type = POINTER TO RECORD END;
  20365. VAR pointer, result: Type;
  20366. BEGIN result := pointer(Type)
  20367. END Test.
  20368. positive: type guard on extending pointer to record type
  20369. MODULE Test;
  20370. TYPE Record = RECORD END; Type = POINTER TO RECORD (Record) END;
  20371. VAR pointer: POINTER TO Record; result: Type;
  20372. BEGIN result := pointer(Type)
  20373. END Test.
  20374. negative: type guard on extended pointer to record type
  20375. MODULE Test;
  20376. TYPE Record = RECORD END; Type = POINTER TO Record;
  20377. VAR pointer: POINTER TO RECORD (Record) END; result: Type;
  20378. BEGIN result := pointer(Type)
  20379. END Test.
  20380. negative: type guard on incompatible pointer to record type
  20381. MODULE Test;
  20382. TYPE Type = POINTER TO RECORD END;
  20383. VAR record: POINTER TO RECORD END; result: Type;
  20384. BEGIN result := record(Type)
  20385. END Test.
  20386. negative: logical and on variable pointers to record
  20387. MODULE Test;
  20388. VAR pointer, result: POINTER TO RECORD END;
  20389. BEGIN result := pointer & pointer
  20390. END Test.
  20391. negative: logical or on variable pointers to record
  20392. MODULE Test;
  20393. VAR pointer, result: POINTER TO RECORD END;
  20394. BEGIN result := pointer OR pointer
  20395. END Test.
  20396. negative: ordinal value of variable pointer to record
  20397. MODULE Test;
  20398. VAR pointer: POINTER TO RECORD END; result: INTEGER;
  20399. BEGIN result := ORD (pointer)
  20400. END Test.
  20401. negative: character value of variable pointer to record
  20402. MODULE Test;
  20403. VAR pointer: POINTER TO RECORD END; result: CHAR;
  20404. BEGIN result := CHR (pointer)
  20405. END Test.
  20406. negative: absolute value of variable pointer to record
  20407. MODULE Test;
  20408. VAR pointer, result: POINTER TO RECORD END;
  20409. BEGIN result := ABS (pointer)
  20410. END Test.
  20411. negative: odd test on variable pointer to record
  20412. MODULE Test;
  20413. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20414. BEGIN result := ODD (pointer)
  20415. END Test.
  20416. negative: capital letter of variable pointer to record
  20417. MODULE Test;
  20418. VAR pointer: POINTER TO RECORD END; result: CHAR;
  20419. BEGIN result := CAP (pointer)
  20420. END Test.
  20421. negative: arithmetic shift of variable pointers to record
  20422. MODULE Test;
  20423. VAR pointer, result: POINTER TO RECORD END;
  20424. BEGIN result := ASH (pointer, pointer)
  20425. END Test.
  20426. negative: short on variable pointer to record
  20427. MODULE Test;
  20428. VAR pointer, result: POINTER TO RECORD END;
  20429. BEGIN result := SHORT (pointer)
  20430. END Test.
  20431. negative: long on variable pointer to record
  20432. MODULE Test;
  20433. VAR pointer, result: POINTER TO RECORD END;
  20434. BEGIN result := LONG (pointer)
  20435. END Test.
  20436. negative: entier on variable pointer to record
  20437. MODULE Test;
  20438. VAR pointer, result: POINTER TO RECORD END;
  20439. BEGIN result := ENTIER (pointer)
  20440. END Test.
  20441. negative: unary length of variable pointer to record
  20442. MODULE Test;
  20443. VAR pointer: POINTER TO RECORD END; result: LONGINT;
  20444. BEGIN result := LEN (pointer)
  20445. END Test.
  20446. negative: binary length of variable pointer to record
  20447. MODULE Test;
  20448. VAR pointer: POINTER TO RECORD END; result: LONGINT;
  20449. BEGIN result := LEN (pointer, 0)
  20450. END Test.
  20451. negative: indexing variable pointer to record
  20452. MODULE Test;
  20453. VAR pointer: POINTER TO RECORD END; result: CHAR;
  20454. BEGIN result := pointer[0]
  20455. END Test.
  20456. negative: variable pointer to record as index
  20457. MODULE Test;
  20458. VAR array: ARRAY 10 OF CHAR; result: CHAR; pointer: POINTER TO RECORD END;
  20459. BEGIN result := array[pointer]
  20460. END Test.
  20461. positive: member selection on variable pointer to record
  20462. MODULE Test;
  20463. VAR pointer: POINTER TO RECORD member: SET END; result: SET;
  20464. BEGIN result := pointer.member
  20465. END Test.
  20466. positive: member modification on variable pointer to record
  20467. MODULE Test;
  20468. VAR pointer: POINTER TO RECORD member: SET END; value: SET;
  20469. BEGIN pointer.member := value
  20470. END Test.
  20471. positive: member selection on temporary pointer to record
  20472. MODULE Test;
  20473. VAR pointer: PROCEDURE (): POINTER TO RECORD member: SET END; result: SET;
  20474. BEGIN result := pointer ().member
  20475. END Test.
  20476. positive: member modification on temporary pointer to record
  20477. MODULE Test;
  20478. VAR pointer: PROCEDURE (): POINTER TO RECORD member: SET END; value: SET;
  20479. BEGIN pointer ().member := value
  20480. END Test.
  20481. positive: member selection on dereferenced variable pointer to record
  20482. MODULE Test;
  20483. VAR pointer: POINTER TO RECORD member: SET END; result: SET;
  20484. BEGIN result := pointer^.member
  20485. END Test.
  20486. positive: member modification on dereferenced variable pointer to record
  20487. MODULE Test;
  20488. VAR pointer: POINTER TO RECORD member: SET END; value: SET;
  20489. BEGIN pointer^.member := value
  20490. END Test.
  20491. positive: member selection on dereferenced temporary pointer to record
  20492. MODULE Test;
  20493. VAR pointer: PROCEDURE (): POINTER TO RECORD member: SET END; result: SET;
  20494. BEGIN result := pointer ()^.member
  20495. END Test.
  20496. positive: member modification on dereferenced temporary pointer to record
  20497. MODULE Test;
  20498. VAR pointer: PROCEDURE (): POINTER TO RECORD member: SET END; value: SET;
  20499. BEGIN pointer ()^.member := value
  20500. END Test.
  20501. negative: calling variable pointer to record
  20502. MODULE Test;
  20503. VAR pointer: POINTER TO RECORD END;
  20504. BEGIN pointer
  20505. END Test.
  20506. # variable pointers to array
  20507. negative: arithmetic negation on variable pointer to array
  20508. MODULE Test;
  20509. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20510. BEGIN result := -pointer;
  20511. END Test.
  20512. negative: logical negation on variable pointer to array
  20513. MODULE Test;
  20514. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20515. BEGIN result := ~pointer;
  20516. END Test.
  20517. positive: dereferencing variable pointer to array
  20518. MODULE Test;
  20519. TYPE Array = ARRAY 10 OF CHAR;
  20520. VAR pointer: POINTER TO Array; result: Array;
  20521. BEGIN result := pointer^;
  20522. END Test.
  20523. negative: addition on variable pointers to array
  20524. MODULE Test;
  20525. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20526. BEGIN result := pointer + pointer;
  20527. END Test.
  20528. negative: subtraction on variable pointers to array
  20529. MODULE Test;
  20530. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20531. BEGIN result := pointer - pointer
  20532. END Test.
  20533. negative: multiplication on variable pointers to array
  20534. MODULE Test;
  20535. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20536. BEGIN result := pointer * pointer
  20537. END Test.
  20538. negative: integer division on variable pointers to array
  20539. MODULE Test;
  20540. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: INTEGER;
  20541. BEGIN result := pointer DIV pointer
  20542. END Test.
  20543. negative: real division on variable pointers to array
  20544. MODULE Test;
  20545. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: REAL;
  20546. BEGIN result := pointer / pointer
  20547. END Test.
  20548. negative: modulo on variable pointers to array
  20549. MODULE Test;
  20550. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: INTEGER;
  20551. BEGIN result := pointer MOD pointer
  20552. END Test.
  20553. positive: equal relation on variable pointers to array
  20554. MODULE Test;
  20555. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20556. BEGIN result := pointer = pointer
  20557. END Test.
  20558. positive: equal relation on compatible variable pointers to array
  20559. MODULE Test;
  20560. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20561. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20562. END Test.
  20563. negative: equal relation on incompatible variable pointers to array
  20564. MODULE Test;
  20565. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: POINTER TO ARRAY 20 OF CHAR; result: BOOLEAN;
  20566. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20567. END Test.
  20568. negative: equal relation on incompatible variable pointers to array and record
  20569. MODULE Test;
  20570. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: RECORD END; result: BOOLEAN;
  20571. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20572. END Test.
  20573. positive: unequal relation on variable pointers to array
  20574. MODULE Test;
  20575. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20576. BEGIN result := pointer # pointer
  20577. END Test.
  20578. positive: unequal relation on compatible variable pointers to array
  20579. MODULE Test;
  20580. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20581. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20582. END Test.
  20583. negative: unequal relation on incompatible variable pointers to array
  20584. MODULE Test;
  20585. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: POINTER TO ARRAY 20 OF CHAR; result: BOOLEAN;
  20586. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20587. END Test.
  20588. negative: unequal relation on incompatible variable pointers to array and record
  20589. MODULE Test;
  20590. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: RECORD END; result: BOOLEAN;
  20591. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20592. END Test.
  20593. negative: less relation on variable pointers to array
  20594. MODULE Test;
  20595. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20596. BEGIN result := pointer < pointer
  20597. END Test.
  20598. negative: less or equal relation on variable pointers to array
  20599. MODULE Test;
  20600. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20601. BEGIN result := pointer <= pointer
  20602. END Test.
  20603. negative: greater relation on variable pointers to array
  20604. MODULE Test;
  20605. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20606. BEGIN result := pointer > pointer
  20607. END Test.
  20608. negative: greater or equal relation on variable pointers to array
  20609. MODULE Test;
  20610. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20611. BEGIN result := pointer >= pointer
  20612. END Test.
  20613. negative: set membership on variable pointers to array
  20614. MODULE Test;
  20615. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20616. BEGIN result := pointer IN pointer
  20617. END Test.
  20618. negative: type test on variable pointers to array
  20619. MODULE Test;
  20620. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20621. BEGIN result := pointer IS pointer
  20622. END Test.
  20623. negative: type test on variable pointer to array
  20624. MODULE Test;
  20625. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20626. BEGIN result := pointer IS POINTER TO ARRAY 10 OF CHAR
  20627. END Test.
  20628. negative: type test on pointer to array type
  20629. MODULE Test;
  20630. TYPE Type = POINTER TO ARRAY 10 OF CHAR;
  20631. VAR pointer: Type; result: BOOLEAN;
  20632. BEGIN result := pointer IS Type
  20633. END Test.
  20634. negative: type guard on variable pointers to array
  20635. MODULE Test;
  20636. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20637. BEGIN result := pointer(pointer)
  20638. END Test.
  20639. negative: type guard on variable pointer to array
  20640. MODULE Test;
  20641. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20642. BEGIN result := pointer(POINTER TO ARRAY 10 OF CHAR)
  20643. END Test.
  20644. negative: type guard on pointer to array type
  20645. MODULE Test;
  20646. TYPE Type = POINTER TO ARRAY 10 OF CHAR;
  20647. VAR pointer: Type; result: Type;
  20648. BEGIN result := pointer(Type)
  20649. END Test.
  20650. negative: logical and on variable pointers to array
  20651. MODULE Test;
  20652. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20653. BEGIN result := pointer & pointer
  20654. END Test.
  20655. negative: logical or on variable pointers to array
  20656. MODULE Test;
  20657. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20658. BEGIN result := pointer OR pointer
  20659. END Test.
  20660. negative: ordinal value of variable pointer to array
  20661. MODULE Test;
  20662. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: INTEGER;
  20663. BEGIN result := ORD (pointer)
  20664. END Test.
  20665. negative: character value of variable pointer to array
  20666. MODULE Test;
  20667. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20668. BEGIN result := CHR (pointer)
  20669. END Test.
  20670. negative: absolute value of variable pointer to array
  20671. MODULE Test;
  20672. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20673. BEGIN result := ABS (pointer)
  20674. END Test.
  20675. negative: odd test on variable pointer to array
  20676. MODULE Test;
  20677. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20678. BEGIN result := ODD (pointer)
  20679. END Test.
  20680. negative: capital letter of variable pointer to array
  20681. MODULE Test;
  20682. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20683. BEGIN result := CAP (pointer)
  20684. END Test.
  20685. negative: arithmetic shift of variable pointers to array
  20686. MODULE Test;
  20687. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20688. BEGIN result := ASH (pointer, pointer)
  20689. END Test.
  20690. negative: short on variable pointer to array
  20691. MODULE Test;
  20692. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20693. BEGIN result := SHORT (pointer)
  20694. END Test.
  20695. negative: long on variable pointer to array
  20696. MODULE Test;
  20697. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20698. BEGIN result := LONG (pointer)
  20699. END Test.
  20700. negative: entier on variable pointer to array
  20701. MODULE Test;
  20702. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20703. BEGIN result := ENTIER (pointer)
  20704. END Test.
  20705. positive: unary length of variable pointer to array
  20706. MODULE Test;
  20707. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: LONGINT;
  20708. BEGIN result := LEN (pointer)
  20709. END Test.
  20710. positive: binary length of variable pointer to array
  20711. MODULE Test;
  20712. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: LONGINT;
  20713. BEGIN result := LEN (pointer, 0)
  20714. END Test.
  20715. positive: indexing variable pointer to boolean array
  20716. MODULE Test;
  20717. VAR array: POINTER TO ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  20718. BEGIN result := array[0]
  20719. END Test.
  20720. positive: indexing temporary pointer to boolean array
  20721. MODULE Test;
  20722. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  20723. BEGIN result := array()[0]
  20724. END Test.
  20725. positive: changing indexed temporary pointer to boolean array
  20726. MODULE Test;
  20727. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF BOOLEAN;
  20728. BEGIN array()[0] := TRUE;
  20729. END Test.
  20730. positive: indexing dereferenced variable pointer to boolean array
  20731. MODULE Test;
  20732. VAR array: POINTER TO ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  20733. BEGIN result := array^[0]
  20734. END Test.
  20735. positive: indexing dereferenced temporary pointer to boolean array
  20736. MODULE Test;
  20737. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  20738. BEGIN result := array()^[0]
  20739. END Test.
  20740. positive: changing dereferenced indexed temporary pointer to boolean array
  20741. MODULE Test;
  20742. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF BOOLEAN;
  20743. BEGIN array()^[0] := TRUE;
  20744. END Test.
  20745. positive: indexing variable pointer to character array
  20746. MODULE Test;
  20747. VAR array: POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20748. BEGIN result := array[0]
  20749. END Test.
  20750. positive: indexing temporary pointer to character array
  20751. MODULE Test;
  20752. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20753. BEGIN result := array()[0]
  20754. END Test.
  20755. positive: changing indexed temporary pointer to character array
  20756. MODULE Test;
  20757. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR;
  20758. BEGIN array()[0] := '0';
  20759. END Test.
  20760. positive: indexing dereferenced variable pointer to character array
  20761. MODULE Test;
  20762. VAR array: POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20763. BEGIN result := array^[0]
  20764. END Test.
  20765. positive: indexing dereferenced temporary pointer to character array
  20766. MODULE Test;
  20767. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20768. BEGIN result := array()^[0]
  20769. END Test.
  20770. positive: changing dereferenced indexed temporary pointer to character array
  20771. MODULE Test;
  20772. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR;
  20773. BEGIN array()^[0] := '0';
  20774. END Test.
  20775. positive: indexing variable pointer to integer array
  20776. MODULE Test;
  20777. VAR array: POINTER TO ARRAY 10 OF INTEGER; result: INTEGER;
  20778. BEGIN result := array[0]
  20779. END Test.
  20780. positive: indexing temporary pointer to integer array
  20781. MODULE Test;
  20782. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF INTEGER; result: INTEGER;
  20783. BEGIN result := array()[0]
  20784. END Test.
  20785. positive: changing indexed temporary pointer to integer array
  20786. MODULE Test;
  20787. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF INTEGER;
  20788. BEGIN array()[0] := 5;
  20789. END Test.
  20790. positive: indexing dereferenced variable pointer to integer array
  20791. MODULE Test;
  20792. VAR array: POINTER TO ARRAY 10 OF INTEGER; result: INTEGER;
  20793. BEGIN result := array^[0]
  20794. END Test.
  20795. positive: indexing dereferenced temporary pointer to integer array
  20796. MODULE Test;
  20797. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF INTEGER; result: INTEGER;
  20798. BEGIN result := array()^[0]
  20799. END Test.
  20800. positive: changing dereferenced indexed temporary pointer to integer array
  20801. MODULE Test;
  20802. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF INTEGER;
  20803. BEGIN array()^[0] := 5;
  20804. END Test.
  20805. positive: indexing variable pointer to real array
  20806. MODULE Test;
  20807. VAR array: POINTER TO ARRAY 10 OF REAL; result: REAL;
  20808. BEGIN result := array[0]
  20809. END Test.
  20810. positive: indexing temporary pointer to real array
  20811. MODULE Test;
  20812. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF REAL; result: REAL;
  20813. BEGIN result := array()[0]
  20814. END Test.
  20815. positive: changing indexed temporary pointer to real array
  20816. MODULE Test;
  20817. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF REAL;
  20818. BEGIN array()[0] := 5.0;
  20819. END Test.
  20820. positive: indexing dereferenced variable pointer to real array
  20821. MODULE Test;
  20822. VAR array: POINTER TO ARRAY 10 OF REAL; result: REAL;
  20823. BEGIN result := array^[0]
  20824. END Test.
  20825. positive: indexing dereferenced temporary pointer to real array
  20826. MODULE Test;
  20827. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF REAL; result: REAL;
  20828. BEGIN result := array()^[0]
  20829. END Test.
  20830. positive: changing dereferenced indexed temporary pointer to real array
  20831. MODULE Test;
  20832. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF REAL;
  20833. BEGIN array()^[0] := 5.0;
  20834. END Test.
  20835. positive: indexing variable pointer to set array
  20836. MODULE Test;
  20837. VAR array: POINTER TO ARRAY 10 OF SET; result: SET;
  20838. BEGIN result := array[0]
  20839. END Test.
  20840. positive: indexing temporary pointer to set array
  20841. MODULE Test;
  20842. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF SET; result: SET;
  20843. BEGIN result := array()[0]
  20844. END Test.
  20845. positive: changing indexed temporary pointer to set array
  20846. MODULE Test;
  20847. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF SET;
  20848. BEGIN array()[0] := {5};
  20849. END Test.
  20850. positive: indexing dereferenced variable pointer to set array
  20851. MODULE Test;
  20852. VAR array: POINTER TO ARRAY 10 OF SET; result: SET;
  20853. BEGIN result := array^[0]
  20854. END Test.
  20855. positive: indexing dereferenced temporary pointer to set array
  20856. MODULE Test;
  20857. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF SET; result: SET;
  20858. BEGIN result := array()^[0]
  20859. END Test.
  20860. positive: changing dereferenced indexed temporary pointer to set array
  20861. MODULE Test;
  20862. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF SET;
  20863. BEGIN array()^[0] := {5};
  20864. END Test.
  20865. positive: indexing variable pointer to array of array
  20866. MODULE Test;
  20867. VAR array: POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  20868. BEGIN result := array[0]
  20869. END Test.
  20870. positive: indexing temporary pointer to array of array
  20871. MODULE Test;
  20872. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  20873. BEGIN result := array()[0]
  20874. END Test.
  20875. positive: changing indexed temporary pointer to array of array
  20876. MODULE Test;
  20877. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; value: ARRAY 10 OF CHAR;
  20878. BEGIN array()[0] := value;
  20879. END Test.
  20880. positive: indexing dereferenced variable pointer to array of array
  20881. MODULE Test;
  20882. VAR array: POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  20883. BEGIN result := array^[0]
  20884. END Test.
  20885. positive: indexing dereferenced temporary pointer to array of array
  20886. MODULE Test;
  20887. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  20888. BEGIN result := array()^[0]
  20889. END Test.
  20890. positive: changing dereferenced indexed temporary pointer to array of array
  20891. MODULE Test;
  20892. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; value: ARRAY 10 OF CHAR;
  20893. BEGIN array()^[0] := value;
  20894. END Test.
  20895. positive: indexing variable pointer to record array
  20896. MODULE Test;
  20897. TYPE Record = RECORD END;
  20898. VAR array: POINTER TO ARRAY 10 OF Record; result: Record;
  20899. BEGIN result := array[0]
  20900. END Test.
  20901. positive: indexing temporary pointer to record array
  20902. MODULE Test;
  20903. TYPE Record = RECORD END;
  20904. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record; result: Record;
  20905. BEGIN result := array()[0]
  20906. END Test.
  20907. positive: changing indexed temporary pointer to record array
  20908. MODULE Test;
  20909. TYPE Record = RECORD END;
  20910. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record; value: Record;
  20911. BEGIN array()[0] := value;
  20912. END Test.
  20913. positive: changing member of indexed temporary pointer to record array
  20914. MODULE Test;
  20915. TYPE Record = RECORD i: INTEGER END;
  20916. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record;
  20917. BEGIN array()[0].i := 5;
  20918. END Test.
  20919. positive: indexing dereferenced variable pointer to array of record
  20920. MODULE Test;
  20921. TYPE Record = RECORD END;
  20922. VAR array: POINTER TO ARRAY 10 OF Record; result: Record;
  20923. BEGIN result := array^[0]
  20924. END Test.
  20925. positive: indexing dereferenced temporary pointer to array of record
  20926. MODULE Test;
  20927. TYPE Record = RECORD END;
  20928. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record; result: Record;
  20929. BEGIN result := array()^[0]
  20930. END Test.
  20931. positive: changing dereferenced indexed temporary pointer to array of record
  20932. MODULE Test;
  20933. TYPE Record = RECORD END;
  20934. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record; value: Record;
  20935. BEGIN array()^[0] := value;
  20936. END Test.
  20937. positive: changing member of dereferenced indexed temporary pointer to array of record
  20938. MODULE Test;
  20939. TYPE Record = RECORD i: INTEGER END;
  20940. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record;
  20941. BEGIN array()^[0].i := 5;
  20942. END Test.
  20943. positive: indexing variable pointer to object array
  20944. MODULE Test;
  20945. TYPE Object = OBJECT END Object;
  20946. VAR array: POINTER TO ARRAY 10 OF Object; result: Object;
  20947. BEGIN result := array[0]
  20948. END Test.
  20949. positive: indexing temporary pointer to object array
  20950. MODULE Test;
  20951. TYPE Object = OBJECT END Object;
  20952. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object; result: Object;
  20953. BEGIN result := array()[0]
  20954. END Test.
  20955. positive: changing indexed temporary pointer to object array
  20956. MODULE Test;
  20957. TYPE Object = OBJECT END Object;
  20958. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object; value: Object;
  20959. BEGIN array()[0] := value;
  20960. END Test.
  20961. positive: changing member of indexed temporary pointer to object array
  20962. MODULE Test;
  20963. TYPE Object = OBJECT VAR i: INTEGER END Object;
  20964. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object;
  20965. BEGIN array()[0].i := 5;
  20966. END Test.
  20967. positive: indexing dereferenced variable pointer to object array
  20968. MODULE Test;
  20969. TYPE Object = OBJECT END Object;
  20970. VAR array: POINTER TO ARRAY 10 OF Object; result: Object;
  20971. BEGIN result := array^[0]
  20972. END Test.
  20973. positive: indexing dereferenced temporary pointer to object array
  20974. MODULE Test;
  20975. TYPE Object = OBJECT END Object;
  20976. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object; result: Object;
  20977. BEGIN result := array()^[0]
  20978. END Test.
  20979. positive: changing dereferenced indexed temporary pointer to object array
  20980. MODULE Test;
  20981. TYPE Object = OBJECT END Object;
  20982. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object; value: Object;
  20983. BEGIN array()^[0] := value;
  20984. END Test.
  20985. positive: changing member of dereferenced indexed temporary pointer to object array
  20986. MODULE Test;
  20987. TYPE Object = OBJECT VAR i: INTEGER END Object;
  20988. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object;
  20989. BEGIN array()^[0].i := 5;
  20990. END Test.
  20991. positive: indexing variable pointer to base object array
  20992. MODULE Test;
  20993. VAR array: POINTER TO ARRAY 10 OF OBJECT; result: OBJECT;
  20994. BEGIN result := array[0]
  20995. END Test.
  20996. positive: indexing temporary pointer to base object array
  20997. MODULE Test;
  20998. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF OBJECT; result: OBJECT;
  20999. BEGIN result := array()[0]
  21000. END Test.
  21001. positive: changing indexed temporary pointer to base object array
  21002. MODULE Test;
  21003. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF OBJECT; value: OBJECT;
  21004. BEGIN array()[0] := value;
  21005. END Test.
  21006. positive: indexing dereferenced variable pointer to base object array
  21007. MODULE Test;
  21008. VAR array: POINTER TO ARRAY 10 OF OBJECT; result: OBJECT;
  21009. BEGIN result := array^[0]
  21010. END Test.
  21011. positive: indexing dereferenced temporary pointer to base object array
  21012. MODULE Test;
  21013. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF OBJECT; result: OBJECT;
  21014. BEGIN result := array()^[0]
  21015. END Test.
  21016. positive: changing dereferenced indexed temporary pointer to base object array
  21017. MODULE Test;
  21018. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF OBJECT; value: OBJECT;
  21019. BEGIN array()^[0] := value;
  21020. END Test.
  21021. positive: indexing variable pointer to pointer to array array
  21022. MODULE Test;
  21023. VAR array: POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  21024. BEGIN result := array[0]
  21025. END Test.
  21026. positive: indexing temporary pointer to pointer to array array
  21027. MODULE Test;
  21028. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  21029. BEGIN result := array()[0]
  21030. END Test.
  21031. positive: changing indexed temporary pointer to pointer to array array
  21032. MODULE Test;
  21033. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; value: POINTER TO ARRAY 10 OF CHAR;
  21034. BEGIN array()[0] := value;
  21035. END Test.
  21036. positive: changing element of indexed temporary pointer to pointer to array array
  21037. MODULE Test;
  21038. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR;
  21039. BEGIN array()[0][0] := 'f';
  21040. END Test.
  21041. positive: indexing dereferenced variable pointer to pointer to array array
  21042. MODULE Test;
  21043. VAR array: POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  21044. BEGIN result := array^[0]
  21045. END Test.
  21046. positive: indexing dereferenced temporary pointer to pointer to array array
  21047. MODULE Test;
  21048. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  21049. BEGIN result := array()^[0]
  21050. END Test.
  21051. positive: changing dereferenced indexed temporary pointer to pointer to array array
  21052. MODULE Test;
  21053. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; value: POINTER TO ARRAY 10 OF CHAR;
  21054. BEGIN array()^[0] := value;
  21055. END Test.
  21056. positive: changing element of dereferenced indexed temporary pointer to pointer to array array
  21057. MODULE Test;
  21058. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR;
  21059. BEGIN array()^[0][0] := 'f';
  21060. END Test.
  21061. positive: indexing variable pointer to pointer to record array
  21062. MODULE Test;
  21063. TYPE Record = RECORD END;
  21064. VAR array: POINTER TO ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  21065. BEGIN result := array[0]
  21066. END Test.
  21067. positive: indexing temporary pointer to pointer to record array
  21068. MODULE Test;
  21069. TYPE Record = RECORD END;
  21070. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  21071. BEGIN result := array()[0]
  21072. END Test.
  21073. positive: changing indexed temporary pointer to pointer to record array
  21074. MODULE Test;
  21075. TYPE Record = RECORD END;
  21076. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO Record; value: POINTER TO Record;
  21077. BEGIN array()[0] := value;
  21078. END Test.
  21079. positive: changing element of indexed temporary pointer to pointer to record array
  21080. MODULE Test;
  21081. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO RECORD i: INTEGER END;
  21082. BEGIN array()[0].i := 5;
  21083. END Test.
  21084. positive: indexing dereferenced variable pointer to record array
  21085. MODULE Test;
  21086. TYPE Record = RECORD END;
  21087. VAR array: POINTER TO ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  21088. BEGIN result := array^[0]
  21089. END Test.
  21090. positive: indexing dereferenced temporary pointer to pointer to record array
  21091. MODULE Test;
  21092. TYPE Record = RECORD END;
  21093. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  21094. BEGIN result := array()^[0]
  21095. END Test.
  21096. positive: changing dereferenced indexed temporary pointer to pointer to record array
  21097. MODULE Test;
  21098. TYPE Record = RECORD END;
  21099. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO Record; value: POINTER TO Record;
  21100. BEGIN array()^[0] := value;
  21101. END Test.
  21102. positive: changing element of dereferenced indexed temporary pointer to pointer to record array
  21103. MODULE Test;
  21104. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO RECORD i: INTEGER END;
  21105. BEGIN array()^[0].i := 5;
  21106. END Test.
  21107. positive: indexing variable pointer to procedure array
  21108. MODULE Test;
  21109. VAR array: POINTER TO ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  21110. BEGIN result := array[0]
  21111. END Test.
  21112. positive: indexing temporary pointer to procedure array
  21113. MODULE Test;
  21114. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  21115. BEGIN result := array()[0]
  21116. END Test.
  21117. positive: changing indexed temporary pointer to procedure array
  21118. MODULE Test;
  21119. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF PROCEDURE; value: PROCEDURE;
  21120. BEGIN array()[0] := value;
  21121. END Test.
  21122. positive: indexing dereferenced variable pointer to procedure array
  21123. MODULE Test;
  21124. VAR array: POINTER TO ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  21125. BEGIN result := array^[0]
  21126. END Test.
  21127. positive: indexing dereferenced temporary pointer to procedure array
  21128. MODULE Test;
  21129. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  21130. BEGIN result := array()^[0]
  21131. END Test.
  21132. positive: changing dereferenced indexed temporary pointer to procedure array
  21133. MODULE Test;
  21134. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF PROCEDURE; value: PROCEDURE;
  21135. BEGIN array()^[0] := value;
  21136. END Test.
  21137. negative: variable pointer to array as index
  21138. MODULE Test;
  21139. VAR array: ARRAY 10 OF CHAR; result: CHAR; pointer: POINTER TO ARRAY 10 OF CHAR;
  21140. BEGIN result := array[pointer]
  21141. END Test.
  21142. negative: member selection on variable pointer to array
  21143. MODULE Test;
  21144. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  21145. BEGIN result := pointer.member
  21146. END Test.
  21147. negative: member selection on dereferenced variable pointer to array
  21148. MODULE Test;
  21149. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  21150. BEGIN result := pointer^.member
  21151. END Test.
  21152. negative: calling variable pointer to array
  21153. MODULE Test;
  21154. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  21155. BEGIN pointer
  21156. END Test.
  21157. # procedure variables
  21158. negative: arithmetic negation on procedure variable
  21159. MODULE Test;
  21160. VAR procedure, result: PROCEDURE;
  21161. BEGIN result := -procedure;
  21162. END Test.
  21163. negative: logical negation on procedure variable
  21164. MODULE Test;
  21165. VAR procedure, result: PROCEDURE;
  21166. BEGIN result := ~procedure;
  21167. END Test.
  21168. negative: dereferencing variable pointer to procedure
  21169. MODULE Test;
  21170. VAR procedure, result: PROCEDURE;
  21171. BEGIN result := procedure^;
  21172. END Test.
  21173. negative: addition on procedure variables
  21174. MODULE Test;
  21175. VAR procedure, result: PROCEDURE;
  21176. BEGIN result := procedure + procedure;
  21177. END Test.
  21178. negative: subtraction on procedure variables
  21179. MODULE Test;
  21180. VAR procedure, result: PROCEDURE;
  21181. BEGIN result := procedure - procedure
  21182. END Test.
  21183. negative: multiplication on procedure variables
  21184. MODULE Test;
  21185. VAR procedure, result: PROCEDURE;
  21186. BEGIN result := procedure * procedure
  21187. END Test.
  21188. negative: integer division on procedure variables
  21189. MODULE Test;
  21190. VAR procedure: PROCEDURE; result: INTEGER;
  21191. BEGIN result := procedure DIV procedure
  21192. END Test.
  21193. negative: real division on procedure variables
  21194. MODULE Test;
  21195. VAR procedure: PROCEDURE; result: REAL;
  21196. BEGIN result := procedure / procedure
  21197. END Test.
  21198. negative: modulo on procedure variables
  21199. MODULE Test;
  21200. VAR procedure: PROCEDURE; result: INTEGER;
  21201. BEGIN result := procedure MOD procedure
  21202. END Test.
  21203. positive: equal relation on procedure variables
  21204. MODULE Test;
  21205. VAR procedure: PROCEDURE; result: BOOLEAN;
  21206. BEGIN result := procedure = procedure
  21207. END Test.
  21208. positive: equal relation on compatible procedure variables
  21209. MODULE Test;
  21210. VAR procedure1: PROCEDURE; procedure2: PROCEDURE; result: BOOLEAN;
  21211. BEGIN result := (procedure1 = procedure2) OR (procedure2 = procedure1)
  21212. END Test.
  21213. negative: equal relation on incompatible procedure variables
  21214. MODULE Test;
  21215. VAR procedure1: PROCEDURE; procedure2: PROCEDURE (p: PROCEDURE); result: BOOLEAN;
  21216. BEGIN result := (procedure1 = procedure2) OR (procedure2 = procedure1)
  21217. END Test.
  21218. positive: unequal relation on procedure variables
  21219. MODULE Test;
  21220. VAR procedure: PROCEDURE; result: BOOLEAN;
  21221. BEGIN result := procedure # procedure
  21222. END Test.
  21223. positive: unequal relation on compatible procedure variables
  21224. MODULE Test;
  21225. VAR procedure1: PROCEDURE; procedure2: PROCEDURE; result: BOOLEAN;
  21226. BEGIN result := (procedure1 # procedure2) OR (procedure2 # procedure1)
  21227. END Test.
  21228. negative: unequal relation on incompatible procedure variables
  21229. MODULE Test;
  21230. VAR procedure1: PROCEDURE; procedure2: PROCEDURE (p: PROCEDURE); result: BOOLEAN;
  21231. BEGIN result := (procedure1 # procedure2) OR (procedure2 # procedure1)
  21232. END Test.
  21233. negative: less relation on procedure variables
  21234. MODULE Test;
  21235. VAR procedure: PROCEDURE; result: BOOLEAN;
  21236. BEGIN result := procedure < procedure
  21237. END Test.
  21238. negative: less or equal relation on procedure variables
  21239. MODULE Test;
  21240. VAR procedure: PROCEDURE; result: BOOLEAN;
  21241. BEGIN result := procedure <= procedure
  21242. END Test.
  21243. negative: greater relation on procedure variables
  21244. MODULE Test;
  21245. VAR procedure: PROCEDURE; result: BOOLEAN;
  21246. BEGIN result := procedure > procedure
  21247. END Test.
  21248. negative: greater or equal relation on procedure variables
  21249. MODULE Test;
  21250. VAR procedure: PROCEDURE; result: BOOLEAN;
  21251. BEGIN result := procedure >= procedure
  21252. END Test.
  21253. negative: set membership on procedure variables
  21254. MODULE Test;
  21255. VAR procedure: PROCEDURE; result: BOOLEAN;
  21256. BEGIN result := procedure IN procedure
  21257. END Test.
  21258. negative: type test on procedure variables
  21259. MODULE Test;
  21260. VAR procedure: PROCEDURE; result: BOOLEAN;
  21261. BEGIN result := procedure IS procedure
  21262. END Test.
  21263. negative: type test on procedure variable
  21264. MODULE Test;
  21265. VAR procedure: PROCEDURE; result: BOOLEAN;
  21266. BEGIN result := procedure IS PROCEDURE
  21267. END Test.
  21268. negative: type test on pointer to procedure type
  21269. MODULE Test;
  21270. TYPE Type = PROCEDURE;
  21271. VAR procedure: Type; result: BOOLEAN;
  21272. BEGIN result := procedure IS Type
  21273. END Test.
  21274. negative: type guard on procedure variables
  21275. MODULE Test;
  21276. VAR procedure, result: PROCEDURE;
  21277. BEGIN result := procedure(procedure)
  21278. END Test.
  21279. negative: type guard on procedure variable
  21280. MODULE Test;
  21281. VAR procedure, result: PROCEDURE;
  21282. BEGIN result := procedure(PROCEDURE)
  21283. END Test.
  21284. negative: type guard on pointer to procedure type
  21285. MODULE Test;
  21286. TYPE Type = PROCEDURE;
  21287. VAR procedure: Type; result: Type;
  21288. BEGIN result := procedure(Type)
  21289. END Test.
  21290. negative: logical and on procedure variables
  21291. MODULE Test;
  21292. VAR procedure, result: PROCEDURE;
  21293. BEGIN result := procedure & procedure
  21294. END Test.
  21295. negative: logical or on procedure variables
  21296. MODULE Test;
  21297. VAR procedure, result: PROCEDURE;
  21298. BEGIN result := procedure OR procedure
  21299. END Test.
  21300. negative: ordinal value of procedure variable
  21301. MODULE Test;
  21302. VAR procedure: PROCEDURE; result: INTEGER;
  21303. BEGIN result := ORD (procedure)
  21304. END Test.
  21305. negative: character value of procedure variable
  21306. MODULE Test;
  21307. VAR procedure: PROCEDURE; result: CHAR;
  21308. BEGIN result := CHR (procedure)
  21309. END Test.
  21310. negative: absolute value of procedure variable
  21311. MODULE Test;
  21312. VAR procedure, result: PROCEDURE;
  21313. BEGIN result := ABS (procedure)
  21314. END Test.
  21315. negative: odd test on procedure variable
  21316. MODULE Test;
  21317. VAR procedure: PROCEDURE; result: BOOLEAN;
  21318. BEGIN result := ODD (procedure)
  21319. END Test.
  21320. negative: capital letter of procedure variable
  21321. MODULE Test;
  21322. VAR procedure: PROCEDURE; result: CHAR;
  21323. BEGIN result := CAP (procedure)
  21324. END Test.
  21325. negative: arithmetic shift of procedure variables
  21326. MODULE Test;
  21327. VAR procedure, result: PROCEDURE;
  21328. BEGIN result := ASH (procedure, procedure)
  21329. END Test.
  21330. negative: short on procedure variable
  21331. MODULE Test;
  21332. VAR procedure, result: PROCEDURE;
  21333. BEGIN result := SHORT (procedure)
  21334. END Test.
  21335. negative: long on procedure variable
  21336. MODULE Test;
  21337. VAR procedure, result: PROCEDURE;
  21338. BEGIN result := LONG (procedure)
  21339. END Test.
  21340. negative: entier on procedure variable
  21341. MODULE Test;
  21342. VAR procedure, result: PROCEDURE;
  21343. BEGIN result := ENTIER (procedure)
  21344. END Test.
  21345. negative: unary length of procedure variable
  21346. MODULE Test;
  21347. VAR procedure: PROCEDURE; result: LONGINT;
  21348. BEGIN result := LEN (procedure)
  21349. END Test.
  21350. negative: binary length of procedure variable
  21351. MODULE Test;
  21352. VAR procedure: PROCEDURE; result: LONGINT;
  21353. BEGIN result := LEN (procedure, 0)
  21354. END Test.
  21355. negative: indexing procedure variable
  21356. MODULE Test;
  21357. VAR procedure: PROCEDURE; result: CHAR;
  21358. BEGIN result := procedure[0]
  21359. END Test.
  21360. negative: procedure variable as index
  21361. MODULE Test;
  21362. VAR array: ARRAY 10 OF CHAR; result: CHAR; procedure: PROCEDURE;
  21363. BEGIN result := array[procedure]
  21364. END Test.
  21365. positive: calling procedure variable
  21366. MODULE Test;
  21367. VAR procedure: PROCEDURE;
  21368. BEGIN procedure ()
  21369. END Test.
  21370. negative: ignoring procedure variable
  21371. MODULE Test;
  21372. VAR procedure: PROCEDURE;
  21373. BEGIN IGNORE procedure
  21374. END Test.
  21375. negative: ignoring procedure variable call
  21376. MODULE Test;
  21377. VAR procedure: PROCEDURE;
  21378. BEGIN IGNORE procedure ()
  21379. END Test.
  21380. negative: calling procedure variable returning boolean
  21381. MODULE Test;
  21382. VAR procedure: PROCEDURE (): BOOLEAN;
  21383. BEGIN procedure ()
  21384. END Test.
  21385. positive: ignoring procedure variable returning boolean
  21386. MODULE Test;
  21387. VAR procedure: PROCEDURE (): BOOLEAN;
  21388. BEGIN IGNORE procedure ()
  21389. END Test.
  21390. negative: calling procedure variable returning character
  21391. MODULE Test;
  21392. VAR procedure: PROCEDURE (): CHAR;
  21393. BEGIN procedure ()
  21394. END Test.
  21395. positive: ignoring procedure variable returning character
  21396. MODULE Test;
  21397. VAR procedure: PROCEDURE (): CHAR;
  21398. BEGIN IGNORE procedure ()
  21399. END Test.
  21400. negative: calling procedure variable returning integer
  21401. MODULE Test;
  21402. VAR procedure: PROCEDURE (): INTEGER;
  21403. BEGIN procedure ()
  21404. END Test.
  21405. positive: ignoring procedure variable returning integer
  21406. MODULE Test;
  21407. VAR procedure: PROCEDURE (): INTEGER;
  21408. BEGIN IGNORE procedure ()
  21409. END Test.
  21410. negative: calling procedure variable returning real
  21411. MODULE Test;
  21412. VAR procedure: PROCEDURE (): REAL;
  21413. BEGIN procedure ()
  21414. END Test.
  21415. positive: ignoring procedure variable returning real
  21416. MODULE Test;
  21417. VAR procedure: PROCEDURE (): REAL;
  21418. BEGIN IGNORE procedure ()
  21419. END Test.
  21420. negative: calling procedure variable returning set
  21421. MODULE Test;
  21422. VAR procedure: PROCEDURE (): SET;
  21423. BEGIN procedure ()
  21424. END Test.
  21425. positive: ignoring procedure variable returning set
  21426. MODULE Test;
  21427. VAR procedure: PROCEDURE (): SET;
  21428. BEGIN IGNORE procedure ()
  21429. END Test.
  21430. negative: calling procedure variable returning array
  21431. MODULE Test;
  21432. VAR procedure: PROCEDURE (): ARRAY 10 OF CHAR;
  21433. BEGIN procedure ()
  21434. END Test.
  21435. positive: ignoring procedure variable returning array
  21436. MODULE Test;
  21437. VAR procedure: PROCEDURE (): ARRAY 10 OF CHAR;
  21438. BEGIN IGNORE procedure ()
  21439. END Test.
  21440. negative: calling procedure variable returning record
  21441. MODULE Test;
  21442. VAR procedure: PROCEDURE (): RECORD END;
  21443. BEGIN procedure ()
  21444. END Test.
  21445. positive: ignoring procedure variable returning record
  21446. MODULE Test;
  21447. VAR procedure: PROCEDURE (): RECORD END;
  21448. BEGIN IGNORE procedure ()
  21449. END Test.
  21450. negative: calling procedure variable returning object
  21451. MODULE Test;
  21452. VAR procedure: PROCEDURE (): OBJECT END;
  21453. BEGIN procedure ()
  21454. END Test.
  21455. positive: ignoring procedure variable returning object
  21456. MODULE Test;
  21457. VAR procedure: PROCEDURE (): OBJECT END;
  21458. BEGIN IGNORE procedure ()
  21459. END Test.
  21460. negative: calling procedure variable returning base object
  21461. MODULE Test;
  21462. VAR procedure: PROCEDURE (): OBJECT;
  21463. BEGIN procedure ()
  21464. END Test.
  21465. positive: ignoring procedure variable returning base object
  21466. MODULE Test;
  21467. VAR procedure: PROCEDURE (): OBJECT;
  21468. BEGIN IGNORE procedure ()
  21469. END Test.
  21470. negative: calling procedure variable returning pointer to array
  21471. MODULE Test;
  21472. VAR procedure: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR;
  21473. BEGIN procedure ()
  21474. END Test.
  21475. positive: ignoring procedure variable returning pointer to array
  21476. MODULE Test;
  21477. VAR procedure: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR;
  21478. BEGIN IGNORE procedure ()
  21479. END Test.
  21480. negative: calling procedure variable returning pointer to record
  21481. MODULE Test;
  21482. VAR procedure: PROCEDURE (): POINTER TO ARRAY 10 OF RECORD END;
  21483. BEGIN procedure ()
  21484. END Test.
  21485. positive: ignoring procedure variable returning pointer to record
  21486. MODULE Test;
  21487. VAR procedure: PROCEDURE (): POINTER TO ARRAY 10 OF RECORD END;
  21488. BEGIN IGNORE procedure ()
  21489. END Test.
  21490. negative: calling procedure variable returning procedure
  21491. MODULE Test;
  21492. VAR procedure: PROCEDURE (): PROCEDURE;
  21493. BEGIN procedure ()
  21494. END Test.
  21495. positive: ignoring procedure variable returning procedure
  21496. MODULE Test;
  21497. VAR procedure: PROCEDURE (): PROCEDURE;
  21498. BEGIN IGNORE procedure ()
  21499. END Test.
  21500. # implicit variable conversions
  21501. positive: implicit variable short to integer conversion
  21502. MODULE Test;
  21503. VAR shortint: SHORTINT; integer, result: INTEGER;
  21504. BEGIN result := shortint + integer
  21505. END Test.
  21506. positive: implicit variable short to long integer conversion
  21507. MODULE Test;
  21508. VAR shortint: SHORTINT; longint, result: LONGINT;
  21509. BEGIN result := shortint * longint
  21510. END Test.
  21511. positive: implicit variable short to huge integer conversion
  21512. MODULE Test;
  21513. VAR shortint: SHORTINT; hugeint, result: HUGEINT;
  21514. BEGIN result := hugeint DIV shortint
  21515. END Test.
  21516. positive: implicit variable integer to long integer conversion
  21517. MODULE Test;
  21518. VAR integer: INTEGER; longint, result: LONGINT;
  21519. BEGIN result := integer - longint
  21520. END Test.
  21521. positive: implicit variable integer to huge integer conversion
  21522. MODULE Test;
  21523. VAR integer: INTEGER; hugeint, result: HUGEINT;
  21524. BEGIN result := integer * hugeint
  21525. END Test.
  21526. positive: implicit variable long to huge integer conversion
  21527. MODULE Test;
  21528. VAR longint: INTEGER; hugeint, result: HUGEINT;
  21529. BEGIN result := hugeint + longint
  21530. END Test.
  21531. positive: implicit variable integer to real conversion
  21532. MODULE Test;
  21533. VAR integer: INTEGER; real, result: REAL;
  21534. BEGIN result := real + integer
  21535. END Test.
  21536. positive: implicit variable integer to long real conversion
  21537. MODULE Test;
  21538. VAR integer: INTEGER; longreal, result: LONGREAL;
  21539. BEGIN result := integer / longreal
  21540. END Test.
  21541. positive: implicit variable real to long real conversion
  21542. MODULE Test;
  21543. VAR real: REAL; longreal, result: LONGREAL;
  21544. BEGIN result := longreal * real
  21545. END Test.
  21546. negative: implicit conversion between variable boolean and character
  21547. MODULE Test;
  21548. VAR boolean, result: BOOLEAN; character: CHAR;
  21549. BEGIN result := boolean = character
  21550. END Test.
  21551. negative: implicit conversion between variable boolean and integer
  21552. MODULE Test;
  21553. VAR boolean, result: BOOLEAN; integer: INTEGER;
  21554. BEGIN result := boolean # integer
  21555. END Test.
  21556. negative: implicit conversion between variable boolean and real
  21557. MODULE Test;
  21558. VAR boolean, result: BOOLEAN; real: REAL;
  21559. BEGIN result := boolean = real
  21560. END Test.
  21561. negative: implicit conversion between variable boolean and set
  21562. MODULE Test;
  21563. VAR boolean, result: BOOLEAN; set: SET;
  21564. BEGIN result := boolean = set
  21565. END Test.
  21566. negative: implicit conversion between variable character and integer
  21567. MODULE Test;
  21568. VAR character: CHAR; integer: INTEGER; result: BOOLEAN;
  21569. BEGIN result := character # integer
  21570. END Test.
  21571. negative: implicit conversion between variable character and real
  21572. MODULE Test;
  21573. VAR character: CHAR; real: REAL; result: BOOLEAN;
  21574. BEGIN result := 't' # real
  21575. END Test.
  21576. negative: implicit conversion between variable character and set
  21577. MODULE Test;
  21578. VAR character: CHAR; set: SET; result: BOOLEAN;
  21579. BEGIN result := character = set
  21580. END Test.
  21581. positive: implicit conversion between variable integer and real
  21582. MODULE Test;
  21583. VAR integer: INTEGER; real: REAL; result: BOOLEAN;
  21584. BEGIN result := integer # real
  21585. END Test.
  21586. negative: implicit conversion between variable integer and set
  21587. MODULE Test;
  21588. VAR integer: INTEGER; set: SET; result: BOOLEAN;
  21589. BEGIN result := integer = set
  21590. END Test.
  21591. negative: implicit conversion between variable real and set
  21592. MODULE Test;
  21593. VAR real: REAL; set: SET; result: BOOLEAN;
  21594. BEGIN result := real = set
  21595. END Test.
  21596. # explicit variable conversions
  21597. negative: explicit long conversion on variable short integer
  21598. MODULE Test;
  21599. VAR shortint: SHORTINT;
  21600. BEGIN shortint := LONG (shortint);
  21601. END Test.
  21602. negative: explicit short conversion on variable short integer
  21603. MODULE Test;
  21604. VAR shortint: SHORTINT;
  21605. BEGIN shortint := SHORT (shortint);
  21606. END Test.
  21607. negative: explicit long conversion on variable integer
  21608. MODULE Test;
  21609. VAR integer: INTEGER;
  21610. BEGIN integer := LONG (integer);
  21611. END Test.
  21612. positive: explicit short conversion on variable integer
  21613. MODULE Test;
  21614. VAR integer: INTEGER;
  21615. BEGIN integer := SHORT (integer);
  21616. END Test.
  21617. negative: explicit long conversion on variable long integer
  21618. MODULE Test;
  21619. VAR longint: LONGINT;
  21620. BEGIN longint := LONG (longint);
  21621. END Test.
  21622. positive: explicit short conversion on variable long integer
  21623. MODULE Test;
  21624. VAR longint: LONGINT;
  21625. BEGIN longint := SHORT (longint);
  21626. END Test.
  21627. negative: explicit long conversion on variable huge integer
  21628. MODULE Test;
  21629. VAR hugeint: HUGEINT;
  21630. BEGIN hugeint := LONG (hugeint);
  21631. END Test.
  21632. positive: explicit short conversion on variable huge integer
  21633. MODULE Test;
  21634. VAR hugeint: HUGEINT;
  21635. BEGIN hugeint := SHORT (hugeint);
  21636. END Test.
  21637. positive: explicit variable short integer to integer conversion
  21638. MODULE Test;
  21639. VAR shortint: SHORTINT; integer: INTEGER;
  21640. BEGIN integer := LONG (shortint);
  21641. END Test.
  21642. positive: explicit variable short to long integer conversion
  21643. MODULE Test;
  21644. VAR shortint: SHORTINT; longint: LONGINT;
  21645. BEGIN longint := LONG (LONG (shortint));
  21646. END Test.
  21647. positive: explicit variable short to huge integer conversion
  21648. MODULE Test;
  21649. VAR shortint: SHORTINT; hugeint: HUGEINT;
  21650. BEGIN hugeint := LONG (LONG (LONG (shortint)));
  21651. END Test.
  21652. positive: explicit variable integer to short integer conversion
  21653. MODULE Test;
  21654. VAR integer: INTEGER; shortint: SHORTINT;
  21655. BEGIN integer := SHORT (integer);
  21656. END Test.
  21657. positive: explicit variable integer to long integer conversion
  21658. MODULE Test;
  21659. VAR integer: INTEGER; longint: LONGINT;
  21660. BEGIN longint := LONG (integer);
  21661. END Test.
  21662. positive: explicit variable integer to huge integer conversion
  21663. MODULE Test;
  21664. VAR integer: INTEGER; hugeint: HUGEINT;
  21665. BEGIN hugeint := LONG (LONG (integer));
  21666. END Test.
  21667. positive: explicit variable long to short integer conversion
  21668. MODULE Test;
  21669. VAR longint: LONGINT; shortint: SHORTINT;
  21670. BEGIN shortint := SHORT (SHORT (longint));
  21671. END Test.
  21672. positive: explicit variable long to integer conversion
  21673. MODULE Test;
  21674. VAR longint: LONGINT; integer: INTEGER;
  21675. BEGIN integer := SHORT (longint);
  21676. END Test.
  21677. positive: explicit variable long to huge integer conversion
  21678. MODULE Test;
  21679. VAR longint: LONGINT; hugeint: HUGEINT;
  21680. BEGIN hugeint := LONG (longint);
  21681. END Test.
  21682. positive: explicit variable huge to short integer conversion
  21683. MODULE Test;
  21684. VAR hugeint: HUGEINT; shortint: SHORTINT;
  21685. BEGIN shortint := SHORT (SHORT (SHORT (hugeint)));
  21686. END Test.
  21687. positive: explicit variable huge to integer conversion
  21688. MODULE Test;
  21689. VAR hugeint: HUGEINT; integer: INTEGER;
  21690. BEGIN integer := SHORT (SHORT (hugeint));
  21691. END Test.
  21692. positive: explicit variable huge to long integer conversion
  21693. MODULE Test;
  21694. VAR hugeint: HUGEINT; longint: LONGINT;
  21695. BEGIN hugeint := SHORT (hugeint);
  21696. END Test.
  21697. negative: explicit variable real to short integer conversion
  21698. MODULE Test;
  21699. VAR real: REAL; shortint: SHORTINT;
  21700. BEGIN shortint := ENTIER (real);
  21701. END Test.
  21702. negative: explicit variable real to integer conversion
  21703. MODULE Test;
  21704. VAR real: REAL; integer: INTEGER;
  21705. BEGIN integer := ENTIER (real);
  21706. END Test.
  21707. positive: explicit variable real to long integer conversion
  21708. MODULE Test;
  21709. VAR real: REAL; longint: LONGINT;
  21710. BEGIN longint := ENTIER (real);
  21711. END Test.
  21712. positive: explicit variable real to huge integer conversion
  21713. MODULE Test;
  21714. VAR real: REAL; hugeint: HUGEINT;
  21715. BEGIN hugeint := ENTIER (real);
  21716. END Test.
  21717. negative: explicit variable long real to short integer conversion
  21718. MODULE Test;
  21719. VAR longreal: LONGREAL; shortint: SHORTINT;
  21720. BEGIN shortint := ENTIER (longreal);
  21721. END Test.
  21722. negative: explicit variable long real to integer conversion
  21723. MODULE Test;
  21724. VAR longreal: LONGREAL; integer: INTEGER;
  21725. BEGIN integer := ENTIER (longreal);
  21726. END Test.
  21727. positive: explicit variable long real to long integer conversion
  21728. MODULE Test;
  21729. VAR longreal: LONGREAL; longint: LONGINT;
  21730. BEGIN longint := ENTIER (longreal);
  21731. END Test.
  21732. positive: explicit variable long real to huge integer conversion
  21733. MODULE Test;
  21734. VAR longreal: LONGREAL; hugeint: HUGEINT;
  21735. BEGIN hugeint := ENTIER (longreal);
  21736. END Test.
  21737. # for statement
  21738. negative: for statement with unknown counter
  21739. MODULE Test;
  21740. BEGIN FOR i := 0 TO 10 DO END
  21741. END Test.
  21742. negative: for statement with constant as counter
  21743. MODULE Test;
  21744. CONST i = 0;
  21745. BEGIN FOR i := 0 TO 10 DO END
  21746. END Test.
  21747. negative: for statement with type as counter
  21748. MODULE Test;
  21749. TYPE i = LONGINT;
  21750. BEGIN FOR i := 0 TO 10 DO END
  21751. END Test.
  21752. positive: for statement with variable as counter
  21753. MODULE Test;
  21754. VAR i: INTEGER;
  21755. BEGIN FOR i := 0 TO 10 DO END
  21756. END Test.
  21757. positive: for statement with parameter as counter
  21758. MODULE Test;
  21759. PROCEDURE Procedure (i: INTEGER);
  21760. BEGIN FOR i := 0 TO 10 DO END
  21761. END Procedure;
  21762. END Test.
  21763. negative: for statement with procedure as counter
  21764. MODULE Test;
  21765. PROCEDURE i; END i;
  21766. BEGIN FOR i := 0 TO 10 DO END
  21767. END Test.
  21768. negative: for statement with constant counter
  21769. MODULE Test;
  21770. VAR s, e: INTEGER;
  21771. BEGIN FOR 0 := s TO e DO END
  21772. END Test.
  21773. positive: for statement with constant start counter
  21774. MODULE Test;
  21775. VAR i, e: INTEGER;
  21776. BEGIN FOR i := 0 TO e DO END
  21777. END Test.
  21778. positive: for statement with constant end counter
  21779. MODULE Test;
  21780. VAR i, s: INTEGER;
  21781. BEGIN FOR i := s TO 0 DO END
  21782. END Test.
  21783. positive: for statement with variable counter
  21784. MODULE Test;
  21785. VAR i: INTEGER;
  21786. BEGIN FOR i := 0 TO 10 DO END
  21787. END Test.
  21788. positive: for statement with variable start counter
  21789. MODULE Test;
  21790. VAR i, s: INTEGER;
  21791. BEGIN FOR i := s TO 10 DO END
  21792. END Test.
  21793. positive: for statement with variable end counter
  21794. MODULE Test;
  21795. VAR i, e: INTEGER;
  21796. BEGIN FOR i := 0 TO e DO END
  21797. END Test.
  21798. negative: for statement with variable increment
  21799. MODULE Test;
  21800. VAR i, s: INTEGER;
  21801. BEGIN FOR i := 0 TO 10 BY s DO END
  21802. END Test.
  21803. positive: for statement with parameter counter
  21804. MODULE Test;
  21805. PROCEDURE P (i: INTEGER);
  21806. BEGIN FOR i := 0 TO 10 DO END
  21807. END P;
  21808. END Test.
  21809. positive: for statement with variable parameter counter
  21810. MODULE Test;
  21811. PROCEDURE P (VAR i: INTEGER);
  21812. BEGIN FOR i := 0 TO 10 DO END
  21813. END P;
  21814. END Test.
  21815. negative: for statement with constant parameter counter
  21816. MODULE Test;
  21817. PROCEDURE P (CONST i: INTEGER);
  21818. BEGIN FOR i := 0 TO 10 DO END
  21819. END P;
  21820. END Test.
  21821. positive: for statement with parameter start counter
  21822. MODULE Test;
  21823. VAR i: INTEGER;
  21824. PROCEDURE P (s: INTEGER);
  21825. BEGIN FOR i := s TO 10 DO END
  21826. END P;
  21827. END Test.
  21828. positive: for statement with variable parameter start counter
  21829. MODULE Test;
  21830. VAR i: INTEGER;
  21831. PROCEDURE P (VAR s: INTEGER);
  21832. BEGIN FOR i := s TO 10 DO END
  21833. END P;
  21834. END Test.
  21835. positive: for statement with constant parameter start counter
  21836. MODULE Test;
  21837. VAR i: INTEGER;
  21838. PROCEDURE P (CONST s: INTEGER);
  21839. BEGIN FOR i := s TO 10 DO END
  21840. END P;
  21841. END Test.
  21842. positive: for statement with parameter end counter
  21843. MODULE Test;
  21844. VAR i: INTEGER;
  21845. PROCEDURE P (e: INTEGER);
  21846. BEGIN FOR i := 0 TO e DO END
  21847. END P;
  21848. END Test.
  21849. positive: for statement with variable parameter end counter
  21850. MODULE Test;
  21851. VAR i: INTEGER;
  21852. PROCEDURE P (VAR e: INTEGER);
  21853. BEGIN FOR i := 0 TO e DO END
  21854. END P;
  21855. END Test.
  21856. positive: for statement with constant parameter end counter
  21857. MODULE Test;
  21858. VAR i: INTEGER;
  21859. PROCEDURE P (CONST e: INTEGER);
  21860. BEGIN FOR i := 0 TO e DO END
  21861. END P;
  21862. END Test.
  21863. negative: for statement with parameter increment
  21864. MODULE Test;
  21865. VAR i: INTEGER;
  21866. PROCEDURE P (s: INTEGER);
  21867. BEGIN FOR i := 0 TO 10 BY s DO END
  21868. END P;
  21869. END Test.
  21870. negative: for statement with variable parameter increment
  21871. MODULE Test;
  21872. VAR i: INTEGER;
  21873. PROCEDURE P (VAR s: INTEGER);
  21874. BEGIN FOR i := 0 TO 10 BY s DO END
  21875. END P;
  21876. END Test.
  21877. negative: for statement with constant parameter increment
  21878. MODULE Test;
  21879. VAR i: INTEGER;
  21880. PROCEDURE P (CONST s: INTEGER);
  21881. BEGIN FOR i := 0 TO 10 BY s DO END
  21882. END P;
  21883. END Test.
  21884. positive: for statement with positive constant increment
  21885. MODULE Test;
  21886. VAR i: INTEGER;
  21887. BEGIN FOR i := 0 TO 10 BY 1 DO END
  21888. END Test.
  21889. positive: for statement with negative constant increment
  21890. MODULE Test;
  21891. VAR i: INTEGER;
  21892. BEGIN FOR i := 0 TO 10 BY -1 DO END
  21893. END Test.
  21894. negative: for statement with zero increment
  21895. MODULE Test;
  21896. VAR i: INTEGER;
  21897. BEGIN FOR i := 0 TO 10 BY 0 DO END
  21898. END Test.
  21899. negative: for statement with counter of type boolean
  21900. MODULE Test;
  21901. VAR i, s, e: BOOLEAN;
  21902. BEGIN FOR i := s TO e DO END
  21903. END Test.
  21904. negative: for statement with counter of type character
  21905. MODULE Test;
  21906. VAR i, s, e: CHAR;
  21907. BEGIN FOR i := s TO e DO END
  21908. END Test.
  21909. positive: for statement with counter of type short integer
  21910. MODULE Test;
  21911. VAR i, s, e: SHORTINT;
  21912. BEGIN FOR i := s TO e DO END
  21913. END Test.
  21914. positive: for statement with counter of type integer
  21915. MODULE Test;
  21916. VAR i, s, e: INTEGER;
  21917. BEGIN FOR i := s TO e DO END
  21918. END Test.
  21919. positive: for statement with counter of type long integer
  21920. MODULE Test;
  21921. VAR i, s, e: LONGINT;
  21922. BEGIN FOR i := s TO e DO END
  21923. END Test.
  21924. positive: for statement with counter of type huge integer
  21925. MODULE Test;
  21926. VAR i, s, e: HUGEINT;
  21927. BEGIN FOR i := s TO e DO END
  21928. END Test.
  21929. negative: for statement with counter of type real
  21930. MODULE Test;
  21931. VAR i, s, e: REAL;
  21932. BEGIN FOR i := s TO e DO END
  21933. END Test.
  21934. negative: for statement with counter of type long real
  21935. MODULE Test;
  21936. VAR i, s, e: REAL;
  21937. BEGIN FOR i := s TO e DO END
  21938. END Test.
  21939. negative: for statement with counter of type set
  21940. MODULE Test;
  21941. VAR i, s, e: SET;
  21942. BEGIN FOR i := s TO e DO END
  21943. END Test.
  21944. negative: for statement with counter of type array
  21945. MODULE Test;
  21946. VAR i, s, e: ARRAY 10 OF CHAR;
  21947. BEGIN FOR i := s TO e DO END
  21948. END Test.
  21949. negative: for statement with counter of type record
  21950. MODULE Test;
  21951. VAR i, s, e: RECORD END;
  21952. BEGIN FOR i := s TO e DO END
  21953. END Test.
  21954. negative: for statement with counter of type object
  21955. MODULE Test;
  21956. VAR i, s, e: OBJECT END;
  21957. BEGIN FOR i := s TO e DO END
  21958. END Test.
  21959. negative: for statement with counter of type pointer
  21960. MODULE Test;
  21961. VAR i, s, e: POINTER TO RECORD;
  21962. BEGIN FOR i := s TO e DO END
  21963. END Test.
  21964. negative: for statement with counter of type procedure
  21965. MODULE Test;
  21966. VAR i, s, e: PROCEDURE;
  21967. BEGIN FOR i := s TO e DO END
  21968. END Test.
  21969. positive: for statement with short integer counter and short integer start counter
  21970. MODULE Test;
  21971. VAR i, s: SHORTINT;
  21972. BEGIN FOR i := s TO 10 DO END
  21973. END Test.
  21974. negative: for statement with short integer counter and integer start counter
  21975. MODULE Test;
  21976. VAR i: SHORTINT; s: INTEGER;
  21977. BEGIN FOR i := s TO 10 DO END
  21978. END Test.
  21979. negative: for statement with short integer counter and long integer start counter
  21980. MODULE Test;
  21981. VAR i: SHORTINT; s: LONGINT;
  21982. BEGIN FOR i := s TO 10 DO END
  21983. END Test.
  21984. negative: for statement with short integer counter and huge integer start counter
  21985. MODULE Test;
  21986. VAR i: SHORTINT; s: HUGEINT;
  21987. BEGIN FOR i := s TO 10 DO END
  21988. END Test.
  21989. positive: for statement with integer counter and short integer start counter
  21990. MODULE Test;
  21991. VAR i: INTEGER; s: SHORTINT;
  21992. BEGIN FOR i := s TO 10 DO END
  21993. END Test.
  21994. positive: for statement with integer counter and integer start counter
  21995. MODULE Test;
  21996. VAR i, s: INTEGER;
  21997. BEGIN FOR i := s TO 10 DO END
  21998. END Test.
  21999. negative: for statement with integer counter and long integer start counter
  22000. MODULE Test;
  22001. VAR i: INTEGER; s: LONGINT;
  22002. BEGIN FOR i := s TO 10 DO END
  22003. END Test.
  22004. negative: for statement with integer counter and huge integer start counter
  22005. MODULE Test;
  22006. VAR i: INTEGER; s: HUGEINT;
  22007. BEGIN FOR i := s TO 10 DO END
  22008. END Test.
  22009. positive: for statement with long integer counter and short integer start counter
  22010. MODULE Test;
  22011. VAR i: LONGINT; s: SHORTINT;
  22012. BEGIN FOR i := s TO 10 DO END
  22013. END Test.
  22014. positive: for statement with long integer counter and integer start counter
  22015. MODULE Test;
  22016. VAR i: LONGINT; s: INTEGER;
  22017. BEGIN FOR i := s TO 10 DO END
  22018. END Test.
  22019. positive: for statement with long integer counter and long integer start counter
  22020. MODULE Test;
  22021. VAR i, s: LONGINT;
  22022. BEGIN FOR i := s TO 10 DO END
  22023. END Test.
  22024. negative: for statement with long integer counter and huge integer start counter
  22025. MODULE Test;
  22026. VAR i: LONGINT; s: HUGEINT;
  22027. BEGIN FOR i := s TO 10 DO END
  22028. END Test.
  22029. positive: for statement with huge integer counter and short integer start counter
  22030. MODULE Test;
  22031. VAR i: HUGEINT; s: SHORTINT;
  22032. BEGIN FOR i := s TO 10 DO END
  22033. END Test.
  22034. positive: for statement with huge integer counter and integer start counter
  22035. MODULE Test;
  22036. VAR i: HUGEINT; s: INTEGER;
  22037. BEGIN FOR i := s TO 10 DO END
  22038. END Test.
  22039. positive: for statement with huge integer counter and long integer start counter
  22040. MODULE Test;
  22041. VAR i: HUGEINT; s: LONGINT;
  22042. BEGIN FOR i := s TO 10 DO END
  22043. END Test.
  22044. positive: for statement with huge integer counter and huge integer start counter
  22045. MODULE Test;
  22046. VAR i, s: HUGEINT;
  22047. BEGIN FOR i := s TO 10 DO END
  22048. END Test.
  22049. positive: for statement with short integer counter and short integer end counter
  22050. MODULE Test;
  22051. VAR i, e: SHORTINT;
  22052. BEGIN FOR i := 0 TO e DO END
  22053. END Test.
  22054. negative: for statement with short integer counter and integer end counter
  22055. MODULE Test;
  22056. VAR i: SHORTINT; e: INTEGER;
  22057. BEGIN FOR i := 0 TO e DO END
  22058. END Test.
  22059. negative: for statement with short integer counter and long integer end counter
  22060. MODULE Test;
  22061. VAR i: SHORTINT; e: LONGINT;
  22062. BEGIN FOR i := 0 TO e DO END
  22063. END Test.
  22064. negative: for statement with short integer counter and huge integer end counter
  22065. MODULE Test;
  22066. VAR i: SHORTINT; e: HUGEINT;
  22067. BEGIN FOR i := 0 TO e DO END
  22068. END Test.
  22069. positive: for statement with integer counter and short integer end counter
  22070. MODULE Test;
  22071. VAR i: INTEGER; e: SHORTINT;
  22072. BEGIN FOR i := 0 TO e DO END
  22073. END Test.
  22074. positive: for statement with integer counter and integer end counter
  22075. MODULE Test;
  22076. VAR i, e: INTEGER;
  22077. BEGIN FOR i := 0 TO e DO END
  22078. END Test.
  22079. negative: for statement with integer counter and long integer end counter
  22080. MODULE Test;
  22081. VAR i: INTEGER; e: LONGINT;
  22082. BEGIN FOR i := 0 TO e DO END
  22083. END Test.
  22084. negative: for statement with integer counter and huge integer end counter
  22085. MODULE Test;
  22086. VAR i: INTEGER; e: HUGEINT;
  22087. BEGIN FOR i := 0 TO e DO END
  22088. END Test.
  22089. positive: for statement with long integer counter and short integer end counter
  22090. MODULE Test;
  22091. VAR i: LONGINT; e: SHORTINT;
  22092. BEGIN FOR i := 0 TO e DO END
  22093. END Test.
  22094. positive: for statement with long integer counter and integer end counter
  22095. MODULE Test;
  22096. VAR i: LONGINT; e: INTEGER;
  22097. BEGIN FOR i := 0 TO e DO END
  22098. END Test.
  22099. positive: for statement with long integer counter and long integer end counter
  22100. MODULE Test;
  22101. VAR i, e: LONGINT;
  22102. BEGIN FOR i := 0 TO e DO END
  22103. END Test.
  22104. negative: for statement with long integer counter and huge integer end counter
  22105. MODULE Test;
  22106. VAR i: LONGINT; e: HUGEINT;
  22107. BEGIN FOR i := 0 TO e DO END
  22108. END Test.
  22109. positive: for statement with huge integer counter and short integer end counter
  22110. MODULE Test;
  22111. VAR i: HUGEINT; e: SHORTINT;
  22112. BEGIN FOR i := 0 TO e DO END
  22113. END Test.
  22114. positive: for statement with huge integer counter and integer end counter
  22115. MODULE Test;
  22116. VAR i: HUGEINT; e: INTEGER;
  22117. BEGIN FOR i := 0 TO e DO END
  22118. END Test.
  22119. positive: for statement with huge integer counter and long integer end counter
  22120. MODULE Test;
  22121. VAR i: HUGEINT; e: LONGINT;
  22122. BEGIN FOR i := 0 TO e DO END
  22123. END Test.
  22124. positive: for statement with huge integer counter and huge integer end counter
  22125. MODULE Test;
  22126. VAR i, e: HUGEINT;
  22127. BEGIN FOR i := 0 TO e DO END
  22128. END Test.
  22129. # return statement
  22130. negative: return statement with value in module body
  22131. MODULE Test;
  22132. BEGIN RETURN 0
  22133. END Test.
  22134. positive: return statement without value in module body
  22135. MODULE Test;
  22136. BEGIN RETURN
  22137. END Test.
  22138. negative: return statement with value in object body
  22139. MODULE Test;
  22140. TYPE Object = OBJECT
  22141. BEGIN RETURN 0
  22142. END Object;
  22143. END Test.
  22144. positive: return statement without value in object body
  22145. MODULE Test;
  22146. TYPE Object = OBJECT
  22147. BEGIN RETURN
  22148. END Object;
  22149. END Test.
  22150. positive: return statement with value in procedure with return type
  22151. MODULE Test;
  22152. PROCEDURE Procedure (): INTEGER;
  22153. BEGIN RETURN 0
  22154. END Procedure;
  22155. END Test.
  22156. negative: return statement without value in procedure with return type
  22157. MODULE Test;
  22158. PROCEDURE Procedure (): INTEGER;
  22159. BEGIN RETURN
  22160. END Procedure;
  22161. END Test.
  22162. negative: return statement with value in procedure without return type
  22163. MODULE Test;
  22164. PROCEDURE Procedure;
  22165. BEGIN RETURN 0
  22166. END Procedure;
  22167. END Test.
  22168. positive: return statement without value in procedure without return type
  22169. MODULE Test;
  22170. PROCEDURE Procedure;
  22171. BEGIN RETURN
  22172. END Procedure;
  22173. END Test.
  22174. positive: procedure with boolean as return type returning boolean
  22175. MODULE Test;
  22176. PROCEDURE Procedure (value: BOOLEAN): BOOLEAN; BEGIN RETURN value END Procedure;
  22177. END Test.
  22178. negative: procedure with boolean as return type returning character
  22179. MODULE Test;
  22180. PROCEDURE Procedure (value: CHAR): BOOLEAN; BEGIN RETURN value END Procedure;
  22181. END Test.
  22182. negative: procedure with boolean as return type returning integer
  22183. MODULE Test;
  22184. PROCEDURE Procedure (value: INTEGER): BOOLEAN; BEGIN RETURN value END Procedure;
  22185. END Test.
  22186. negative: procedure with boolean as return type returning real
  22187. MODULE Test;
  22188. PROCEDURE Procedure (value: REAL): BOOLEAN; BEGIN RETURN value END Procedure;
  22189. END Test.
  22190. negative: procedure with boolean as return type returning set
  22191. MODULE Test;
  22192. PROCEDURE Procedure (value: SET): BOOLEAN; BEGIN RETURN value END Procedure;
  22193. END Test.
  22194. negative: procedure with boolean as return type returning array
  22195. MODULE Test;
  22196. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): BOOLEAN; BEGIN RETURN value END Procedure;
  22197. END Test.
  22198. negative: procedure with boolean as return type returning record
  22199. MODULE Test;
  22200. PROCEDURE Procedure (value: RECORD END): BOOLEAN; BEGIN RETURN value END Procedure;
  22201. END Test.
  22202. negative: procedure with boolean as return type returning object
  22203. MODULE Test;
  22204. PROCEDURE Procedure (value: OBJECT END): BOOLEAN; BEGIN RETURN value END Procedure;
  22205. END Test.
  22206. negative: procedure with boolean as return type returning base object
  22207. MODULE Test;
  22208. PROCEDURE Procedure (value: OBJECT): BOOLEAN; BEGIN RETURN value END Procedure;
  22209. END Test.
  22210. negative: procedure with boolean as return type returning pointer to array
  22211. MODULE Test;
  22212. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): BOOLEAN; BEGIN RETURN value END Procedure;
  22213. END Test.
  22214. negative: procedure with boolean as return type returning pointer to record
  22215. MODULE Test;
  22216. PROCEDURE Procedure (value: POINTER TO RECORD END): BOOLEAN; BEGIN RETURN value END Procedure;
  22217. END Test.
  22218. negative: procedure with boolean as return type returning procedure
  22219. MODULE Test;
  22220. PROCEDURE Procedure (value: PROCEDURE): BOOLEAN; BEGIN RETURN value END Procedure;
  22221. END Test.
  22222. negative: procedure with character as return type returning boolean
  22223. MODULE Test;
  22224. PROCEDURE Procedure (value: BOOLEAN): CHAR; BEGIN RETURN value END Procedure;
  22225. END Test.
  22226. positive: procedure with character as return type returning character
  22227. MODULE Test;
  22228. PROCEDURE Procedure (value: CHAR): CHAR; BEGIN RETURN value END Procedure;
  22229. END Test.
  22230. negative: procedure with character as return type returning integer
  22231. MODULE Test;
  22232. PROCEDURE Procedure (value: INTEGER): CHAR; BEGIN RETURN value END Procedure;
  22233. END Test.
  22234. negative: procedure with character as return type returning real
  22235. MODULE Test;
  22236. PROCEDURE Procedure (value: REAL): CHAR; BEGIN RETURN value END Procedure;
  22237. END Test.
  22238. negative: procedure with character as return type returning set
  22239. MODULE Test;
  22240. PROCEDURE Procedure (value: SET): CHAR; BEGIN RETURN value END Procedure;
  22241. END Test.
  22242. negative: procedure with character as return type returning array
  22243. MODULE Test;
  22244. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): CHAR; BEGIN RETURN value END Procedure;
  22245. END Test.
  22246. negative: procedure with character as return type returning record
  22247. MODULE Test;
  22248. PROCEDURE Procedure (value: RECORD END): CHAR; BEGIN RETURN value END Procedure;
  22249. END Test.
  22250. negative: procedure with character as return type returning object
  22251. MODULE Test;
  22252. PROCEDURE Procedure (value: OBJECT END): CHAR; BEGIN RETURN value END Procedure;
  22253. END Test.
  22254. negative: procedure with character as return type returning base object
  22255. MODULE Test;
  22256. PROCEDURE Procedure (value: OBJECT): CHAR; BEGIN RETURN value END Procedure;
  22257. END Test.
  22258. negative: procedure with character as return type returning pointer to array
  22259. MODULE Test;
  22260. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): CHAR; BEGIN RETURN value END Procedure;
  22261. END Test.
  22262. negative: procedure with character as return type returning pointer to record
  22263. MODULE Test;
  22264. PROCEDURE Procedure (value: POINTER TO RECORD END): CHAR; BEGIN RETURN value END Procedure;
  22265. END Test.
  22266. negative: procedure with character as return type returning procedure
  22267. MODULE Test;
  22268. PROCEDURE Procedure (value: PROCEDURE): CHAR; BEGIN RETURN value END Procedure;
  22269. END Test.
  22270. negative: procedure with short integer as return type returning boolean
  22271. MODULE Test;
  22272. PROCEDURE Procedure (value: BOOLEAN): SHORTINT; BEGIN RETURN value END Procedure;
  22273. END Test.
  22274. negative: procedure with short integer as return type returning character
  22275. MODULE Test;
  22276. PROCEDURE Procedure (value: CHAR): SHORTINT; BEGIN RETURN value END Procedure;
  22277. END Test.
  22278. positive: procedure with short integer as return type returning short integer
  22279. MODULE Test;
  22280. PROCEDURE Procedure (value: SHORTINT): SHORTINT; BEGIN RETURN value END Procedure;
  22281. END Test.
  22282. negative: procedure with short integer as return type returning integer
  22283. MODULE Test;
  22284. PROCEDURE Procedure (value: INTEGER): SHORTINT; BEGIN RETURN value END Procedure;
  22285. END Test.
  22286. negative: procedure with short integer as return type returning long integer
  22287. MODULE Test;
  22288. PROCEDURE Procedure (value: LONGINT): SHORTINT; BEGIN RETURN value END Procedure;
  22289. END Test.
  22290. negative: procedure with short integer as return type returning huge integer
  22291. MODULE Test;
  22292. PROCEDURE Procedure (value: HUGEINT): SHORTINT; BEGIN RETURN value END Procedure;
  22293. END Test.
  22294. negative: procedure with short integer as return type returning real
  22295. MODULE Test;
  22296. PROCEDURE Procedure (value: REAL): SHORTINT; BEGIN RETURN value END Procedure;
  22297. END Test.
  22298. negative: procedure with short integer as return type returning set
  22299. MODULE Test;
  22300. PROCEDURE Procedure (value: SET): SHORTINT; BEGIN RETURN value END Procedure;
  22301. END Test.
  22302. negative: procedure with short integer as return type returning array
  22303. MODULE Test;
  22304. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): SHORTINT; BEGIN RETURN value END Procedure;
  22305. END Test.
  22306. negative: procedure with short integer as return type returning record
  22307. MODULE Test;
  22308. PROCEDURE Procedure (value: RECORD END): SHORTINT; BEGIN RETURN value END Procedure;
  22309. END Test.
  22310. negative: procedure with short integer as return type returning object
  22311. MODULE Test;
  22312. PROCEDURE Procedure (value: OBJECT END): SHORTINT; BEGIN RETURN value END Procedure;
  22313. END Test.
  22314. negative: procedure with short integer as return type returning base object
  22315. MODULE Test;
  22316. PROCEDURE Procedure (value: OBJECT): SHORTINT; BEGIN RETURN value END Procedure;
  22317. END Test.
  22318. negative: procedure with short integer as return type returning pointer to array
  22319. MODULE Test;
  22320. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): SHORTINT; BEGIN RETURN value END Procedure;
  22321. END Test.
  22322. negative: procedure with short integer as return type returning pointer to record
  22323. MODULE Test;
  22324. PROCEDURE Procedure (value: POINTER TO RECORD END): SHORTINT; BEGIN RETURN value END Procedure;
  22325. END Test.
  22326. negative: procedure with short integer as return type returning procedure
  22327. MODULE Test;
  22328. PROCEDURE Procedure (value: PROCEDURE): SHORTINT; BEGIN RETURN value END Procedure;
  22329. END Test.
  22330. negative: procedure with integer as return type returning boolean
  22331. MODULE Test;
  22332. PROCEDURE Procedure (value: BOOLEAN): INTEGER; BEGIN RETURN value END Procedure;
  22333. END Test.
  22334. negative: procedure with integer as return type returning character
  22335. MODULE Test;
  22336. PROCEDURE Procedure (value: CHAR): INTEGER; BEGIN RETURN value END Procedure;
  22337. END Test.
  22338. positive: procedure with integer as return type returning short integer
  22339. MODULE Test;
  22340. PROCEDURE Procedure (value: SHORTINT): INTEGER; BEGIN RETURN value END Procedure;
  22341. END Test.
  22342. positive: procedure with integer as return type returning integer
  22343. MODULE Test;
  22344. PROCEDURE Procedure (value: INTEGER): INTEGER; BEGIN RETURN value END Procedure;
  22345. END Test.
  22346. negative: procedure with integer as return type returning long integer
  22347. MODULE Test;
  22348. PROCEDURE Procedure (value: LONGINT): INTEGER; BEGIN RETURN value END Procedure;
  22349. END Test.
  22350. negative: procedure with integer as return type returning huge integer
  22351. MODULE Test;
  22352. PROCEDURE Procedure (value: HUGEINT): INTEGER; BEGIN RETURN value END Procedure;
  22353. END Test.
  22354. negative: procedure with integer as return type returning real
  22355. MODULE Test;
  22356. PROCEDURE Procedure (value: REAL): INTEGER; BEGIN RETURN value END Procedure;
  22357. END Test.
  22358. negative: procedure with integer as return type returning set
  22359. MODULE Test;
  22360. PROCEDURE Procedure (value: SET): INTEGER; BEGIN RETURN value END Procedure;
  22361. END Test.
  22362. negative: procedure with integer as return type returning array
  22363. MODULE Test;
  22364. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): INTEGER; BEGIN RETURN value END Procedure;
  22365. END Test.
  22366. negative: procedure with integer as return type returning record
  22367. MODULE Test;
  22368. PROCEDURE Procedure (value: RECORD END): INTEGER; BEGIN RETURN value END Procedure;
  22369. END Test.
  22370. negative: procedure with integer as return type returning object
  22371. MODULE Test;
  22372. PROCEDURE Procedure (value: OBJECT END): INTEGER; BEGIN RETURN value END Procedure;
  22373. END Test.
  22374. negative: procedure with integer as return type returning base object
  22375. MODULE Test;
  22376. PROCEDURE Procedure (value: OBJECT): INTEGER; BEGIN RETURN value END Procedure;
  22377. END Test.
  22378. negative: procedure with integer as return type returning pointer to array
  22379. MODULE Test;
  22380. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): INTEGER; BEGIN RETURN value END Procedure;
  22381. END Test.
  22382. negative: procedure with integer as return type returning pointer to record
  22383. MODULE Test;
  22384. PROCEDURE Procedure (value: POINTER TO RECORD END): INTEGER; BEGIN RETURN value END Procedure;
  22385. END Test.
  22386. negative: procedure with integer as return type returning procedure
  22387. MODULE Test;
  22388. PROCEDURE Procedure (value: PROCEDURE): INTEGER; BEGIN RETURN value END Procedure;
  22389. END Test.
  22390. negative: procedure with long integer as return type returning boolean
  22391. MODULE Test;
  22392. PROCEDURE Procedure (value: BOOLEAN): LONGINT; BEGIN RETURN value END Procedure;
  22393. END Test.
  22394. negative: procedure with long integer as return type returning character
  22395. MODULE Test;
  22396. PROCEDURE Procedure (value: CHAR): LONGINT; BEGIN RETURN value END Procedure;
  22397. END Test.
  22398. positive: procedure with long integer as return type returning short integer
  22399. MODULE Test;
  22400. PROCEDURE Procedure (value: SHORTINT): LONGINT; BEGIN RETURN value END Procedure;
  22401. END Test.
  22402. positive: procedure with long integer as return type returning integer
  22403. MODULE Test;
  22404. PROCEDURE Procedure (value: INTEGER): LONGINT; BEGIN RETURN value END Procedure;
  22405. END Test.
  22406. positive: procedure with long integer as return type returning long integer
  22407. MODULE Test;
  22408. PROCEDURE Procedure (value: LONGINT): LONGINT; BEGIN RETURN value END Procedure;
  22409. END Test.
  22410. negative: procedure with long integer as return type returning huge integer
  22411. MODULE Test;
  22412. PROCEDURE Procedure (value: HUGEINT): LONGINT; BEGIN RETURN value END Procedure;
  22413. END Test.
  22414. negative: procedure with long integer as return type returning real
  22415. MODULE Test;
  22416. PROCEDURE Procedure (value: REAL): LONGINT; BEGIN RETURN value END Procedure;
  22417. END Test.
  22418. negative: procedure with long integer as return type returning set
  22419. MODULE Test;
  22420. PROCEDURE Procedure (value: SET): LONGINT; BEGIN RETURN value END Procedure;
  22421. END Test.
  22422. negative: procedure with long integer as return type returning array
  22423. MODULE Test;
  22424. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): LONGINT; BEGIN RETURN value END Procedure;
  22425. END Test.
  22426. negative: procedure with long integer as return type returning record
  22427. MODULE Test;
  22428. PROCEDURE Procedure (value: RECORD END): LONGINT; BEGIN RETURN value END Procedure;
  22429. END Test.
  22430. negative: procedure with long integer as return type returning object
  22431. MODULE Test;
  22432. PROCEDURE Procedure (value: OBJECT END): LONGINT; BEGIN RETURN value END Procedure;
  22433. END Test.
  22434. negative: procedure with long integer as return type returning base object
  22435. MODULE Test;
  22436. PROCEDURE Procedure (value: OBJECT): LONGINT; BEGIN RETURN value END Procedure;
  22437. END Test.
  22438. negative: procedure with long integer as return type returning pointer to array
  22439. MODULE Test;
  22440. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): LONGINT; BEGIN RETURN value END Procedure;
  22441. END Test.
  22442. negative: procedure with long integer as return type returning pointer to record
  22443. MODULE Test;
  22444. PROCEDURE Procedure (value: POINTER TO RECORD END): LONGINT; BEGIN RETURN value END Procedure;
  22445. END Test.
  22446. negative: procedure with long integer as return type returning procedure
  22447. MODULE Test;
  22448. PROCEDURE Procedure (value: PROCEDURE): LONGINT; BEGIN RETURN value END Procedure;
  22449. END Test.
  22450. negative: procedure with huge integer as return type returning boolean
  22451. MODULE Test;
  22452. PROCEDURE Procedure (value: BOOLEAN): HUGEINT; BEGIN RETURN value END Procedure;
  22453. END Test.
  22454. negative: procedure with huge integer as return type returning character
  22455. MODULE Test;
  22456. PROCEDURE Procedure (value: CHAR): HUGEINT; BEGIN RETURN value END Procedure;
  22457. END Test.
  22458. positive: procedure with huge integer as return type returning short integer
  22459. MODULE Test;
  22460. PROCEDURE Procedure (value: SHORTINT): HUGEINT; BEGIN RETURN value END Procedure;
  22461. END Test.
  22462. positive: procedure with huge integer as return type returning integer
  22463. MODULE Test;
  22464. PROCEDURE Procedure (value: INTEGER): HUGEINT; BEGIN RETURN value END Procedure;
  22465. END Test.
  22466. positive: procedure with huge integer as return type returning long integer
  22467. MODULE Test;
  22468. PROCEDURE Procedure (value: LONGINT): HUGEINT; BEGIN RETURN value END Procedure;
  22469. END Test.
  22470. positive: procedure with huge integer as return type returning huge integer
  22471. MODULE Test;
  22472. PROCEDURE Procedure (value: HUGEINT): HUGEINT; BEGIN RETURN value END Procedure;
  22473. END Test.
  22474. negative: procedure with huge integer as return type returning real
  22475. MODULE Test;
  22476. PROCEDURE Procedure (value: REAL): HUGEINT; BEGIN RETURN value END Procedure;
  22477. END Test.
  22478. negative: procedure with huge integer as return type returning set
  22479. MODULE Test;
  22480. PROCEDURE Procedure (value: SET): HUGEINT; BEGIN RETURN value END Procedure;
  22481. END Test.
  22482. negative: procedure with huge integer as return type returning array
  22483. MODULE Test;
  22484. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): HUGEINT; BEGIN RETURN value END Procedure;
  22485. END Test.
  22486. negative: procedure with huge integer as return type returning record
  22487. MODULE Test;
  22488. PROCEDURE Procedure (value: RECORD END): HUGEINT; BEGIN RETURN value END Procedure;
  22489. END Test.
  22490. negative: procedure with huge integer as return type returning object
  22491. MODULE Test;
  22492. PROCEDURE Procedure (value: OBJECT END): HUGEINT; BEGIN RETURN value END Procedure;
  22493. END Test.
  22494. negative: procedure with huge integer as return type returning base object
  22495. MODULE Test;
  22496. PROCEDURE Procedure (value: OBJECT): HUGEINT; BEGIN RETURN value END Procedure;
  22497. END Test.
  22498. negative: procedure with huge integer as return type returning pointer to array
  22499. MODULE Test;
  22500. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): HUGEINT; BEGIN RETURN value END Procedure;
  22501. END Test.
  22502. negative: procedure with huge integer as return type returning pointer to record
  22503. MODULE Test;
  22504. PROCEDURE Procedure (value: POINTER TO RECORD END): HUGEINT; BEGIN RETURN value END Procedure;
  22505. END Test.
  22506. negative: procedure with huge integer as return type returning procedure
  22507. MODULE Test;
  22508. PROCEDURE Procedure (value: PROCEDURE): HUGEINT; BEGIN RETURN value END Procedure;
  22509. END Test.
  22510. negative: procedure with real as return type returning boolean
  22511. MODULE Test;
  22512. PROCEDURE Procedure (value: BOOLEAN): REAL; BEGIN RETURN value END Procedure;
  22513. END Test.
  22514. negative: procedure with real as return type returning character
  22515. MODULE Test;
  22516. PROCEDURE Procedure (value: CHAR): REAL; BEGIN RETURN value END Procedure;
  22517. END Test.
  22518. positive: procedure with real as return type returning short integer
  22519. MODULE Test;
  22520. PROCEDURE Procedure (value: SHORTINT): REAL; BEGIN RETURN value END Procedure;
  22521. END Test.
  22522. positive: procedure with real as return type returning integer
  22523. MODULE Test;
  22524. PROCEDURE Procedure (value: INTEGER): REAL; BEGIN RETURN value END Procedure;
  22525. END Test.
  22526. positive: procedure with real as return type returning long integer
  22527. MODULE Test;
  22528. PROCEDURE Procedure (value: LONGINT): REAL; BEGIN RETURN value END Procedure;
  22529. END Test.
  22530. positive: procedure with real as return type returning huge integer
  22531. MODULE Test;
  22532. PROCEDURE Procedure (value: HUGEINT): REAL; BEGIN RETURN value END Procedure;
  22533. END Test.
  22534. positive: procedure with real as return type returning real
  22535. MODULE Test;
  22536. PROCEDURE Procedure (value: REAL): REAL; BEGIN RETURN value END Procedure;
  22537. END Test.
  22538. negative: procedure with real as return type returning long real
  22539. MODULE Test;
  22540. PROCEDURE Procedure (value: LONGREAL): REAL; BEGIN RETURN value END Procedure;
  22541. END Test.
  22542. negative: procedure with real as return type returning set
  22543. MODULE Test;
  22544. PROCEDURE Procedure (value: SET): REAL; BEGIN RETURN value END Procedure;
  22545. END Test.
  22546. negative: procedure with real as return type returning array
  22547. MODULE Test;
  22548. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): REAL; BEGIN RETURN value END Procedure;
  22549. END Test.
  22550. negative: procedure with real as return type returning record
  22551. MODULE Test;
  22552. PROCEDURE Procedure (value: RECORD END): REAL; BEGIN RETURN value END Procedure;
  22553. END Test.
  22554. negative: procedure with real as return type returning object
  22555. MODULE Test;
  22556. PROCEDURE Procedure (value: OBJECT END): REAL; BEGIN RETURN value END Procedure;
  22557. END Test.
  22558. negative: procedure with real as return type returning base object
  22559. MODULE Test;
  22560. PROCEDURE Procedure (value: OBJECT): REAL; BEGIN RETURN value END Procedure;
  22561. END Test.
  22562. negative: procedure with real as return type returning pointer to array
  22563. MODULE Test;
  22564. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): REAL; BEGIN RETURN value END Procedure;
  22565. END Test.
  22566. negative: procedure with real as return type returning pointer to record
  22567. MODULE Test;
  22568. PROCEDURE Procedure (value: POINTER TO RECORD END): REAL; BEGIN RETURN value END Procedure;
  22569. END Test.
  22570. negative: procedure with real as return type returning procedure
  22571. MODULE Test;
  22572. PROCEDURE Procedure (value: PROCEDURE): REAL; BEGIN RETURN value END Procedure;
  22573. END Test.
  22574. negative: procedure with long real as return type returning boolean
  22575. MODULE Test;
  22576. PROCEDURE Procedure (value: BOOLEAN): LONGREAL; BEGIN RETURN value END Procedure;
  22577. END Test.
  22578. negative: procedure with long real as return type returning character
  22579. MODULE Test;
  22580. PROCEDURE Procedure (value: CHAR): LONGREAL; BEGIN RETURN value END Procedure;
  22581. END Test.
  22582. positive: procedure with long real as return type returning short integer
  22583. MODULE Test;
  22584. PROCEDURE Procedure (value: SHORTINT): LONGREAL; BEGIN RETURN value END Procedure;
  22585. END Test.
  22586. positive: procedure with long real as return type returning integer
  22587. MODULE Test;
  22588. PROCEDURE Procedure (value: INTEGER): LONGREAL; BEGIN RETURN value END Procedure;
  22589. END Test.
  22590. positive: procedure with long real as return type returning long integer
  22591. MODULE Test;
  22592. PROCEDURE Procedure (value: LONGINT): LONGREAL; BEGIN RETURN value END Procedure;
  22593. END Test.
  22594. positive: procedure with long real as return type returning huge integer
  22595. MODULE Test;
  22596. PROCEDURE Procedure (value: HUGEINT): LONGREAL; BEGIN RETURN value END Procedure;
  22597. END Test.
  22598. positive: procedure with long real as return type returning real
  22599. MODULE Test;
  22600. PROCEDURE Procedure (value: REAL): LONGREAL; BEGIN RETURN value END Procedure;
  22601. END Test.
  22602. positive: procedure with long real as return type returning long real
  22603. MODULE Test;
  22604. PROCEDURE Procedure (value: LONGREAL): LONGREAL; BEGIN RETURN value END Procedure;
  22605. END Test.
  22606. negative: procedure with long real as return type returning set
  22607. MODULE Test;
  22608. PROCEDURE Procedure (value: SET): LONGREAL; BEGIN RETURN value END Procedure;
  22609. END Test.
  22610. negative: procedure with long real as return type returning array
  22611. MODULE Test;
  22612. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): LONGREAL; BEGIN RETURN value END Procedure;
  22613. END Test.
  22614. negative: procedure with long real as return type returning record
  22615. MODULE Test;
  22616. PROCEDURE Procedure (value: RECORD END): LONGREAL; BEGIN RETURN value END Procedure;
  22617. END Test.
  22618. negative: procedure with long real as return type returning object
  22619. MODULE Test;
  22620. PROCEDURE Procedure (value: OBJECT END): LONGREAL; BEGIN RETURN value END Procedure;
  22621. END Test.
  22622. negative: procedure with long real as return type returning base object
  22623. MODULE Test;
  22624. PROCEDURE Procedure (value: OBJECT): LONGREAL; BEGIN RETURN value END Procedure;
  22625. END Test.
  22626. negative: procedure with long real as return type returning pointer to array
  22627. MODULE Test;
  22628. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): LONGREAL; BEGIN RETURN value END Procedure;
  22629. END Test.
  22630. negative: procedure with long real as return type returning pointer to record
  22631. MODULE Test;
  22632. PROCEDURE Procedure (value: POINTER TO RECORD END): LONGREAL; BEGIN RETURN value END Procedure;
  22633. END Test.
  22634. negative: procedure with long real as return type returning procedure
  22635. MODULE Test;
  22636. PROCEDURE Procedure (value: PROCEDURE): LONGREAL; BEGIN RETURN value END Procedure;
  22637. END Test.
  22638. negative: procedure with set as return type returning boolean
  22639. MODULE Test;
  22640. PROCEDURE Procedure (value: BOOLEAN): SET; BEGIN RETURN value END Procedure;
  22641. END Test.
  22642. negative: procedure with set as return type returning character
  22643. MODULE Test;
  22644. PROCEDURE Procedure (value: CHAR): SET; BEGIN RETURN value END Procedure;
  22645. END Test.
  22646. negative: procedure with set as return type returning integer
  22647. MODULE Test;
  22648. PROCEDURE Procedure (value: INTEGER): SET; BEGIN RETURN value END Procedure;
  22649. END Test.
  22650. negative: procedure with set as return type returning real
  22651. MODULE Test;
  22652. PROCEDURE Procedure (value: REAL): SET; BEGIN RETURN value END Procedure;
  22653. END Test.
  22654. positive: procedure with set as return type returning set
  22655. MODULE Test;
  22656. PROCEDURE Procedure (value: SET): SET; BEGIN RETURN value END Procedure;
  22657. END Test.
  22658. negative: procedure with set as return type returning array
  22659. MODULE Test;
  22660. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): SET; BEGIN RETURN value END Procedure;
  22661. END Test.
  22662. negative: procedure with set as return type returning record
  22663. MODULE Test;
  22664. PROCEDURE Procedure (value: RECORD END): SET; BEGIN RETURN value END Procedure;
  22665. END Test.
  22666. negative: procedure with set as return type returning object
  22667. MODULE Test;
  22668. PROCEDURE Procedure (value: OBJECT END): SET; BEGIN RETURN value END Procedure;
  22669. END Test.
  22670. negative: procedure with set as return type returning base object
  22671. MODULE Test;
  22672. PROCEDURE Procedure (value: OBJECT): SET; BEGIN RETURN value END Procedure;
  22673. END Test.
  22674. negative: procedure with set as return type returning pointer to array
  22675. MODULE Test;
  22676. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): SET; BEGIN RETURN value END Procedure;
  22677. END Test.
  22678. negative: procedure with set as return type returning pointer to record
  22679. MODULE Test;
  22680. PROCEDURE Procedure (value: POINTER TO RECORD END): SET; BEGIN RETURN value END Procedure;
  22681. END Test.
  22682. negative: procedure with set as return type returning procedure
  22683. MODULE Test;
  22684. PROCEDURE Procedure (value: PROCEDURE): SET; BEGIN RETURN value END Procedure;
  22685. END Test.
  22686. negative: procedure with array as return type returning boolean
  22687. MODULE Test;
  22688. PROCEDURE Procedure (value: BOOLEAN): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22689. END Test.
  22690. negative: procedure with array as return type returning character
  22691. MODULE Test;
  22692. PROCEDURE Procedure (value: CHAR): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22693. END Test.
  22694. negative: procedure with array as return type returning integer
  22695. MODULE Test;
  22696. PROCEDURE Procedure (value: INTEGER): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22697. END Test.
  22698. negative: procedure with array as return type returning real
  22699. MODULE Test;
  22700. PROCEDURE Procedure (value: REAL): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22701. END Test.
  22702. negative: procedure with array as return type returning set
  22703. MODULE Test;
  22704. PROCEDURE Procedure (value: SET): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22705. END Test.
  22706. positive: procedure with array as return type returning compatible array
  22707. MODULE Test;
  22708. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22709. END Test.
  22710. negative: procedure with array as return type returning incompatible array
  22711. MODULE Test;
  22712. PROCEDURE Procedure (value: ARRAY 10 OF SET): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22713. END Test.
  22714. negative: procedure with array as return type returning open array
  22715. MODULE Test;
  22716. PROCEDURE Procedure (value: ARRAY OF CHAR): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22717. END Test.
  22718. negative: procedure with array as return type returning record
  22719. MODULE Test;
  22720. PROCEDURE Procedure (value: RECORD END): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22721. END Test.
  22722. negative: procedure with array as return type returning object
  22723. MODULE Test;
  22724. PROCEDURE Procedure (value: OBJECT END): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22725. END Test.
  22726. negative: procedure with array as return type returning base object
  22727. MODULE Test;
  22728. PROCEDURE Procedure (value: OBJECT): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22729. END Test.
  22730. negative: procedure with array as return type returning pointer to array
  22731. MODULE Test;
  22732. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22733. END Test.
  22734. negative: procedure with array as return type returning pointer to record
  22735. MODULE Test;
  22736. PROCEDURE Procedure (value: POINTER TO RECORD END): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22737. END Test.
  22738. negative: procedure with array as return type returning procedure
  22739. MODULE Test;
  22740. PROCEDURE Procedure (value: PROCEDURE): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22741. END Test.
  22742. negative: procedure with record as return type returning boolean
  22743. MODULE Test;
  22744. PROCEDURE Procedure (value: BOOLEAN): RECORD END; BEGIN RETURN value END Procedure;
  22745. END Test.
  22746. negative: procedure with record as return type returning character
  22747. MODULE Test;
  22748. PROCEDURE Procedure (value: CHAR): RECORD END; BEGIN RETURN value END Procedure;
  22749. END Test.
  22750. negative: procedure with record as return type returning integer
  22751. MODULE Test;
  22752. PROCEDURE Procedure (value: INTEGER): RECORD END; BEGIN RETURN value END Procedure;
  22753. END Test.
  22754. negative: procedure with record as return type returning real
  22755. MODULE Test;
  22756. PROCEDURE Procedure (value: REAL): RECORD END; BEGIN RETURN value END Procedure;
  22757. END Test.
  22758. negative: procedure with record as return type returning set
  22759. MODULE Test;
  22760. PROCEDURE Procedure (value: SET): RECORD END; BEGIN RETURN value END Procedure;
  22761. END Test.
  22762. negative: procedure with record as return type returning array
  22763. MODULE Test;
  22764. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): RECORD END; BEGIN RETURN value END Procedure;
  22765. END Test.
  22766. positive: procedure with record as return type returning record
  22767. MODULE Test;
  22768. TYPE Record = RECORD END;
  22769. PROCEDURE Procedure (value: Record): Record; BEGIN RETURN value END Procedure;
  22770. END Test.
  22771. positive: procedure with record as return type returning compatible record
  22772. MODULE Test;
  22773. TYPE Record = RECORD END;
  22774. PROCEDURE Procedure (value: RECORD (Record) END): Record; BEGIN RETURN value END Procedure;
  22775. END Test.
  22776. negative: procedure with record as return type returning incompatible record
  22777. MODULE Test;
  22778. TYPE Record = RECORD END;
  22779. PROCEDURE Procedure (value: Record): RECORD (Record) END; BEGIN RETURN value END Procedure;
  22780. END Test.
  22781. negative: procedure with record as return type returning object
  22782. MODULE Test;
  22783. PROCEDURE Procedure (value: OBJECT END): RECORD END; BEGIN RETURN value END Procedure;
  22784. END Test.
  22785. negative: procedure with record as return type returning base object
  22786. MODULE Test;
  22787. PROCEDURE Procedure (value: OBJECT): RECORD END; BEGIN RETURN value END Procedure;
  22788. END Test.
  22789. negative: procedure with record as return type returning pointer to array
  22790. MODULE Test;
  22791. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): RECORD END; BEGIN RETURN value END Procedure;
  22792. END Test.
  22793. negative: procedure with record as return type returning pointer to record
  22794. MODULE Test;
  22795. PROCEDURE Procedure (value: POINTER TO RECORD END): RECORD END; BEGIN RETURN value END Procedure;
  22796. END Test.
  22797. negative: procedure with record as return type returning procedure
  22798. MODULE Test;
  22799. PROCEDURE Procedure (value: PROCEDURE): RECORD END; BEGIN RETURN value END Procedure;
  22800. END Test.
  22801. negative: procedure with object as return type returning boolean
  22802. MODULE Test;
  22803. PROCEDURE Procedure (value: BOOLEAN): OBJECT END; BEGIN RETURN value END Procedure;
  22804. END Test.
  22805. negative: procedure with object as return type returning character
  22806. MODULE Test;
  22807. PROCEDURE Procedure (value: CHAR): OBJECT END; BEGIN RETURN value END Procedure;
  22808. END Test.
  22809. negative: procedure with object as return type returning integer
  22810. MODULE Test;
  22811. PROCEDURE Procedure (value: INTEGER): OBJECT END; BEGIN RETURN value END Procedure;
  22812. END Test.
  22813. negative: procedure with object as return type returning real
  22814. MODULE Test;
  22815. PROCEDURE Procedure (value: REAL): OBJECT END; BEGIN RETURN value END Procedure;
  22816. END Test.
  22817. negative: procedure with object as return type returning set
  22818. MODULE Test;
  22819. PROCEDURE Procedure (value: SET): OBJECT END; BEGIN RETURN value END Procedure;
  22820. END Test.
  22821. negative: procedure with object as return type returning array
  22822. MODULE Test;
  22823. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): OBJECT END; BEGIN RETURN value END Procedure;
  22824. END Test.
  22825. negative: procedure with object as return type returning record
  22826. MODULE Test;
  22827. PROCEDURE Procedure (value: RECORD END): OBJECT END; BEGIN RETURN value END Procedure;
  22828. END Test.
  22829. positive: procedure with object as return type returning object
  22830. MODULE Test;
  22831. TYPE Object = OBJECT END Object;
  22832. PROCEDURE Procedure (value: Object): Object; BEGIN RETURN value END Procedure;
  22833. END Test.
  22834. positive: procedure with object as return type returning compatible object
  22835. MODULE Test;
  22836. TYPE Object = OBJECT END Object;
  22837. PROCEDURE Procedure (value: OBJECT (Object) END): Object; BEGIN RETURN value END Procedure;
  22838. END Test.
  22839. negative: procedure with object as return type returning incompatible object
  22840. MODULE Test;
  22841. TYPE Object = OBJECT END Object;
  22842. PROCEDURE Procedure (value: Object): OBJECT (Object) END; BEGIN RETURN value END Procedure;
  22843. END Test.
  22844. negative: procedure with object as return type returning base object
  22845. MODULE Test;
  22846. PROCEDURE Procedure (value: OBJECT): OBJECT END; BEGIN RETURN value END Procedure;
  22847. END Test.
  22848. negative: procedure with object as return type returning pointer to array
  22849. MODULE Test;
  22850. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): OBJECT END; BEGIN RETURN value END Procedure;
  22851. END Test.
  22852. negative: procedure with object as return type returning pointer to record
  22853. MODULE Test;
  22854. PROCEDURE Procedure (value: POINTER TO RECORD END): OBJECT END; BEGIN RETURN value END Procedure;
  22855. END Test.
  22856. negative: procedure with object as return type returning procedure
  22857. MODULE Test;
  22858. PROCEDURE Procedure (value: PROCEDURE): OBJECT END; BEGIN RETURN value END Procedure;
  22859. END Test.
  22860. positive: procedure with object as return type returning nil pointer
  22861. MODULE Test;
  22862. PROCEDURE Procedure (): OBJECT END; BEGIN RETURN NIL END Procedure;
  22863. END Test.
  22864. negative: procedure with base object as return type returning boolean
  22865. MODULE Test;
  22866. PROCEDURE Procedure (value: BOOLEAN): OBJECT; BEGIN RETURN value END Procedure;
  22867. END Test.
  22868. negative: procedure with base object as return type returning character
  22869. MODULE Test;
  22870. PROCEDURE Procedure (value: CHAR): OBJECT; BEGIN RETURN value END Procedure;
  22871. END Test.
  22872. negative: procedure with base object as return type returning integer
  22873. MODULE Test;
  22874. PROCEDURE Procedure (value: INTEGER): OBJECT; BEGIN RETURN value END Procedure;
  22875. END Test.
  22876. negative: procedure with base object as return type returning real
  22877. MODULE Test;
  22878. PROCEDURE Procedure (value: REAL): OBJECT; BEGIN RETURN value END Procedure;
  22879. END Test.
  22880. negative: procedure with base object as return type returning set
  22881. MODULE Test;
  22882. PROCEDURE Procedure (value: SET): OBJECT; BEGIN RETURN value END Procedure;
  22883. END Test.
  22884. negative: procedure with base object as return type returning array
  22885. MODULE Test;
  22886. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): OBJECT; BEGIN RETURN value END Procedure;
  22887. END Test.
  22888. negative: procedure with base object as return type returning record
  22889. MODULE Test;
  22890. PROCEDURE Procedure (value: RECORD END): OBJECT; BEGIN RETURN value END Procedure;
  22891. END Test.
  22892. positive: procedure with base object as return type returning object
  22893. MODULE Test;
  22894. PROCEDURE Procedure (value: OBJECT END): OBJECT; BEGIN RETURN value END Procedure;
  22895. END Test.
  22896. positive: procedure with base object as return type returning base object
  22897. MODULE Test;
  22898. PROCEDURE Procedure (value: OBJECT): OBJECT; BEGIN RETURN value END Procedure;
  22899. END Test.
  22900. negative: procedure with base object as return type returning pointer to array
  22901. MODULE Test;
  22902. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): OBJECT; BEGIN RETURN value END Procedure;
  22903. END Test.
  22904. negative: procedure with base object as return type returning procedure
  22905. MODULE Test;
  22906. PROCEDURE Procedure (value: PROCEDURE): OBJECT; BEGIN RETURN value END Procedure;
  22907. END Test.
  22908. positive: procedure with base object as return type returning pointer to record
  22909. MODULE Test;
  22910. PROCEDURE Procedure (value: POINTER TO RECORD END): OBJECT; BEGIN RETURN value END Procedure;
  22911. END Test.
  22912. positive: procedure with base object as return type returning nil pointer
  22913. MODULE Test;
  22914. PROCEDURE Procedure (): OBJECT; BEGIN RETURN NIL END Procedure;
  22915. END Test.
  22916. negative: procedure with pointer to array as return type returning boolean
  22917. MODULE Test;
  22918. PROCEDURE Procedure (value: BOOLEAN): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22919. END Test.
  22920. negative: procedure with pointer to array as return type returning character
  22921. MODULE Test;
  22922. PROCEDURE Procedure (value: CHAR): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22923. END Test.
  22924. negative: procedure with pointer to array as return type returning integer
  22925. MODULE Test;
  22926. PROCEDURE Procedure (value: INTEGER): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22927. END Test.
  22928. negative: procedure with pointer to array as return type returning real
  22929. MODULE Test;
  22930. PROCEDURE Procedure (value: REAL): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22931. END Test.
  22932. negative: procedure with pointer to array as return type returning set
  22933. MODULE Test;
  22934. PROCEDURE Procedure (value: SET): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22935. END Test.
  22936. negative: procedure with pointer to array as return type returning array
  22937. MODULE Test;
  22938. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22939. END Test.
  22940. negative: procedure with pointer to array as return type returning record
  22941. MODULE Test;
  22942. PROCEDURE Procedure (value: RECORD END): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22943. END Test.
  22944. negative: procedure with pointer to array as return type returning object
  22945. MODULE Test;
  22946. PROCEDURE Procedure (value: OBJECT END): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22947. END Test.
  22948. negative: procedure with pointer to array as return type returning base object
  22949. MODULE Test;
  22950. PROCEDURE Procedure (value: OBJECT): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22951. END Test.
  22952. positive: procedure with pointer to array as return type returning compatible pointer to array
  22953. MODULE Test;
  22954. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22955. END Test.
  22956. negative: procedure with pointer to array as return type returning incompatible pointer to array
  22957. MODULE Test;
  22958. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF SET): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22959. END Test.
  22960. negative: procedure with pointer to array as return type returning pointer to record
  22961. MODULE Test;
  22962. PROCEDURE Procedure (value: POINTER TO RECORD END): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22963. END Test.
  22964. negative: procedure with pointer to array as return type returning procedure
  22965. MODULE Test;
  22966. PROCEDURE Procedure (value: PROCEDURE): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22967. END Test.
  22968. positive: procedure with pointer to array as return type returning nil pointer
  22969. MODULE Test;
  22970. PROCEDURE Procedure (): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN NIL END Procedure;
  22971. END Test.
  22972. negative: procedure with pointer to record as return type returning boolean
  22973. MODULE Test;
  22974. PROCEDURE Procedure (value: BOOLEAN): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22975. END Test.
  22976. negative: procedure with pointer to record as return type returning character
  22977. MODULE Test;
  22978. PROCEDURE Procedure (value: CHAR): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22979. END Test.
  22980. negative: procedure with pointer to record as return type returning integer
  22981. MODULE Test;
  22982. PROCEDURE Procedure (value: INTEGER): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22983. END Test.
  22984. negative: procedure with pointer to record as return type returning real
  22985. MODULE Test;
  22986. PROCEDURE Procedure (value: REAL): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22987. END Test.
  22988. negative: procedure with pointer to record as return type returning set
  22989. MODULE Test;
  22990. PROCEDURE Procedure (value: SET): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22991. END Test.
  22992. negative: procedure with pointer to record as return type returning array
  22993. MODULE Test;
  22994. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22995. END Test.
  22996. negative: procedure with pointer to record as return type returning record
  22997. MODULE Test;
  22998. PROCEDURE Procedure (value: RECORD END): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22999. END Test.
  23000. negative: procedure with pointer to record as return type returning object
  23001. MODULE Test;
  23002. PROCEDURE Procedure (value: OBJECT END): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  23003. END Test.
  23004. negative: procedure with pointer to record as return type returning base object
  23005. MODULE Test;
  23006. PROCEDURE Procedure (value: OBJECT): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  23007. END Test.
  23008. negative: procedure with pointer to record as return type returning pointer to array
  23009. MODULE Test;
  23010. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  23011. END Test.
  23012. positive: procedure with pointer to record as return type returning pointer to record
  23013. MODULE Test;
  23014. TYPE Record = RECORD END;
  23015. PROCEDURE Procedure (value: POINTER TO Record): POINTER TO Record; BEGIN RETURN value END Procedure;
  23016. END Test.
  23017. positive: procedure with pointer to record as return type returning compatible pointer to record
  23018. MODULE Test;
  23019. TYPE Record = RECORD END;
  23020. PROCEDURE Procedure (value: POINTER TO RECORD (Record) END): POINTER TO Record; BEGIN RETURN value END Procedure;
  23021. END Test.
  23022. negative: procedure with pointer to record as return type returning incompatible pointer to record
  23023. MODULE Test;
  23024. TYPE Record = RECORD END;
  23025. PROCEDURE Procedure (value: POINTER TO Record): POINTER TO RECORD (Record) END; BEGIN RETURN value END Procedure;
  23026. END Test.
  23027. negative: procedure with pointer to record as return type returning procedure
  23028. MODULE Test;
  23029. PROCEDURE Procedure (value: PROCEDURE): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  23030. END Test.
  23031. positive: procedure with pointer to record as return type returning nil pointer
  23032. MODULE Test;
  23033. PROCEDURE Procedure (): POINTER TO RECORD END; BEGIN RETURN NIL END Procedure;
  23034. END Test.
  23035. negative: procedure with procedure as return type returning boolean
  23036. MODULE Test;
  23037. PROCEDURE Procedure (value: BOOLEAN): PROCEDURE; BEGIN RETURN value END Procedure;
  23038. END Test.
  23039. negative: procedure with procedure as return type returning character
  23040. MODULE Test;
  23041. PROCEDURE Procedure (value: CHAR): PROCEDURE; BEGIN RETURN value END Procedure;
  23042. END Test.
  23043. negative: procedure with procedure as return type returning integer
  23044. MODULE Test;
  23045. PROCEDURE Procedure (value: INTEGER): PROCEDURE; BEGIN RETURN value END Procedure;
  23046. END Test.
  23047. negative: procedure with procedure as return type returning real
  23048. MODULE Test;
  23049. PROCEDURE Procedure (value: REAL): PROCEDURE; BEGIN RETURN value END Procedure;
  23050. END Test.
  23051. negative: procedure with procedure as return type returning set
  23052. MODULE Test;
  23053. PROCEDURE Procedure (value: SET): PROCEDURE; BEGIN RETURN value END Procedure;
  23054. END Test.
  23055. negative: procedure with procedure as return type returning array
  23056. MODULE Test;
  23057. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): PROCEDURE; BEGIN RETURN value END Procedure;
  23058. END Test.
  23059. negative: procedure with procedure as return type returning record
  23060. MODULE Test;
  23061. PROCEDURE Procedure (value: RECORD END): PROCEDURE; BEGIN RETURN value END Procedure;
  23062. END Test.
  23063. negative: procedure with procedure as return type returning object
  23064. MODULE Test;
  23065. PROCEDURE Procedure (value: OBJECT END): PROCEDURE; BEGIN RETURN value END Procedure;
  23066. END Test.
  23067. negative: procedure with procedure as return type returning base object
  23068. MODULE Test;
  23069. PROCEDURE Procedure (value: OBJECT): PROCEDURE; BEGIN RETURN value END Procedure;
  23070. END Test.
  23071. negative: procedure with procedure as return type returning pointer to array
  23072. MODULE Test;
  23073. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): PROCEDURE; BEGIN RETURN value END Procedure;
  23074. END Test.
  23075. negative: procedure with procedure as return type returning pointer to record
  23076. MODULE Test;
  23077. PROCEDURE Procedure (value: POINTER TO RECORD END): PROCEDURE; BEGIN RETURN value END Procedure;
  23078. END Test.
  23079. positive: procedure with procedure as return type returning compatible procedure
  23080. MODULE Test;
  23081. PROCEDURE Procedure (value: PROCEDURE): PROCEDURE; BEGIN RETURN value END Procedure;
  23082. END Test.
  23083. negative: procedure with procedure as return type returning incompatible procedure
  23084. MODULE Test;
  23085. PROCEDURE Procedure (value: PROCEDURE (value: INTEGER)): PROCEDURE; BEGIN RETURN value END Procedure;
  23086. END Test.
  23087. positive: procedure with procedure as return type returning itself
  23088. MODULE Test;
  23089. TYPE Type = PROCEDURE (): Type;
  23090. PROCEDURE Procedure (): Type; BEGIN RETURN Procedure END Procedure;
  23091. END Test.
  23092. positive: procedure with procedure as return type returning nil pointer
  23093. MODULE Test;
  23094. PROCEDURE Procedure (): PROCEDURE; BEGIN RETURN NIL END Procedure;
  23095. END Test.
  23096. # exit statement
  23097. negative: unbounded exit statement
  23098. MODULE Test;
  23099. BEGIN EXIT
  23100. END Test.
  23101. positive: exit statement within loop
  23102. MODULE Test;
  23103. BEGIN LOOP EXIT END
  23104. END Test.
  23105. negative: exit statement before loop
  23106. MODULE Test;
  23107. BEGIN EXIT ; LOOP END
  23108. END Test.
  23109. negative: exit statement after loop
  23110. MODULE Test;
  23111. BEGIN LOOP END ; EXIT
  23112. END Test.
  23113. positive: exit statement within nested loop
  23114. MODULE Test;
  23115. BEGIN LOOP LOOP EXIT END END
  23116. END Test.
  23117. positive: exit statement before nested loop
  23118. MODULE Test;
  23119. BEGIN LOOP EXIT ; LOOP END END
  23120. END Test.
  23121. positive: exit statement after nested loop
  23122. MODULE Test;
  23123. BEGIN LOOP LOOP END ; EXIT END
  23124. END Test.
  23125. # assert statement
  23126. positive: assert statement with constant true condition
  23127. MODULE Test;
  23128. BEGIN ASSERT (TRUE);
  23129. END Test.
  23130. negative: assert statement with constant false condition
  23131. MODULE Test;
  23132. BEGIN ASSERT (FALSE);
  23133. END Test.
  23134. positive: unreachable assert statement with constant false condition
  23135. MODULE Test;
  23136. BEGIN IF FALSE THEN ASSERT (FALSE) END;
  23137. END Test.
  23138. positive: assert statement with positive number
  23139. MODULE Test;
  23140. BEGIN ASSERT (TRUE, 5);
  23141. END Test.
  23142. positive: assert statement with negative number
  23143. MODULE Test;
  23144. BEGIN ASSERT (TRUE, -5);
  23145. END Test.
  23146. positive: assert statement with zero number
  23147. MODULE Test;
  23148. BEGIN ASSERT (TRUE, 0);
  23149. END Test.
  23150. negative: assert statement with constant condition of type character
  23151. MODULE Test;
  23152. BEGIN ASSERT ('a');
  23153. END Test.
  23154. negative: assert statement with constant condition of type integer
  23155. MODULE Test;
  23156. BEGIN ASSERT (5);
  23157. END Test.
  23158. negative: assert statement with constant condition of type real
  23159. MODULE Test;
  23160. BEGIN ASSERT (4.5);
  23161. END Test.
  23162. negative: assert statement with constant condition of type set
  23163. MODULE Test;
  23164. BEGIN ASSERT ({5});
  23165. END Test.
  23166. negative: assert statement with constant condition of type string
  23167. MODULE Test;
  23168. BEGIN ASSERT ("condition");
  23169. END Test.
  23170. negative: assert statement with constant condition of type nil pointer
  23171. MODULE Test;
  23172. BEGIN ASSERT (NIL);
  23173. END Test.
  23174. positive: assert statement with condition of type boolean
  23175. MODULE Test;
  23176. VAR condition: BOOLEAN;
  23177. BEGIN ASSERT (condition);
  23178. END Test.
  23179. negative: assert statement with condition of type character
  23180. MODULE Test;
  23181. VAR condition: CHAR;
  23182. BEGIN ASSERT (condition);
  23183. END Test.
  23184. negative: assert statement with condition of type short integer
  23185. MODULE Test;
  23186. VAR condition: SHORTINT;
  23187. BEGIN ASSERT (condition);
  23188. END Test.
  23189. negative: assert statement with condition of type integer
  23190. MODULE Test;
  23191. VAR condition: INTEGER;
  23192. BEGIN ASSERT (condition);
  23193. END Test.
  23194. negative: assert statement with condition of type long integer
  23195. MODULE Test;
  23196. VAR condition: LONGINT;
  23197. BEGIN ASSERT (condition);
  23198. END Test.
  23199. negative: assert statement with condition of type huge integer
  23200. MODULE Test;
  23201. VAR condition: HUGEINT;
  23202. BEGIN ASSERT (condition);
  23203. END Test.
  23204. negative: assert statement with condition of type real
  23205. MODULE Test;
  23206. VAR condition: REAL;
  23207. BEGIN ASSERT (condition);
  23208. END Test.
  23209. negative: assert statement with condition of type long real
  23210. MODULE Test;
  23211. VAR condition: LONGREAL;
  23212. BEGIN ASSERT (condition);
  23213. END Test.
  23214. negative: assert statement with condition of type set
  23215. MODULE Test;
  23216. VAR condition: SET;
  23217. BEGIN ASSERT (condition);
  23218. END Test.
  23219. negative: assert statement with condition of type array
  23220. MODULE Test;
  23221. VAR condition: ARRAY 10 OF CHAR;
  23222. BEGIN ASSERT (condition);
  23223. END Test.
  23224. negative: assert statement with condition of type record
  23225. MODULE Test;
  23226. VAR condition: RECORD END;
  23227. BEGIN ASSERT (condition);
  23228. END Test.
  23229. negative: assert statement with condition of type object
  23230. MODULE Test;
  23231. VAR condition: OBJECT;
  23232. BEGIN ASSERT (condition);
  23233. END Test.
  23234. negative: assert statement with condition of type pointer
  23235. MODULE Test;
  23236. VAR condition: POINTER TO RECORD END;
  23237. BEGIN ASSERT (condition);
  23238. END Test.
  23239. negative: assert statement with condition of type procedure
  23240. MODULE Test;
  23241. VAR condition: PROCEDURE;
  23242. BEGIN ASSERT (condition);
  23243. END Test.
  23244. negative: assert statement with import as condition
  23245. MODULE Test;
  23246. IMPORT condition := Dummy;
  23247. BEGIN ASSERT (condition);
  23248. END Test.
  23249. negative: assert statement with type as condition
  23250. MODULE Test;
  23251. TYPE condition = BOOLEAN
  23252. BEGIN ASSERT (condition);
  23253. END Test.
  23254. negative: assert statement with constant number of type character
  23255. MODULE Test;
  23256. BEGIN ASSERT (TRUE, 'a');
  23257. END Test.
  23258. positive: assert statement with constant number of type integer
  23259. MODULE Test;
  23260. BEGIN ASSERT (TRUE, 5);
  23261. END Test.
  23262. negative: assert statement with constant number of type real
  23263. MODULE Test;
  23264. BEGIN ASSERT (TRUE, 4.5);
  23265. END Test.
  23266. negative: assert statement with constant number of type set
  23267. MODULE Test;
  23268. BEGIN ASSERT (TRUE, {5});
  23269. END Test.
  23270. negative: assert statement with constant number of type string
  23271. MODULE Test;
  23272. BEGIN ASSERT (TRUE, "number");
  23273. END Test.
  23274. negative: assert statement with constant number of type nil pointer
  23275. MODULE Test;
  23276. BEGIN ASSERT (TRUE, NIL);
  23277. END Test.
  23278. negative: assert statement with number of type boolean
  23279. MODULE Test;
  23280. VAR number: BOOLEAN;
  23281. BEGIN ASSERT (TRUE, number);
  23282. END Test.
  23283. negative: assert statement with number of type character
  23284. MODULE Test;
  23285. VAR number: CHAR;
  23286. BEGIN ASSERT (TRUE, number);
  23287. END Test.
  23288. negative: assert statement with number of type short integer
  23289. MODULE Test;
  23290. VAR number: SHORTINT;
  23291. BEGIN ASSERT (TRUE, number);
  23292. END Test.
  23293. negative: assert statement with number of type integer
  23294. MODULE Test;
  23295. VAR number: INTEGER;
  23296. BEGIN ASSERT (TRUE, number);
  23297. END Test.
  23298. negative: assert statement with number of type long integer
  23299. MODULE Test;
  23300. VAR number: LONGINT;
  23301. BEGIN ASSERT (TRUE, number);
  23302. END Test.
  23303. negative: assert statement with number of type huge integer
  23304. MODULE Test;
  23305. VAR number: HUGEINT;
  23306. BEGIN ASSERT (TRUE, number);
  23307. END Test.
  23308. negative: assert statement with number of type real
  23309. MODULE Test;
  23310. VAR number: REAL;
  23311. BEGIN ASSERT (TRUE, number);
  23312. END Test.
  23313. negative: assert statement with number of type long real
  23314. MODULE Test;
  23315. VAR number: LONGREAL;
  23316. BEGIN ASSERT (TRUE, number);
  23317. END Test.
  23318. negative: assert statement with number of type set
  23319. MODULE Test;
  23320. VAR number: SET;
  23321. BEGIN ASSERT (TRUE, number);
  23322. END Test.
  23323. negative: assert statement with number of type array
  23324. MODULE Test;
  23325. VAR number: ARRAY 10 OF CHAR;
  23326. BEGIN ASSERT (TRUE, number);
  23327. END Test.
  23328. negative: assert statement with number of type record
  23329. MODULE Test;
  23330. VAR number: RECORD END;
  23331. BEGIN ASSERT (TRUE, number);
  23332. END Test.
  23333. negative: assert statement with number of type object
  23334. MODULE Test;
  23335. VAR number: OBJECT;
  23336. BEGIN ASSERT (TRUE, number);
  23337. END Test.
  23338. negative: assert statement with number of type pointer
  23339. MODULE Test;
  23340. VAR number: POINTER TO RECORD END;
  23341. BEGIN ASSERT (TRUE, number);
  23342. END Test.
  23343. negative: assert statement with number of type procedure
  23344. MODULE Test;
  23345. VAR number: PROCEDURE;
  23346. BEGIN ASSERT (TRUE, number);
  23347. END Test.
  23348. negative: assert statement with import as number
  23349. MODULE Test;
  23350. IMPORT number := Dummy;
  23351. BEGIN ASSERT (TRUE, number);
  23352. END Test.
  23353. negative: assert statement with type as number
  23354. MODULE Test;
  23355. TYPE number = INTEGER
  23356. BEGIN ASSERT (TRUE, number);
  23357. END Test.
  23358. # if statement
  23359. positive: if statement with constant true condition
  23360. MODULE Test;
  23361. BEGIN IF TRUE THEN END;
  23362. END Test.
  23363. positive: if statement with constant false condition
  23364. MODULE Test;
  23365. BEGIN IF FALSE THEN END;
  23366. END Test.
  23367. negative: if statement with constant condition of type character
  23368. MODULE Test;
  23369. BEGIN IF 'a' THEN END;
  23370. END Test.
  23371. negative: if statement with constant condition of type integer
  23372. MODULE Test;
  23373. BEGIN IF 5 THEN END;
  23374. END Test.
  23375. negative: if statement with constant condition of type real
  23376. MODULE Test;
  23377. BEGIN IF 4.5 THEN END;
  23378. END Test.
  23379. negative: if statement with constant condition of type set
  23380. MODULE Test;
  23381. BEGIN IF {5} THEN END;
  23382. END Test.
  23383. negative: if statement with constant condition of type string
  23384. MODULE Test;
  23385. BEGIN IF "condition" THEN END;
  23386. END Test.
  23387. negative: if statement with constant condition of type nil pointer
  23388. MODULE Test;
  23389. BEGIN IF NIL THEN END;
  23390. END Test.
  23391. positive: if statement with condition of type boolean
  23392. MODULE Test;
  23393. VAR condition: BOOLEAN;
  23394. BEGIN IF condition THEN END;
  23395. END Test.
  23396. negative: if statement with condition of type character
  23397. MODULE Test;
  23398. VAR condition: CHAR;
  23399. BEGIN IF condition THEN END;
  23400. END Test.
  23401. negative: if statement with condition of type short integer
  23402. MODULE Test;
  23403. VAR condition: SHORTINT;
  23404. BEGIN IF condition THEN END;
  23405. END Test.
  23406. negative: if statement with condition of type integer
  23407. MODULE Test;
  23408. VAR condition: INTEGER;
  23409. BEGIN IF condition THEN END;
  23410. END Test.
  23411. negative: if statement with condition of type long integer
  23412. MODULE Test;
  23413. VAR condition: LONGINT;
  23414. BEGIN IF condition THEN END;
  23415. END Test.
  23416. negative: if statement with condition of type huge integer
  23417. MODULE Test;
  23418. VAR condition: HUGEINT;
  23419. BEGIN IF condition THEN END;
  23420. END Test.
  23421. negative: if statement with condition of type real
  23422. MODULE Test;
  23423. VAR condition: REAL;
  23424. BEGIN IF condition THEN END;
  23425. END Test.
  23426. negative: if statement with condition of type long real
  23427. MODULE Test;
  23428. VAR condition: LONGREAL;
  23429. BEGIN IF condition THEN END;
  23430. END Test.
  23431. negative: if statement with condition of type set
  23432. MODULE Test;
  23433. VAR condition: SET;
  23434. BEGIN IF condition THEN END;
  23435. END Test.
  23436. negative: if statement with condition of type array
  23437. MODULE Test;
  23438. VAR condition: ARRAY 10 OF CHAR;
  23439. BEGIN IF condition THEN END;
  23440. END Test.
  23441. negative: if statement with condition of type record
  23442. MODULE Test;
  23443. VAR condition: RECORD END;
  23444. BEGIN IF condition THEN END;
  23445. END Test.
  23446. negative: if statement with condition of type object
  23447. MODULE Test;
  23448. VAR condition: OBJECT;
  23449. BEGIN IF condition THEN END;
  23450. END Test.
  23451. negative: if statement with condition of type pointer
  23452. MODULE Test;
  23453. VAR condition: POINTER TO RECORD END;
  23454. BEGIN IF condition THEN END;
  23455. END Test.
  23456. negative: if statement with condition of type procedure
  23457. MODULE Test;
  23458. VAR condition: PROCEDURE;
  23459. BEGIN IF condition THEN END;
  23460. END Test.
  23461. negative: if statement with import as condition
  23462. MODULE Test;
  23463. IMPORT condition := Dummy;
  23464. BEGIN IF condition THEN END;
  23465. END Test.
  23466. negative: if statement with type as condition
  23467. MODULE Test;
  23468. TYPE condition = BOOLEAN;
  23469. BEGIN IF condition THEN END;
  23470. END Test.
  23471. positive: else if statement with constant true condition
  23472. MODULE Test;
  23473. BEGIN IF TRUE THEN ELSIF TRUE THEN END;
  23474. END Test.
  23475. positive: else if statement with constant false condition
  23476. MODULE Test;
  23477. BEGIN IF TRUE THEN ELSIF FALSE THEN END;
  23478. END Test.
  23479. negative: else if statement with constant condition of type character
  23480. MODULE Test;
  23481. BEGIN IF TRUE THEN ELSIF 'a' THEN END;
  23482. END Test.
  23483. negative: else if statement with constant condition of type integer
  23484. MODULE Test;
  23485. BEGIN IF TRUE THEN ELSIF 5 THEN END;
  23486. END Test.
  23487. negative: else if statement with constant condition of type real
  23488. MODULE Test;
  23489. BEGIN IF TRUE THEN ELSIF 4.5 THEN END;
  23490. END Test.
  23491. negative: else if statement with constant condition of type set
  23492. MODULE Test;
  23493. BEGIN IF TRUE THEN ELSIF {5} THEN END;
  23494. END Test.
  23495. negative: else if statement with constant condition of type string
  23496. MODULE Test;
  23497. BEGIN IF TRUE THEN ELSIF "condition" THEN END;
  23498. END Test.
  23499. negative: else if statement with constant condition of type nil pointer
  23500. MODULE Test;
  23501. BEGIN IF TRUE THEN ELSIF NIL THEN END;
  23502. END Test.
  23503. positive: else if statement with condition of type boolean
  23504. MODULE Test;
  23505. VAR condition: BOOLEAN;
  23506. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23507. END Test.
  23508. negative: else if statement with condition of type character
  23509. MODULE Test;
  23510. VAR condition: CHAR;
  23511. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23512. END Test.
  23513. negative: else if statement with condition of type short integer
  23514. MODULE Test;
  23515. VAR condition: SHORTINT;
  23516. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23517. END Test.
  23518. negative: else if statement with condition of type integer
  23519. MODULE Test;
  23520. VAR condition: INTEGER;
  23521. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23522. END Test.
  23523. negative: else if statement with condition of type long integer
  23524. MODULE Test;
  23525. VAR condition: LONGINT;
  23526. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23527. END Test.
  23528. negative: else if statement with condition of type huge integer
  23529. MODULE Test;
  23530. VAR condition: HUGEINT;
  23531. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23532. END Test.
  23533. negative: else if statement with condition of type real
  23534. MODULE Test;
  23535. VAR condition: REAL;
  23536. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23537. END Test.
  23538. negative: else if statement with condition of type long real
  23539. MODULE Test;
  23540. VAR condition: LONGREAL;
  23541. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23542. END Test.
  23543. negative: else if statement with condition of type set
  23544. MODULE Test;
  23545. VAR condition: SET;
  23546. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23547. END Test.
  23548. negative: else if statement with condition of type array
  23549. MODULE Test;
  23550. VAR condition: ARRAY 10 OF CHAR;
  23551. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23552. END Test.
  23553. negative: else if statement with condition of type record
  23554. MODULE Test;
  23555. VAR condition: RECORD END;
  23556. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23557. END Test.
  23558. negative: else if statement with condition of type object
  23559. MODULE Test;
  23560. VAR condition: OBJECT;
  23561. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23562. END Test.
  23563. negative: else if statement with condition of type pointer
  23564. MODULE Test;
  23565. VAR condition: POINTER TO RECORD END;
  23566. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23567. END Test.
  23568. negative: else if statement with condition of type procedure
  23569. MODULE Test;
  23570. VAR condition: PROCEDURE;
  23571. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23572. END Test.
  23573. negative: else if statement with import as condition
  23574. MODULE Test;
  23575. IMPORT condition := Dummy;
  23576. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23577. END Test.
  23578. negative: else if statement with type as condition
  23579. MODULE Test;
  23580. TYPE condition = BOOLEAN;
  23581. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23582. END Test.
  23583. # halt statement
  23584. negative: halt statement with constant number of type character
  23585. MODULE Test;
  23586. BEGIN HALT ('a');
  23587. END Test.
  23588. positive: halt statement with constant number of type integer
  23589. MODULE Test;
  23590. BEGIN HALT (105);
  23591. END Test.
  23592. negative: halt statement with constant number of type real
  23593. MODULE Test;
  23594. BEGIN HALT (4.5);
  23595. END Test.
  23596. negative: halt statement with constant number of type set
  23597. MODULE Test;
  23598. BEGIN HALT ({5});
  23599. END Test.
  23600. negative: halt statement with constant number of type string
  23601. MODULE Test;
  23602. BEGIN HALT ("number");
  23603. END Test.
  23604. negative: halt statement with constant number of type nil pointer
  23605. MODULE Test;
  23606. BEGIN HALT (NIL);
  23607. END Test.
  23608. negative: halt statement with number of type boolean
  23609. MODULE Test;
  23610. VAR number: BOOLEAN;
  23611. BEGIN HALT (number);
  23612. END Test.
  23613. negative: halt statement with number of type character
  23614. MODULE Test;
  23615. VAR number: CHAR;
  23616. BEGIN HALT (number);
  23617. END Test.
  23618. negative: halt statement with number of type short integer
  23619. MODULE Test;
  23620. VAR number: SHORTINT;
  23621. BEGIN HALT (number);
  23622. END Test.
  23623. negative: halt statement with number of type integer
  23624. MODULE Test;
  23625. VAR number: INTEGER;
  23626. BEGIN HALT (number);
  23627. END Test.
  23628. negative: halt statement with number of type long integer
  23629. MODULE Test;
  23630. VAR number: LONGINT;
  23631. BEGIN HALT (number);
  23632. END Test.
  23633. negative: halt statement with number of type huge integer
  23634. MODULE Test;
  23635. VAR number: HUGEINT;
  23636. BEGIN HALT (number);
  23637. END Test.
  23638. negative: halt statement with number of type real
  23639. MODULE Test;
  23640. VAR number: REAL;
  23641. BEGIN HALT (number);
  23642. END Test.
  23643. negative: halt statement with number of type long real
  23644. MODULE Test;
  23645. VAR number: LONGREAL;
  23646. BEGIN HALT (number);
  23647. END Test.
  23648. negative: halt statement with number of type set
  23649. MODULE Test;
  23650. VAR number: SET;
  23651. BEGIN HALT (number);
  23652. END Test.
  23653. negative: halt statement with number of type array
  23654. MODULE Test;
  23655. VAR number: ARRAY 10 OF CHAR;
  23656. BEGIN HALT (number);
  23657. END Test.
  23658. negative: halt statement with number of type record
  23659. MODULE Test;
  23660. VAR number: RECORD END;
  23661. BEGIN HALT (number);
  23662. END Test.
  23663. negative: halt statement with number of type object
  23664. MODULE Test;
  23665. VAR number: OBJECT;
  23666. BEGIN HALT (number);
  23667. END Test.
  23668. negative: halt statement with number of type pointer
  23669. MODULE Test;
  23670. VAR number: POINTER TO RECORD END;
  23671. BEGIN HALT (number);
  23672. END Test.
  23673. negative: halt statement with number of type procedure
  23674. MODULE Test;
  23675. VAR number: PROCEDURE;
  23676. BEGIN HALT (number);
  23677. END Test.
  23678. negative: halt statement with import as number
  23679. MODULE Test;
  23680. IMPORT number := Dummy;
  23681. BEGIN HALT (number);
  23682. END Test.
  23683. negative: halt statement with type as number
  23684. MODULE Test;
  23685. TYPE number = INTEGER;
  23686. BEGIN HALT (number);
  23687. END Test.
  23688. # case statement
  23689. negative: case statement with constant boolean value
  23690. MODULE Test;
  23691. BEGIN CASE TRUE OF TRUE: END
  23692. END Test.
  23693. positive: case statement with constant character value
  23694. MODULE Test;
  23695. BEGIN CASE 'a' OF 'a': END
  23696. END Test.
  23697. negative: case statement with constant character value and unmatched case
  23698. MODULE Test;
  23699. BEGIN CASE 't' OF 'y': END
  23700. END Test.
  23701. positive: case statement with constant character value and unmatched case and else
  23702. MODULE Test;
  23703. BEGIN CASE 'e' OF 0X: ELSE END
  23704. END Test.
  23705. positive: case statement with constant short integer value
  23706. MODULE Test;
  23707. BEGIN CASE 10H OF 10H: END
  23708. END Test.
  23709. positive: case statement with constant integer value
  23710. MODULE Test;
  23711. BEGIN CASE 1000H OF 1000H: END
  23712. END Test.
  23713. positive: case statement with constant long integer value
  23714. MODULE Test;
  23715. BEGIN CASE 100000H OF 100000H: END
  23716. END Test.
  23717. positive: case statement with constant huge integer value
  23718. MODULE Test;
  23719. BEGIN CASE 100000000H OF 100000000H: END
  23720. END Test.
  23721. positive: case statement with constant integer value and matched case
  23722. MODULE Test;
  23723. BEGIN CASE 5 OF 5: END
  23724. END Test.
  23725. negative: case statement with constant integer value and unmatched case
  23726. MODULE Test;
  23727. BEGIN CASE 1 OF 2: END
  23728. END Test.
  23729. positive: case statement with constant integer value and unmatched case and else
  23730. MODULE Test;
  23731. BEGIN CASE 9 OF 4: ELSE END
  23732. END Test.
  23733. negative: case statement with constant real value
  23734. MODULE Test;
  23735. BEGIN CASE 1.0 OF 1.0: END
  23736. END Test.
  23737. negative: case statement with constant long real value
  23738. MODULE Test;
  23739. BEGIN CASE 1.D0 OF 1.D0: END
  23740. END Test.
  23741. negative: case statement with constant set value
  23742. MODULE Test;
  23743. BEGIN CASE {} OF {}: END
  23744. END Test.
  23745. negative: case statement with constant string value
  23746. MODULE Test;
  23747. BEGIN CASE "value" OF "value": END
  23748. END Test.
  23749. negative: case statement with nil pointer value
  23750. MODULE Test;
  23751. BEGIN CASE NIL OF NIL: END
  23752. END Test.
  23753. negative: case statement with variable boolean value
  23754. MODULE Test;
  23755. VAR value: BOOLEAN;
  23756. BEGIN CASE value OF TRUE: END
  23757. END Test.
  23758. positive: case statement with variable character value
  23759. MODULE Test;
  23760. VAR value: CHAR;
  23761. BEGIN CASE value OF 3X: END
  23762. END Test.
  23763. positive: case statement with variable short integer value
  23764. MODULE Test;
  23765. VAR value: SHORTINT;
  23766. BEGIN CASE value OF 5: END
  23767. END Test.
  23768. positive: case statement with variable integer value
  23769. MODULE Test;
  23770. VAR value: INTEGER;
  23771. BEGIN CASE value OF 10: END
  23772. END Test.
  23773. positive: case statement with variable long integer value
  23774. MODULE Test;
  23775. VAR value: LONGINT;
  23776. BEGIN CASE value OF 9: END
  23777. END Test.
  23778. positive: case statement with variable huge integer value
  23779. MODULE Test;
  23780. VAR value: HUGEINT;
  23781. BEGIN CASE value OF 6: END
  23782. END Test.
  23783. negative: case statement with variable real value
  23784. MODULE Test;
  23785. VAR value: REAL;
  23786. BEGIN CASE value OF 0.5: END
  23787. END Test.
  23788. negative: case statement with variable long real value
  23789. MODULE Test;
  23790. VAR value: REAL;
  23791. BEGIN CASE value OF 0.D0: END
  23792. END Test.
  23793. negative: case statement with variable set value
  23794. MODULE Test;
  23795. VAR value: SET;
  23796. BEGIN CASE value OF {}: END
  23797. END Test.
  23798. negative: case statement with variable array value
  23799. MODULE Test;
  23800. VAR value: ARRAY 10 OF CHAR;
  23801. BEGIN CASE value OF value: END
  23802. END Test.
  23803. negative: case statement with variable record value
  23804. MODULE Test;
  23805. VAR value: RECORD END;
  23806. BEGIN CASE value OF value: END
  23807. END Test.
  23808. negative: case statement with variable object value
  23809. MODULE Test;
  23810. VAR value: OBJECT END;
  23811. BEGIN CASE value OF value: END
  23812. END Test.
  23813. negative: case statement with variable base object value
  23814. MODULE Test;
  23815. VAR value: OBJECT;
  23816. BEGIN CASE value OF value: END
  23817. END Test.
  23818. negative: case statement with variable pointer to record value
  23819. MODULE Test;
  23820. VAR value: POINTER TO RECORD END;
  23821. BEGIN CASE value OF value: END
  23822. END Test.
  23823. negative: case statement with variable pointer to array value
  23824. MODULE Test;
  23825. VAR value: POINTER TO ARRAY OF CHAR;
  23826. BEGIN CASE value OF value: END
  23827. END Test.
  23828. negative: case statement with variable procedure value
  23829. MODULE Test;
  23830. VAR value: PROCEDURE;
  23831. BEGIN CASE value OF value: END
  23832. END Test.
  23833. negative: case statement with import value
  23834. MODULE Test;
  23835. IMPORT value := Dummy;
  23836. BEGIN CASE value OF value: END
  23837. END Test.
  23838. negative: case statement with type value
  23839. MODULE Test;
  23840. TYPE value = INTEGER;
  23841. BEGIN CASE value OF value: END
  23842. END Test.
  23843. negative: character case statement with constant boolean case
  23844. MODULE Test;
  23845. VAR value: CHAR;
  23846. BEGIN CASE value OF TRUE: END
  23847. END Test.
  23848. positive: character case statement with constant character case
  23849. MODULE Test;
  23850. VAR value: CHAR;
  23851. BEGIN CASE value OF 'a': END
  23852. END Test.
  23853. negative: character case statement with constant short integer case
  23854. MODULE Test;
  23855. VAR value: CHAR;
  23856. BEGIN CASE value OF 10H: END
  23857. END Test.
  23858. negative: character case statement with constant integer case
  23859. MODULE Test;
  23860. VAR value: CHAR;
  23861. BEGIN CASE value OF 1000H: END
  23862. END Test.
  23863. negative: character case statement with constant long integer case
  23864. MODULE Test;
  23865. VAR value: CHAR;
  23866. BEGIN CASE value OF 100000H: END
  23867. END Test.
  23868. negative: character case statement with constant huge integer case
  23869. MODULE Test;
  23870. VAR value: CHAR;
  23871. BEGIN CASE value OF 100000000H: END
  23872. END Test.
  23873. negative: character case statement with constant real case
  23874. MODULE Test;
  23875. VAR value: CHAR;
  23876. BEGIN CASE value OF 1.0: END
  23877. END Test.
  23878. negative: character case statement with constant long real case
  23879. MODULE Test;
  23880. VAR value: CHAR;
  23881. BEGIN CASE value OF 1.D0: END
  23882. END Test.
  23883. negative: character case statement with constant set case
  23884. MODULE Test;
  23885. VAR value: CHAR;
  23886. BEGIN CASE value OF {}: END
  23887. END Test.
  23888. negative: character case statement with constant string case
  23889. MODULE Test;
  23890. VAR value: CHAR;
  23891. BEGIN CASE value OF "value": END
  23892. END Test.
  23893. negative: character case statement with nil pointer case
  23894. MODULE Test;
  23895. VAR value: CHAR;
  23896. BEGIN CASE value OF NIL: END
  23897. END Test.
  23898. negative: character case statement variable boolean case
  23899. MODULE Test;
  23900. VAR value: CHAR; case: BOOLEAN;
  23901. BEGIN CASE value OF case: END
  23902. END Test.
  23903. negative: character case statement with variable character case
  23904. MODULE Test;
  23905. VAR value, case: CHAR;
  23906. BEGIN CASE value OF case: END
  23907. END Test.
  23908. negative: character case statement with variable short integer case
  23909. MODULE Test;
  23910. VAR value: CHAR; case: SHORTINT;
  23911. BEGIN CASE value OF case: END
  23912. END Test.
  23913. negative: character case statement with variable integer case
  23914. MODULE Test;
  23915. VAR value: CHAR; case: INTEGER;
  23916. BEGIN CASE value OF case: END
  23917. END Test.
  23918. negative: character case statement with variable long integer case
  23919. MODULE Test;
  23920. VAR value: CHAR; case: LONGINT;
  23921. BEGIN CASE value OF case: END
  23922. END Test.
  23923. negative: character case statement with variable huge integer case
  23924. MODULE Test;
  23925. VAR value: CHAR; case: HUGEINT;
  23926. BEGIN CASE value OF case: END
  23927. END Test.
  23928. negative: character case statement with variable real case
  23929. MODULE Test;
  23930. VAR value: CHAR; case: REAL;
  23931. BEGIN CASE value OF case: END
  23932. END Test.
  23933. negative: character case statement with variable long real case
  23934. MODULE Test;
  23935. VAR value: CHAR; case: LONGREAL;
  23936. BEGIN CASE value OF case: END
  23937. END Test.
  23938. negative: character case statement with variable set case
  23939. MODULE Test;
  23940. VAR value: CHAR; case: SET;
  23941. BEGIN CASE value OF case: END
  23942. END Test.
  23943. negative: character case statement with variable array case
  23944. MODULE Test;
  23945. VAR value: CHAR; case: ARRAY 10 OF CHAR;
  23946. BEGIN CASE value OF case: END
  23947. END Test.
  23948. negative: character case statement with variable record case
  23949. MODULE Test;
  23950. VAR value: CHAR; case: RECORD END;
  23951. BEGIN CASE value OF case: END
  23952. END Test.
  23953. negative: character case statement with variable object case
  23954. MODULE Test;
  23955. VAR value: CHAR; case: OBJECT END;
  23956. BEGIN CASE value OF case: END
  23957. END Test.
  23958. negative: character case statement with variable base object case
  23959. MODULE Test;
  23960. VAR value: CHAR; case: OBJECT;
  23961. BEGIN CASE value OF case: END
  23962. END Test.
  23963. negative: character case statement with variable pointer to record case
  23964. MODULE Test;
  23965. VAR value: CHAR; case: POINTER TO RECORD END;
  23966. BEGIN CASE value OF case: END
  23967. END Test.
  23968. negative: character case statement with variable pointer to array case
  23969. MODULE Test;
  23970. VAR value: CHAR; case: POINTER TO ARRAY OF CHAR;
  23971. BEGIN CASE value OF case: END
  23972. END Test.
  23973. negative: character case statement with variable procedure case
  23974. MODULE Test;
  23975. VAR value: CHAR; case: PROCEDURE;
  23976. BEGIN CASE value OF case: END
  23977. END Test.
  23978. negative: character case statement with import case
  23979. MODULE Test;
  23980. IMPORT case := Dummy;
  23981. VAR value: CHAR;
  23982. BEGIN CASE value OF case: END
  23983. END Test.
  23984. negative: character case statement with type as case
  23985. MODULE Test;
  23986. TYPE case = INTEGER;
  23987. VAR value: CHAR;
  23988. BEGIN CASE value OF case: END
  23989. END Test.
  23990. negative: short integer case statement with constant boolean case
  23991. MODULE Test;
  23992. VAR value: SHORTINT;
  23993. BEGIN CASE value OF TRUE: END
  23994. END Test.
  23995. negative: short integer case statement with constant character case
  23996. MODULE Test;
  23997. VAR value: SHORTINT;
  23998. BEGIN CASE value OF 'a': END
  23999. END Test.
  24000. positive: short integer case statement with constant short integer case
  24001. MODULE Test;
  24002. VAR value: SHORTINT;
  24003. BEGIN CASE value OF 10H: END
  24004. END Test.
  24005. negative: short integer case statement with constant integer case
  24006. MODULE Test;
  24007. VAR value: SHORTINT;
  24008. BEGIN CASE value OF 1000H: END
  24009. END Test.
  24010. negative: short integer case statement with constant long integer case
  24011. MODULE Test;
  24012. VAR value: SHORTINT;
  24013. BEGIN CASE value OF 100000H: END
  24014. END Test.
  24015. negative: short integer case statement with constant huge integer case
  24016. MODULE Test;
  24017. VAR value: SHORTINT;
  24018. BEGIN CASE value OF 100000000H: END
  24019. END Test.
  24020. negative: short integer case statement with constant real case
  24021. MODULE Test;
  24022. VAR value: SHORTINT;
  24023. BEGIN CASE value OF 1.0: END
  24024. END Test.
  24025. negative: short integer case statement with constant long real case
  24026. MODULE Test;
  24027. VAR value: SHORTINT;
  24028. BEGIN CASE value OF 1.D0: END
  24029. END Test.
  24030. negative: short integer case statement with constant set case
  24031. MODULE Test;
  24032. VAR value: SHORTINT;
  24033. BEGIN CASE value OF {}: END
  24034. END Test.
  24035. negative: short integer case statement with constant string case
  24036. MODULE Test;
  24037. VAR value: SHORTINT;
  24038. BEGIN CASE value OF "value": END
  24039. END Test.
  24040. negative: short integer case statement with nil pointer case
  24041. MODULE Test;
  24042. VAR value: SHORTINT;
  24043. BEGIN CASE value OF NIL: END
  24044. END Test.
  24045. negative: short integer case statement variable boolean case
  24046. MODULE Test;
  24047. VAR value: SHORTINT; case: BOOLEAN;
  24048. BEGIN CASE value OF case: END
  24049. END Test.
  24050. negative: short integer case statement with variable character case
  24051. MODULE Test;
  24052. VAR value: SHORTINT; case: CHAR;
  24053. BEGIN CASE value OF case: END
  24054. END Test.
  24055. negative: short integer case statement with variable short integer case
  24056. MODULE Test;
  24057. VAR value, case: SHORTINT;
  24058. BEGIN CASE value OF case: END
  24059. END Test.
  24060. negative: short integer case statement with variable integer case
  24061. MODULE Test;
  24062. VAR value: SHORTINT; case: INTEGER;
  24063. BEGIN CASE value OF case: END
  24064. END Test.
  24065. negative: short integer case statement with variable long integer case
  24066. MODULE Test;
  24067. VAR value: SHORTINT; case: LONGINT;
  24068. BEGIN CASE value OF case: END
  24069. END Test.
  24070. negative: short integer case statement with variable huge integer case
  24071. MODULE Test;
  24072. VAR value: SHORTINT; case: HUGEINT;
  24073. BEGIN CASE value OF case: END
  24074. END Test.
  24075. negative: short integer case statement with variable real case
  24076. MODULE Test;
  24077. VAR value: SHORTINT; case: REAL;
  24078. BEGIN CASE value OF case: END
  24079. END Test.
  24080. negative: short integer case statement with variable long real case
  24081. MODULE Test;
  24082. VAR value: SHORTINT; case: LONGREAL;
  24083. BEGIN CASE value OF case: END
  24084. END Test.
  24085. negative: short integer case statement with variable set case
  24086. MODULE Test;
  24087. VAR value: SHORTINT; case: SET;
  24088. BEGIN CASE value OF case: END
  24089. END Test.
  24090. negative: short integer case statement with variable array case
  24091. MODULE Test;
  24092. VAR value: SHORTINT; case: ARRAY 10 OF CHAR;
  24093. BEGIN CASE value OF case: END
  24094. END Test.
  24095. negative: short integer case statement with variable record case
  24096. MODULE Test;
  24097. VAR value: SHORTINT; case: RECORD END;
  24098. BEGIN CASE value OF case: END
  24099. END Test.
  24100. negative: short integer case statement with variable object case
  24101. MODULE Test;
  24102. VAR value: SHORTINT; case: OBJECT END;
  24103. BEGIN CASE value OF case: END
  24104. END Test.
  24105. negative: short integer case statement with variable base object case
  24106. MODULE Test;
  24107. VAR value: SHORTINT; case: OBJECT;
  24108. BEGIN CASE value OF case: END
  24109. END Test.
  24110. negative: short integer case statement with variable pointer to record case
  24111. MODULE Test;
  24112. VAR value: SHORTINT; case: POINTER TO RECORD END;
  24113. BEGIN CASE value OF case: END
  24114. END Test.
  24115. negative: short integer case statement with variable pointer to array case
  24116. MODULE Test;
  24117. VAR value: SHORTINT; case: POINTER TO ARRAY OF CHAR;
  24118. BEGIN CASE value OF case: END
  24119. END Test.
  24120. negative: short integer case statement with variable procedure case
  24121. MODULE Test;
  24122. VAR value: SHORTINT; case: PROCEDURE;
  24123. BEGIN CASE value OF case: END
  24124. END Test.
  24125. negative: short integer case statement with import case
  24126. MODULE Test;
  24127. IMPORT case := Dummy; VAR value: SHORTINT;
  24128. BEGIN CASE value OF case: END
  24129. END Test.
  24130. negative: short integer case statement with type as case
  24131. MODULE Test;
  24132. TYPE case = INTEGER; VAR value: case;
  24133. BEGIN CASE value OF case: END
  24134. END Test.
  24135. negative: integer case statement with constant boolean case
  24136. MODULE Test;
  24137. VAR value: INTEGER;
  24138. BEGIN CASE value OF TRUE: END
  24139. END Test.
  24140. negative: integer case statement with constant character case
  24141. MODULE Test;
  24142. VAR value: INTEGER;
  24143. BEGIN CASE value OF 'a': END
  24144. END Test.
  24145. positive: integer case statement with constant short integer case
  24146. MODULE Test;
  24147. VAR value: INTEGER;
  24148. BEGIN CASE value OF 10H: END
  24149. END Test.
  24150. positive: integer case statement with constant integer case
  24151. MODULE Test;
  24152. VAR value: INTEGER;
  24153. BEGIN CASE value OF 1000H: END
  24154. END Test.
  24155. negative: integer case statement with constant long integer case
  24156. MODULE Test;
  24157. VAR value: INTEGER;
  24158. BEGIN CASE value OF 100000H: END
  24159. END Test.
  24160. negative: integer case statement with constant huge integer case
  24161. MODULE Test;
  24162. VAR value: INTEGER;
  24163. BEGIN CASE value OF 100000000H: END
  24164. END Test.
  24165. negative: integer case statement with constant real case
  24166. MODULE Test;
  24167. VAR value: INTEGER;
  24168. BEGIN CASE value OF 1.0: END
  24169. END Test.
  24170. negative: integer case statement with constant long real case
  24171. MODULE Test;
  24172. VAR value: INTEGER;
  24173. BEGIN CASE value OF 1.D0: END
  24174. END Test.
  24175. negative: integer case statement with constant set case
  24176. MODULE Test;
  24177. VAR value: INTEGER;
  24178. BEGIN CASE value OF {}: END
  24179. END Test.
  24180. negative: integer case statement with constant string case
  24181. MODULE Test;
  24182. VAR value: INTEGER;
  24183. BEGIN CASE value OF "value": END
  24184. END Test.
  24185. negative: integer case statement with nil pointer case
  24186. MODULE Test;
  24187. VAR value: INTEGER;
  24188. BEGIN CASE value OF NIL: END
  24189. END Test.
  24190. negative: integer case statement variable boolean case
  24191. MODULE Test;
  24192. VAR value: INTEGER; case: BOOLEAN;
  24193. BEGIN CASE value OF case: END
  24194. END Test.
  24195. negative: integer case statement with variable character case
  24196. MODULE Test;
  24197. VAR value: INTEGER; case: CHAR;
  24198. BEGIN CASE value OF case: END
  24199. END Test.
  24200. negative: integer case statement with variable short integer case
  24201. MODULE Test;
  24202. VAR value: INTEGER; case: SHORTINT;
  24203. BEGIN CASE value OF case: END
  24204. END Test.
  24205. negative: integer case statement with variable integer case
  24206. MODULE Test;
  24207. VAR value, case: INTEGER;
  24208. BEGIN CASE value OF case: END
  24209. END Test.
  24210. negative: integer case statement with variable long integer case
  24211. MODULE Test;
  24212. VAR value: INTEGER; case: LONGINT;
  24213. BEGIN CASE value OF case: END
  24214. END Test.
  24215. negative: integer case statement with variable huge integer case
  24216. MODULE Test;
  24217. VAR value: INTEGER; case: HUGEINT;
  24218. BEGIN CASE value OF case: END
  24219. END Test.
  24220. negative: integer case statement with variable real case
  24221. MODULE Test;
  24222. VAR value: INTEGER; case: REAL;
  24223. BEGIN CASE value OF case: END
  24224. END Test.
  24225. negative: integer case statement with variable long real case
  24226. MODULE Test;
  24227. VAR value: INTEGER; case: LONGREAL;
  24228. BEGIN CASE value OF case: END
  24229. END Test.
  24230. negative: integer case statement with variable set case
  24231. MODULE Test;
  24232. VAR value: INTEGER; case: SET;
  24233. BEGIN CASE value OF case: END
  24234. END Test.
  24235. negative: integer case statement with variable array case
  24236. MODULE Test;
  24237. VAR value: INTEGER; case: ARRAY 10 OF CHAR;
  24238. BEGIN CASE value OF case: END
  24239. END Test.
  24240. negative: integer case statement with variable record case
  24241. MODULE Test;
  24242. VAR value: INTEGER; case: RECORD END;
  24243. BEGIN CASE value OF case: END
  24244. END Test.
  24245. negative: integer case statement with variable object case
  24246. MODULE Test;
  24247. VAR value: INTEGER; case: OBJECT END;
  24248. BEGIN CASE value OF case: END
  24249. END Test.
  24250. negative: integer case statement with variable base object case
  24251. MODULE Test;
  24252. VAR value: INTEGER; case: OBJECT;
  24253. BEGIN CASE value OF case: END
  24254. END Test.
  24255. negative: integer case statement with variable pointer to record case
  24256. MODULE Test;
  24257. VAR value: INTEGER; case: POINTER TO RECORD END;
  24258. BEGIN CASE value OF case: END
  24259. END Test.
  24260. negative: integer case statement with variable pointer to array case
  24261. MODULE Test;
  24262. VAR value: INTEGER; case: POINTER TO ARRAY OF CHAR;
  24263. BEGIN CASE value OF case: END
  24264. END Test.
  24265. negative: integer case statement with variable procedure case
  24266. MODULE Test;
  24267. VAR value: INTEGER; case: PROCEDURE;
  24268. BEGIN CASE value OF case: END
  24269. END Test.
  24270. negative: integer case statement with import case
  24271. MODULE Test;
  24272. IMPORT case := Dummy; VAR value: INTEGER;
  24273. BEGIN CASE value OF case: END
  24274. END Test.
  24275. negative: integer case statement with type as case
  24276. MODULE Test;
  24277. TYPE case = INTEGER; VAR value: case;
  24278. BEGIN CASE value OF case: END
  24279. END Test.
  24280. negative: long integer case statement with constant boolean case
  24281. MODULE Test;
  24282. VAR value: LONGINT;
  24283. BEGIN CASE value OF TRUE: END
  24284. END Test.
  24285. negative: long integer case statement with constant character case
  24286. MODULE Test;
  24287. VAR value: LONGINT;
  24288. BEGIN CASE value OF 'a': END
  24289. END Test.
  24290. positive: long integer case statement with constant short integer case
  24291. MODULE Test;
  24292. VAR value: LONGINT;
  24293. BEGIN CASE value OF 10H: END
  24294. END Test.
  24295. positive: long integer case statement with constant integer case
  24296. MODULE Test;
  24297. VAR value: LONGINT;
  24298. BEGIN CASE value OF 1000H: END
  24299. END Test.
  24300. positive: long integer case statement with constant long integer case
  24301. MODULE Test;
  24302. VAR value: LONGINT;
  24303. BEGIN CASE value OF 100000H: END
  24304. END Test.
  24305. negative: long integer case statement with constant huge integer case
  24306. MODULE Test;
  24307. VAR value: LONGINT;
  24308. BEGIN CASE value OF 100000000H: END
  24309. END Test.
  24310. negative: long integer case statement with constant real case
  24311. MODULE Test;
  24312. VAR value: LONGINT;
  24313. BEGIN CASE value OF 1.0: END
  24314. END Test.
  24315. negative: long integer case statement with constant long real case
  24316. MODULE Test;
  24317. VAR value: LONGINT;
  24318. BEGIN CASE value OF 1.D0: END
  24319. END Test.
  24320. negative: long integer case statement with constant set case
  24321. MODULE Test;
  24322. VAR value: LONGINT;
  24323. BEGIN CASE value OF {}: END
  24324. END Test.
  24325. negative: long integer case statement with constant string case
  24326. MODULE Test;
  24327. VAR value: LONGINT;
  24328. BEGIN CASE value OF "value": END
  24329. END Test.
  24330. negative: long integer case statement with nil pointer case
  24331. MODULE Test;
  24332. VAR value: LONGINT;
  24333. BEGIN CASE value OF NIL: END
  24334. END Test.
  24335. negative: long integer case statement variable boolean case
  24336. MODULE Test;
  24337. VAR value: LONGINT; case: BOOLEAN;
  24338. BEGIN CASE value OF case: END
  24339. END Test.
  24340. negative: long integer case statement with variable character case
  24341. MODULE Test;
  24342. VAR value: LONGINT; case: CHAR;
  24343. BEGIN CASE value OF case: END
  24344. END Test.
  24345. negative: long integer case statement with variable short integer case
  24346. MODULE Test;
  24347. VAR value: LONGINT; case: SHORTINT;
  24348. BEGIN CASE value OF case: END
  24349. END Test.
  24350. negative: long integer case statement with variable integer case
  24351. MODULE Test;
  24352. VAR value: LONGINT; case: INTEGER;
  24353. BEGIN CASE value OF case: END
  24354. END Test.
  24355. negative: long integer case statement with variable long integer case
  24356. MODULE Test;
  24357. VAR value, case: LONGINT;
  24358. BEGIN CASE value OF case: END
  24359. END Test.
  24360. negative: long integer case statement with variable huge integer case
  24361. MODULE Test;
  24362. VAR value: LONGINT; case: HUGEINT;
  24363. BEGIN CASE value OF case: END
  24364. END Test.
  24365. negative: long integer case statement with variable real case
  24366. MODULE Test;
  24367. VAR value: LONGINT; case: REAL;
  24368. BEGIN CASE value OF case: END
  24369. END Test.
  24370. negative: long integer case statement with variable long real case
  24371. MODULE Test;
  24372. VAR value: LONGINT; case: LONGREAL;
  24373. BEGIN CASE value OF case: END
  24374. END Test.
  24375. negative: long integer case statement with variable set case
  24376. MODULE Test;
  24377. VAR value: LONGINT; case: SET;
  24378. BEGIN CASE value OF case: END
  24379. END Test.
  24380. negative: long integer case statement with variable array case
  24381. MODULE Test;
  24382. VAR value: LONGINT; case: ARRAY 10 OF CHAR;
  24383. BEGIN CASE value OF case: END
  24384. END Test.
  24385. negative: long integer case statement with variable record case
  24386. MODULE Test;
  24387. VAR value: LONGINT; case: RECORD END;
  24388. BEGIN CASE value OF case: END
  24389. END Test.
  24390. negative: long integer case statement with variable object case
  24391. MODULE Test;
  24392. VAR value: LONGINT; case: OBJECT END;
  24393. BEGIN CASE value OF case: END
  24394. END Test.
  24395. negative: long integer case statement with variable base object case
  24396. MODULE Test;
  24397. VAR value: LONGINT; case: OBJECT;
  24398. BEGIN CASE value OF case: END
  24399. END Test.
  24400. negative: long integer case statement with variable pointer to record case
  24401. MODULE Test;
  24402. VAR value: LONGINT; case: POINTER TO RECORD END;
  24403. BEGIN CASE value OF case: END
  24404. END Test.
  24405. negative: long integer case statement with variable pointer to array case
  24406. MODULE Test;
  24407. VAR value: LONGINT; case: POINTER TO ARRAY OF CHAR;
  24408. BEGIN CASE value OF case: END
  24409. END Test.
  24410. negative: long integer case statement with variable procedure case
  24411. MODULE Test;
  24412. VAR value: LONGINT; case: PROCEDURE;
  24413. BEGIN CASE value OF case: END
  24414. END Test.
  24415. negative: long integer case statement with import case
  24416. MODULE Test;
  24417. IMPORT case := Dummy; VAR value: LONGINT;
  24418. BEGIN CASE value OF case: END
  24419. END Test.
  24420. negative: long integer case statement with type as case
  24421. MODULE Test;
  24422. TYPE case = LONGINT; VAR value: case;
  24423. BEGIN CASE value OF case: END
  24424. END Test.
  24425. negative: huge integer case statement with constant boolean case
  24426. MODULE Test;
  24427. VAR value: HUGEINT;
  24428. BEGIN CASE value OF TRUE: END
  24429. END Test.
  24430. negative: huge integer case statement with constant character case
  24431. MODULE Test;
  24432. VAR value: HUGEINT;
  24433. BEGIN CASE value OF 'a': END
  24434. END Test.
  24435. positive: huge integer case statement with constant short integer case
  24436. MODULE Test;
  24437. VAR value: HUGEINT;
  24438. BEGIN CASE value OF 10H: END
  24439. END Test.
  24440. positive: huge integer case statement with constant integer case
  24441. MODULE Test;
  24442. VAR value: HUGEINT;
  24443. BEGIN CASE value OF 1000H: END
  24444. END Test.
  24445. positive: huge integer case statement with constant long integer case
  24446. MODULE Test;
  24447. VAR value: HUGEINT;
  24448. BEGIN CASE value OF 100000H: END
  24449. END Test.
  24450. positive: huge integer case statement with constant huge integer case
  24451. MODULE Test;
  24452. VAR value: HUGEINT;
  24453. BEGIN CASE value OF 100000000H: END
  24454. END Test.
  24455. negative: huge integer case statement with constant real case
  24456. MODULE Test;
  24457. VAR value: HUGEINT;
  24458. BEGIN CASE value OF 1.0: END
  24459. END Test.
  24460. negative: huge integer case statement with constant long real case
  24461. MODULE Test;
  24462. VAR value: HUGEINT;
  24463. BEGIN CASE value OF 1.D0: END
  24464. END Test.
  24465. negative: huge integer case statement with constant set case
  24466. MODULE Test;
  24467. VAR value: HUGEINT;
  24468. BEGIN CASE value OF {}: END
  24469. END Test.
  24470. negative: huge integer case statement with constant string case
  24471. MODULE Test;
  24472. VAR value: HUGEINT;
  24473. BEGIN CASE value OF "value": END
  24474. END Test.
  24475. negative: huge integer case statement with nil pointer case
  24476. MODULE Test;
  24477. VAR value: HUGEINT;
  24478. BEGIN CASE value OF NIL: END
  24479. END Test.
  24480. negative: huge integer case statement variable boolean case
  24481. MODULE Test;
  24482. VAR value: HUGEINT; case: BOOLEAN;
  24483. BEGIN CASE value OF case: END
  24484. END Test.
  24485. negative: huge integer case statement with variable character case
  24486. MODULE Test;
  24487. VAR value: HUGEINT; case: CHAR;
  24488. BEGIN CASE value OF case: END
  24489. END Test.
  24490. negative: huge integer case statement with variable short integer case
  24491. MODULE Test;
  24492. VAR value: HUGEINT; case: SHORTINT;
  24493. BEGIN CASE value OF case: END
  24494. END Test.
  24495. negative: huge integer case statement with variable integer case
  24496. MODULE Test;
  24497. VAR value: HUGEINT; case: INTEGER;
  24498. BEGIN CASE value OF case: END
  24499. END Test.
  24500. negative: huge integer case statement with variable long integer case
  24501. MODULE Test;
  24502. VAR value: HUGEINT; case: LONGINT;
  24503. BEGIN CASE value OF case: END
  24504. END Test.
  24505. negative: huge integer case statement with variable huge integer case
  24506. MODULE Test;
  24507. VAR value, case: HUGEINT;
  24508. BEGIN CASE value OF case: END
  24509. END Test.
  24510. negative: huge integer case statement with variable real case
  24511. MODULE Test;
  24512. VAR value: HUGEINT; case: REAL;
  24513. BEGIN CASE value OF case: END
  24514. END Test.
  24515. negative: huge integer case statement with variable long real case
  24516. MODULE Test;
  24517. VAR value: HUGEINT; case: LONGREAL;
  24518. BEGIN CASE value OF case: END
  24519. END Test.
  24520. negative: huge integer case statement with variable set case
  24521. MODULE Test;
  24522. VAR value: HUGEINT; case: SET;
  24523. BEGIN CASE value OF case: END
  24524. END Test.
  24525. negative: huge integer case statement with variable array case
  24526. MODULE Test;
  24527. VAR value: HUGEINT; case: ARRAY 10 OF CHAR;
  24528. BEGIN CASE value OF case: END
  24529. END Test.
  24530. negative: huge integer case statement with variable record case
  24531. MODULE Test;
  24532. VAR value: HUGEINT; case: RECORD END;
  24533. BEGIN CASE value OF case: END
  24534. END Test.
  24535. negative: huge integer case statement with variable object case
  24536. MODULE Test;
  24537. VAR value: HUGEINT; case: OBJECT END;
  24538. BEGIN CASE value OF case: END
  24539. END Test.
  24540. negative: huge integer case statement with variable base object case
  24541. MODULE Test;
  24542. VAR value: HUGEINT; case: OBJECT;
  24543. BEGIN CASE value OF case: END
  24544. END Test.
  24545. negative: huge integer case statement with variable pointer to record case
  24546. MODULE Test;
  24547. VAR value: HUGEINT; case: POINTER TO RECORD END;
  24548. BEGIN CASE value OF case: END
  24549. END Test.
  24550. negative: huge integer case statement with variable pointer to array case
  24551. MODULE Test;
  24552. VAR value: HUGEINT; case: POINTER TO ARRAY OF CHAR;
  24553. BEGIN CASE value OF case: END
  24554. END Test.
  24555. negative: huge integer case statement with variable procedure case
  24556. MODULE Test;
  24557. VAR value: HUGEINT; case: PROCEDURE;
  24558. BEGIN CASE value OF case: END
  24559. END Test.
  24560. negative: huge integer case statement with import case
  24561. MODULE Test;
  24562. IMPORT case := Dummy; VAR value: HUGEINT;
  24563. BEGIN CASE value OF case: END
  24564. END Test.
  24565. negative: huge integer case statement with type as case
  24566. MODULE Test;
  24567. TYPE case = HUGEINT; VAR value: case;
  24568. BEGIN CASE value OF case: END
  24569. END Test.
  24570. positive: character case statement with multiple case range
  24571. MODULE Test;
  24572. VAR value: CHAR;
  24573. BEGIN CASE value OF 0X..10X, 11X..20X: END;
  24574. END Test.
  24575. positive: character case statement with empty case range
  24576. MODULE Test;
  24577. VAR value: CHAR;
  24578. BEGIN CASE value OF 10X..10X: END;
  24579. END Test.
  24580. negative: character case statement with invalid case range
  24581. MODULE Test;
  24582. VAR value: CHAR;
  24583. BEGIN CASE value OF 10X..0X: END;
  24584. END Test.
  24585. negative: character case statement with duplicated cases within same label
  24586. MODULE Test;
  24587. VAR value: CHAR;
  24588. BEGIN CASE value OF 10X, 10X: END;
  24589. END Test.
  24590. negative: character case statement with duplicated case ranges within same label
  24591. MODULE Test;
  24592. VAR value: CHAR;
  24593. BEGIN CASE value OF 0X..10X, 10X..20X: END;
  24594. END Test.
  24595. negative: character case statement with duplicated cases within different label
  24596. MODULE Test;
  24597. VAR value: CHAR;
  24598. BEGIN CASE value OF 10X: | 10X: END;
  24599. END Test.
  24600. negative: character case statement with duplicated case ranges within different label
  24601. MODULE Test;
  24602. VAR value: CHAR;
  24603. BEGIN CASE value OF 0X..10X: | 10X..20X: END;
  24604. END Test.
  24605. positive: character case statement with ascending cases
  24606. MODULE Test;
  24607. VAR value: CHAR;
  24608. BEGIN CASE value OF 0X..5X, 6X, 7X..7X, 8X, 9X: | 10X..20X, 21X: | 22X, 23X..29X, 30X: END;
  24609. END Test.
  24610. positive: character case statement with descending cases
  24611. MODULE Test;
  24612. VAR value: CHAR;
  24613. BEGIN CASE value OF 30X, 23X..29X, 22X: | 21X, 10X..20X: | 0X..5X, 6X, 7X..7X, 8X, 9X: END;
  24614. END Test.
  24615. positive: nested character case statement
  24616. MODULE Test;
  24617. VAR value: CHAR;
  24618. BEGIN CASE value OF 0X..10X: CASE value OF 0X..10X: END END;
  24619. END Test.
  24620. positive: integer case statement with negative case
  24621. MODULE Test;
  24622. VAR value: INTEGER;
  24623. BEGIN CASE value OF -10: END;
  24624. END Test.
  24625. positive: integer case statement with zero case
  24626. MODULE Test;
  24627. VAR value: INTEGER;
  24628. BEGIN CASE value OF 0: END;
  24629. END Test.
  24630. positive: integer case statement with positive case
  24631. MODULE Test;
  24632. VAR value: INTEGER;
  24633. BEGIN CASE value OF 10: END;
  24634. END Test.
  24635. positive: integer case statement with multiple case range
  24636. MODULE Test;
  24637. VAR value: INTEGER;
  24638. BEGIN CASE value OF 0..10, 11..20: END;
  24639. END Test.
  24640. positive: integer case statement with empty case range
  24641. MODULE Test;
  24642. VAR value: INTEGER;
  24643. BEGIN CASE value OF 10..10: END;
  24644. END Test.
  24645. negative: integer case statement with invalid case range
  24646. MODULE Test;
  24647. VAR value: INTEGER;
  24648. BEGIN CASE value OF 10..0: END;
  24649. END Test.
  24650. negative: integer case statement with duplicated cases within same label
  24651. MODULE Test;
  24652. VAR value: INTEGER;
  24653. BEGIN CASE value OF 10, 10: END;
  24654. END Test.
  24655. negative: integer case statement with duplicated case ranges within same label
  24656. MODULE Test;
  24657. VAR value: INTEGER;
  24658. BEGIN CASE value OF 0..10, 10..20: END;
  24659. END Test.
  24660. negative: integer case statement with duplicated cases within different label
  24661. MODULE Test;
  24662. VAR value: INTEGER;
  24663. BEGIN CASE value OF 10: | 10: END;
  24664. END Test.
  24665. negative: integer case statement with duplicated case ranges within different label
  24666. MODULE Test;
  24667. VAR value: INTEGER;
  24668. BEGIN CASE value OF 0..10: | 10..20: END;
  24669. END Test.
  24670. positive: integer case statement with ascending cases
  24671. MODULE Test;
  24672. VAR value: INTEGER;
  24673. BEGIN CASE value OF 0..5, 6, 7..7, 8, 9: | 10..20, 21: | 22, 23..29, 30: END;
  24674. END Test.
  24675. positive: integer case statement with descending cases
  24676. MODULE Test;
  24677. VAR value: INTEGER;
  24678. BEGIN CASE value OF 30, 23..29, 22: | 21, 10..20: | 0..5, 6, 7..7, 8, 9: END;
  24679. END Test.
  24680. positive: nested integer case statement
  24681. MODULE Test;
  24682. VAR value: INTEGER;
  24683. BEGIN CASE value OF 0..10: CASE value OF 0..10: END END;
  24684. END Test.
  24685. # with statement
  24686. negative: with statement with constant boolean value
  24687. MODULE Test;
  24688. BEGIN WITH TRUE : BOOLEAN DO END;
  24689. END Test.
  24690. negative: with statement with constant boolean value type
  24691. MODULE Test;
  24692. TYPE Type = BOOLEAN;
  24693. BEGIN WITH TRUE : Type DO END;
  24694. END Test.
  24695. negative: with statement with indirect constant boolean value
  24696. MODULE Test;
  24697. CONST Constant = TRUE;
  24698. BEGIN WITH Constant : BOOLEAN DO END;
  24699. END Test.
  24700. negative: with statement with indirect constant boolean value type
  24701. MODULE Test;
  24702. CONST Constant = TRUE;
  24703. TYPE Type = BOOLEAN;
  24704. BEGIN WITH Constant : Type DO END;
  24705. END Test.
  24706. negative: with statement with constant character value
  24707. MODULE Test;
  24708. BEGIN WITH '0' : CHAR DO END;
  24709. END Test.
  24710. negative: with statement with constant character value type
  24711. MODULE Test;
  24712. TYPE Type = CHAR;
  24713. BEGIN WITH '0' : Type DO END;
  24714. END Test.
  24715. negative: with statement with indirect constant character value
  24716. MODULE Test;
  24717. CONST Constant = '0';
  24718. BEGIN WITH Constant : CHAR DO END;
  24719. END Test.
  24720. negative: with statement with indirect constant character value type
  24721. MODULE Test;
  24722. CONST Constant = '0';
  24723. TYPE Type = CHAR;
  24724. BEGIN WITH Constant : Type DO END;
  24725. END Test.
  24726. negative: with statement with constant integer value
  24727. MODULE Test;
  24728. BEGIN WITH 0 : INTEGER DO END;
  24729. END Test.
  24730. negative: with statement with constant integer value type
  24731. MODULE Test;
  24732. TYPE Type = INTEGER;
  24733. BEGIN WITH 0 : Type DO END;
  24734. END Test.
  24735. negative: with statement with indirect constant integer value
  24736. MODULE Test;
  24737. CONST Constant = 0;
  24738. BEGIN WITH Constant : INTEGER DO END;
  24739. END Test.
  24740. negative: with statement with indirect constant integer value type
  24741. MODULE Test;
  24742. CONST Constant = 0;
  24743. TYPE Type = INTEGER;
  24744. BEGIN WITH Constant : Type DO END;
  24745. END Test.
  24746. negative: with statement with constant real value
  24747. MODULE Test;
  24748. BEGIN WITH 0.0 : REAL DO END;
  24749. END Test.
  24750. negative: with statement with constant real value type
  24751. MODULE Test;
  24752. TYPE Type = REAL;
  24753. BEGIN WITH 0.0 : Type DO END;
  24754. END Test.
  24755. negative: with statement with indirect constant real value
  24756. MODULE Test;
  24757. CONST Constant = 0.0;
  24758. BEGIN WITH Constant : REAL DO END;
  24759. END Test.
  24760. negative: with statement with indirect constant real value type
  24761. MODULE Test;
  24762. CONST Constant = 0.0;
  24763. TYPE Type = REAL;
  24764. BEGIN WITH Constant : Type DO END;
  24765. END Test.
  24766. negative: with statement with constant set value
  24767. MODULE Test;
  24768. BEGIN WITH {} : SET DO END;
  24769. END Test.
  24770. negative: with statement with constant set value type
  24771. MODULE Test;
  24772. TYPE Type = SET;
  24773. BEGIN WITH {} : Type DO END;
  24774. END Test.
  24775. negative: with statement with indirect constant set value
  24776. MODULE Test;
  24777. CONST Constant = {};
  24778. BEGIN WITH Constant : SET DO END;
  24779. END Test.
  24780. negative: with statement with indirect constant set value type
  24781. MODULE Test;
  24782. CONST Constant = {};
  24783. TYPE Type = SET;
  24784. BEGIN WITH Constant : Type DO END;
  24785. END Test.
  24786. negative: with statement with constant string value
  24787. MODULE Test;
  24788. BEGIN WITH "string" : ARRAY OF CHAR DO END;
  24789. END Test.
  24790. negative: with statement with constant string value type
  24791. MODULE Test;
  24792. TYPE Type = ARRAY OF CHAR;
  24793. BEGIN WITH "string" : Type DO END;
  24794. END Test.
  24795. negative: with statement with indirect constant string value
  24796. MODULE Test;
  24797. CONST Constant = "string";
  24798. BEGIN WITH Constant : ARRAY OF CHAR DO END;
  24799. END Test.
  24800. negative: with statement with indirect constant string value type
  24801. MODULE Test;
  24802. CONST Constant = "string";
  24803. TYPE Type = ARRAY OF CHAR;
  24804. BEGIN WITH Constant : Type DO END;
  24805. END Test.
  24806. negative: with statement with nil pointer value
  24807. MODULE Test;
  24808. BEGIN WITH NIL : OBJECT DO END;
  24809. END Test.
  24810. negative: with statement with nil pointer value type
  24811. MODULE Test;
  24812. TYPE Type = OBJECT;
  24813. BEGIN WITH NIL : Type DO END;
  24814. END Test.
  24815. negative: with statement with indirect nil pointer value
  24816. MODULE Test;
  24817. CONST Constant = NIL;
  24818. TYPE Type = OBJECT;
  24819. BEGIN WITH Constant : Type DO END;
  24820. END Test.
  24821. negative: with statement with indirect nil pointer value type
  24822. MODULE Test;
  24823. TYPE Type = OBJECT;
  24824. CONST Constant = NIL;
  24825. BEGIN WITH Constant : Type DO END;
  24826. END Test.
  24827. negative: with statement with variable boolean value
  24828. MODULE Test;
  24829. VAR value: BOOLEAN;
  24830. BEGIN WITH value : BOOLEAN DO END;
  24831. END Test.
  24832. negative: with statement with variable boolean value type
  24833. MODULE Test;
  24834. TYPE Type = BOOLEAN;
  24835. VAR value: Type;
  24836. BEGIN WITH value : Type DO END;
  24837. END Test.
  24838. negative: with statement with variable character value
  24839. MODULE Test;
  24840. VAR value: CHAR;
  24841. BEGIN WITH value : CHAR DO END;
  24842. END Test.
  24843. negative: with statement with variable character value type
  24844. MODULE Test;
  24845. TYPE Type = CHAR;
  24846. VAR value: Type;
  24847. BEGIN WITH value : Type DO END;
  24848. END Test.
  24849. negative: with statement with variable short integer value
  24850. MODULE Test;
  24851. VAR value: SHORTINT;
  24852. BEGIN WITH value : SHORTINT DO END;
  24853. END Test.
  24854. negative: with statement with variable short integer value type
  24855. MODULE Test;
  24856. TYPE Type = SHORTINT;
  24857. VAR value: Type;
  24858. BEGIN WITH value : Type DO END;
  24859. END Test.
  24860. negative: with statement with variable integer value
  24861. MODULE Test;
  24862. VAR value: INTEGER;
  24863. BEGIN WITH value : INTEGER DO END;
  24864. END Test.
  24865. negative: with statement with variable integer value type
  24866. MODULE Test;
  24867. TYPE Type = INTEGER;
  24868. VAR value: Type;
  24869. BEGIN WITH value : Type DO END;
  24870. END Test.
  24871. negative: with statement with variable long integer value
  24872. MODULE Test;
  24873. VAR value: LONGINT;
  24874. BEGIN WITH value : LONGINT DO END;
  24875. END Test.
  24876. negative: with statement with variable long integer value type
  24877. MODULE Test;
  24878. TYPE Type = LONGINT;
  24879. VAR value: Type;
  24880. BEGIN WITH value : Type DO END;
  24881. END Test.
  24882. negative: with statement with variable huge integer value
  24883. MODULE Test;
  24884. VAR value: HUGEINT;
  24885. BEGIN WITH value : HUGEINT DO END;
  24886. END Test.
  24887. negative: with statement with variable huge integer value type
  24888. MODULE Test;
  24889. TYPE Type = HUGEINT;
  24890. VAR value: Type;
  24891. BEGIN WITH value : Type DO END;
  24892. END Test.
  24893. negative: with statement with variable real value
  24894. MODULE Test;
  24895. VAR value: REAL;
  24896. BEGIN WITH value : REAL DO END;
  24897. END Test.
  24898. negative: with statement with variable real value type
  24899. MODULE Test;
  24900. TYPE Type = REAL;
  24901. VAR value: Type;
  24902. BEGIN WITH value : Type DO END;
  24903. END Test.
  24904. negative: with statement with variable long real value
  24905. MODULE Test;
  24906. VAR value: LONGREAL;
  24907. BEGIN WITH value : LONGREAL DO END;
  24908. END Test.
  24909. negative: with statement with variable long real value type
  24910. MODULE Test;
  24911. TYPE Type = LONGREAL;
  24912. VAR value: Type;
  24913. BEGIN WITH value : Type DO END;
  24914. END Test.
  24915. negative: with statement with variable set value
  24916. MODULE Test;
  24917. VAR value: SET;
  24918. BEGIN WITH value : SET DO END;
  24919. END Test.
  24920. negative: with statement with variable set value type
  24921. MODULE Test;
  24922. TYPE Type = SET;
  24923. VAR value: Type;
  24924. BEGIN WITH value : Type DO END;
  24925. END Test.
  24926. negative: with statement with variable array value
  24927. MODULE Test;
  24928. VAR value: ARRAY 10 OF CHAR;
  24929. BEGIN WITH value : ARRAY 10 OF CHAR DO END;
  24930. END Test.
  24931. negative: with statement with variable array value type
  24932. MODULE Test;
  24933. TYPE Type = ARRAY 10 OF CHAR;
  24934. VAR value: Type;
  24935. BEGIN WITH value : Type DO END;
  24936. END Test.
  24937. negative: with statement with variable record value
  24938. MODULE Test;
  24939. PROCEDURE Procedure (VAR value: RECORD END);
  24940. BEGIN WITH value : RECORD END DO END;
  24941. END Procedure;
  24942. END Test.
  24943. positive: with statement with same record type
  24944. MODULE Test;
  24945. TYPE Type = RECORD check: BOOLEAN END;
  24946. PROCEDURE Procedure (VAR value, check: Type);
  24947. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24948. END Procedure;
  24949. END Test.
  24950. positive: with statement with nested record types
  24951. MODULE Test;
  24952. TYPE A = RECORD a: BOOLEAN END;
  24953. TYPE B = RECORD (A) b: BOOLEAN END;
  24954. TYPE C = RECORD (B) c: BOOLEAN END;
  24955. PROCEDURE Procedure (VAR value: A);
  24956. BEGIN WITH value : B DO WITH value : C DO ASSERT (value.c) END; ASSERT (value.b) END; ASSERT (value.a);
  24957. END Procedure;
  24958. END Test.
  24959. negative: with statement with invalid nested record types
  24960. MODULE Test;
  24961. TYPE A = RECORD END;
  24962. TYPE B = RECORD (A) END;
  24963. TYPE C = RECORD (A) END;
  24964. PROCEDURE Procedure (VAR value: A);
  24965. BEGIN WITH value : B DO WITH value : C DO END END;
  24966. END Procedure;
  24967. END Test.
  24968. positive: with statement with extending record type
  24969. MODULE Test;
  24970. TYPE Record = RECORD END; Type = RECORD (Record) check: BOOLEAN END;
  24971. PROCEDURE Procedure (VAR value: Record; check: Type);
  24972. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24973. END Procedure;
  24974. END Test.
  24975. negative: with statement with static extending record type
  24976. MODULE Test;
  24977. TYPE Record = RECORD END; Type = RECORD (Record) check: BOOLEAN END;
  24978. VAR value: Record; check: Type;
  24979. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24980. END Test.
  24981. negative: with statement with extending record type and invalid assignment
  24982. MODULE Test;
  24983. TYPE Record = RECORD END; Type = RECORD (Record) END;
  24984. PROCEDURE Procedure (VAR value, check: Record);
  24985. BEGIN WITH value : Type DO value := check END;
  24986. END Procedure;
  24987. END Test.
  24988. negative: with statement with extended record type
  24989. MODULE Test;
  24990. TYPE Record = RECORD END; Type = Record;
  24991. PROCEDURE Procedure (VAR value: RECORD (Record) END);
  24992. BEGIN WITH value : Type DO END;
  24993. END Procedure;
  24994. END Test.
  24995. negative: with statement with incompatible record type
  24996. MODULE Test;
  24997. TYPE Type = RECORD END;
  24998. PROCEDURE Procedure (VAR value: RECORD END);
  24999. BEGIN WITH value : Type DO END;
  25000. END Procedure;
  25001. END Test.
  25002. negative: with statement with variable object value
  25003. MODULE Test;
  25004. VAR value: OBJECT END;
  25005. BEGIN WITH value : OBJECT END DO END;
  25006. END Test.
  25007. positive: with statement with same object type
  25008. MODULE Test;
  25009. TYPE Type = OBJECT VAR check: BOOLEAN END Type;
  25010. VAR value, check: Type;
  25011. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  25012. END Test.
  25013. positive: with statement with nested object types
  25014. MODULE Test;
  25015. TYPE A = OBJECT VAR a: BOOLEAN END A;
  25016. TYPE B = OBJECT (A) VAR b: BOOLEAN END B;
  25017. TYPE C = OBJECT (B) VAR c: BOOLEAN END C;
  25018. VAR value: A;
  25019. BEGIN WITH value : B DO WITH value : C DO ASSERT (value.c) END; ASSERT (value.b) END; ASSERT (value.a);
  25020. END Test.
  25021. negative: with statement with invalid nested object types
  25022. MODULE Test;
  25023. TYPE A = OBJECT END A;
  25024. TYPE B = OBJECT (A) END B;
  25025. TYPE C = OBJECT (A) END C;
  25026. VAR value: A;
  25027. BEGIN WITH value : B DO WITH value : C DO END END;
  25028. END Test.
  25029. positive: with statement with extending object type
  25030. MODULE Test;
  25031. TYPE Object = OBJECT END Object; Type = OBJECT (Object) VAR check: BOOLEAN END Type;
  25032. VAR value: Object; check: Type;
  25033. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  25034. END Test.
  25035. negative: with statement with extending object type and invalid assignment
  25036. MODULE Test;
  25037. TYPE Object = OBJECT END Object; Type = OBJECT (Object) END Type;
  25038. VAR value, check: Object;
  25039. BEGIN WITH value : Type DO value := check END;
  25040. END Test.
  25041. negative: with statement with extended object type
  25042. MODULE Test;
  25043. TYPE Object = OBJECT END Object; Type = Object;
  25044. VAR value: OBJECT (Object) END;
  25045. BEGIN WITH value : Type DO END;
  25046. END Test.
  25047. negative: with statement with incompatible object type
  25048. MODULE Test;
  25049. TYPE Type = OBJECT END Type;
  25050. VAR value: OBJECT END;
  25051. BEGIN WITH value : Type DO END;
  25052. END Test.
  25053. negative: with statement with variable base object value
  25054. MODULE Test;
  25055. VAR value: OBJECT;
  25056. BEGIN WITH value : OBJECT DO END;
  25057. END Test.
  25058. positive: with statement with same base object type
  25059. MODULE Test;
  25060. TYPE Type = OBJECT;
  25061. VAR value, check: Type;
  25062. BEGIN WITH value : Type DO check := value; value := check END;
  25063. END Test.
  25064. positive: with statement with nested base object types
  25065. MODULE Test;
  25066. TYPE A = OBJECT;
  25067. TYPE B = OBJECT (A) VAR b: BOOLEAN END B;
  25068. TYPE C = OBJECT (B) VAR c: BOOLEAN END C;
  25069. VAR value: A;
  25070. BEGIN WITH value : B DO WITH value : C DO ASSERT (value.c) END; ASSERT (value.b) END;
  25071. END Test.
  25072. negative: with statement with invalid nested base object types
  25073. MODULE Test;
  25074. TYPE A = OBJECT;
  25075. TYPE B = OBJECT (A) END B;
  25076. TYPE C = OBJECT (A) END C;
  25077. VAR value: A;
  25078. BEGIN WITH value : B DO WITH value : C DO END END;
  25079. END Test.
  25080. positive: with statement with extending base object type
  25081. MODULE Test;
  25082. TYPE Object = OBJECT; Type = OBJECT (Object) VAR check: BOOLEAN END Type;
  25083. VAR value: Object; check: Type;
  25084. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  25085. END Test.
  25086. negative: with statement with extending base object type and invalid assignment
  25087. MODULE Test;
  25088. TYPE Object = OBJECT; Type = OBJECT (Object) END Type;
  25089. VAR value, check: Object;
  25090. BEGIN WITH value : Type DO value := check END;
  25091. END Test.
  25092. negative: with statement with extended base object type
  25093. MODULE Test;
  25094. TYPE Object = OBJECT; Type = Object;
  25095. VAR value: OBJECT (Object) END;
  25096. BEGIN WITH value : Type DO END;
  25097. END Test.
  25098. negative: with statement with self and same object type
  25099. MODULE Test;
  25100. TYPE Object = OBJECT
  25101. BEGIN WITH SELF : Type DO END;
  25102. END Object;
  25103. TYPE Type = Object;
  25104. END Test.
  25105. negative: with statement with self and extending object type
  25106. MODULE Test;
  25107. TYPE Object = OBJECT
  25108. BEGIN WITH SELF : Type DO END;
  25109. END Object;
  25110. TYPE Type = OBJECT (Object) END Type;
  25111. END Test.
  25112. negative: with statement with self and extended object type
  25113. MODULE Test;
  25114. TYPE Object = OBJECT (Type)
  25115. BEGIN WITH SELF : Type DO END;
  25116. END Object;
  25117. TYPE Type = OBJECT END Type;
  25118. END Test.
  25119. positive: with statement with object variable and self assignment
  25120. MODULE Test;
  25121. TYPE Object = OBJECT
  25122. VAR value: Object;
  25123. BEGIN WITH value : Type DO ASSERT (value.check); value := value END;
  25124. END Object;
  25125. TYPE Type = OBJECT (Object) VAR check: BOOLEAN; END Type;
  25126. END Test.
  25127. positive: with statement with object variable and self assignment using self
  25128. MODULE Test;
  25129. TYPE Object = OBJECT
  25130. VAR value: Object;
  25131. BEGIN WITH value : Type DO ASSERT (value.check); value := SELF.value END;
  25132. END Object;
  25133. TYPE Type = OBJECT (Object) VAR check: BOOLEAN; END Type;
  25134. END Test.
  25135. negative: with statement with object variable and assignment using another object instance
  25136. MODULE Test;
  25137. TYPE Object = OBJECT
  25138. VAR value: Object;
  25139. BEGIN WITH value : Type DO ASSERT (value.check); value := value.value END;
  25140. END Object;
  25141. TYPE Type = OBJECT (Object) VAR check: BOOLEAN; END Type;
  25142. END Test.
  25143. negative: with statement with variable pointer to array value
  25144. MODULE Test;
  25145. VAR value: POINTER TO ARRAY 10 OF CHAR;
  25146. BEGIN WITH value : POINTER TO ARRAY 10 OF CHAR DO END;
  25147. END Test.
  25148. negative: with statement with variable pointer to array value type
  25149. MODULE Test;
  25150. TYPE Type = POINTER TO ARRAY 10 OF CHAR;
  25151. VAR value: Type;
  25152. BEGIN WITH value : Type DO END;
  25153. END Test.
  25154. negative: with statement with variable pointer to record value
  25155. MODULE Test;
  25156. VAR value: POINTER TO RECORD END;
  25157. BEGIN WITH value : POINTER TO RECORD END DO END;
  25158. END Test.
  25159. positive: with statement with same pointer to record type
  25160. MODULE Test;
  25161. TYPE Type = POINTER TO RECORD check: BOOLEAN END;
  25162. VAR value: Type; check: Type;
  25163. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  25164. END Test.
  25165. positive: with statement with nested pointer to record types
  25166. MODULE Test;
  25167. TYPE A = RECORD a: BOOLEAN END; PA = POINTER TO A;
  25168. TYPE B = RECORD (A) b: BOOLEAN END; PB = POINTER TO B;
  25169. TYPE C = RECORD (B) c: BOOLEAN END; PC = POINTER TO C;
  25170. VAR value: PA;
  25171. BEGIN WITH value : PB DO WITH value : PC DO ASSERT (value.c) END; ASSERT (value.b) END; ASSERT (value.a);
  25172. END Test.
  25173. negative: with statement with invalid nested pointer to record types
  25174. MODULE Test;
  25175. TYPE A = RECORD a: BOOLEAN END; PA = POINTER TO A;
  25176. TYPE B = RECORD (A) b: BOOLEAN END; PB = POINTER TO B;
  25177. TYPE C = RECORD (A) c: BOOLEAN END; PC = POINTER TO C;
  25178. VAR value: PA;
  25179. BEGIN WITH value : PB DO WITH value : PC DO END END;
  25180. END Test.
  25181. positive: with statement with extending pointer to record type
  25182. MODULE Test;
  25183. TYPE Record = RECORD END; Type = POINTER TO RECORD (Record) check: BOOLEAN END;
  25184. VAR value: POINTER TO Record; check: Type;
  25185. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  25186. END Test.
  25187. negative: with statement with extending pointer to record type and invalid assignment
  25188. MODULE Test;
  25189. TYPE Record = RECORD END; Type = POINTER TO RECORD (Record) END;
  25190. VAR value, check: POINTER TO Record;
  25191. BEGIN WITH value : Type DO value := check END;
  25192. END Test.
  25193. negative: with statement with extended pointer to record type
  25194. MODULE Test;
  25195. TYPE Record = RECORD END; Type = POINTER TO Record;
  25196. VAR value: POINTER TO RECORD (Record) END;
  25197. BEGIN WITH value : Type DO END;
  25198. END Test.
  25199. negative: with statement with incompatible pointer to record type
  25200. MODULE Test;
  25201. TYPE Type = POINTER TO RECORD END;
  25202. VAR value: POINTER TO RECORD END;
  25203. BEGIN WITH value : Type DO END;
  25204. END Test.
  25205. negative: with statement with variable procedure value
  25206. MODULE Test;
  25207. VAR value: PROCEDURE;
  25208. BEGIN WITH value : PROCEDURE DO END;
  25209. END Test.
  25210. negative: with statement with variable procedure value type
  25211. MODULE Test;
  25212. TYPE Type = PROCEDURE;
  25213. VAR value: Type;
  25214. BEGIN WITH value : Type DO END;
  25215. END Test.
  25216. # new statement
  25217. negative: new statement on constant boolean
  25218. MODULE Test;
  25219. CONST Constant = TRUE;
  25220. BEGIN NEW (Constant);
  25221. END Test.
  25222. negative: new statement on constant character
  25223. MODULE Test;
  25224. CONST Constant = 'a';
  25225. BEGIN NEW (Constant);
  25226. END Test.
  25227. negative: new statement on constant integer
  25228. MODULE Test;
  25229. CONST Constant = 42;
  25230. BEGIN NEW (Constant);
  25231. END Test.
  25232. negative: new statement on constant real
  25233. MODULE Test;
  25234. CONST Constant = 0.1;
  25235. BEGIN NEW (Constant);
  25236. END Test.
  25237. negative: new statement on constant set
  25238. MODULE Test;
  25239. CONST Constant = {};
  25240. BEGIN NEW (Constant);
  25241. END Test.
  25242. negative: new statement on constant string
  25243. MODULE Test;
  25244. CONST Constant = "string";
  25245. BEGIN NEW (Constant);
  25246. END Test.
  25247. negative: new statement on nil pointer
  25248. MODULE Test;
  25249. CONST Constant = NIL;
  25250. BEGIN NEW (Constant);
  25251. END Test.
  25252. negative: new statement on boolean
  25253. MODULE Test;
  25254. VAR boolean: BOOLEAN;
  25255. BEGIN NEW (boolean);
  25256. END Test.
  25257. negative: new statement on character
  25258. MODULE Test;
  25259. VAR character: CHAR;
  25260. BEGIN NEW (character);
  25261. END Test.
  25262. negative: new statement on integer
  25263. MODULE Test;
  25264. VAR integer: INTEGER;
  25265. BEGIN NEW (integer);
  25266. END Test.
  25267. negative: new statement on real
  25268. MODULE Test;
  25269. VAR real: REAL;
  25270. BEGIN NEW (real);
  25271. END Test.
  25272. negative: new statement on set
  25273. MODULE Test;
  25274. VAR set: SET;
  25275. BEGIN NEW (set);
  25276. END Test.
  25277. negative: new statement on array
  25278. MODULE Test;
  25279. VAR array: ARRAY 10 OF CHAR;
  25280. BEGIN NEW (array);
  25281. END Test.
  25282. negative: new statement on record
  25283. MODULE Test;
  25284. VAR record: RECORD END;
  25285. BEGIN NEW (record);
  25286. END Test.
  25287. positive: new statement on object parameter
  25288. MODULE Test;
  25289. PROCEDURE Procedure (object: OBJECT END);
  25290. BEGIN NEW (object);
  25291. END Procedure;
  25292. END Test.
  25293. positive: new statement on variable object parameter
  25294. MODULE Test;
  25295. PROCEDURE Procedure (VAR object: OBJECT END);
  25296. BEGIN NEW (object);
  25297. END Procedure;
  25298. END Test.
  25299. negative: new statement on constant object parameter
  25300. MODULE Test;
  25301. PROCEDURE Procedure (CONST object: OBJECT END);
  25302. BEGIN NEW (object);
  25303. END Procedure;
  25304. END Test.
  25305. negative: new statement on self
  25306. MODULE Test;
  25307. TYPE Object = OBJECT
  25308. BEGIN NEW (SELF);
  25309. END Object;
  25310. END Test.
  25311. positive: new statement on object without initializer
  25312. MODULE Test;
  25313. VAR object: OBJECT END;
  25314. BEGIN NEW (object);
  25315. END Test.
  25316. negative: new statement on object without initializer and one argument
  25317. MODULE Test;
  25318. VAR object: OBJECT END;
  25319. BEGIN NEW (object, 5);
  25320. END Test.
  25321. positive: new statement on object with simple initializer
  25322. MODULE Test;
  25323. TYPE Object = OBJECT
  25324. PROCEDURE &Initializer; END Initializer;
  25325. END Object;
  25326. VAR object: Object;
  25327. BEGIN NEW (object);
  25328. END Test.
  25329. negative: new statement on object with simple initializer and one argument
  25330. MODULE Test;
  25331. TYPE Object = OBJECT
  25332. PROCEDURE &Initializer; END Initializer;
  25333. END Object;
  25334. VAR object: Object;
  25335. BEGIN NEW (object, 5);
  25336. END Test.
  25337. negative: new statement on object with complex initializer and no argument
  25338. MODULE Test;
  25339. TYPE Object = OBJECT
  25340. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25341. END Object;
  25342. VAR object: Object;
  25343. BEGIN NEW (object);
  25344. END Test.
  25345. positive: new statement on object with complex initializer and one argument
  25346. MODULE Test;
  25347. TYPE Object = OBJECT
  25348. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25349. END Object;
  25350. VAR object: Object;
  25351. BEGIN NEW (object, 5);
  25352. END Test.
  25353. positive: new statement on object with complex initializer and matching arguments
  25354. MODULE Test;
  25355. TYPE Object = OBJECT
  25356. PROCEDURE &Initializer (i, j: INTEGER; b: BOOLEAN); END Initializer;
  25357. END Object;
  25358. VAR object: Object;
  25359. BEGIN NEW (object, 5, 6, TRUE);
  25360. END Test.
  25361. negative: new statement on object with complex initializer and incompatible arguments
  25362. MODULE Test;
  25363. TYPE Object = OBJECT
  25364. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25365. END Object;
  25366. VAR object: Object;
  25367. BEGIN NEW (object, TRUE);
  25368. END Test.
  25369. positive: new statement on object with simple inherited initializer
  25370. MODULE Test;
  25371. TYPE Base = OBJECT
  25372. PROCEDURE &Initializer; END Initializer;
  25373. END Base;
  25374. VAR object: OBJECT (Base) END;
  25375. BEGIN NEW (object);
  25376. END Test.
  25377. negative: new statement on object with simple inherited initializer and one argument
  25378. MODULE Test;
  25379. TYPE Base = OBJECT
  25380. PROCEDURE &Initializer; END Initializer;
  25381. END Base;
  25382. VAR object: OBJECT (Base) END;
  25383. BEGIN NEW (object, 5);
  25384. END Test.
  25385. negative: new statement on object with complex inherited initializer and no argument
  25386. MODULE Test;
  25387. TYPE Base = OBJECT
  25388. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25389. END Base;
  25390. VAR object: OBJECT (Base) END;
  25391. BEGIN NEW (object);
  25392. END Test.
  25393. positive: new statement on object with complex inherited initializer and one argument
  25394. MODULE Test;
  25395. TYPE Base = OBJECT
  25396. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25397. END Base;
  25398. VAR object: OBJECT (Base) END;
  25399. BEGIN NEW (object, 5);
  25400. END Test.
  25401. positive: new statement on object with complex inherited initializer and matching arguments
  25402. MODULE Test;
  25403. TYPE Base = OBJECT
  25404. PROCEDURE &Initializer(i, j: INTEGER; b: BOOLEAN); END Initializer;
  25405. END Base;
  25406. VAR object: OBJECT (Base) END;
  25407. BEGIN NEW (object, 5, 6, TRUE);
  25408. END Test.
  25409. positive: new statement on object with simple overridden initializer
  25410. MODULE Test;
  25411. TYPE Base = OBJECT
  25412. PROCEDURE &InitBase (i: INTEGER); END InitBase;
  25413. END Base;
  25414. TYPE Object = OBJECT (Base)
  25415. PROCEDURE &InitObject; BEGIN InitBase (5) END InitObject;
  25416. END Object;
  25417. VAR object: Object;
  25418. BEGIN NEW (object);
  25419. END Test.
  25420. negative: new statement on object with simple overridden initializer and one argument
  25421. MODULE Test;
  25422. TYPE Base = OBJECT
  25423. PROCEDURE &InitBase (i: INTEGER); END InitBase;
  25424. END Base;
  25425. TYPE Object = OBJECT (Base)
  25426. PROCEDURE &InitObject; END InitObject;
  25427. END Object;
  25428. VAR object: Object;
  25429. BEGIN NEW (object, 5);
  25430. END Test.
  25431. negative: new statement on object with complex overridden initializer and no argument
  25432. MODULE Test;
  25433. TYPE Base = OBJECT
  25434. PROCEDURE &InitBase; END InitBase;
  25435. END Base;
  25436. TYPE Object = OBJECT (Base)
  25437. PROCEDURE &InitObject (i: INTEGER); END InitObject;
  25438. END Object;
  25439. VAR object: Object;
  25440. BEGIN NEW (object);
  25441. END Test.
  25442. positive: new statement on object with complex overridden initializer and one argument
  25443. MODULE Test;
  25444. TYPE Base = OBJECT
  25445. PROCEDURE &InitBase; END InitBase;
  25446. END Base;
  25447. TYPE Object = OBJECT (Base)
  25448. PROCEDURE &InitObject (i: INTEGER); BEGIN InitBase END InitObject;
  25449. END Object;
  25450. VAR object: Object;
  25451. BEGIN NEW (object, 5);
  25452. END Test.
  25453. positive: new statement on object with complex overridden initializer and matching arguments
  25454. MODULE Test;
  25455. TYPE Base = OBJECT
  25456. PROCEDURE &InitBase (r: REAL; s: SET); END InitBase;
  25457. END Base;
  25458. TYPE Object = OBJECT (Base)
  25459. PROCEDURE &InitObject (i, j: INTEGER; b: BOOLEAN); BEGIN InitBase (0, {}) END InitObject;
  25460. END Object;
  25461. VAR object: Object;
  25462. BEGIN NEW (object, 5, 6, TRUE);
  25463. END Test.
  25464. positive: new statement on pointer to array with no dimension
  25465. MODULE Test;
  25466. VAR array: POINTER TO ARRAY 10 OF CHAR;
  25467. BEGIN NEW (array);
  25468. END Test.
  25469. positive: new statement on pointer to array parameter
  25470. MODULE Test;
  25471. PROCEDURE Procedure (array: POINTER TO ARRAY 10 OF CHAR);
  25472. BEGIN NEW (array);
  25473. END Procedure;
  25474. END Test.
  25475. positive: new statement on variable pointer to array parameter
  25476. MODULE Test;
  25477. PROCEDURE Procedure (VAR array: POINTER TO ARRAY 10 OF CHAR);
  25478. BEGIN NEW (array);
  25479. END Procedure;
  25480. END Test.
  25481. negative: new statement on constant pointer to array parameter
  25482. MODULE Test;
  25483. PROCEDURE Procedure (CONST array: POINTER TO ARRAY 10 OF CHAR);
  25484. BEGIN NEW (array);
  25485. END Procedure;
  25486. END Test.
  25487. negative: new statement on pointer to open array with no dimension
  25488. MODULE Test;
  25489. VAR array: POINTER TO ARRAY OF CHAR;
  25490. BEGIN NEW (array);
  25491. END Test.
  25492. positive: new statement on pointer to open array with one dimension
  25493. MODULE Test;
  25494. VAR array: POINTER TO ARRAY OF CHAR;
  25495. BEGIN NEW (array, 5);
  25496. END Test.
  25497. negative: new statement on pointer to open array with incompatible dimension
  25498. MODULE Test;
  25499. VAR array: POINTER TO ARRAY OF CHAR;
  25500. BEGIN NEW (array, 10X);
  25501. END Test.
  25502. negative: new statement on pointer to open array with negative dimension
  25503. MODULE Test;
  25504. VAR array: POINTER TO ARRAY OF CHAR;
  25505. BEGIN NEW (array, -5);
  25506. END Test.
  25507. positive: new statement on pointer to open array with zero dimension
  25508. MODULE Test;
  25509. VAR array: POINTER TO ARRAY OF CHAR;
  25510. BEGIN NEW (array, 0);
  25511. END Test.
  25512. negative: new statement on pointer to twice open array with no dimension
  25513. MODULE Test;
  25514. VAR array: POINTER TO ARRAY OF ARRAY 10 OF ARRAY OF CHAR;
  25515. BEGIN NEW (array);
  25516. END Test.
  25517. negative: new statement on pointer to twice open array with one dimension
  25518. MODULE Test;
  25519. VAR array: POINTER TO ARRAY OF ARRAY 10 OF ARRAY OF CHAR;
  25520. BEGIN NEW (array, 5);
  25521. END Test.
  25522. positive: new statement on pointer to twice open array with two dimensions
  25523. MODULE Test;
  25524. VAR array: POINTER TO ARRAY OF ARRAY OF ARRAY 10 OF CHAR;
  25525. BEGIN NEW (array, 5, 10);
  25526. END Test.
  25527. positive: new statement on pointer to record
  25528. MODULE Test;
  25529. VAR record: POINTER TO RECORD END;
  25530. BEGIN NEW (record);
  25531. END Test.
  25532. positive: new statement on pointer to record parameter
  25533. MODULE Test;
  25534. PROCEDURE Procedure (record: POINTER TO RECORD END);
  25535. BEGIN NEW (record);
  25536. END Procedure;
  25537. END Test.
  25538. positive: new statement on variable pointer to record parameter
  25539. MODULE Test;
  25540. PROCEDURE Procedure (VAR record: POINTER TO RECORD END);
  25541. BEGIN NEW (record);
  25542. END Procedure;
  25543. END Test.
  25544. negative: new statement on constant pointer to record parameter
  25545. MODULE Test;
  25546. PROCEDURE Procedure (CONST record: POINTER TO RECORD END);
  25547. BEGIN NEW (record);
  25548. END Procedure;
  25549. END Test.
  25550. negative: new statement on pointer to record with argument
  25551. MODULE Test;
  25552. VAR record: POINTER TO RECORD END;
  25553. BEGIN NEW (record, 1);
  25554. END Test.
  25555. negative: new statement on pointer to record with arguments
  25556. MODULE Test;
  25557. VAR record: POINTER TO RECORD END;
  25558. BEGIN NEW (record, 1, 2);
  25559. END Test.
  25560. negative: new statement on procedure
  25561. MODULE Test;
  25562. VAR procedure: PROCEDURE;
  25563. BEGIN NEW (procedure);
  25564. END Test.
  25565. # increment statement
  25566. negative: increment statement on constant boolean
  25567. MODULE Test;
  25568. CONST Constant = TRUE;
  25569. BEGIN INC (Constant);
  25570. END Test.
  25571. negative: increment statement on constant character
  25572. MODULE Test;
  25573. CONST Constant = 'a';
  25574. BEGIN INC (Constant);
  25575. END Test.
  25576. negative: increment statement on constant integer
  25577. MODULE Test;
  25578. CONST Constant = 42;
  25579. BEGIN INC (Constant);
  25580. END Test.
  25581. negative: increment statement on constant real
  25582. MODULE Test;
  25583. CONST Constant = 0.1;
  25584. BEGIN INC (Constant);
  25585. END Test.
  25586. negative: increment statement on constant set
  25587. MODULE Test;
  25588. CONST Constant = {};
  25589. BEGIN INC (Constant);
  25590. END Test.
  25591. negative: increment statement on constant string
  25592. MODULE Test;
  25593. CONST Constant = "string";
  25594. BEGIN INC (Constant);
  25595. END Test.
  25596. negative: increment statement on nil pointer
  25597. MODULE Test;
  25598. CONST Constant = NIL;
  25599. BEGIN INC (Constant);
  25600. END Test.
  25601. negative: increment statement on boolean
  25602. MODULE Test;
  25603. VAR boolean: BOOLEAN;
  25604. BEGIN INC (boolean);
  25605. END Test.
  25606. negative: increment statement on character
  25607. MODULE Test;
  25608. VAR character: CHAR;
  25609. BEGIN INC (character);
  25610. END Test.
  25611. positive: increment statement on short integer
  25612. MODULE Test;
  25613. VAR integer: SHORTINT;
  25614. BEGIN INC (integer);
  25615. END Test.
  25616. positive: increment statement on integer
  25617. MODULE Test;
  25618. VAR integer: INTEGER;
  25619. BEGIN INC (integer);
  25620. END Test.
  25621. positive: increment statement on long integer
  25622. MODULE Test;
  25623. VAR integer: LONGINT;
  25624. BEGIN INC (integer);
  25625. END Test.
  25626. positive: increment statement on huge integer
  25627. MODULE Test;
  25628. VAR integer: HUGEINT;
  25629. BEGIN INC (integer);
  25630. END Test.
  25631. positive: increment statement on integer parameter
  25632. MODULE Test;
  25633. PROCEDURE Procedure (integer: INTEGER);
  25634. BEGIN INC (integer);
  25635. END Procedure;
  25636. END Test.
  25637. positive: increment statement on variable integer parameter
  25638. MODULE Test;
  25639. PROCEDURE Procedure (VAR integer: INTEGER);
  25640. BEGIN INC (integer);
  25641. END Procedure;
  25642. END Test.
  25643. negative: increment statement on constant integer parameter
  25644. MODULE Test;
  25645. PROCEDURE Procedure (CONST integer: INTEGER);
  25646. BEGIN INC (integer);
  25647. END Procedure;
  25648. END Test.
  25649. negative: increment statement on real
  25650. MODULE Test;
  25651. VAR real: REAL;
  25652. BEGIN INC (real);
  25653. END Test.
  25654. negative: increment statement on set
  25655. MODULE Test;
  25656. VAR set: SET;
  25657. BEGIN INC (set);
  25658. END Test.
  25659. negative: increment statement on array
  25660. MODULE Test;
  25661. VAR array: ARRAY 10 OF CHAR;
  25662. BEGIN INC (array);
  25663. END Test.
  25664. negative: increment statement on record
  25665. MODULE Test;
  25666. VAR record: RECORD END;
  25667. BEGIN INC (record);
  25668. END Test.
  25669. negative: increment statement on object
  25670. MODULE Test;
  25671. VAR object: OBJECT END;
  25672. BEGIN INC (object);
  25673. END Test.
  25674. negative: increment statement on pointer to array
  25675. MODULE Test;
  25676. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  25677. BEGIN INC (pointer);
  25678. END Test.
  25679. negative: increment statement on pointer to record
  25680. MODULE Test;
  25681. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  25682. BEGIN INC (pointer);
  25683. END Test.
  25684. negative: increment statement on procedure
  25685. MODULE Test;
  25686. VAR procedure: PROCEDURE;
  25687. BEGIN INC (procedure);
  25688. END Test.
  25689. negative: increment statement with constant boolean as increment
  25690. MODULE Test;
  25691. CONST Constant = TRUE;
  25692. VAR integer: INTEGER;
  25693. BEGIN INC (integer, Constant);
  25694. END Test.
  25695. negative: increment statement with constant character as increment
  25696. MODULE Test;
  25697. CONST Constant = 'a';
  25698. VAR integer: INTEGER;
  25699. BEGIN INC (integer, Constant);
  25700. END Test.
  25701. positive: increment statement with constant integer as increment
  25702. MODULE Test;
  25703. CONST Constant = 42;
  25704. VAR integer: INTEGER;
  25705. BEGIN INC (integer, Constant);
  25706. END Test.
  25707. positive: increment statement with constant negative integer as increment
  25708. MODULE Test;
  25709. VAR integer: INTEGER;
  25710. BEGIN INC (integer, -5);
  25711. END Test.
  25712. positive: increment statement with zero as increment
  25713. MODULE Test;
  25714. VAR integer: INTEGER;
  25715. BEGIN INC (integer, 0);
  25716. END Test.
  25717. positive: increment statement with constant positive integer as increment
  25718. MODULE Test;
  25719. VAR integer: INTEGER;
  25720. BEGIN INC (integer, 5);
  25721. END Test.
  25722. negative: increment statement with constant real as increment
  25723. MODULE Test;
  25724. CONST Constant = 0.1;
  25725. VAR integer: INTEGER;
  25726. BEGIN INC (integer, Constant);
  25727. END Test.
  25728. negative: increment statement with constant set as increment
  25729. MODULE Test;
  25730. CONST Constant = {};
  25731. VAR integer: INTEGER;
  25732. BEGIN INC (integer, Constant);
  25733. END Test.
  25734. negative: increment statement with constant string as increment
  25735. MODULE Test;
  25736. CONST Constant = "string";
  25737. VAR integer: INTEGER;
  25738. BEGIN INC (integer, Constant);
  25739. END Test.
  25740. negative: increment statement with nil pointer as increment
  25741. MODULE Test;
  25742. CONST Constant = NIL;
  25743. VAR integer: INTEGER;
  25744. BEGIN INC (integer, Constant);
  25745. END Test.
  25746. negative: increment statement with boolean as increment
  25747. MODULE Test;
  25748. VAR integer: INTEGER; increment: BOOLEAN;
  25749. BEGIN INC (integer, increment);
  25750. END Test.
  25751. negative: increment statement with character as increment
  25752. MODULE Test;
  25753. VAR integer: INTEGER; increment: CHAR;
  25754. BEGIN INC (integer, increment);
  25755. END Test.
  25756. positive: increment statement on short integer with short integer as increment
  25757. MODULE Test;
  25758. VAR integer, increment: SHORTINT;
  25759. BEGIN INC (integer, increment);
  25760. END Test.
  25761. negative: increment statement on short integer with integer as increment
  25762. MODULE Test;
  25763. VAR integer: SHORTINT; increment: INTEGER;
  25764. BEGIN INC (integer, increment);
  25765. END Test.
  25766. negative: increment statement on short integer with long integer as increment
  25767. MODULE Test;
  25768. VAR integer: SHORTINT; increment: LONGINT;
  25769. BEGIN INC (integer, increment);
  25770. END Test.
  25771. negative: increment statement on short integer with huge integer as increment
  25772. MODULE Test;
  25773. VAR integer: SHORTINT; increment: HUGEINT;
  25774. BEGIN INC (integer, increment);
  25775. END Test.
  25776. positive: increment statement on integer with short integer as increment
  25777. MODULE Test;
  25778. VAR integer: INTEGER; increment: SHORTINT;
  25779. BEGIN INC (integer, increment);
  25780. END Test.
  25781. positive: increment statement on integer with integer as increment
  25782. MODULE Test;
  25783. VAR integer, increment: INTEGER;
  25784. BEGIN INC (integer, increment);
  25785. END Test.
  25786. negative: increment statement on integer with long integer as increment
  25787. MODULE Test;
  25788. VAR integer: INTEGER; increment: LONGINT;
  25789. BEGIN INC (integer, increment);
  25790. END Test.
  25791. negative: increment statement on integer with huge integer as increment
  25792. MODULE Test;
  25793. VAR integer: INTEGER; increment: HUGEINT;
  25794. BEGIN INC (integer, increment);
  25795. END Test.
  25796. positive: increment statement on long integer with short integer as increment
  25797. MODULE Test;
  25798. VAR integer: LONGINT; increment: SHORTINT;
  25799. BEGIN INC (integer, increment);
  25800. END Test.
  25801. positive: increment statement on long integer with integer as increment
  25802. MODULE Test;
  25803. VAR integer: LONGINT; increment: INTEGER;
  25804. BEGIN INC (integer, increment);
  25805. END Test.
  25806. positive: increment statement on long integer with long integer as increment
  25807. MODULE Test;
  25808. VAR integer, increment: LONGINT;
  25809. BEGIN INC (integer, increment);
  25810. END Test.
  25811. negative: increment statement on long integer with huge integer as increment
  25812. MODULE Test;
  25813. VAR integer: LONGINT; increment: HUGEINT;
  25814. BEGIN INC (integer, increment);
  25815. END Test.
  25816. positive: increment statement on huge integer with short integer as increment
  25817. MODULE Test;
  25818. VAR integer: HUGEINT; increment: SHORTINT;
  25819. BEGIN INC (integer, increment);
  25820. END Test.
  25821. positive: increment statement on huge integer with integer as increment
  25822. MODULE Test;
  25823. VAR integer: HUGEINT; increment: INTEGER;
  25824. BEGIN INC (integer, increment);
  25825. END Test.
  25826. positive: increment statement on huge integer with long integer as increment
  25827. MODULE Test;
  25828. VAR integer: HUGEINT; increment: LONGINT;
  25829. BEGIN INC (integer, increment);
  25830. END Test.
  25831. positive: increment statement on huge integer with huge integer as increment
  25832. MODULE Test;
  25833. VAR integer, increment: HUGEINT;
  25834. BEGIN INC (integer, increment);
  25835. END Test.
  25836. positive: increment statement with integer parameter as increment
  25837. MODULE Test;
  25838. PROCEDURE Procedure (increment: INTEGER);
  25839. VAR integer: INTEGER;
  25840. BEGIN INC (integer, increment);
  25841. END Procedure;
  25842. END Test.
  25843. positive: increment statement with variable integer parameter as increment
  25844. MODULE Test;
  25845. PROCEDURE Procedure (VAR increment: INTEGER);
  25846. VAR integer: INTEGER;
  25847. BEGIN INC (integer, increment);
  25848. END Procedure;
  25849. END Test.
  25850. positive: increment statement with constant integer parameter as increment
  25851. MODULE Test;
  25852. PROCEDURE Procedure (CONST increment: INTEGER);
  25853. VAR integer: INTEGER;
  25854. BEGIN INC (integer, increment);
  25855. END Procedure;
  25856. END Test.
  25857. negative: increment statement with real as increment
  25858. MODULE Test;
  25859. VAR integer: INTEGER; increment: REAL;
  25860. BEGIN INC (integer, increment);
  25861. END Test.
  25862. negative: increment statement with set as increment
  25863. MODULE Test;
  25864. VAR integer: INTEGER; increment: SET;
  25865. BEGIN INC (integer, increment);
  25866. END Test.
  25867. negative: increment statement with array as increment
  25868. MODULE Test;
  25869. VAR integer: INTEGER; increment: ARRAY 10 OF CHAR;
  25870. BEGIN INC (integer, increment);
  25871. END Test.
  25872. negative: increment statement with record as increment
  25873. MODULE Test;
  25874. VAR integer: INTEGER; increment: RECORD END;
  25875. BEGIN INC (integer, increment);
  25876. END Test.
  25877. negative: increment statement with object as increment
  25878. MODULE Test;
  25879. VAR integer: INTEGER; increment: OBJECT END;
  25880. BEGIN INC (integer, increment);
  25881. END Test.
  25882. negative: increment statement with pointer to array as increment
  25883. MODULE Test;
  25884. VAR integer: INTEGER; increment: POINTER TO ARRAY 10 OF CHAR;
  25885. BEGIN INC (integer, increment);
  25886. END Test.
  25887. negative: increment statement with pointer to record as increment
  25888. MODULE Test;
  25889. VAR integer: INTEGER; increment: POINTER TO ARRAY 10 OF CHAR;
  25890. BEGIN INC (integer, increment);
  25891. END Test.
  25892. negative: increment statement with procedure as increment
  25893. MODULE Test;
  25894. VAR integer: INTEGER; increment: PROCEDURE;
  25895. BEGIN INC (integer, increment);
  25896. END Test.
  25897. # decrement statement
  25898. negative: decrement statement on constant boolean
  25899. MODULE Test;
  25900. CONST Constant = TRUE;
  25901. BEGIN DEC (Constant);
  25902. END Test.
  25903. negative: decrement statement on constant character
  25904. MODULE Test;
  25905. CONST Constant = 'a';
  25906. BEGIN DEC (Constant);
  25907. END Test.
  25908. negative: decrement statement on constant integer
  25909. MODULE Test;
  25910. CONST Constant = 42;
  25911. BEGIN DEC (Constant);
  25912. END Test.
  25913. negative: decrement statement on constant real
  25914. MODULE Test;
  25915. CONST Constant = 0.1;
  25916. BEGIN DEC (Constant);
  25917. END Test.
  25918. negative: decrement statement on constant set
  25919. MODULE Test;
  25920. CONST Constant = {};
  25921. BEGIN DEC (Constant);
  25922. END Test.
  25923. negative: decrement statement on constant string
  25924. MODULE Test;
  25925. CONST Constant = "string";
  25926. BEGIN DEC (Constant);
  25927. END Test.
  25928. negative: decrement statement on nil pointer
  25929. MODULE Test;
  25930. CONST Constant = NIL;
  25931. BEGIN DEC (Constant);
  25932. END Test.
  25933. negative: decrement statement on boolean
  25934. MODULE Test;
  25935. VAR boolean: BOOLEAN;
  25936. BEGIN DEC (boolean);
  25937. END Test.
  25938. negative: decrement statement on character
  25939. MODULE Test;
  25940. VAR character: CHAR;
  25941. BEGIN DEC (character);
  25942. END Test.
  25943. positive: decrement statement on short integer
  25944. MODULE Test;
  25945. VAR integer: SHORTINT;
  25946. BEGIN DEC (integer);
  25947. END Test.
  25948. positive: decrement statement on integer
  25949. MODULE Test;
  25950. VAR integer: INTEGER;
  25951. BEGIN DEC (integer);
  25952. END Test.
  25953. positive: decrement statement on long integer
  25954. MODULE Test;
  25955. VAR integer: LONGINT;
  25956. BEGIN DEC (integer);
  25957. END Test.
  25958. positive: decrement statement on huge integer
  25959. MODULE Test;
  25960. VAR integer: HUGEINT;
  25961. BEGIN DEC (integer);
  25962. END Test.
  25963. positive: decrement statement on integer parameter
  25964. MODULE Test;
  25965. PROCEDURE Procedure (integer: INTEGER);
  25966. BEGIN DEC (integer);
  25967. END Procedure;
  25968. END Test.
  25969. positive: decrement statement on variable integer parameter
  25970. MODULE Test;
  25971. PROCEDURE Procedure (VAR integer: INTEGER);
  25972. BEGIN DEC (integer);
  25973. END Procedure;
  25974. END Test.
  25975. negative: decrement statement on constant integer parameter
  25976. MODULE Test;
  25977. PROCEDURE Procedure (CONST integer: INTEGER);
  25978. BEGIN DEC (integer);
  25979. END Procedure;
  25980. END Test.
  25981. negative: decrement statement on real
  25982. MODULE Test;
  25983. VAR real: REAL;
  25984. BEGIN DEC (real);
  25985. END Test.
  25986. negative: decrement statement on set
  25987. MODULE Test;
  25988. VAR set: SET;
  25989. BEGIN DEC (set);
  25990. END Test.
  25991. negative: decrement statement on array
  25992. MODULE Test;
  25993. VAR array: ARRAY 10 OF CHAR;
  25994. BEGIN DEC (array);
  25995. END Test.
  25996. negative: decrement statement on record
  25997. MODULE Test;
  25998. VAR record: RECORD END;
  25999. BEGIN DEC (record);
  26000. END Test.
  26001. negative: decrement statement on object
  26002. MODULE Test;
  26003. VAR object: OBJECT END;
  26004. BEGIN DEC (object);
  26005. END Test.
  26006. negative: decrement statement on pointer to array
  26007. MODULE Test;
  26008. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26009. BEGIN DEC (pointer);
  26010. END Test.
  26011. negative: decrement statement on pointer to record
  26012. MODULE Test;
  26013. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26014. BEGIN DEC (pointer);
  26015. END Test.
  26016. negative: decrement statement on procedure
  26017. MODULE Test;
  26018. VAR procedure: PROCEDURE;
  26019. BEGIN DEC (procedure);
  26020. END Test.
  26021. negative: decrement statement with constant boolean as increment
  26022. MODULE Test;
  26023. CONST Constant = TRUE;
  26024. VAR integer: INTEGER;
  26025. BEGIN DEC (integer, Constant);
  26026. END Test.
  26027. negative: decrement statement with constant character as increment
  26028. MODULE Test;
  26029. CONST Constant = 'a';
  26030. VAR integer: INTEGER;
  26031. BEGIN DEC (integer, Constant);
  26032. END Test.
  26033. positive: decrement statement with constant integer as increment
  26034. MODULE Test;
  26035. CONST Constant = 42;
  26036. VAR integer: INTEGER;
  26037. BEGIN DEC (integer, Constant);
  26038. END Test.
  26039. positive: decrement statement with constant negative integer as increment
  26040. MODULE Test;
  26041. VAR integer: INTEGER;
  26042. BEGIN DEC (integer, -5);
  26043. END Test.
  26044. positive: decrement statement with zero as increment
  26045. MODULE Test;
  26046. VAR integer: INTEGER;
  26047. BEGIN DEC (integer, 0);
  26048. END Test.
  26049. positive: decrement statement with constant positive integer as increment
  26050. MODULE Test;
  26051. VAR integer: INTEGER;
  26052. BEGIN DEC (integer, 5);
  26053. END Test.
  26054. negative: decrement statement with constant real as increment
  26055. MODULE Test;
  26056. CONST Constant = 0.1;
  26057. VAR integer: INTEGER;
  26058. BEGIN DEC (integer, Constant);
  26059. END Test.
  26060. negative: decrement statement with constant set as increment
  26061. MODULE Test;
  26062. CONST Constant = {};
  26063. VAR integer: INTEGER;
  26064. BEGIN DEC (integer, Constant);
  26065. END Test.
  26066. negative: decrement statement with constant string as increment
  26067. MODULE Test;
  26068. CONST Constant = "string";
  26069. VAR integer: INTEGER;
  26070. BEGIN DEC (integer, Constant);
  26071. END Test.
  26072. negative: decrement statement with nil pointer as increment
  26073. MODULE Test;
  26074. CONST Constant = NIL;
  26075. VAR integer: INTEGER;
  26076. BEGIN DEC (integer, Constant);
  26077. END Test.
  26078. negative: decrement statement with boolean as increment
  26079. MODULE Test;
  26080. VAR integer: INTEGER; increment: BOOLEAN;
  26081. BEGIN DEC (integer, increment);
  26082. END Test.
  26083. negative: decrement statement with character as increment
  26084. MODULE Test;
  26085. VAR integer: INTEGER; increment: CHAR;
  26086. BEGIN DEC (integer, increment);
  26087. END Test.
  26088. positive: decrement statement on short integer with short integer as increment
  26089. MODULE Test;
  26090. VAR integer, increment: SHORTINT;
  26091. BEGIN DEC (integer, increment);
  26092. END Test.
  26093. negative: decrement statement on short integer with integer as increment
  26094. MODULE Test;
  26095. VAR integer: SHORTINT; increment: INTEGER;
  26096. BEGIN DEC (integer, increment);
  26097. END Test.
  26098. negative: decrement statement on short integer with long integer as increment
  26099. MODULE Test;
  26100. VAR integer: SHORTINT; increment: LONGINT;
  26101. BEGIN DEC (integer, increment);
  26102. END Test.
  26103. negative: decrement statement on short integer with huge integer as increment
  26104. MODULE Test;
  26105. VAR integer: SHORTINT; increment: HUGEINT;
  26106. BEGIN DEC (integer, increment);
  26107. END Test.
  26108. positive: decrement statement on integer with short integer as increment
  26109. MODULE Test;
  26110. VAR integer: INTEGER; increment: SHORTINT;
  26111. BEGIN DEC (integer, increment);
  26112. END Test.
  26113. positive: decrement statement on integer with integer as increment
  26114. MODULE Test;
  26115. VAR integer, increment: INTEGER;
  26116. BEGIN DEC (integer, increment);
  26117. END Test.
  26118. negative: decrement statement on integer with long integer as increment
  26119. MODULE Test;
  26120. VAR integer: INTEGER; increment: LONGINT;
  26121. BEGIN DEC (integer, increment);
  26122. END Test.
  26123. negative: decrement statement on integer with huge integer as increment
  26124. MODULE Test;
  26125. VAR integer: INTEGER; increment: HUGEINT;
  26126. BEGIN DEC (integer, increment);
  26127. END Test.
  26128. positive: decrement statement on long integer with short integer as increment
  26129. MODULE Test;
  26130. VAR integer: LONGINT; increment: SHORTINT;
  26131. BEGIN DEC (integer, increment);
  26132. END Test.
  26133. positive: decrement statement on long integer with integer as increment
  26134. MODULE Test;
  26135. VAR integer: LONGINT; increment: INTEGER;
  26136. BEGIN DEC (integer, increment);
  26137. END Test.
  26138. positive: decrement statement on long integer with long integer as increment
  26139. MODULE Test;
  26140. VAR integer, increment: LONGINT;
  26141. BEGIN DEC (integer, increment);
  26142. END Test.
  26143. negative: decrement statement on long integer with huge integer as increment
  26144. MODULE Test;
  26145. VAR integer: LONGINT; increment: HUGEINT;
  26146. BEGIN DEC (integer, increment);
  26147. END Test.
  26148. positive: decrement statement on huge integer with short integer as increment
  26149. MODULE Test;
  26150. VAR integer: HUGEINT; increment: SHORTINT;
  26151. BEGIN DEC (integer, increment);
  26152. END Test.
  26153. positive: decrement statement on huge integer with integer as increment
  26154. MODULE Test;
  26155. VAR integer: HUGEINT; increment: INTEGER;
  26156. BEGIN DEC (integer, increment);
  26157. END Test.
  26158. positive: decrement statement on huge integer with long integer as increment
  26159. MODULE Test;
  26160. VAR integer: HUGEINT; increment: LONGINT;
  26161. BEGIN DEC (integer, increment);
  26162. END Test.
  26163. positive: decrement statement on huge integer with huge integer as increment
  26164. MODULE Test;
  26165. VAR integer, increment: HUGEINT;
  26166. BEGIN DEC (integer, increment);
  26167. END Test.
  26168. positive: decrement statement with integer parameter as increment
  26169. MODULE Test;
  26170. PROCEDURE Procedure (increment: INTEGER);
  26171. VAR integer: INTEGER;
  26172. BEGIN DEC (integer, increment);
  26173. END Procedure;
  26174. END Test.
  26175. positive: decrement statement with variable integer parameter as increment
  26176. MODULE Test;
  26177. PROCEDURE Procedure (VAR increment: INTEGER);
  26178. VAR integer: INTEGER;
  26179. BEGIN DEC (integer, increment);
  26180. END Procedure;
  26181. END Test.
  26182. positive: decrement statement with constant integer parameter as increment
  26183. MODULE Test;
  26184. PROCEDURE Procedure (CONST increment: INTEGER);
  26185. VAR integer: INTEGER;
  26186. BEGIN DEC (integer, increment);
  26187. END Procedure;
  26188. END Test.
  26189. negative: decrement statement with real as increment
  26190. MODULE Test;
  26191. VAR integer: INTEGER; increment: REAL;
  26192. BEGIN DEC (integer, increment);
  26193. END Test.
  26194. negative: decrement statement with set as increment
  26195. MODULE Test;
  26196. VAR integer: INTEGER; increment: SET;
  26197. BEGIN DEC (integer, increment);
  26198. END Test.
  26199. negative: decrement statement with array as increment
  26200. MODULE Test;
  26201. VAR integer: INTEGER; increment: ARRAY 10 OF CHAR;
  26202. BEGIN DEC (integer, increment);
  26203. END Test.
  26204. negative: decrement statement with record as increment
  26205. MODULE Test;
  26206. VAR integer: INTEGER; increment: RECORD END;
  26207. BEGIN DEC (integer, increment);
  26208. END Test.
  26209. negative: decrement statement with object as increment
  26210. MODULE Test;
  26211. VAR integer: INTEGER; increment: OBJECT END;
  26212. BEGIN DEC (integer, increment);
  26213. END Test.
  26214. negative: decrement statement with pointer to array as increment
  26215. MODULE Test;
  26216. VAR integer: INTEGER; increment: POINTER TO ARRAY 10 OF CHAR;
  26217. BEGIN DEC (integer, increment);
  26218. END Test.
  26219. negative: decrement statement with pointer to record as increment
  26220. MODULE Test;
  26221. VAR integer: INTEGER; increment: POINTER TO ARRAY 10 OF CHAR;
  26222. BEGIN DEC (integer, increment);
  26223. END Test.
  26224. negative: decrement statement with procedure as increment
  26225. MODULE Test;
  26226. VAR integer: INTEGER; increment: PROCEDURE;
  26227. BEGIN DEC (integer, increment);
  26228. END Test.
  26229. # include statement
  26230. negative: include statement on constant boolean
  26231. MODULE Test;
  26232. CONST Constant = TRUE;
  26233. BEGIN INCL (Constant, 0);
  26234. END Test.
  26235. negative: include statement on constant character
  26236. MODULE Test;
  26237. CONST Constant = 'a';
  26238. BEGIN INCL (Constant, 0);
  26239. END Test.
  26240. negative: include statement on constant integer
  26241. MODULE Test;
  26242. CONST Constant = 42;
  26243. BEGIN INCL (Constant, 0);
  26244. END Test.
  26245. negative: include statement on constant real
  26246. MODULE Test;
  26247. CONST Constant = 0.1;
  26248. BEGIN INCL (Constant, 0);
  26249. END Test.
  26250. negative: include statement on constant set
  26251. MODULE Test;
  26252. CONST Constant = {};
  26253. BEGIN INCL (Constant, 0);
  26254. END Test.
  26255. negative: include statement on constant string
  26256. MODULE Test;
  26257. CONST Constant = "string";
  26258. BEGIN INCL (Constant, 0);
  26259. END Test.
  26260. negative: include statement on nil pointer
  26261. MODULE Test;
  26262. CONST Constant = NIL;
  26263. BEGIN INCL (Constant, 0);
  26264. END Test.
  26265. negative: include statement on boolean
  26266. MODULE Test;
  26267. VAR boolean: BOOLEAN;
  26268. BEGIN INCL (boolean, 0);
  26269. END Test.
  26270. negative: include statement on character
  26271. MODULE Test;
  26272. VAR character: CHAR;
  26273. BEGIN INCL (character, 0);
  26274. END Test.
  26275. negative: include statement on integer
  26276. MODULE Test;
  26277. VAR integer: INTEGER;
  26278. BEGIN INCL (integer, 0);
  26279. END Test.
  26280. negative: include statement on real
  26281. MODULE Test;
  26282. VAR real: REAL;
  26283. BEGIN INCL (real, 0);
  26284. END Test.
  26285. negative: include statement on set with constant boolean
  26286. MODULE Test;
  26287. VAR set: SET;
  26288. BEGIN INCL (set, TRUE);
  26289. END Test.
  26290. negative: include statement on set with constant character
  26291. MODULE Test;
  26292. VAR set: SET;
  26293. BEGIN INCL (set, 'f');
  26294. END Test.
  26295. positive: include statement on set with positive constant integer
  26296. MODULE Test;
  26297. VAR set: SET;
  26298. BEGIN INCL (set, 5);
  26299. END Test.
  26300. negative: include statement on set with constant integer exceeding valid range
  26301. MODULE Test;
  26302. VAR set: SET;
  26303. BEGIN INCL (set, 5654);
  26304. END Test.
  26305. positive: include statement on set with zero
  26306. MODULE Test;
  26307. VAR set: SET;
  26308. BEGIN INCL (set, 0);
  26309. END Test.
  26310. negative: include statement on set with negative constant integer
  26311. MODULE Test;
  26312. VAR set: SET;
  26313. BEGIN INCL (set, -5);
  26314. END Test.
  26315. positive: include statement on set parameter
  26316. MODULE Test;
  26317. PROCEDURE Procedure (set: SET);
  26318. BEGIN INCL (set, 0);
  26319. END Procedure;
  26320. END Test.
  26321. positive: include statement on variable set parameter
  26322. MODULE Test;
  26323. PROCEDURE Procedure (VAR set: SET);
  26324. BEGIN INCL (set, 0);
  26325. END Procedure;
  26326. END Test.
  26327. negative: include statement on constant set parameter
  26328. MODULE Test;
  26329. PROCEDURE Procedure (CONST set: SET);
  26330. BEGIN INCL (set, 0);
  26331. END Procedure;
  26332. END Test.
  26333. positive: include statement on set with integer parameter
  26334. MODULE Test;
  26335. PROCEDURE Procedure (integer: INTEGER);
  26336. VAR set: SET;
  26337. BEGIN INCL (set, integer);
  26338. END Procedure;
  26339. END Test.
  26340. positive: include statement on set with variable integer parameter
  26341. MODULE Test;
  26342. PROCEDURE Procedure (VAR integer: INTEGER);
  26343. VAR set: SET;
  26344. BEGIN INCL (set, integer);
  26345. END Procedure;
  26346. END Test.
  26347. positive: include statement on set with constant integer parameter
  26348. MODULE Test;
  26349. PROCEDURE Procedure (CONST integer: INTEGER);
  26350. VAR set: SET;
  26351. BEGIN INCL (set, integer);
  26352. END Procedure;
  26353. END Test.
  26354. negative: include statement on set with constant real
  26355. MODULE Test;
  26356. VAR set: SET;
  26357. BEGIN INCL (set, 0.0);
  26358. END Test.
  26359. negative: include statement on set with constant set
  26360. MODULE Test;
  26361. VAR set: SET;
  26362. BEGIN INCL (set, {});
  26363. END Test.
  26364. negative: include statement on set with constant string
  26365. MODULE Test;
  26366. VAR set: SET;
  26367. BEGIN INCL (set, "element");
  26368. END Test.
  26369. negative: include statement on set with nil pointer
  26370. MODULE Test;
  26371. VAR set: SET;
  26372. BEGIN INCL (set, NIL);
  26373. END Test.
  26374. negative: include statement on set with boolean
  26375. MODULE Test;
  26376. VAR set: SET; boolean: BOOLEAN;
  26377. BEGIN INCL (set, boolean);
  26378. END Test.
  26379. negative: include statement on set with character
  26380. MODULE Test;
  26381. VAR set: SET; character: CHAR;
  26382. BEGIN INCL (set, character);
  26383. END Test.
  26384. positive: include statement on set with short integer
  26385. MODULE Test;
  26386. VAR set: SET; integer: SHORTINT;
  26387. BEGIN INCL (set, integer);
  26388. END Test.
  26389. positive: include statement on set with integer
  26390. MODULE Test;
  26391. VAR set: SET; integer: INTEGER;
  26392. BEGIN INCL (set, integer);
  26393. END Test.
  26394. positive: include statement on set with long integer
  26395. MODULE Test;
  26396. VAR set: SET; integer: LONGINT;
  26397. BEGIN INCL (set, integer);
  26398. END Test.
  26399. positive: include statement on set with huge integer
  26400. MODULE Test;
  26401. VAR set: SET; integer: HUGEINT;
  26402. BEGIN INCL (set, integer);
  26403. END Test.
  26404. negative: include statement on set with real
  26405. MODULE Test;
  26406. VAR set: SET; real: REAL;
  26407. BEGIN INCL (set, real);
  26408. END Test.
  26409. negative: include statement on array
  26410. MODULE Test;
  26411. VAR array: ARRAY 10 OF CHAR;
  26412. BEGIN INCL (array, 0);
  26413. END Test.
  26414. negative: include statement on record
  26415. MODULE Test;
  26416. VAR record: RECORD END;
  26417. BEGIN INCL (record, 0);
  26418. END Test.
  26419. negative: include statement on object
  26420. MODULE Test;
  26421. VAR object: OBJECT END;
  26422. BEGIN INCL (object, 0);
  26423. END Test.
  26424. negative: include statement on pointer to array
  26425. MODULE Test;
  26426. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26427. BEGIN INCL (pointer, 0);
  26428. END Test.
  26429. negative: include statement on pointer to record
  26430. MODULE Test;
  26431. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26432. BEGIN INCL (pointer, 0);
  26433. END Test.
  26434. negative: include statement on procedure
  26435. MODULE Test;
  26436. VAR procedure: PROCEDURE;
  26437. BEGIN INCL (procedure, 0);
  26438. END Test.
  26439. # exclude statement
  26440. negative: exclude statement on constant boolean
  26441. MODULE Test;
  26442. CONST Constant = TRUE;
  26443. BEGIN EXCL (Constant, 0);
  26444. END Test.
  26445. negative: exclude statement on constant character
  26446. MODULE Test;
  26447. CONST Constant = 'a';
  26448. BEGIN EXCL (Constant, 0);
  26449. END Test.
  26450. negative: exclude statement on constant integer
  26451. MODULE Test;
  26452. CONST Constant = 42;
  26453. BEGIN EXCL (Constant, 0);
  26454. END Test.
  26455. negative: exclude statement on constant real
  26456. MODULE Test;
  26457. CONST Constant = 0.1;
  26458. BEGIN EXCL (Constant, 0);
  26459. END Test.
  26460. negative: exclude statement on constant set
  26461. MODULE Test;
  26462. CONST Constant = {};
  26463. BEGIN EXCL (Constant, 0);
  26464. END Test.
  26465. negative: exclude statement on constant string
  26466. MODULE Test;
  26467. CONST Constant = "string";
  26468. BEGIN EXCL (Constant, 0);
  26469. END Test.
  26470. negative: exclude statement on nil pointer
  26471. MODULE Test;
  26472. CONST Constant = NIL;
  26473. BEGIN EXCL (Constant, 0);
  26474. END Test.
  26475. negative: exclude statement on boolean
  26476. MODULE Test;
  26477. VAR boolean: BOOLEAN;
  26478. BEGIN EXCL (boolean, 0);
  26479. END Test.
  26480. negative: exclude statement on character
  26481. MODULE Test;
  26482. VAR character: CHAR;
  26483. BEGIN EXCL (character, 0);
  26484. END Test.
  26485. negative: exclude statement on integer
  26486. MODULE Test;
  26487. VAR integer: INTEGER;
  26488. BEGIN EXCL (integer, 0);
  26489. END Test.
  26490. negative: exclude statement on real
  26491. MODULE Test;
  26492. VAR real: REAL;
  26493. BEGIN EXCL (real, 0);
  26494. END Test.
  26495. negative: exclude statement on set with constant boolean
  26496. MODULE Test;
  26497. VAR set: SET;
  26498. BEGIN EXCL (set, TRUE);
  26499. END Test.
  26500. negative: exclude statement on set with constant character
  26501. MODULE Test;
  26502. VAR set: SET;
  26503. BEGIN EXCL (set, 'f');
  26504. END Test.
  26505. positive: exclude statement on set with positive constant integer
  26506. MODULE Test;
  26507. VAR set: SET;
  26508. BEGIN EXCL (set, 5);
  26509. END Test.
  26510. negative: exclude statement on set with constant integer exceeding valid range
  26511. MODULE Test;
  26512. VAR set: SET;
  26513. BEGIN EXCL (set, 5654);
  26514. END Test.
  26515. positive: exclude statement on set with zero
  26516. MODULE Test;
  26517. VAR set: SET;
  26518. BEGIN EXCL (set, 0);
  26519. END Test.
  26520. negative: exclude statement on set with negative constant integer
  26521. MODULE Test;
  26522. VAR set: SET;
  26523. BEGIN EXCL (set, -5);
  26524. END Test.
  26525. positive: exclude statement on set parameter
  26526. MODULE Test;
  26527. PROCEDURE Procedure (set: SET);
  26528. BEGIN EXCL (set, 0);
  26529. END Procedure;
  26530. END Test.
  26531. positive: exclude statement on variable set parameter
  26532. MODULE Test;
  26533. PROCEDURE Procedure (VAR set: SET);
  26534. BEGIN EXCL (set, 0);
  26535. END Procedure;
  26536. END Test.
  26537. negative: exclude statement on constant set parameter
  26538. MODULE Test;
  26539. PROCEDURE Procedure (CONST set: SET);
  26540. BEGIN EXCL (set, 0);
  26541. END Procedure;
  26542. END Test.
  26543. positive: exclude statement on set with integer parameter
  26544. MODULE Test;
  26545. PROCEDURE Procedure (integer: INTEGER);
  26546. VAR set: SET;
  26547. BEGIN EXCL (set, integer);
  26548. END Procedure;
  26549. END Test.
  26550. positive: exclude statement on set with variable integer parameter
  26551. MODULE Test;
  26552. PROCEDURE Procedure (VAR integer: INTEGER);
  26553. VAR set: SET;
  26554. BEGIN EXCL (set, integer);
  26555. END Procedure;
  26556. END Test.
  26557. positive: exclude statement on set with constant integer parameter
  26558. MODULE Test;
  26559. PROCEDURE Procedure (CONST integer: INTEGER);
  26560. VAR set: SET;
  26561. BEGIN EXCL (set, integer);
  26562. END Procedure;
  26563. END Test.
  26564. negative: exclude statement on set with constant real
  26565. MODULE Test;
  26566. VAR set: SET;
  26567. BEGIN EXCL (set, 0.0);
  26568. END Test.
  26569. negative: exclude statement on set with constant set
  26570. MODULE Test;
  26571. VAR set: SET;
  26572. BEGIN EXCL (set, {});
  26573. END Test.
  26574. negative: exclude statement on set with constant string
  26575. MODULE Test;
  26576. VAR set: SET;
  26577. BEGIN EXCL (set, "element");
  26578. END Test.
  26579. negative: exclude statement on set with nil pointer
  26580. MODULE Test;
  26581. VAR set: SET;
  26582. BEGIN EXCL (set, NIL);
  26583. END Test.
  26584. negative: exclude statement on set with boolean
  26585. MODULE Test;
  26586. VAR set: SET; boolean: BOOLEAN;
  26587. BEGIN EXCL (set, boolean);
  26588. END Test.
  26589. negative: exclude statement on set with character
  26590. MODULE Test;
  26591. VAR set: SET; character: CHAR;
  26592. BEGIN EXCL (set, character);
  26593. END Test.
  26594. positive: exclude statement on set with short integer
  26595. MODULE Test;
  26596. VAR set: SET; integer: SHORTINT;
  26597. BEGIN EXCL (set, integer);
  26598. END Test.
  26599. positive: exclude statement on set with integer
  26600. MODULE Test;
  26601. VAR set: SET; integer: INTEGER;
  26602. BEGIN EXCL (set, integer);
  26603. END Test.
  26604. positive: exclude statement on set with long integer
  26605. MODULE Test;
  26606. VAR set: SET; integer: LONGINT;
  26607. BEGIN EXCL (set, integer);
  26608. END Test.
  26609. positive: exclude statement on set with huge integer
  26610. MODULE Test;
  26611. VAR set: SET; integer: HUGEINT;
  26612. BEGIN EXCL (set, integer);
  26613. END Test.
  26614. negative: exclude statement on set with real
  26615. MODULE Test;
  26616. VAR set: SET; real: REAL;
  26617. BEGIN EXCL (set, real);
  26618. END Test.
  26619. negative: exclude statement on array
  26620. MODULE Test;
  26621. VAR array: ARRAY 10 OF CHAR;
  26622. BEGIN EXCL (array, 0);
  26623. END Test.
  26624. negative: exclude statement on record
  26625. MODULE Test;
  26626. VAR record: RECORD END;
  26627. BEGIN EXCL (record, 0);
  26628. END Test.
  26629. negative: exclude statement on object
  26630. MODULE Test;
  26631. VAR object: OBJECT END;
  26632. BEGIN EXCL (object, 0);
  26633. END Test.
  26634. negative: exclude statement on pointer to array
  26635. MODULE Test;
  26636. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26637. BEGIN EXCL (pointer, 0);
  26638. END Test.
  26639. negative: exclude statement on pointer to record
  26640. MODULE Test;
  26641. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26642. BEGIN EXCL (pointer, 0);
  26643. END Test.
  26644. negative: exclude statement on procedure
  26645. MODULE Test;
  26646. VAR procedure: PROCEDURE;
  26647. BEGIN EXCL (procedure, 0);
  26648. END Test.
  26649. # copy statement
  26650. negative: copy statement on boolean
  26651. MODULE Test;
  26652. VAR source, dest: BOOLEAN;
  26653. BEGIN COPY (source, dest);
  26654. END Test.
  26655. negative: copy statement on character
  26656. MODULE Test;
  26657. VAR source, dest: CHAR;
  26658. BEGIN COPY (source, dest);
  26659. END Test.
  26660. negative: copy statement on integer
  26661. MODULE Test;
  26662. VAR source, dest: INTEGER;
  26663. BEGIN COPY (source, dest);
  26664. END Test.
  26665. negative: copy statement on real
  26666. MODULE Test;
  26667. VAR source, dest: REAL;
  26668. BEGIN COPY (source, dest);
  26669. END Test.
  26670. negative: copy statement on set
  26671. MODULE Test;
  26672. VAR source, dest: SET;
  26673. BEGIN COPY (source, dest);
  26674. END Test.
  26675. negative: copy statement on array of boolean
  26676. MODULE Test;
  26677. VAR source, dest: ARRAY 10 OF BOOLEAN;
  26678. BEGIN COPY (source, dest);
  26679. END Test.
  26680. positive: copy statement on array of character
  26681. MODULE Test;
  26682. VAR source, dest: ARRAY 10 OF CHAR;
  26683. BEGIN COPY (source, dest);
  26684. END Test.
  26685. positive: copy statement on array of character and longer array of character
  26686. MODULE Test;
  26687. VAR source: ARRAY 10 OF CHAR; dest: ARRAY 20 OF CHAR;
  26688. BEGIN COPY (source, dest);
  26689. END Test.
  26690. positive: copy statement on array of character and shorter array of character
  26691. MODULE Test;
  26692. VAR source: ARRAY 20 OF CHAR; dest: ARRAY 10 OF CHAR;
  26693. BEGIN source[9] := 0X; COPY (source, dest);
  26694. END Test.
  26695. positive: copy statement on string and longer array of character
  26696. MODULE Test;
  26697. CONST Source = "source";
  26698. VAR dest: ARRAY 10 OF CHAR;
  26699. BEGIN COPY (Source, dest);
  26700. END Test.
  26701. negative: copy statement on string and shorter array of character
  26702. MODULE Test;
  26703. CONST Source = "longer source";
  26704. VAR dest: ARRAY 10 OF CHAR;
  26705. BEGIN COPY (Source, dest);
  26706. END Test.
  26707. negative: copy statement on array of character and string
  26708. MODULE Test;
  26709. CONST Dest = "dest";
  26710. VAR source: ARRAY 10 OF CHAR;
  26711. BEGIN COPY (source, Dest);
  26712. END Test.
  26713. positive: copy statement with array of character parameter as source
  26714. MODULE Test;
  26715. PROCEDURE Procedure (source: ARRAY 10 OF CHAR);
  26716. VAR dest: ARRAY 10 OF CHAR;
  26717. BEGIN COPY (source, dest);
  26718. END Procedure;
  26719. END Test.
  26720. positive: copy statement with variable array of character parameter as source
  26721. MODULE Test;
  26722. PROCEDURE Procedure (VAR source: ARRAY 10 OF CHAR);
  26723. VAR dest: ARRAY 10 OF CHAR;
  26724. BEGIN COPY (source, dest);
  26725. END Procedure;
  26726. END Test.
  26727. positive: copy statement with constant array of character parameter as source
  26728. MODULE Test;
  26729. PROCEDURE Procedure (CONST source: ARRAY 10 OF CHAR);
  26730. VAR dest: ARRAY 10 OF CHAR;
  26731. BEGIN COPY (source, dest);
  26732. END Procedure;
  26733. END Test.
  26734. positive: copy statement with open array of character parameter as source
  26735. MODULE Test;
  26736. PROCEDURE Procedure (source: ARRAY OF CHAR);
  26737. VAR dest: ARRAY 10 OF CHAR;
  26738. BEGIN COPY (source, dest);
  26739. END Procedure;
  26740. END Test.
  26741. positive: copy statement with open variable array of character parameter as source
  26742. MODULE Test;
  26743. PROCEDURE Procedure (VAR source: ARRAY OF CHAR);
  26744. VAR dest: ARRAY 10 OF CHAR;
  26745. BEGIN COPY (source, dest);
  26746. END Procedure;
  26747. END Test.
  26748. positive: copy statement with open constant array of character parameter as source
  26749. MODULE Test;
  26750. PROCEDURE Procedure (CONST source: ARRAY OF CHAR);
  26751. VAR dest: ARRAY 10 OF CHAR;
  26752. BEGIN COPY (source, dest);
  26753. END Procedure;
  26754. END Test.
  26755. positive: copy statement with array of character parameter as destination
  26756. MODULE Test;
  26757. PROCEDURE Procedure (dest: ARRAY 10 OF CHAR);
  26758. VAR source: ARRAY 10 OF CHAR;
  26759. BEGIN COPY (source, dest);
  26760. END Procedure;
  26761. END Test.
  26762. positive: copy statement with variable array of character parameter as destination
  26763. MODULE Test;
  26764. PROCEDURE Procedure (VAR dest: ARRAY 10 OF CHAR);
  26765. VAR source: ARRAY 10 OF CHAR;
  26766. BEGIN COPY (source, dest);
  26767. END Procedure;
  26768. END Test.
  26769. negative: copy statement with constant array of character parameter as destination
  26770. MODULE Test;
  26771. PROCEDURE Procedure (CONST dest: ARRAY 10 OF CHAR);
  26772. VAR source: ARRAY 10 OF CHAR;
  26773. BEGIN COPY (source, dest);
  26774. END Procedure;
  26775. END Test.
  26776. positive: copy statement with open array of character parameter as destination
  26777. MODULE Test;
  26778. PROCEDURE Procedure (dest: ARRAY OF CHAR);
  26779. VAR source: ARRAY 10 OF CHAR;
  26780. BEGIN COPY (source, dest);
  26781. END Procedure;
  26782. END Test.
  26783. positive: copy statement with open variable array of character parameter as destination
  26784. MODULE Test;
  26785. PROCEDURE Procedure (VAR dest: ARRAY OF CHAR);
  26786. VAR source: ARRAY 10 OF CHAR;
  26787. BEGIN COPY (source, dest);
  26788. END Procedure;
  26789. END Test.
  26790. negative: copy statement with open constant array of character parameter as destination
  26791. MODULE Test;
  26792. PROCEDURE Procedure (CONST dest: ARRAY OF CHAR);
  26793. VAR source: ARRAY 10 OF CHAR;
  26794. BEGIN COPY (source, dest);
  26795. END Procedure;
  26796. END Test.
  26797. positive: copy statement with string as source and array of character parameter as destination
  26798. MODULE Test;
  26799. PROCEDURE Procedure (dest: ARRAY 10 OF CHAR);
  26800. BEGIN COPY ("source", dest);
  26801. END Procedure;
  26802. END Test.
  26803. positive: copy statement with string as source and variable array of character parameter as destination
  26804. MODULE Test;
  26805. PROCEDURE Procedure (VAR dest: ARRAY 10 OF CHAR);
  26806. BEGIN COPY ("source", dest);
  26807. END Procedure;
  26808. END Test.
  26809. negative: copy statement with string as source and constant array of character parameter as destination
  26810. MODULE Test;
  26811. PROCEDURE Procedure (CONST dest: ARRAY 10 OF CHAR);
  26812. BEGIN COPY ("source", dest);
  26813. END Procedure;
  26814. END Test.
  26815. positive: copy statement with string as source and open array of character parameter as destination
  26816. MODULE Test;
  26817. PROCEDURE Procedure (dest: ARRAY OF CHAR);
  26818. BEGIN COPY ("source", dest);
  26819. END Procedure;
  26820. END Test.
  26821. positive: copy statement with string as source and open variable array of character parameter as destination
  26822. MODULE Test;
  26823. PROCEDURE Procedure (VAR dest: ARRAY OF CHAR);
  26824. BEGIN COPY ("source", dest);
  26825. END Procedure;
  26826. END Test.
  26827. negative: copy statement with string as source and open constant array of character parameter as destination
  26828. MODULE Test;
  26829. PROCEDURE Procedure (CONST dest: ARRAY OF CHAR);
  26830. BEGIN COPY ("source", dest);
  26831. END Procedure;
  26832. END Test.
  26833. negative: copy statement on array of integer
  26834. MODULE Test;
  26835. VAR source, dest: ARRAY 10 OF INTEGER;
  26836. BEGIN COPY (source, dest);
  26837. END Test.
  26838. negative: copy statement on array of real
  26839. MODULE Test;
  26840. VAR source, dest: ARRAY 10 OF REAL;
  26841. BEGIN COPY (source, dest);
  26842. END Test.
  26843. negative: copy statement on array of set
  26844. MODULE Test;
  26845. VAR source, dest: ARRAY 10 OF SET;
  26846. BEGIN COPY (source, dest);
  26847. END Test.
  26848. negative: copy statement on array of record
  26849. MODULE Test;
  26850. VAR source, dest: ARRAY 10 OF RECORD END;
  26851. BEGIN COPY (source, dest);
  26852. END Test.
  26853. negative: copy statement on array of object
  26854. MODULE Test;
  26855. VAR source, dest: ARRAY 10 OF OBJECT END;
  26856. BEGIN COPY (source, dest);
  26857. END Test.
  26858. negative: copy statement on array of base object
  26859. MODULE Test;
  26860. VAR source, dest: ARRAY 10 OF OBJECT;
  26861. BEGIN COPY (source, dest);
  26862. END Test.
  26863. negative: copy statement on array of pointer to array
  26864. MODULE Test;
  26865. VAR source, dest: ARRAY 10 OF POINTER TO ARRAY OF CHAR;
  26866. BEGIN COPY (source, dest);
  26867. END Test.
  26868. negative: copy statement on array of pointer to record
  26869. MODULE Test;
  26870. VAR source, dest: ARRAY 10 OF POINTER TO RECORD END;
  26871. BEGIN COPY (source, dest);
  26872. END Test.
  26873. negative: copy statement on array of procedure
  26874. MODULE Test;
  26875. VAR source, dest: ARRAY 10 OF PROCEDURE;
  26876. BEGIN COPY (source, dest);
  26877. END Test.
  26878. negative: copy statement on record
  26879. MODULE Test;
  26880. VAR source, dest: RECORD END;
  26881. BEGIN COPY (source, dest);
  26882. END Test.
  26883. negative: copy statement on object
  26884. MODULE Test;
  26885. VAR source, dest: OBJECT END;
  26886. BEGIN COPY (source, dest);
  26887. END Test.
  26888. negative: copy statement on base object
  26889. MODULE Test;
  26890. VAR source, dest: OBJECT;
  26891. BEGIN COPY (source, dest);
  26892. END Test.
  26893. negative: copy statement on pointer to array
  26894. MODULE Test;
  26895. VAR source, dest: POINTER TO ARRAY 10 OF CHAR;
  26896. BEGIN COPY (source, dest);
  26897. END Test.
  26898. negative: copy statement on pointer to record
  26899. MODULE Test;
  26900. VAR source, dest: POINTER TO RECORD END;
  26901. BEGIN COPY (source, dest);
  26902. END Test.
  26903. negative: copy statement on procedure
  26904. MODULE Test;
  26905. VAR source, dest: PROCEDURE;
  26906. BEGIN COPY (source, dest);
  26907. END Test.
  26908. # overriding object procedures
  26909. positive: overriding same object procedure
  26910. MODULE Test;
  26911. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26912. TYPE B = OBJECT (A) PROCEDURE P; END P; END B;
  26913. END Test.
  26914. positive: deep overriding same object procedure
  26915. MODULE Test;
  26916. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26917. TYPE B = OBJECT (A) END B;
  26918. TYPE C = OBJECT (D) PROCEDURE P; END P; END C;
  26919. TYPE D = OBJECT (B) END D;
  26920. END Test.
  26921. negative: deep overriding same object procedure with different return type
  26922. MODULE Test;
  26923. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26924. TYPE B = OBJECT (A) END B;
  26925. TYPE C = OBJECT (D) PROCEDURE P (): A; END P; END C;
  26926. TYPE D = OBJECT (B) END D;
  26927. END Test.
  26928. positive: deep overriding same object procedure with same symbol in-between
  26929. MODULE Test;
  26930. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26931. TYPE B = OBJECT (A) VAR P: A END B;
  26932. TYPE C = OBJECT (D) PROCEDURE P; END P; END C;
  26933. TYPE D = OBJECT (B) END D;
  26934. END Test.
  26935. negative: deep overriding same object procedure with different return type and same symbol in-between
  26936. MODULE Test;
  26937. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26938. TYPE B = OBJECT (A) VAR P: A END B;
  26939. TYPE C = OBJECT (D) PROCEDURE P (): A; END P; END C;
  26940. TYPE D = OBJECT (B) END D;
  26941. END Test.
  26942. negative: overriding same object procedure with one parameter
  26943. MODULE Test;
  26944. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26945. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26946. END Test.
  26947. negative: overriding same object procedure with no parameter
  26948. MODULE Test;
  26949. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26950. TYPE B = OBJECT (A) PROCEDURE P; END P; END B;
  26951. END Test.
  26952. positive: overriding same object procedure with parameter
  26953. MODULE Test;
  26954. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26955. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26956. END Test.
  26957. negative: overriding same object procedure with var parameter
  26958. MODULE Test;
  26959. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26960. TYPE B = OBJECT (A) PROCEDURE P (VAR p: A); END P; END B;
  26961. END Test.
  26962. negative: overriding same object procedure with const parameter
  26963. MODULE Test;
  26964. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26965. TYPE B = OBJECT (A) PROCEDURE P (CONST p: A); END P; END B;
  26966. END Test.
  26967. negative: overriding same object procedure with var parameter with parameter
  26968. MODULE Test;
  26969. TYPE A = OBJECT PROCEDURE P (VAR p: A); END P; END A;
  26970. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26971. END Test.
  26972. positive: overriding same object procedure with var parameter with var parameter
  26973. MODULE Test;
  26974. TYPE A = OBJECT PROCEDURE P (VAR p: A); END P; END A;
  26975. TYPE B = OBJECT (A) PROCEDURE P (VAR p: A); END P; END B;
  26976. END Test.
  26977. negative: overriding same object procedure with var parameter with const parameter
  26978. MODULE Test;
  26979. TYPE A = OBJECT PROCEDURE P (VAR p: A); END P; END A;
  26980. TYPE B = OBJECT (A) PROCEDURE P (CONST p: A); END P; END B;
  26981. END Test.
  26982. negative: overriding same object procedure with const parameter with parameter
  26983. MODULE Test;
  26984. TYPE A = OBJECT PROCEDURE P (CONST p: A); END P; END A;
  26985. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26986. END Test.
  26987. negative: overriding same object procedure with const parameter with var parameter
  26988. MODULE Test;
  26989. TYPE A = OBJECT PROCEDURE P (CONST p: A); END P; END A;
  26990. TYPE B = OBJECT (A) PROCEDURE P (VAR p: A); END P; END B;
  26991. END Test.
  26992. positive: overriding same object procedure with const parameter with const parameter
  26993. MODULE Test;
  26994. TYPE A = OBJECT PROCEDURE P (CONST p: A); END P; END A;
  26995. TYPE B = OBJECT (A) PROCEDURE P (CONST p: A); END P; END B;
  26996. END Test.
  26997. positive: overriding same object procedure with same parameter type
  26998. MODULE Test;
  26999. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  27000. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  27001. END Test.
  27002. negative: overriding same object procedure with covariant parameter type
  27003. MODULE Test;
  27004. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  27005. TYPE B = OBJECT (A) PROCEDURE P (p: B); END P; END B;
  27006. END Test.
  27007. negative: overriding same object procedure with contravariant parameter type
  27008. MODULE Test;
  27009. TYPE A = OBJECT PROCEDURE P (p: B); END P; END A;
  27010. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  27011. END Test.
  27012. negative: overriding same object procedure with different parameter type
  27013. MODULE Test;
  27014. TYPE A = OBJECT PROCEDURE P (p: SET); END P; END A;
  27015. TYPE B = OBJECT (A) PROCEDURE P (p: CHAR); END P; END B;
  27016. END Test.
  27017. positive: overriding object procedure with same return type
  27018. MODULE Test;
  27019. TYPE A = OBJECT PROCEDURE P(): A; END P; END A;
  27020. TYPE B = OBJECT (A) PROCEDURE P(): A; END P; END B;
  27021. END Test.
  27022. negative: overriding object procedure with covariant return type
  27023. MODULE Test;
  27024. TYPE A = OBJECT PROCEDURE P(): A; END P; END A;
  27025. TYPE B = OBJECT (A) PROCEDURE P(): B; END P; END B;
  27026. END Test.
  27027. negative: overriding object procedure with contravariant return type
  27028. MODULE Test;
  27029. TYPE A = OBJECT PROCEDURE P(): B; END P; END A;
  27030. TYPE B = OBJECT (A) PROCEDURE P(): A; END P; END B;
  27031. END Test.
  27032. negative: overriding object procedure with different return type
  27033. MODULE Test;
  27034. TYPE A = OBJECT PROCEDURE P(): SET; END P; END A;
  27035. TYPE B = OBJECT (A) PROCEDURE P(): CHAR; END P; END B;
  27036. END Test.
  27037. negative: super call on procedure variable in module
  27038. MODULE Test;
  27039. VAR procedure: PROCEDURE;
  27040. BEGIN procedure^
  27041. END Test.
  27042. negative: super call on procedure variable in procedure
  27043. MODULE Test;
  27044. PROCEDURE Procedure;
  27045. VAR procedure: PROCEDURE;
  27046. BEGIN procedure^
  27047. END Procedure;
  27048. END Test.
  27049. negative: super call on procedure variable in object
  27050. MODULE Test;
  27051. TYPE Object = OBJECT
  27052. VAR procedure: PROCEDURE;
  27053. BEGIN procedure^
  27054. END Object;
  27055. END Test.
  27056. negative: super call on hidden procedure variable in object
  27057. MODULE Test;
  27058. TYPE Base = OBJECT
  27059. VAR procedure: PROCEDURE;
  27060. END Base;
  27061. TYPE Derived = OBJECT (Base)
  27062. BEGIN procedure^
  27063. END Derived;
  27064. END Test.
  27065. negative: super call on hiding procedure variable in object
  27066. MODULE Test;
  27067. TYPE Base = OBJECT
  27068. VAR procedure: PROCEDURE;
  27069. END Base;
  27070. TYPE Derived = OBJECT (Base)
  27071. VAR procedure: PROCEDURE;
  27072. BEGIN procedure^
  27073. END Derived;
  27074. END Test.
  27075. negative: super call to procedure in module
  27076. MODULE Test;
  27077. PROCEDURE Procedure; END Procedure;
  27078. BEGIN Procedure^
  27079. END Test.
  27080. negative: super call to procedure in procedure
  27081. MODULE Test;
  27082. PROCEDURE Procedure;
  27083. PROCEDURE Procedure; END Procedure;
  27084. BEGIN Procedure^
  27085. END Procedure;
  27086. END Test.
  27087. negative: super call to non-overriding procedure in object
  27088. MODULE Test;
  27089. TYPE Object = OBJECT
  27090. PROCEDURE Procedure; END Procedure;
  27091. BEGIN Procedure^
  27092. END Object;
  27093. END Test.
  27094. negative: super call to non-overridden procedure in object
  27095. MODULE Test;
  27096. TYPE Base = OBJECT
  27097. PROCEDURE Procedure; END Procedure;
  27098. END Base;
  27099. TYPE Derived = OBJECT (Base)
  27100. BEGIN Procedure^
  27101. END Derived;
  27102. END Test.
  27103. positive: super call to overridden procedure in object
  27104. MODULE Test;
  27105. TYPE Base = OBJECT
  27106. PROCEDURE Procedure; END Procedure;
  27107. END Base;
  27108. TYPE Derived = OBJECT (Base)
  27109. PROCEDURE Procedure; END Procedure;
  27110. BEGIN Procedure^
  27111. END Derived;
  27112. END Test.
  27113. negative: qualified super call to overridden but non-overriding procedure in object
  27114. MODULE Test;
  27115. TYPE A = OBJECT
  27116. PROCEDURE Procedure; END Procedure;
  27117. END A;
  27118. TYPE B = OBJECT (A)
  27119. PROCEDURE Procedure; END Procedure;
  27120. END B;
  27121. TYPE C = OBJECT (B)
  27122. BEGIN SELF.Procedure^
  27123. END C;
  27124. END Test.
  27125. negative: qualified super call on reference to overridden procedure in object
  27126. MODULE Test;
  27127. TYPE Base = OBJECT
  27128. PROCEDURE Procedure; END Procedure;
  27129. END Base;
  27130. TYPE Derived = OBJECT (Base)
  27131. VAR object: Derived;
  27132. PROCEDURE Procedure; END Procedure;
  27133. BEGIN object.Procedure^
  27134. END Derived;
  27135. END Test.
  27136. negative: qualified super call on reference to overridden procedure in module
  27137. MODULE Test;
  27138. TYPE Base = OBJECT
  27139. PROCEDURE Procedure; END Procedure;
  27140. END Base;
  27141. TYPE Derived = OBJECT (Base)
  27142. PROCEDURE Procedure; END Procedure;
  27143. END Derived;
  27144. VAR object: Derived;
  27145. BEGIN object.Procedure^
  27146. END Test.
  27147. # flags
  27148. negative: procedure illegaly marked delegate
  27149. MODULE Test;
  27150. PROCEDURE {DELEGATE} P; END P;
  27151. END Test.
  27152. negative: procedure illegaly marked untraced
  27153. MODULE Test;
  27154. PROCEDURE {UNTRACED} P; END P;
  27155. END Test.
  27156. positive: pointer to array variable marked untraced
  27157. MODULE Test;
  27158. VAR a {UNTRACED}: POINTER TO ARRAY OF CHAR;
  27159. END Test.
  27160. positive: pointer to record variable marked untraced
  27161. MODULE Test;
  27162. VAR a {UNTRACED}: POINTER TO RECORD END;
  27163. END Test.
  27164. negative: non-pointer variable marked untraced
  27165. MODULE Test;
  27166. VAR a {UNTRACED}: LONGINT;
  27167. END Test.
  27168. negative: variable marked delegate
  27169. MODULE Test;
  27170. VAR a{DELEGATE}: PROCEDURE;
  27171. END Test.
  27172. positive: delegate procedure type
  27173. MODULE Test;
  27174. TYPE TP=PROCEDURE{DELEGATE};
  27175. END Test.
  27176. positive: delegate procedure type with arguments
  27177. MODULE Test;
  27178. TYPE TP=PROCEDURE{DELEGATE}(a: LONGINT): LONGINT;
  27179. END Test.
  27180. positive: delegate procedure variable assignment
  27181. MODULE Test;
  27182. VAR p:PROCEDURE{DELEGATE};
  27183. PROCEDURE P; END P;
  27184. BEGIN p := P
  27185. END Test.
  27186. positive: delegate procedure variable nil assignment
  27187. MODULE Test;
  27188. VAR p: PROCEDURE{DELEGATE};
  27189. BEGIN p := NIL
  27190. END Test.
  27191. positive: delegate procedure variable assignment in exclusive block
  27192. MODULE Test;
  27193. VAR p:PROCEDURE{DELEGATE};
  27194. PROCEDURE P; END P;
  27195. BEGIN {EXCLUSIVE} p := P
  27196. END Test.
  27197. positive: delegate procedure variable nil assignment in exclusive block
  27198. MODULE Test;
  27199. VAR p: PROCEDURE{DELEGATE};
  27200. BEGIN {EXCLUSIVE} p := NIL
  27201. END Test.
  27202. positive: delegate procedure variable assigned to method
  27203. MODULE Test;
  27204. TYPE O=OBJECT PROCEDURE P; END P; END O;
  27205. VAR o:O; p:PROCEDURE{DELEGATE};
  27206. BEGIN p := o.P
  27207. END Test.
  27208. negative: non-delegate procedure variable assigned to method
  27209. MODULE Test;
  27210. TYPE O=OBJECT PROCEDURE P; END P; END O;
  27211. VAR o:O; p:PROCEDURE;
  27212. BEGIN p := o.P
  27213. END Test.
  27214. # signatures
  27215. positive: signature matching extension of object
  27216. MODULE Test;
  27217. TYPE O=OBJECT
  27218. PROCEDURE P; END P;
  27219. PROCEDURE Q(i: INTEGER); END Q;
  27220. PROCEDURE R(i: LONGINT): LONGINT; END R;
  27221. END O;
  27222. TYPE OO=OBJECT(O);
  27223. PROCEDURE P; END P;
  27224. PROCEDURE Q(i: INTEGER); END Q;
  27225. PROCEDURE R(i: LONGINT): LONGINT; END R;
  27226. END OO;
  27227. END Test.
  27228. negative: extension of objects with nonmatching signature: parameter incompatible
  27229. MODULE Test;
  27230. TYPE O=OBJECT
  27231. PROCEDURE P(i: INTEGER); END P;
  27232. END O;
  27233. TYPE OO=OBJECT(O)
  27234. PROCEDURE P(i: LONGINT); END P;
  27235. END OO;
  27236. END Test.
  27237. positive: extension of object matching signature: constructor extends non-constructor
  27238. MODULE Test;
  27239. TYPE O=OBJECT
  27240. PROCEDURE P; END P;
  27241. END O;
  27242. TYPE OO=OBJECT(O);
  27243. PROCEDURE &P; END P;
  27244. END OO;
  27245. END Test.
  27246. negative: extension of object with nonmatching signature: non-constructor extends constructor
  27247. MODULE Test;
  27248. TYPE O=OBJECT
  27249. PROCEDURE &P; END P;
  27250. END O;
  27251. TYPE OO=OBJECT(O);
  27252. PROCEDURE P; END P;
  27253. END OO;
  27254. END Test.
  27255. positive: non-exported constructor used in same module
  27256. MODULE Dummy;
  27257. TYPE O*=OBJECT
  27258. PROCEDURE & Init (x: LONGINT; CONST y: ARRAY OF CHAR);
  27259. END Init;
  27260. END O;
  27261. VAR o:O;
  27262. BEGIN
  27263. NEW(o,10,"test")
  27264. END Dummy.
  27265. negative: non-exported constructor used as method in different module
  27266. MODULE Test;
  27267. IMPORT Dummy;
  27268. VAR a: Dummy.O;
  27269. BEGIN
  27270. a.Init(10,"test")
  27271. END Test.
  27272. negative: non-exported constructor used as constructor in different module
  27273. MODULE Test;
  27274. IMPORT Dummy;
  27275. VAR a: Dummy.O;
  27276. BEGIN
  27277. NEW(a,10,"test");
  27278. END Test.
  27279. positive: non-exported constructor overwritten by new constructor with different name in different module
  27280. MODULE Test;
  27281. IMPORT Dummy;
  27282. TYPE O=OBJECT (Dummy.O)
  27283. PROCEDURE & InitX(a,b: LONGINT); END InitX;
  27284. END O;
  27285. VAR a: O;
  27286. BEGIN
  27287. NEW(a,10,20);
  27288. END Test.
  27289. positive: non-exported constructor overwritten by new constructor with same name in different module
  27290. MODULE Test;
  27291. IMPORT Dummy;
  27292. TYPE O=OBJECT (Dummy.O)
  27293. PROCEDURE & Init(a,b: LONGINT); END Init;
  27294. END O;
  27295. VAR a: O;
  27296. BEGIN
  27297. NEW(a,10,20);
  27298. END Test.
  27299. positive: exported constructor used in same module
  27300. MODULE Dummy;
  27301. TYPE O*=OBJECT
  27302. PROCEDURE & Init* (x: LONGINT; CONST y: ARRAY OF CHAR);
  27303. END Init;
  27304. END O;
  27305. VAR o:O;
  27306. BEGIN
  27307. NEW(o,10,"test")
  27308. END Dummy.
  27309. positive: exported constructor used as method in different module
  27310. MODULE Test;
  27311. IMPORT Dummy;
  27312. VAR a: Dummy.O;
  27313. BEGIN
  27314. a.Init(10,"test")
  27315. END Test.
  27316. positive: exported constructor used as constructor in different module
  27317. MODULE Test;
  27318. IMPORT Dummy;
  27319. VAR a: Dummy.O;
  27320. BEGIN
  27321. NEW(a,10,"test");
  27322. END Test.
  27323. positive: exported constructor overwritten by new constructor with different name and non-matching signature in different module
  27324. MODULE Test;
  27325. IMPORT Dummy;
  27326. TYPE O=OBJECT (Dummy.O)
  27327. PROCEDURE & InitX(a,b: LONGINT); END InitX;
  27328. END O;
  27329. VAR a: O;
  27330. BEGIN
  27331. NEW(a,10,20);
  27332. END Test.
  27333. negative: non-exported constructor overwritten by new constructor with same name and non-matching signature in different module
  27334. MODULE Test;
  27335. IMPORT Dummy;
  27336. TYPE O=OBJECT (Dummy.O)
  27337. PROCEDURE & Init(a,b: LONGINT); END Init;
  27338. END O;
  27339. END Test.
  27340. positive: non-exported constructor overwritten by new constructor with same name and matching signature in different module
  27341. MODULE Test;
  27342. IMPORT Dummy;
  27343. TYPE O=OBJECT (Dummy.O)
  27344. PROCEDURE & Init(a: LONGINT; CONST name: ARRAY OF CHAR); END Init;
  27345. END O;
  27346. VAR a: O;
  27347. BEGIN
  27348. NEW(a,10,"test");
  27349. END Test.
  27350. negative: new on object with non-exported constructor with empty parameter list
  27351. MODULE Dummy;
  27352. TYPE O*=OBJECT
  27353. PROCEDURE & Init;
  27354. END Init;
  27355. END O;
  27356. END Dummy.
  27357. MODULE Test;
  27358. IMPORT Dummy;
  27359. VAR o: Dummy.O;
  27360. BEGIN NEW(o)
  27361. END Test.
  27362. # realtime objects
  27363. positive: plain realtime object
  27364. MODULE Test;
  27365. TYPE A = OBJECT {REALTIME} END A;
  27366. END Test.
  27367. positive: realtime pointer to record
  27368. MODULE Test;
  27369. TYPE A = POINTER {REALTIME} TO RECORD END;
  27370. END Test.
  27371. positive: realtime pointer to array
  27372. MODULE Test;
  27373. TYPE A = POINTER {REALTIME} TO ARRAY OF CHAR;
  27374. END Test.
  27375. positive: realtime object containing basic type fields
  27376. MODULE Test;
  27377. IMPORT SYSTEM;
  27378. TYPE A = OBJECT {REALTIME}
  27379. VAR a0: CHAR8; a1: CHAR16; a2: CHAR32; a3: SHORTINT; a4: INTEGER; a5: LONGINT; a6: HUGEINT; a7: REAL;
  27380. a8: LONGREAL; a9: BOOLEAN; a10: SET; a11: ADDRESS; a12:SIZE; a13: SYSTEM.BYTE;
  27381. END A;
  27382. END Test.
  27383. positive: realtime pointer to record that contains basic type fields
  27384. MODULE Test;
  27385. IMPORT SYSTEM;
  27386. TYPE A = POINTER {REALTIME} TO RECORD
  27387. a0: CHAR8; a1: CHAR16; a2: CHAR32; a3: SHORTINT; a4: INTEGER; a5: LONGINT; a6: HUGEINT; a7: REAL;
  27388. a8: LONGREAL; a9: BOOLEAN; a10: SET; a11: ADDRESS; a12:SIZE; a13: SYSTEM.BYTE;
  27389. END;
  27390. END Test.
  27391. positive: realtime pointer to array where the elements contain basic type fields
  27392. MODULE Test;
  27393. IMPORT SYSTEM;
  27394. TYPE A0 = POINTER {REALTIME} TO ARRAY OF RECORD
  27395. a0: CHAR8; a1: CHAR16; a2: CHAR32; a3: SHORTINT; a4: INTEGER; a5: LONGINT; a6: HUGEINT; a7: REAL;
  27396. a8: LONGREAL; a9: BOOLEAN; a10: SET; a11: ADDRESS; a12:SIZE; a13: SYSTEM.BYTE;
  27397. END;
  27398. END Test.
  27399. positive: realtime object containing enumeration type field
  27400. MODULE Test;
  27401. TYPE Color = ENUM red, green, blue END;
  27402. RTObject = OBJECT {REALTIME} VAR color: Color; END RTObject;
  27403. END Test.
  27404. positive: realtime object containing non-basic type realtime fields
  27405. MODULE Test;
  27406. TYPE A = OBJECT {REALTIME} END A;
  27407. B = OBJECT {REALTIME} VAR a: A; b: B; END B;
  27408. END Test.
  27409. positive: realtime pointer to record that contains non-basic type fields
  27410. MODULE Test;
  27411. TYPE A = POINTER {REALTIME} TO RECORD END;
  27412. B = POINTER {REALTIME} TO RECORD a: A; b: B END;
  27413. END Test.
  27414. positive: realtime pointer to array where the elements contain non-basic realtime fields
  27415. MODULE Test;
  27416. TYPE A = POINTER {REALTIME} TO RECORD END;
  27417. B = POINTER {REALTIME} TO ARRAY OF RECORD a: A; b: B END;
  27418. END Test.
  27419. negative: realtime object containing non-realtime any pointer
  27420. MODULE Test;
  27421. TYPE A = OBJECT {REALTIME} VAR a0: ANY END A;
  27422. END Test;
  27423. negative: realtime object containing non-realtime pointer to record
  27424. MODULE Test;
  27425. TYPE A = OBJECT {REALTIME} VAR a0: POINTER TO RECORD END END A;
  27426. END Test;
  27427. negative: realtime object containing non-realtime pointer to array
  27428. MODULE Test;
  27429. TYPE A = OBJECT {REALTIME} VAR a0: POINTER TO ARRAY OF CHAR END A;
  27430. END Test;
  27431. negative: realtime object containing non-realtime object reference
  27432. MODULE Test;
  27433. TYPE A = OBJECT END A;
  27434. B = OBJECT {REALTIME} b: A END B;
  27435. END Test;
  27436. positive: realtime object containing record variable with realtime fields
  27437. MODULE Test;
  27438. TYPE A = OBJECT {REALTIME} VAR a: RECORD k: SHORTINT; l: INTEGER; m: A END END A;
  27439. END Test.
  27440. positive: realtime object containing record variable with realtime pointers
  27441. MODULE Test;
  27442. TYPE A = OBJECT {REALTIME} VAR a: RECORD p0: POINTER {REALTIME} TO RECORD END;
  27443. p1: POINTER {REALTIME} TO ARRAY OF CHAR; END; END A;
  27444. END Test.
  27445. negative: realtime object containing record variable with a non-realtime any pointer
  27446. MODULE Test;
  27447. TYPE A = OBJECT {REALTIME} VAR a: RECORD p: ANY END; END A;
  27448. END Test.
  27449. negative: realtime object containing record variable with a non-realtime record pointer
  27450. MODULE Test;
  27451. TYPE A = OBJECT {REALTIME} VAR a: RECORD p: POINTER TO RECORD END; END; END A;
  27452. END Test.
  27453. negative: realtime object containing record variable with a non-realtime array pointer
  27454. MODULE Test;
  27455. TYPE A = OBJECT {REALTIME} VAR a: RECORD p: POINTER TO ARRAY OF CHAR END; END A;
  27456. END Test.
  27457. positive: non-realtime object containing reference to realtime object
  27458. MODULE Test;
  27459. TYPE A = OBJECT {REALTIME} VAR a0: LONGINT; a1: CHAR; END A;
  27460. B = OBJECT VAR a: A; END B;
  27461. END Test.
  27462. positive: extension of realtime object declared as realtime object
  27463. MODULE Test;
  27464. TYPE A = OBJECT {REALTIME} VAR a0: CHAR; a1: SET; END A;
  27465. B = OBJECT {REALTIME} (A) VAR b0: INTEGER; b1: LONGINT; END B;
  27466. END Test.
  27467. positive: variable of realtime pointer to record type
  27468. MODULE Test;
  27469. VAR p: POINTER {REALTIME} TO RECORD k, l: LONGINT END;
  27470. END Test.
  27471. positive: variable of realtime pointer to array type
  27472. MODULE Test;
  27473. VAR p: POINTER {REALTIME} TO ARRAY OF BOOLEAN;
  27474. END Test.
  27475. negative: realtime extension of non-realtime object
  27476. MODULE Test;
  27477. TYPE A = OBJECT VAR a0: CHAR; a1: SET; END A;
  27478. B = OBJECT {REALTIME} (A) VAR b0: INTEGER; b1: LONGINT; END B;
  27479. END Test.
  27480. negative: non-realtime extension of realtime object
  27481. MODULE Test;
  27482. TYPE A = OBJECT {REALTIME} VAR a0: CHAR; a1: SET; END A;
  27483. B = OBJECT (A) VAR b0: INTEGER; b1: LONGINT; END B;
  27484. END Test.
  27485. positive: record extensions - both record types are implicit realtime objects
  27486. MODULE Test;
  27487. TYPE A = RECORD a0: CHAR; a1: SET; END;
  27488. B = RECORD (A) b0: INTEGER; b1: LONGINT; END;
  27489. AP = POINTER {REALTIME} TO A;
  27490. BP = POINTER {REALTIME} TO B;
  27491. END Test.
  27492. negative: record extensions - only base type is realtime object
  27493. MODULE Test;
  27494. TYPE A = RECORD a0: CHAR; a1: SET; END;
  27495. B = RECORD (A) b0: INTEGER; b1: ANY; END;
  27496. AP = POINTER {REALTIME} TO A;
  27497. BP = POINTER {REALTIME} TO B;
  27498. END Test.
  27499. positive: extension of realtime pointer
  27500. MODULE Test;
  27501. TYPE R = RECORD r0, r1: LONGINT; END;
  27502. P = POINTER {REALTIME} TO Q;
  27503. Q = RECORD (R) q0, q1: LONGINT; END;
  27504. S = OBJECT {REALTIME} (P) VAR s0, s1: LONGINT; END S;
  27505. END Test.
  27506. positive: module Dummy for realtime and non-realtime types
  27507. MODULE Dummy;
  27508. TYPE RTRec* = RECORD r0: LONGINT; r1: CHAR; END;
  27509. NRTRec* = RECORD n0: LONGINT; n1: ANY; END;
  27510. RTO* = OBJECT {REALTIME} VAR m0: SET; END RTO;
  27511. NRTO0* = OBJECT VAR p: ANY; END NRTO0;
  27512. NRTO1* = OBJECT VAR k: LONGINT; END NRTO1;
  27513. END Dummy.
  27514. positive: realtime pointer to (realtime) record from imported module
  27515. MODULE Test;
  27516. IMPORT Dummy;
  27517. TYPE RTPtr = POINTER {REALTIME} TO Dummy.RTRec;
  27518. END Test.
  27519. positive: non-realtime pointer to (non-realtime) record from imported module
  27520. MODULE Test;
  27521. IMPORT Dummy;
  27522. TYPE NRTPtr = POINTER TO Dummy.NRTRec;
  27523. END Test.
  27524. positive: non-realtime pointer to (realtime) record from imported module
  27525. MODULE Test;
  27526. IMPORT Dummy;
  27527. TYPE NRTPtr = POINTER TO Dummy.RTRec;
  27528. END Test.
  27529. negative: realtime pointer to (non-realtime) record from imported module
  27530. MODULE Test;
  27531. IMPORT Dummy;
  27532. TYPE RTPtr = POINTER {REALTIME} TO Dummy.NRTRec;
  27533. END Test.
  27534. positive: realtime extension of imported realtime object
  27535. MODULE Test;
  27536. IMPORT Dummy;
  27537. TYPE RTE = OBJECT {REALTIME} (Dummy.RTO) VAR t0: POINTER {REALTIME} TO ARRAY OF CHAR; END RTE;
  27538. END Test.
  27539. negative: non-realtime extension of imported realtime object
  27540. MODULE Test;
  27541. IMPORT Dummy;
  27542. TYPE NRTE = OBJECT (Dummy.RTO) VAR k: LONGINT; END NRTE;
  27543. END Test.
  27544. positive: non-realtime extension of imported non-realtime object that contains non-realtime fields
  27545. MODULE Test;
  27546. IMPORT Dummy;
  27547. TYPE NRTE = OBJECT (Dummy.NRTO0) VAR c: CHAR; END NRTE;
  27548. END Test.
  27549. positive: non-realtime extension of imported non-realtime object that contains only realtime fields
  27550. MODULE Test;
  27551. IMPORT Dummy;
  27552. TYPE NRTE = OBJECT (Dummy.NRTO1) VAR c: CHAR; END NRTE;
  27553. END Test.
  27554. # realtime procedures
  27555. positive: procedure marked as realtime
  27556. MODULE Test;
  27557. PROCEDURE {REALTIME} P; END P;
  27558. END Test.
  27559. positive: calling realtime procedure in non-realtime procedure
  27560. MODULE Test;
  27561. PROCEDURE {REALTIME} RTP; END RTP;
  27562. PROCEDURE NRTP; BEGIN RTP; END NRTP;
  27563. END Test.
  27564. positive: recursive call of realtime procedure
  27565. MODULE Test;
  27566. PROCEDURE {REALTIME} RTP; BEGIN RTP; END RTP;
  27567. END Test.
  27568. negative: calling non-realtime procedure in realtime procedure
  27569. MODULE Test;
  27570. PROCEDURE NRTP; END NRTP;
  27571. PROCEDURE {REALTIME} RTP; BEGIN NRTP; END RTP;
  27572. END Test.
  27573. negative: new statement in realtime procedure
  27574. MODULE Test;
  27575. PROCEDURE {REALTIME} P;
  27576. VAR p: POINTER TO RECORD END;
  27577. BEGIN NEW (p);
  27578. END P;
  27579. END Test.
  27580. negative: exclusive block in realtime procedure
  27581. MODULE Test;
  27582. PROCEDURE {REALTIME} P;
  27583. BEGIN {EXCLUSIVE}
  27584. END P;
  27585. END Test.
  27586. negative: await statement in realtime procedure
  27587. MODULE Test;
  27588. VAR condition: BOOLEAN;
  27589. PROCEDURE {REALTIME} P;
  27590. BEGIN AWAIT (condition);
  27591. END P;
  27592. END Test.
  27593. positive: realtime procedure variable to non-realtime procedure variable assignment
  27594. MODULE Test;
  27595. VAR rtp: PROCEDURE {REALTIME}; nrtp: PROCEDURE;
  27596. BEGIN nrtp := rtp;
  27597. END Test.
  27598. positive: realtime procedure variable to realtime procedure variable assignment
  27599. MODULE Test;
  27600. VAR rtp: PROCEDURE {REALTIME};
  27601. BEGIN rtp := rtp;
  27602. END Test.
  27603. negative: non-realtime procedure variable to realtime procedure variable assignment
  27604. MODULE Test;
  27605. VAR rtp: PROCEDURE {REALTIME}; nrtp: PROCEDURE;
  27606. BEGIN rtp := nrtp;
  27607. END Test.
  27608. negative: module body marked as realtime
  27609. MODULE Test;
  27610. BEGIN {REALTIME}
  27611. END Test.
  27612. negative: procedure body marked as realtime
  27613. MODULE Test;
  27614. PROCEDURE P;
  27615. BEGIN {REALTIME}
  27616. END P;
  27617. END Test.
  27618. positive: passive object body marked as realtime
  27619. MODULE Test;
  27620. TYPE Object = OBJECT
  27621. BEGIN {REALTIME}
  27622. END Object;
  27623. END Test.
  27624. positive: calling realtime procedure in passive object body marked as realtime
  27625. MODULE Test;
  27626. TYPE Object = OBJECT {REALTIME}
  27627. PROCEDURE {REALTIME} P; END P;
  27628. BEGIN {REALTIME} P;
  27629. END Object;
  27630. END Test.
  27631. negative: calling non-realtime procedure in passive object body marked as realtime
  27632. MODULE Test;
  27633. TYPE Object = OBJECT
  27634. PROCEDURE P; END P;
  27635. BEGIN {REALTIME} P;
  27636. END Object;
  27637. END Test.
  27638. positive: active object body marked as realtime
  27639. MODULE Test;
  27640. TYPE Object = OBJECT
  27641. BEGIN {ACTIVE, REALTIME}
  27642. END Object;
  27643. END Test.
  27644. positive: calling realtime procedure in active object body marked as realtime
  27645. MODULE Test;
  27646. TYPE Object = OBJECT {REALTIME}
  27647. PROCEDURE {REALTIME} P; END P;
  27648. BEGIN {ACTIVE, REALTIME} P;
  27649. END Object;
  27650. END Test.
  27651. negative: declaring realtime procedure/method in non-realtime object
  27652. MODULE Test;
  27653. TYPE A = OBJECT
  27654. PROCEDURE {REALTIME} P;
  27655. END P;
  27656. END A;
  27657. END Test.
  27658. negative: calling non-realtime procedure in active object body marked as realtime
  27659. MODULE Test;
  27660. TYPE Object = OBJECT
  27661. PROCEDURE P; END P;
  27662. BEGIN {ACTIVE, REALTIME} P;
  27663. END Object;
  27664. END Test.
  27665. positive: overwriting realtime procedure with realtime procedure
  27666. MODULE Test;
  27667. TYPE Base = OBJECT {REALTIME}
  27668. PROCEDURE {REALTIME} P; END P;
  27669. END Base;
  27670. TYPE Object = OBJECT {REALTIME} (Base)
  27671. PROCEDURE {REALTIME} P; END P;
  27672. END Object;
  27673. END Test.
  27674. negative: overwriting non-realtime procedure with realtime procedure
  27675. MODULE Test;
  27676. TYPE Base = OBJECT {REALTIME}
  27677. PROCEDURE P; END P;
  27678. END Base;
  27679. TYPE Object = OBJECT {REALTIME} (Base)
  27680. PROCEDURE {REALTIME} P; END P;
  27681. END Object;
  27682. END Test.
  27683. negative: overwriting realtime procedure with non-realtime procedure
  27684. MODULE Test;
  27685. TYPE Base = OBJECT {REALTIME}
  27686. PROCEDURE {REALTIME} P; END P;
  27687. END Base;
  27688. TYPE Object = OBJECT {REALTIME} (Base)
  27689. PROCEDURE P; END P;
  27690. END Object;
  27691. END Test.
  27692. positive: exporting realtime procedure
  27693. MODULE Dummy;
  27694. PROCEDURE {REALTIME} P*;
  27695. BEGIN END P;
  27696. PROCEDURE {REALTIME} Pp*(i: LONGINT);
  27697. BEGIN END Pp;
  27698. PROCEDURE Q*;
  27699. BEGIN END Q;
  27700. END Dummy.
  27701. positive: using imported realtime procedure in realtime and non-realtime procedure
  27702. MODULE Test;
  27703. IMPORT Dummy;
  27704. PROCEDURE {REALTIME} P;
  27705. BEGIN Dummy.P; Dummy.Pp(10)
  27706. END P;
  27707. PROCEDURE Q;
  27708. BEGIN Dummy.P
  27709. END Q;
  27710. END Test.
  27711. negative: using imported non-realtime procedure in realtime procedure
  27712. MODULE Test;
  27713. IMPORT Dummy;
  27714. PROCEDURE {REALTIME} P;
  27715. BEGIN Dummy.Q; Dummy.Pp(10)
  27716. END P;
  27717. END Test.
  27718. positive: use of basic type realtime variables and parameters in realtime procedure
  27719. MODULE Test;
  27720. PROCEDURE {REALTIME} P(VAR k: LONGINT);
  27721. VAR l: SET;
  27722. BEGIN l:= {}; k:= 5;
  27723. END P;
  27724. END Test.
  27725. positive: use of structured realtime variables in realtime procedure
  27726. MODULE Test;
  27727. TYPE A = OBJECT {REALTIME} VAR k, l: LONGINT END A;
  27728. PROCEDURE {REALTIME} P(VAR a: A);
  27729. BEGIN a.k := 0; a.l := 0;
  27730. END P;
  27731. END Test.
  27732. negative: use of non-realtime variables in realtime procedure
  27733. MODULE Test;
  27734. PROCEDURE {REALTIME} P(VAR a: POINTER TO ARRAY OF CHAR);
  27735. VAR i: LONGINT
  27736. BEGIN FOR i := 0 TO LEN(a) DO a[i] := '' END;
  27737. END P;
  27738. END Test.
  27739. positive: use of string constant (of implicit realtime type) in realtime procedure
  27740. MODULE Test;
  27741. PROCEDURE {REALTIME} P;
  27742. VAR a: ARRAY 10 OF CHAR;
  27743. BEGIN a := "AA";
  27744. END P;
  27745. END Test.
  27746. positive: module Dummy for realtime and non-realtime types and variables
  27747. MODULE Dummy;
  27748. TYPE RTRec* = RECORD i*: LONGINT; END;
  27749. NRTRec* = RECORD p*: ANY; END;
  27750. RTO* = OBJECT {REALTIME} VAR s: SET; END RTO;
  27751. NRTO* = OBJECT VAR p: ANY; END NRTO;
  27752. VAR rtrec*: RTRec;
  27753. nrtrec*: NRTRec;
  27754. PROCEDURE {REALTIME} P*;
  27755. END P;
  27756. PROCEDURE Q*;
  27757. END Q;
  27758. END Dummy.
  27759. positive: use of imported realtime type in realtime procedure
  27760. MODULE Test;
  27761. IMPORT Dummy;
  27762. PROCEDURE {REALTIME} P(VAR r: Dummy.RTO);
  27763. END P;
  27764. END Test.
  27765. negative: use of imported non-realtime type in realtime procedure
  27766. MODULE Test;
  27767. IMPORT Dummy;
  27768. PROCEDURE {REALTIME} P(VAR n: Dummy.NRTO);
  27769. END P;
  27770. END Test.
  27771. positive: use of imported realtime variable in realtime procedure
  27772. MODULE Test;
  27773. IMPORT Dummy;
  27774. PROCEDURE {REALTIME} P;
  27775. BEGIN Dummy.rtrec.i := 0;
  27776. END P;
  27777. END Test.
  27778. negative: use of imported non-realtime variable in realtime procedure
  27779. MODULE Test;
  27780. IMPORT Dummy;
  27781. PROCEDURE {REALTIME} P;
  27782. BEGIN Dummy.nrtrec.p := NIL;
  27783. END P;
  27784. END Test.
  27785. positive: use of imported realtime variable in non-realtime procedure
  27786. MODULE Test;
  27787. IMPORT Dummy;
  27788. PROCEDURE P;
  27789. BEGIN Dummy.rtrec.i := 0;
  27790. END P;
  27791. END Test.
  27792. positive: use of imported non-realtime variable in non-realtime procedure
  27793. MODULE Test;
  27794. IMPORT Dummy;
  27795. PROCEDURE P;
  27796. BEGIN Dummy.nrtrec.p := NIL;
  27797. END P;
  27798. END Test.
  27799. positive: realtime procedure used as parameter in realtime procedure
  27800. MODULE Test;
  27801. TYPE RTPT = PROCEDURE {REALTIME};
  27802. VAR rtp: PROCEDURE {REALTIME};
  27803. PROCEDURE {REALTIME} P(rtp: RTPT);
  27804. END P;
  27805. BEGIN P(rtp);
  27806. END Test.
  27807. negative: non-realtime procedure as parameter in realtime procedure
  27808. MODULE Test;
  27809. TYPE RTPT = PROCEDURE {REALTIME};
  27810. VAR rtp: PROCEDURE;
  27811. PROCEDURE {REALTIME} P(rtp: RTPT);
  27812. END P;
  27813. BEGIN P(rtp);
  27814. END Test.
  27815. positive: realtime procedure used as var-parameter in realtime procedure
  27816. MODULE Test;
  27817. TYPE RTPT = PROCEDURE {REALTIME};
  27818. VAR rtp: PROCEDURE {REALTIME};
  27819. PROCEDURE {REALTIME} P(VAR rtp: RTPT);
  27820. END P;
  27821. BEGIN P(rtp);
  27822. END Test.
  27823. negative: use of exclusive section in realtime module procedure
  27824. MODULE Test;
  27825. PROCEDURE {REALTIME} P;
  27826. BEGIN {EXCLUSIVE}
  27827. END P;
  27828. END Test.
  27829. # handling of untraced flag
  27830. positive: untraced flag on pointer to record
  27831. MODULE Test;
  27832. TYPE P= POINTER TO RECORD END;
  27833. VAR x {UNTRACED}: P;
  27834. END Test.
  27835. positive: untraced flag on object
  27836. MODULE Test;
  27837. TYPE P= OBJECT END P;
  27838. VAR x {UNTRACED}: P;
  27839. END Test.
  27840. positive: untraced flag on pointer to array
  27841. MODULE Test;
  27842. TYPE P=POINTER TO ARRAY OF CHAR;
  27843. VAR x {UNTRACED}: P;
  27844. END Test.
  27845. positive: untraced flag on delegate procedure
  27846. MODULE Test;
  27847. TYPE P=PROCEDURE {DELEGATE};
  27848. VAR x {UNTRACED}: P;
  27849. END Test.
  27850. negative: untraced flag on basic type
  27851. MODULE Test;
  27852. TYPE P=LONGINT;
  27853. VAR x{UNTRACED}: P;
  27854. END Test.
  27855. negative: untraced flag on procedure type
  27856. MODULE Test;
  27857. TYPE P= PROCEDURE;
  27858. VAR x{UNTRACED}: P;
  27859. END Test.
  27860. negative: untraced flag on record type;
  27861. MODULE Test;
  27862. TYPE P=RECORD END;
  27863. VAR x{UNTRACED}: P;
  27864. END Test.
  27865. #miscellaneous
  27866. positive: system address type size
  27867. MODULE Test;
  27868. IMPORT SYSTEM;
  27869. VAR a: LONGINT;
  27870. BEGIN a := SIZEOF(ADDRESS)
  27871. END Test.
  27872. negative: system address function on size-incompatible type
  27873. MODULE Test;
  27874. IMPORT SYSTEM;
  27875. VAR a: SHORTINT;
  27876. BEGIN a := SYSTEM.ADR(a)
  27877. END Test.
  27878. positive: system address function on size-compatible type
  27879. MODULE Test;
  27880. IMPORT SYSTEM;
  27881. VAR a: HUGEINT;
  27882. BEGIN a := SYSTEM.ADR(a)
  27883. END Test.
  27884. positive: unsigned system address function
  27885. MODULE Test;
  27886. IMPORT SYSTEM;
  27887. VAR a: ADDRESS;
  27888. BEGIN a := SYSTEM.ADR(a)
  27889. END Test.
  27890. positive: mixture of 32 and 8 bit types implying high register pressure by using an array
  27891. MODULE Test;
  27892. VAR b: ARRAY 2 OF CHAR; a: LONGINT; ch: CHAR;
  27893. BEGIN
  27894. b[a] := CHR(((a MOD 0AH) + 30H))
  27895. END Test.
  27896. positive: system.val
  27897. MODULE Test;
  27898. IMPORT SYSTEM;
  27899. VAR a: LONGINT; b: REAL; c: POINTER TO ARRAY OF CHAR; i: INTEGER; ch: CHAR;
  27900. BEGIN
  27901. a := SYSTEM.VAL(LONGINT,a);
  27902. a := SYSTEM.VAL(LONGINT,c);
  27903. a := SYSTEM.VAL(LONGINT,b);
  27904. a := SYSTEM.VAL(LONGINT,i);
  27905. a := SYSTEM.VAL(LONGINT,ch);
  27906. END Test.
  27907. positive: shift of unsigned type by signed value
  27908. MODULE Test;
  27909. IMPORT SYSTEM;
  27910. VAR ebx: SET;
  27911. BEGIN
  27912. ebx := LSH(ebx, -16)
  27913. END Test.
  27914. positive: shift of unsigned type by signed variable
  27915. MODULE Test;
  27916. IMPORT SYSTEM;
  27917. VAR ebx: SET; a: LONGINT;
  27918. BEGIN
  27919. ebx := LSH(ebx, a)
  27920. END Test.
  27921. positive: assignment of converted unsigned type to signed type
  27922. MODULE Test;
  27923. IMPORT SYSTEM;
  27924. VAR ebx: SET; a,i: LONGINT;
  27925. BEGIN
  27926. i := SYSTEM.VAL(LONGINT, LSH(ebx * {16..23}, -16));
  27927. END Test.
  27928. positive: getprocedure builtin call
  27929. MODULE Test;
  27930. TYPE
  27931. R= RECORD END;
  27932. MyO= OBJECT END MyO;
  27933. VAR
  27934. p: PROCEDURE;
  27935. q: PROCEDURE(r: R);
  27936. r: PROCEDURE():MyO;
  27937. s: PROCEDURE(p: MyO): MyO;
  27938. t: PROCEDURE(p:MyO);
  27939. u: PROCEDURE(r: R): MyO;
  27940. BEGIN
  27941. GETPROCEDURE("TestModule","TestProcedure",p);
  27942. GETPROCEDURE("X","Y",p);
  27943. GETPROCEDURE("TestModule","TestProcedure",p);
  27944. GETPROCEDURE("TestModule","TestProcedure",q);
  27945. GETPROCEDURE("TestModule","TestProcedure",r);
  27946. GETPROCEDURE("TestModule","TestProcedure",t);
  27947. GETPROCEDURE("TestModule","TestProcedure",s);
  27948. GETPROCEDURE("TestModule","TestProcedure",u);
  27949. END Test.
  27950. negative: procedure call designator returning nil as index
  27951. MODULE Test;
  27952. VAR a: ARRAY 32 OF CHAR; c: CHAR;
  27953. PROCEDURE P;
  27954. BEGIN
  27955. END P;
  27956. BEGIN
  27957. c := a[P()];
  27958. END Test.
  27959. negative: procedure call designator returning nil in binary expression
  27960. MODULE Test;
  27961. VAR a,b: LONGINT;
  27962. PROCEDURE P;
  27963. BEGIN
  27964. END P;
  27965. BEGIN
  27966. a := b + P();
  27967. END Test.
  27968. positive: module exporting procedure variable with return type
  27969. MODULE Dummy;
  27970. VAR
  27971. p-: PROCEDURE(a,b: LONGINT): LONGINT;
  27972. END Dummy.
  27973. positive: module importing procedure variable with return type
  27974. MODULE Test;
  27975. IMPORT Dummy;
  27976. VAR a: LONGINT;
  27977. BEGIN
  27978. a := a + Dummy.p(0,0);
  27979. END Test.
  27980. positive: passing NIL parameter on WINAPI string parameter
  27981. MODULE Test;
  27982. IMPORT SYSTEM;
  27983. VAR
  27984. p: PROCEDURE{WINAPI}(CONST a: ARRAY OF CHAR);
  27985. BEGIN
  27986. p(NIL);
  27987. END Test.
  27988. positive: SYSTEM.TYPECODE on records, pointer to record and object
  27989. MODULE Test;
  27990. IMPORT SYSTEM;
  27991. TYPE
  27992. R1=RECORD END; R2=RECORD (R1) END;
  27993. P1= POINTER TO RECORD END; P2=POINTER TO RECORD (P1) END;
  27994. O1 = OBJECT END O1; O2=OBJECT(O1) END O2;
  27995. PROCEDURE P(VAR r: R1; p: P1; o: O1);
  27996. VAR a: ADDRESS;
  27997. BEGIN
  27998. IF r IS R2 THEN END;
  27999. a := SYSTEM.TYPECODE(R2);
  28000. IF p IS P2 THEN END;
  28001. a := SYSTEM.TYPECODE(P2);
  28002. IF o IS O2 THEN END;
  28003. a := SYSTEM.TYPECODE(O2);
  28004. END P;
  28005. END Test.
  28006. negative: SYSTEM.TYPECODE with basic type
  28007. MODULE Test;
  28008. IMPORT SYSTEM;
  28009. TYPE
  28010. T = INTEGER;
  28011. VAR
  28012. a: LONGINT;
  28013. BEGIN
  28014. a:= SYSTEM.TYPECODE(T);
  28015. END Test.
  28016. negative: SYSTEM.TYPECODE with ANY type
  28017. MODULE Test;
  28018. IMPORT SYSTEM;
  28019. TYPE
  28020. T = ANY;
  28021. VAR
  28022. a: LONGINT;
  28023. BEGIN
  28024. a:= SYSTEM.TYPECODE(T);
  28025. END Test.
  28026. negative: SYSTEM.TYPECODE with OBJECT type
  28027. MODULE Test;
  28028. IMPORT SYSTEM;
  28029. TYPE
  28030. T = OBJECT;
  28031. VAR
  28032. a: LONGINT;
  28033. BEGIN
  28034. a:= SYSTEM.TYPECODE(T);
  28035. END Test.
  28036. negative: SYSTEM.TYPECODE with static array
  28037. MODULE Test;
  28038. IMPORT SYSTEM;
  28039. TYPE
  28040. T = ARRAY 32 OF CHAR;
  28041. VAR
  28042. a: LONGINT;
  28043. BEGIN
  28044. a:= SYSTEM.TYPECODE(T);
  28045. END Test.
  28046. negative: SYSTEM.TYPECODE with pointer to static array
  28047. MODULE Test;
  28048. IMPORT SYSTEM;
  28049. TYPE
  28050. T = POINTER TO ARRAY 32 OF LONGINT;
  28051. VAR
  28052. a: LONGINT;
  28053. BEGIN
  28054. a:= SYSTEM.TYPECODE(T);
  28055. END Test.
  28056. negative: SYSTEM.TYPECODE with pointer to dynamic array without pointers
  28057. MODULE Test;
  28058. IMPORT SYSTEM;
  28059. TYPE
  28060. T = POINTER TO ARRAY OF LONGINT;
  28061. VAR
  28062. a: LONGINT;
  28063. BEGIN
  28064. a:= SYSTEM.TYPECODE(T);
  28065. END Test.
  28066. positive: SYSTEM.HALT statement
  28067. MODULE Test;
  28068. IMPORT SYSTEM;
  28069. BEGIN
  28070. SYSTEM.HALT(100);
  28071. SYSTEM.HALT(10);
  28072. END Test.
  28073. positive: HALT statement with small parameter
  28074. MODULE Test;
  28075. BEGIN HALT(14)
  28076. END Test.
  28077. positive: pass a one and two character array as string and pass one array character as character
  28078. MODULE Test;
  28079. PROCEDURE P(CONST s: ARRAY OF CHAR);
  28080. BEGIN END P;
  28081. PROCEDURE Q(CONST c: CHAR);
  28082. BEGIN END Q;
  28083. BEGIN P("a"); P("ab"); Q("a"); P('a'); P('ab'); Q('a');
  28084. END Test.
  28085. positive: assign one character array to character
  28086. MODULE Test;
  28087. VAR a: CHAR;
  28088. BEGIN a := "a"
  28089. END Test.
  28090. negative: assign a character to a string
  28091. MODULE Test;
  28092. VAR a: ARRAY 2 OF CHAR;
  28093. BEGIN a := 0X;
  28094. END Test.
  28095. negative: pass a character value as a string
  28096. MODULE Test;
  28097. PROCEDURE P(CONST a: ARRAY OF CHAR);
  28098. BEGIN END P;
  28099. BEGIN P(0X);
  28100. END Test.
  28101. positive: assign a string of length zero to variable parameter
  28102. MODULE Test;
  28103. PROCEDURE P(VAR a: ARRAY OF CHAR);
  28104. BEGIN
  28105. a := "";
  28106. END P;
  28107. END Test.
  28108. positive: index array of record and pass as parameter
  28109. MODULE Test;
  28110. TYPE R=RECORD END;
  28111. VAR a: ARRAY 32 OF R;
  28112. PROCEDURE P(CONST r: R);
  28113. BEGIN END P;
  28114. BEGIN P(a[10]);
  28115. END Test.
  28116. positive: export of a type
  28117. MODULE Dummy;
  28118. TYPE R*=RECORD END;
  28119. END Dummy.
  28120. positive: reexport a type
  28121. MODULE Test;
  28122. IMPORT Dummy;
  28123. PROCEDURE P*(VAR r: Dummy.R);
  28124. BEGIN END P;
  28125. END Test.
  28126. positive: new on pointer to array containing pointers (any)
  28127. MODULE Test;
  28128. VAR a: POINTER TO ARRAY OF ANY;
  28129. BEGIN NEW(a,10) END Test.
  28130. positive: new on pointer to array containing pointers (delegates)
  28131. MODULE Test;
  28132. TYPE delegate = PROCEDURE{DELEGATE}(x: LONGINT);
  28133. VAR a: POINTER TO ARRAY OF delegate;
  28134. BEGIN NEW(a,10) END Test.
  28135. positive: new on pointer to array containing pointers (objects)
  28136. MODULE Test;
  28137. TYPE object = OBJECT END object;
  28138. VAR a: POINTER TO ARRAY OF object;
  28139. BEGIN NEW(a,10) END Test.
  28140. positive: new on pointer to array containing pointers (record with pointer)
  28141. MODULE Test;
  28142. TYPE
  28143. r1 = RECORD a: LONGINT; b: POINTER TO r1 END;
  28144. r2 = RECORD r: r1 END;
  28145. record = RECORD (r2) b: LONGINT END;
  28146. VAR a: POINTER TO ARRAY OF record;
  28147. BEGIN NEW(a,10) END Test.
  28148. positive: export object with field
  28149. MODULE Dummy;
  28150. TYPE
  28151. Volume* = OBJECT
  28152. VAR size-: LONGINT
  28153. END Volume;
  28154. END Dummy.
  28155. positive: import object with field
  28156. MODULE Test;
  28157. IMPORT Dummy;
  28158. TYPE
  28159. File = OBJECT
  28160. VAR
  28161. vol: Dummy.Volume;
  28162. PROCEDURE P;
  28163. VAR size: LONGINT;
  28164. BEGIN
  28165. size := vol.size;
  28166. END P;
  28167. END File;
  28168. END Test.
  28169. positive: export string value
  28170. MODULE Dummy;
  28171. CONST str*="myString";
  28172. END Dummy.
  28173. positive: import and use string value
  28174. MODULE Test;
  28175. IMPORT Dummy;
  28176. PROCEDURE P(str: ARRAY OF CHAR);
  28177. BEGIN
  28178. END P;
  28179. BEGIN P(Dummy.str);
  28180. END Test.
  28181. positive: boolean in record designator in pointer to array
  28182. MODULE Test;
  28183. TYPE
  28184. R= RECORD a,b: BOOLEAN END;
  28185. P= POINTER TO ARRAY OF R;
  28186. B= ARRAY 20 OF BOOLEAN;
  28187. VAR p:P; b:B;
  28188. BEGIN ASSERT(p[10].b); ASSERT(b[10]);
  28189. END Test.
  28190. positive: formal array of system.byte parameter used with basic actual parameter
  28191. MODULE Test;
  28192. IMPORT SYSTEM;
  28193. VAR a: ARRAY 32 OF CHAR; b: LONGINT;
  28194. PROCEDURE P(CONST a: ARRAY OF SYSTEM.BYTE);
  28195. BEGIN
  28196. END P;
  28197. BEGIN P(a); P(b); P(a[0]);
  28198. END Test.
  28199. positive: module exporting OBJECT
  28200. MODULE Dummy;
  28201. VAR a*: OBJECT;
  28202. END Dummy.
  28203. positive: module importing OBJECT
  28204. MODULE Test;
  28205. IMPORT Dummy;
  28206. PROCEDURE P(a: OBJECT);
  28207. BEGIN
  28208. END P;
  28209. BEGIN P(Dummy.a);
  28210. END Test.
  28211. positive: binary MIN function
  28212. MODULE Test;
  28213. CONST min = MIN(10,20);
  28214. VAR a,b: LONGINT; r1,r2: REAL;
  28215. BEGIN
  28216. a := MIN(a,b);
  28217. r1 := MIN(r1,r2);
  28218. a := MIN(a,256);
  28219. r1 := MIN(r1,20);
  28220. r1 := MIN(2.0,200);
  28221. ASSERT(MIN(1,10)=1);
  28222. ASSERT(MIN(-10,10)=-10);
  28223. END Test.
  28224. positive: binary MAX function
  28225. MODULE Test;
  28226. CONST min = MAX(10,20);
  28227. VAR a,b: LONGINT; r1,r2: REAL;
  28228. BEGIN
  28229. a := MAX(a,b);
  28230. r1 := MAX(r1,r2);
  28231. a := MAX(a,256);
  28232. r1 := MAX(r1,20);
  28233. r1 := MAX(2.0,200);
  28234. ASSERT(MAX(1,10)=10);
  28235. ASSERT(MAX(-10,10)=10);
  28236. END Test.
  28237. positive: method returning a delegate type
  28238. MODULE Test;
  28239. IMPORT SYSTEM;
  28240. TYPE Proc = PROCEDURE{DELEGATE};
  28241. TYPE O= OBJECT
  28242. VAR
  28243. PROCEDURE P;
  28244. BEGIN END P;
  28245. PROCEDURE Q(): Proc;
  28246. BEGIN
  28247. RETURN P;
  28248. END Q;
  28249. END O;
  28250. VAR x: Proc; o:O;
  28251. BEGIN x := o.Q(); x:= x;
  28252. END Test.
  28253. positive: type test on pointer returned by procedure
  28254. MODULE Test;
  28255. TYPE O = OBJECT END O;
  28256. PROCEDURE P(): OBJECT; BEGIN RETURN NIL; END P;
  28257. BEGIN ASSERT(P() IS O);
  28258. END Test.
  28259. positive: delegate array element assignment
  28260. MODULE Test;
  28261. IMPORT SYSTEM;
  28262. TYPE Handler= PROCEDURE{DELEGATE};
  28263. VAR
  28264. handlers: ARRAY 6 OF Handler; h: Handler;
  28265. BEGIN handlers[3] := h;
  28266. END Test.
  28267. positive: large stack size
  28268. MODULE Test;
  28269. CONST stackSize = 10000H;
  28270. PROCEDURE P;
  28271. VAR a: ARRAY stackSize OF CHAR;
  28272. BEGIN
  28273. END P;
  28274. PROCEDURE Q;
  28275. VAR a: ARRAY 100 OF CHAR;
  28276. BEGIN
  28277. END Q;
  28278. END Test.
  28279. positive: shortint variable multiplied by shortint value (8bit multiply)
  28280. MODULE Test;
  28281. PROCEDURE P;
  28282. VAR a: SHORTINT;
  28283. BEGIN
  28284. IF a = a*3 THEN END;
  28285. END P;
  28286. END Test.
  28287. positive: with statement on object field
  28288. MODULE Test;
  28289. TYPE Object = OBJECT VAR a: LONGINT; END Object;
  28290. TYPE Object2 = OBJECT (Object) VAR a: Object; END Object2;
  28291. TYPE Object3 = OBJECT VAR a: Object; BEGIN WITH a: Object2 DO a.a.a := a.a.a; END; END Object3;
  28292. END Test.
  28293. negative: access to different instance of a with-guarded variable
  28294. MODULE Test;
  28295. TYPE A = OBJECT END A;
  28296. TYPE B = OBJECT (A)
  28297. VAR a: A;
  28298. BEGIN WITH a: B DO a.a.a := NIL END;
  28299. END B;
  28300. END Test.
  28301. positive: use of SYSTEM.NEW
  28302. MODULE Test;
  28303. IMPORT SYSTEM;
  28304. VAR any: ANY;
  28305. BEGIN SYSTEM.NEW(any,100);
  28306. END Test.
  28307. positive: expression involving a reordering of floating point stack
  28308. MODULE Test;
  28309. VAR x,y: LONGREAL;
  28310. PROCEDURE Sqrt(x: REAL): REAL;
  28311. BEGIN END Sqrt;
  28312. BEGIN
  28313. x := x*y + Sqrt(SHORT(x)) + x*y;
  28314. END Test.
  28315. positive: use string length with different lengths (to check side-effects on length field in string value)
  28316. MODULE Test;
  28317. TYPE
  28318. String = ARRAY 128 OF CHAR;
  28319. PROCEDURE PutBareName ( VAR name : String);
  28320. VAR ix : LONGINT;
  28321. BEGIN
  28322. WHILE (ix<LEN(name)) DO END;
  28323. END PutBareName;
  28324. PROCEDURE AddUserToName (VAR thisName : String);
  28325. VAR pos : INTEGER;
  28326. BEGIN
  28327. IF pos < LEN (thisName) THEN END;
  28328. END AddUserToName;
  28329. END Test.
  28330. positive: SYSTEM.BYTE varpar
  28331. MODULE Test;
  28332. IMPORT SYSTEM;
  28333. VAR c: CHAR;
  28334. PROCEDURE P(VAR x: SYSTEM.BYTE);
  28335. BEGIN
  28336. END P;
  28337. BEGIN
  28338. P(c);
  28339. END Test.
  28340. positive: write a SYSTEM.BYTE varpar without conversion
  28341. MODULE Test;
  28342. IMPORT SYSTEM;
  28343. PROCEDURE P(VAR buf: SYSTEM.BYTE);
  28344. VAR s1,s2: SHORTINT;
  28345. BEGIN
  28346. buf := s2*16 + (s1 MOD 16)
  28347. END P;
  28348. END Test.
  28349. positive: use a value for a the address in SYSTEM.GET
  28350. MODULE Test;
  28351. IMPORT SYSTEM;
  28352. PROCEDURE P(VAR buf: SYSTEM.BYTE);
  28353. VAR adr: ADDRESS;
  28354. BEGIN
  28355. adr := 0;
  28356. SYSTEM.GET (040EH, SYSTEM.VAL (INTEGER, adr)); (* EBDA address *)
  28357. END P;
  28358. END Test.
  28359. negative: use a non variable for destination in SYSTEM.GET
  28360. MODULE Test;
  28361. IMPORT SYSTEM;
  28362. PROCEDURE P(VAR buf: SYSTEM.BYTE);
  28363. VAR adr: ADDRESS;
  28364. BEGIN
  28365. SYSTEM.GET (adr, adr+1); (* EBDA address *)
  28366. END P;
  28367. END Test.
  28368. positive: negative values in address
  28369. MODULE Test;
  28370. IMPORT SYSTEM;
  28371. VAR a: ADDRESS;
  28372. BEGIN
  28373. a := -1;
  28374. END Test.
  28375. positive: negative values in address in SYSTEM.GET
  28376. MODULE Test;
  28377. IMPORT SYSTEM;
  28378. VAR a: LONGINT;
  28379. BEGIN
  28380. SYSTEM.GET(-1,a)
  28381. END Test.
  28382. positive: ugly system.val with records
  28383. MODULE Test;
  28384. IMPORT SYSTEM;
  28385. TYPE Record= RECORD a,b: LONGINT END;
  28386. PROCEDURE P(VAR r: Record);
  28387. VAR a: LONGINT;
  28388. BEGIN
  28389. P(SYSTEM.VAL(Record,a));
  28390. END P;
  28391. PROCEDURE Q(r: Record);
  28392. VAR a: LONGINT;
  28393. BEGIN
  28394. Q(SYSTEM.VAL(Record,a));
  28395. END Q;
  28396. END Test.
  28397. positive: call an empty inline code
  28398. MODULE Test;
  28399. IMPORT SYSTEM;
  28400. PROCEDURE -P;
  28401. CODE{SYSTEM.i386}
  28402. END P;
  28403. BEGIN P;
  28404. END Test.
  28405. positive: export inline code with reference to (local) constant
  28406. MODULE Test;
  28407. IMPORT SYSTEM;
  28408. PROCEDURE -P*;
  28409. CONST const=16;
  28410. CODE{SYSTEM.i386}
  28411. MOV EAX,const
  28412. END P;
  28413. END Test.
  28414. positive: export and import real number
  28415. MODULE A;
  28416. CONST
  28417. e*=1.2345D0;
  28418. END A.
  28419. MODULE Test;
  28420. IMPORT A;
  28421. CONST e=1.2345D0;
  28422. BEGIN
  28423. ASSERT(A.e = e);
  28424. END Test.
  28425. positive: addition of ADDRESS and SIZE
  28426. MODULE Test;
  28427. IMPORT SYSTEM;
  28428. VAR a: ADDRESS; s: SIZE;
  28429. BEGIN
  28430. a := a + s;
  28431. END Test.
  28432. positive: implicit HUGEINT conversion in comparison
  28433. MODULE Test;
  28434. VAR h: HUGEINT;
  28435. BEGIN
  28436. IF h < 0 THEN END
  28437. END Test.
  28438. positive: ADDRESS as variable in for loop
  28439. MODULE Test;
  28440. IMPORT SYSTEM;
  28441. VAR a,b,i: ADDRESS;
  28442. BEGIN
  28443. FOR i := a TO b DO
  28444. END;
  28445. END Test.
  28446. positive: subtract a ADDRESS from ADDRESS
  28447. MODULE Test;
  28448. IMPORT SYSTEM;
  28449. VAR a,b: ADDRESS; size: SIZE;
  28450. BEGIN
  28451. size := a-b;
  28452. size := -size
  28453. END Test.
  28454. negative: LONG conversion on ADDRESS
  28455. MODULE Test;
  28456. IMPORT SYSTEM;
  28457. VAR a: ADDRESS; v: HUGEINT;
  28458. BEGIN
  28459. v := LONG(a)
  28460. END Test.
  28461. positive: add negative value to ADDRESS
  28462. MODULE Test;
  28463. IMPORT SYSTEM;
  28464. VAR a: ADDRESS;
  28465. CONST const = -4;
  28466. BEGIN
  28467. a := a + const;
  28468. END Test.
  28469. positive: unary negation of ADDRESS
  28470. MODULE Test;
  28471. IMPORT SYSTEM;
  28472. VAR a: ADDRESS;
  28473. BEGIN
  28474. a := a + (-a) MOD 4;
  28475. END Test.
  28476. positive: export and import ADDRESS parameter
  28477. MODULE A;
  28478. IMPORT SYSTEM;
  28479. PROCEDURE P*(VAR a: ADDRESS);
  28480. BEGIN
  28481. END P;
  28482. END A.
  28483. MODULE Test;
  28484. IMPORT SYSTEM,A;
  28485. VAR a: ADDRESS;
  28486. BEGIN A.P(a)
  28487. END Test.
  28488. positive: use ADDRESS as array index
  28489. MODULE Test;
  28490. IMPORT SYSTEM;
  28491. VAR a: ADDRESS; b: ARRAY 32 OF ADDRESS;
  28492. BEGIN b[a] := b[a]
  28493. END Test.
  28494. positive: long jumps (backend test for TRM)
  28495. MODULE Test;
  28496. PROCEDURE LongJumpBackwards;
  28497. VAR a,b,c: LONGINT;
  28498. BEGIN
  28499. REPEAT
  28500. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28501. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28502. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28503. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28504. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28505. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28506. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28507. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28508. UNTIL a<b
  28509. END LongJumpBackwards;
  28510. PROCEDURE LongJumpForwards;
  28511. VAR a,b,c: LONGINT;
  28512. BEGIN
  28513. IF a>=b THEN
  28514. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28515. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28516. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28517. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28518. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28519. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28520. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28521. a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c; a := b + c;
  28522. END;
  28523. END LongJumpForwards;
  28524. END Test.
  28525. positive: expressions of type real with longint divisions
  28526. MODULE Test;
  28527. PROCEDURE Do*(x: REAL): REAL;
  28528. VAR v: REAL;
  28529. BEGIN
  28530. v := x * (x * (x * (x * ((11 / 11520) - x * (1 / 14400)) - 583 / 69120) + 14597 / 276480) - 156409 / 737280) + 381773117 / 928972800;
  28531. RETURN v;
  28532. END Do;
  28533. END Test.
  28534. negative: invalid arrow designator
  28535. MODULE Test;
  28536. VAR s: ARRAY 128 OF CHAR;
  28537. BEGIN
  28538. COPY("WMClock.Open~", s)^;
  28539. END Test.
  28540. positive: tests of MIN and MAX
  28541. MODULE Test;
  28542. PROCEDURE TestMinMax*();
  28543. BEGIN
  28544. ASSERT(-128 = MIN(SHORTINT)); ASSERT(127 = MAX(SHORTINT));
  28545. ASSERT(-32768 = MIN(INTEGER)); ASSERT(32767 = MAX(INTEGER));
  28546. ASSERT(-2147483648 = MIN(LONGINT)); ASSERT(2147483647 = MAX(LONGINT));
  28547. ASSERT(-9223372036854775807-1 = MIN(HUGEINT)); ASSERT(9223372036854775807 = MAX(HUGEINT));
  28548. ASSERT(-128 = MIN(SIGNED8)); ASSERT(127 = MAX(SIGNED8));
  28549. ASSERT(-32768 = MIN(SIGNED16)); ASSERT(32767 = MAX(SIGNED16));
  28550. ASSERT(-2147483648 = MIN(SIGNED32)); ASSERT(2147483647 = MAX(SIGNED32));
  28551. ASSERT(-9223372036854775807 -1 = MIN(SIGNED64)); ASSERT(9223372036854775807 = MAX(SIGNED64));
  28552. ASSERT(0 = MIN(UNSIGNED8)); ASSERT(255 = MAX(UNSIGNED8));
  28553. ASSERT(0 = MIN(UNSIGNED16)); ASSERT(65535 = MAX(UNSIGNED16));
  28554. ASSERT(0 = MIN(UNSIGNED32)); ASSERT(4294967295 = MAX(UNSIGNED32));
  28555. ASSERT(0 = MIN(UNSIGNED64)); ASSERT(SIGNED64(-1) = MAX(UNSIGNED64));
  28556. END TestMinMax;
  28557. BEGIN
  28558. END Test.
  28559. negative: conversion float to unsigned data type
  28560. MODULE Test;
  28561. VAR real: REAL;
  28562. VAR unsigned8: UNSIGNED8;
  28563. BEGIN
  28564. unsigned8 := UNSIGNED8(real);
  28565. END Test.
  28566. negative: use array of size for array size
  28567. MODULE Test;
  28568. CONST Data = [10,20];
  28569. VAR a: ARRAY LEN(Data) OF LONGINT;
  28570. END Test.
  28571. positive: use array size for array size
  28572. MODULE Test;
  28573. CONST Data = [10,20];
  28574. VAR a: ARRAY LEN(Data,0) OF LONGINT;
  28575. END Test.