Oberon.Compilation.Test 849 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449
  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. negative: 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. negative: 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 import
  1666. MODULE Test;
  1667. CONST IMPORT = 0;
  1668. END Test.
  1669. negative: redefining in
  1670. MODULE Test;
  1671. CONST IN = 0;
  1672. END Test.
  1673. negative: redefining inc
  1674. MODULE Test;
  1675. CONST INC = 0;
  1676. END Test.
  1677. negative: redefining incl
  1678. MODULE Test;
  1679. CONST INCL = 0;
  1680. END Test.
  1681. negative: redefining integer
  1682. MODULE Test;
  1683. CONST INTEGER = 0;
  1684. END Test.
  1685. negative: redefining is
  1686. MODULE Test;
  1687. CONST IS = 0;
  1688. END Test.
  1689. negative: redefining len
  1690. MODULE Test;
  1691. CONST LEN = 0;
  1692. END Test.
  1693. negative: redefining long
  1694. MODULE Test;
  1695. CONST LONG = 0;
  1696. END Test.
  1697. negative: redefining longint
  1698. MODULE Test;
  1699. CONST LONGINT = 0;
  1700. END Test.
  1701. negative: redefining longreal
  1702. MODULE Test;
  1703. CONST LONGREAL = 0;
  1704. END Test.
  1705. negative: redefining loop
  1706. MODULE Test;
  1707. CONST LOOP = 0;
  1708. END Test.
  1709. negative: redefining max
  1710. MODULE Test;
  1711. CONST MAX = 0;
  1712. END Test.
  1713. negative: redefining min
  1714. MODULE Test;
  1715. CONST MIN = 0;
  1716. END Test.
  1717. negative: redefining mod
  1718. MODULE Test;
  1719. CONST MOD = 0;
  1720. END Test.
  1721. negative: redefining module
  1722. MODULE Test;
  1723. CONST MODULE = 0;
  1724. END Test.
  1725. negative: redefining new
  1726. MODULE Test;
  1727. CONST NEW = 0;
  1728. END Test.
  1729. negative: redefining nil
  1730. MODULE Test;
  1731. CONST NIL = 0;
  1732. END Test.
  1733. negative: redefining object
  1734. MODULE Test;
  1735. CONST OBJECT = 0;
  1736. END Test.
  1737. negative: redefining odd
  1738. MODULE Test;
  1739. CONST ODD = 0;
  1740. END Test.
  1741. negative: redefining of
  1742. MODULE Test;
  1743. CONST OF = 0;
  1744. END Test.
  1745. negative: redefining or
  1746. MODULE Test;
  1747. CONST OR = 0;
  1748. END Test.
  1749. negative: redefining ord
  1750. MODULE Test;
  1751. CONST ORD = 0;
  1752. END Test.
  1753. negative: redefining pointer
  1754. MODULE Test;
  1755. CONST POINTER = 0;
  1756. END Test.
  1757. negative: redefining procedure
  1758. MODULE Test;
  1759. CONST PROCEDURE = 0;
  1760. END Test.
  1761. negative: redefining real
  1762. MODULE Test;
  1763. CONST REAL = 0;
  1764. END Test.
  1765. negative: redefining record
  1766. MODULE Test;
  1767. CONST RECORD = 0;
  1768. END Test.
  1769. negative: redefining repeat
  1770. MODULE Test;
  1771. CONST REPEAT = 0;
  1772. END Test.
  1773. negative: redefining return
  1774. MODULE Test;
  1775. CONST RETURN = 0;
  1776. END Test.
  1777. negative: redefining self
  1778. MODULE Test;
  1779. CONST SELF = 0;
  1780. END Test.
  1781. negative: redefining set
  1782. MODULE Test;
  1783. CONST SET = 0;
  1784. END Test.
  1785. negative: redefining short
  1786. MODULE Test;
  1787. CONST SHORT = 0;
  1788. END Test.
  1789. negative: redefining shortint
  1790. MODULE Test;
  1791. CONST SHORTINT = 0;
  1792. END Test.
  1793. negative: redefining then
  1794. MODULE Test;
  1795. CONST THEN = 0;
  1796. END Test.
  1797. negative: redefining to
  1798. MODULE Test;
  1799. CONST TO = 0;
  1800. END Test.
  1801. negative: redefining true
  1802. MODULE Test;
  1803. CONST TRUE = 0;
  1804. END Test.
  1805. negative: redefining type
  1806. MODULE Test;
  1807. CONST TYPE = 0;
  1808. END Test.
  1809. negative: redefining until
  1810. MODULE Test;
  1811. CONST UNTIL = 0;
  1812. END Test.
  1813. negative: redefining var
  1814. MODULE Test;
  1815. CONST VAR = 0;
  1816. END Test.
  1817. negative: redefining while
  1818. MODULE Test;
  1819. CONST WHILE = 0;
  1820. END Test.
  1821. negative: redefining with
  1822. MODULE Test;
  1823. CONST WITH = 0;
  1824. END Test.
  1825. # Semantic tests
  1826. # =====================================
  1827. # imports
  1828. positive: dummy module
  1829. MODULE Dummy; END Dummy.
  1830. positive: single import
  1831. MODULE Test;
  1832. IMPORT Dummy;
  1833. END Test.
  1834. negative: import marked as exported
  1835. MODULE Test;
  1836. IMPORT Dummy*;
  1837. END Test.
  1838. negative: import marked as read-only
  1839. MODULE Test;
  1840. IMPORT Dummy-;
  1841. END Test.
  1842. positive: single import with different alias
  1843. MODULE Test;
  1844. IMPORT Alias := Dummy;
  1845. END Test.
  1846. positive: single import with same alias
  1847. MODULE Test;
  1848. IMPORT Dummy := Dummy;
  1849. END Test.
  1850. negative: duplicated import
  1851. MODULE Test;
  1852. IMPORT Dummy, Dummy;
  1853. END Test.
  1854. positive: duplicated import with different alias
  1855. MODULE Test;
  1856. IMPORT A := Dummy, B := Dummy;
  1857. END Test.
  1858. negative: duplicated import with same alias
  1859. MODULE Test;
  1860. IMPORT A := Dummy, A := Dummy;
  1861. END Test.
  1862. negative: import within procedure
  1863. MODULE Test;
  1864. PROCEDURE Procedure;
  1865. IMPORT Import := Dummy;
  1866. END Procedure;
  1867. END Test.
  1868. negative: import within nested procedure
  1869. MODULE Test;
  1870. PROCEDURE Procedure;
  1871. PROCEDURE Procedure;
  1872. IMPORT Import := Dummy;
  1873. END Procedure;
  1874. END Procedure;
  1875. END Test.
  1876. negative: import within object
  1877. MODULE Test;
  1878. TYPE Object = OBJECT
  1879. IMPORT Import := Dummy;
  1880. END Object;
  1881. END Test.
  1882. negative: import within object in procedure
  1883. MODULE Test;
  1884. PROCEDURE Procedure;
  1885. TYPE Object = OBJECT
  1886. IMPORT Import := Dummy;
  1887. END Object;
  1888. END Object;
  1889. END Test.
  1890. negative: import within procedure in object
  1891. MODULE Test;
  1892. TYPE Object = OBJECT
  1893. PROCEDURE Procedure;
  1894. IMPORT Import := Dummy;
  1895. END Procedure;
  1896. END Object;
  1897. END Test.
  1898. positive: dummy empty module
  1899. MODULE Test; END Test.
  1900. positive: dummy module with import
  1901. MODULE Dummy;
  1902. IMPORT Test;
  1903. END Dummy.
  1904. negative: module importing itself directly
  1905. MODULE Test;
  1906. IMPORT Test;
  1907. END Test.
  1908. negative: module importing itself directly with alias
  1909. MODULE Test;
  1910. IMPORT Import := Test;
  1911. END Test.
  1912. negative: module importing itself indirectly
  1913. MODULE Test;
  1914. IMPORT Dummy;
  1915. END Test.
  1916. negative: module importing itself indirectly with alias
  1917. MODULE Test;
  1918. IMPORT Import := Dummy;
  1919. END Test.
  1920. negative: constant as import
  1921. MODULE Test;
  1922. IMPORT Import := Constant;
  1923. CONST Constant = 0;
  1924. END Test.
  1925. negative: type as import
  1926. MODULE Test;
  1927. IMPORT Import := Type;
  1928. TYPE Type = INTEGER;
  1929. END Test.
  1930. negative: variable as import
  1931. MODULE Test;
  1932. IMPORT Import := variable;
  1933. VAR variable: INTEGER;
  1934. END Test.
  1935. negative: procedure as import
  1936. MODULE Test;
  1937. IMPORT Import := Procedure;
  1938. PROCEDURE Procedure; INTEGER;
  1939. END Test.
  1940. negative: parameter as import
  1941. MODULE Test;
  1942. PROCEDURE Procedure (parameter: INTEGER);
  1943. IMPORT Import := parameter;
  1944. END Procedure;
  1945. END Test.
  1946. # constants
  1947. positive: unmarked constant
  1948. MODULE Test;
  1949. CONST Constant = 54;
  1950. END Test.
  1951. positive: unmarked constant within procedure
  1952. MODULE Test;
  1953. PROCEDURE Procedure;
  1954. CONST Constant = 54;
  1955. END Procedure;
  1956. END Test.
  1957. positive: unmarked constant within nested procedure
  1958. MODULE Test;
  1959. PROCEDURE Procedure;
  1960. PROCEDURE Procedure;
  1961. CONST Constant = 54;
  1962. END Procedure;
  1963. END Procedure;
  1964. END Test.
  1965. positive: unmarked constant within object
  1966. MODULE Test;
  1967. TYPE Object = OBJECT
  1968. CONST Constant = 54;
  1969. END Object;
  1970. END Test.
  1971. positive: unmarked constant within object in procedure
  1972. MODULE Test;
  1973. PROCEDURE Procedure;
  1974. TYPE Object = OBJECT
  1975. CONST Constant = 54;
  1976. END Object;
  1977. END Procedure;
  1978. END Test.
  1979. positive: unmarked constant within procedure in object
  1980. MODULE Test;
  1981. TYPE Object = OBJECT
  1982. PROCEDURE Procedure;
  1983. CONST Constant = 54;
  1984. END Procedure;
  1985. END Object;
  1986. END Test.
  1987. positive: constant marked as exported
  1988. MODULE Test;
  1989. CONST Constant* = 54;
  1990. END Test.
  1991. negative: constant marked as exported within procedure
  1992. MODULE Test;
  1993. PROCEDURE Procedure;
  1994. CONST Constant* = 54;
  1995. END Procedure;
  1996. END Test.
  1997. negative: constant marked as exported within nested procedure
  1998. MODULE Test;
  1999. PROCEDURE Procedure;
  2000. PROCEDURE Procedure;
  2001. CONST Constant* = 54;
  2002. END Procedure;
  2003. END Procedure;
  2004. END Test.
  2005. positive: constant marked as exported within object
  2006. MODULE Test;
  2007. TYPE Object = OBJECT
  2008. CONST Constant* = 54;
  2009. END Object;
  2010. END Test.
  2011. negative: constant marked as exported within object in procedure
  2012. MODULE Test;
  2013. PROCEDURE Procedure;
  2014. TYPE Object = OBJECT
  2015. CONST Constant* = 54;
  2016. END Object;
  2017. END Procedure;
  2018. END Test.
  2019. negative: constant marked as exported within procedure in object
  2020. MODULE Test;
  2021. TYPE Object = OBJECT
  2022. PROCEDURE Procedure;
  2023. CONST Constant* = 54;
  2024. END Procedure;
  2025. END Object;
  2026. END Test.
  2027. negative: constant marked as read-only
  2028. MODULE Test;
  2029. CONST Constant- = TRUE;
  2030. END Test.
  2031. negative: constant marked as read-only within procedure
  2032. MODULE Test;
  2033. PROCEDURE Procedure;
  2034. CONST Constant- = TRUE;
  2035. END Procedure;
  2036. END Test.
  2037. negative: constant marked as read-only within nested procedure
  2038. MODULE Test;
  2039. PROCEDURE Procedure;
  2040. PROCEDURE Procedure;
  2041. CONST Constant- = TRUE;
  2042. END Procedure;
  2043. END Procedure;
  2044. END Test.
  2045. negative: constant marked as read-only within object
  2046. MODULE Test;
  2047. TYPE Object = OBJECT
  2048. CONST Constant- = TRUE;
  2049. END Object;
  2050. END Test.
  2051. negative: constant marked as read-only within object in procedure
  2052. MODULE Test;
  2053. PROCEDURE Procedure;
  2054. TYPE Object = OBJECT
  2055. CONST Constant- = TRUE;
  2056. END Object;
  2057. END Procedure;
  2058. END Test.
  2059. negative: constant marked as read-only within procedure in object
  2060. MODULE Test;
  2061. TYPE Object = OBJECT
  2062. PROCEDURE Procedure;
  2063. CONST Constant- = TRUE;
  2064. END Procedure;
  2065. END Object;
  2066. END Test.
  2067. negative: duplicated constant
  2068. MODULE Test;
  2069. CONST Constant = TRUE;
  2070. CONST Constant = FALSE;
  2071. END Test.
  2072. negative: duplicated constant within procedure
  2073. MODULE Test;
  2074. PROCEDURE Procedure;
  2075. CONST Constant = TRUE;
  2076. CONST Constant = FALSE;
  2077. END Procedure;
  2078. END Test.
  2079. negative: duplicated constant within nested procedure
  2080. MODULE Test;
  2081. PROCEDURE Procedure;
  2082. PROCEDURE Procedure;
  2083. CONST Constant = TRUE;
  2084. CONST Constant = FALSE;
  2085. END Procedure;
  2086. END Procedure;
  2087. END Test.
  2088. negative: duplicated constant within object
  2089. MODULE Test;
  2090. TYPE Object = OBJECT
  2091. CONST Constant = TRUE;
  2092. CONST Constant = FALSE;
  2093. END Object;
  2094. END Test.
  2095. negative: duplicated constant within object in procedure
  2096. MODULE Test;
  2097. TYPE Object = OBJECT
  2098. PROCEDURE Procedure;
  2099. CONST Constant = TRUE;
  2100. CONST Constant = FALSE;
  2101. END Procedure;
  2102. END Object;
  2103. END Test.
  2104. negative: duplicated constant within procedure in object
  2105. MODULE Test;
  2106. PROCEDURE Procedure;
  2107. TYPE Object = OBJECT
  2108. CONST Constant = TRUE;
  2109. CONST Constant = FALSE;
  2110. END Object;
  2111. END Procedure;
  2112. END Test.
  2113. positive: backwards referencing constant
  2114. MODULE Test;
  2115. CONST A = 0; B = A;
  2116. END Test.
  2117. positive: backwards referencing constant within procedure
  2118. MODULE Test;
  2119. PROCEDURE Procedure;
  2120. CONST A = 0; B = A;
  2121. END Procedure;
  2122. END Test.
  2123. positive: backwards referencing constant within nested procedure
  2124. MODULE Test;
  2125. PROCEDURE Procedure;
  2126. PROCEDURE Procedure;
  2127. CONST A = 0; B = A;
  2128. END Procedure;
  2129. END Procedure;
  2130. END Test.
  2131. positive: backwards referencing constant within object
  2132. MODULE Test;
  2133. TYPE Object = OBJECT
  2134. CONST A = 0; B = A;
  2135. END Object;
  2136. END Test.
  2137. positive: backwards referencing constant within object in procedure
  2138. MODULE Test;
  2139. PROCEDURE Procedure;
  2140. TYPE Object = OBJECT
  2141. CONST A = 0; B = A;
  2142. END Object;
  2143. END Procedure;
  2144. END Test.
  2145. positive: backwards referencing constant within procedure in object
  2146. MODULE Test;
  2147. TYPE Object = OBJECT
  2148. PROCEDURE Procedure;
  2149. CONST A = 0; B = A;
  2150. END Procedure;
  2151. END Object;
  2152. END Test.
  2153. positive: forwards referencing constant
  2154. MODULE Test;
  2155. CONST A = B; B = 0;
  2156. END Test.
  2157. positive: forwards referencing constant within procedure
  2158. MODULE Test;
  2159. PROCEDURE Procedure;
  2160. CONST A = B; B = 0;
  2161. END Procedure;
  2162. END Test.
  2163. positive: forwards referencing constant within nested procedure
  2164. MODULE Test;
  2165. PROCEDURE Procedure;
  2166. PROCEDURE Procedure;
  2167. CONST A = B; B = 0;
  2168. END Procedure;
  2169. END Procedure;
  2170. END Test.
  2171. positive: forwards referencing constant within object
  2172. MODULE Test;
  2173. TYPE Object = OBJECT
  2174. CONST A = B; B = 0;
  2175. END Object;
  2176. END Test.
  2177. positive: forwards referencing constant within object in procedure
  2178. MODULE Test;
  2179. PROCEDURE Procedure;
  2180. TYPE Object = OBJECT
  2181. CONST A = B; B = 0;
  2182. END Object;
  2183. END Procedure;
  2184. END Test.
  2185. positive: forwards referencing constant within procedure in object
  2186. MODULE Test;
  2187. TYPE Object = OBJECT
  2188. PROCEDURE Procedure;
  2189. CONST A = B; B = 0;
  2190. END Procedure;
  2191. END Object;
  2192. END Test.
  2193. negative: cyclic referencing constants
  2194. MODULE Test;
  2195. CONST A = B; B = A;
  2196. END Test.
  2197. negative: cyclic referencing constants within procedure
  2198. MODULE Test;
  2199. PROCEDURE Procedure;
  2200. CONST A = B; B = A;
  2201. END Procedure;
  2202. END Test.
  2203. negative: cyclic referencing constants within nested procedure
  2204. MODULE Test;
  2205. PROCEDURE Procedure;
  2206. PROCEDURE Procedure;
  2207. CONST A = B; B = A;
  2208. END Procedure;
  2209. END Procedure;
  2210. END Test.
  2211. negative: cyclic referencing constants within object
  2212. MODULE Test;
  2213. TYPE Object = OBJECT
  2214. CONST A = B; B = A;
  2215. END Object;
  2216. END Test.
  2217. negative: cyclic referencing constants within object in procedure
  2218. MODULE Test;
  2219. PROCEDURE Procedure;
  2220. TYPE Object = OBJECT
  2221. CONST A = B; B = A;
  2222. END Object;
  2223. END Procedure;
  2224. END Test.
  2225. negative: cyclic referencing constants within procedure in object
  2226. MODULE Test;
  2227. TYPE Object = OBJECT
  2228. PROCEDURE Procedure;
  2229. CONST A = B; B = A;
  2230. END Procedure;
  2231. END Object;
  2232. END Test.
  2233. negative: self referencing constant
  2234. MODULE Test;
  2235. CONST Constant = Constant;
  2236. END Test.
  2237. negative: self referencing constant within procedure
  2238. MODULE Test;
  2239. PROCEDURE Procedure;
  2240. CONST Constant = Constant;
  2241. END Procedure;
  2242. END Test.
  2243. negative: self referencing constant within nested procedure
  2244. MODULE Test;
  2245. PROCEDURE Procedure;
  2246. PROCEDURE Procedure;
  2247. CONST Constant = Constant;
  2248. END Procedure;
  2249. END Procedure;
  2250. END Test.
  2251. negative: self referencing constant within object
  2252. MODULE Test;
  2253. TYPE Object = OBJECT
  2254. CONST Constant = Constant;
  2255. END Object;
  2256. END Test.
  2257. negative: self referencing constant within object in procedure
  2258. MODULE Test;
  2259. TYPE Object = OBJECT
  2260. PROCEDURE Procedure;
  2261. CONST Constant = Constant;
  2262. END Procedure;
  2263. END Object;
  2264. END Test.
  2265. negative: self referencing constant within procedure in object
  2266. MODULE Test;
  2267. PROCEDURE Procedure;
  2268. TYPE Object = OBJECT
  2269. CONST Constant = Constant;
  2270. END Object;
  2271. END Procedure;
  2272. END Test.
  2273. positive: dummy module exporting constants
  2274. MODULE Dummy;
  2275. CONST Exported* = 5;
  2276. CONST Private = 5;
  2277. END Dummy.
  2278. positive: importing exported constant
  2279. MODULE Test;
  2280. IMPORT Dummy;
  2281. CONST Constant = Dummy.Exported;
  2282. BEGIN ASSERT (Constant = 5);
  2283. END Test.
  2284. negative: importing private constant
  2285. MODULE Test;
  2286. IMPORT Dummy;
  2287. CONST Constant = Dummy.Private;
  2288. END Test.
  2289. negative: importing invalid constant
  2290. MODULE Test;
  2291. IMPORT Dummy;
  2292. CONST Constant = Dummy.Invalid;
  2293. END Test.
  2294. negative: import as constant
  2295. MODULE Test;
  2296. IMPORT Import := Dummy;
  2297. CONST Constant = Import;
  2298. END Test.
  2299. negative: type as constant
  2300. MODULE Test;
  2301. CONST Constant = Type;
  2302. TYPE Type = INTEGER;
  2303. END Test.
  2304. negative: variable as constant
  2305. MODULE Test;
  2306. CONST Constant = variable;
  2307. VAR variable: INTEGER;
  2308. END Test.
  2309. negative: procedure as constant
  2310. MODULE Test;
  2311. CONST Constant = Procedure;
  2312. PROCEDURE Procedure; INTEGER;
  2313. END Test.
  2314. negative: parameter as constant
  2315. MODULE Test;
  2316. PROCEDURE Procedure (parameter: INTEGER);
  2317. CONST Constant = parameter;
  2318. END Procedure;
  2319. END Test.
  2320. negative: const parameter as constant
  2321. MODULE Test;
  2322. PROCEDURE Procedure (CONST parameter: INTEGER);
  2323. CONST Constant = parameter;
  2324. END Procedure;
  2325. END Test.
  2326. # constant booleans
  2327. negative: arithmetic negation on constant boolean
  2328. MODULE Test;
  2329. CONST Result = -TRUE;
  2330. END Test.
  2331. positive: logical negation on constant boolean
  2332. MODULE Test;
  2333. CONST Result = ~FALSE;
  2334. BEGIN ASSERT (Result = TRUE);
  2335. END Test.
  2336. positive: multiple logical negations on constant boolean
  2337. MODULE Test;
  2338. CONST Result = ~~~~FALSE;
  2339. BEGIN ASSERT (Result = FALSE);
  2340. END Test.
  2341. negative: dereferencing constant boolean
  2342. MODULE Test;
  2343. CONST Result = FALSE^;
  2344. END Test.
  2345. negative: dereferencing constant boolean indirectly
  2346. MODULE Test;
  2347. CONST Constant = FALSE;
  2348. CONST Result = Constant^;
  2349. END Test.
  2350. negative: addition on constant booleans
  2351. MODULE Test;
  2352. CONST Result = TRUE + FALSE;
  2353. END Test.
  2354. negative: subtraction on constant booleans
  2355. MODULE Test;
  2356. CONST Result = FALSE - TRUE
  2357. END Test.
  2358. negative: multiplication on constant booleans
  2359. MODULE Test;
  2360. CONST Result = FALSE * TRUE
  2361. END Test.
  2362. negative: integer division on constant booleans
  2363. MODULE Test;
  2364. CONST Result = TRUE DIV TRUE
  2365. END Test.
  2366. negative: real division on constant booleans
  2367. MODULE Test;
  2368. CONST Result = TRUE / FALSE
  2369. END Test.
  2370. negative: modulo on constant booleans
  2371. MODULE Test;
  2372. CONST Result = FALSE MOD TRUE
  2373. END Test.
  2374. positive: equal relation on constant booleans
  2375. MODULE Test;
  2376. CONST Result = TRUE = FALSE
  2377. BEGIN ASSERT (Result = FALSE);
  2378. END Test.
  2379. positive: unequal relation on constant booleans
  2380. MODULE Test;
  2381. CONST Result = TRUE # TRUE
  2382. BEGIN ASSERT (Result = FALSE);
  2383. END Test.
  2384. negative: less relation on constant booleans
  2385. MODULE Test;
  2386. CONST Result = TRUE < FALSE
  2387. END Test.
  2388. negative: less or equal relation on constant booleans
  2389. MODULE Test;
  2390. CONST Result = FALSE <= FALSE
  2391. END Test.
  2392. negative: greater relation on constant booleans
  2393. MODULE Test;
  2394. CONST Result = FALSE > TRUE
  2395. END Test.
  2396. negative: greater or equal relation on constant booleans
  2397. MODULE Test;
  2398. CONST Result = FALSE >= TRUE
  2399. END Test.
  2400. negative: set membership on constant booleans
  2401. MODULE Test;
  2402. CONST Result = TRUE IN FALSE
  2403. END Test.
  2404. negative: type test on constant booleans
  2405. MODULE Test;
  2406. CONST Result = TRUE IS FALSE
  2407. END Test.
  2408. negative: type test on constant boolean
  2409. MODULE Test;
  2410. CONST Result = TRUE IS BOOLEAN
  2411. END Test.
  2412. negative: type test on constant boolean type
  2413. MODULE Test;
  2414. TYPE Type = BOOLEAN;
  2415. CONST Result = TRUE IS Type
  2416. END Test.
  2417. negative: type guard on constant booleans
  2418. MODULE Test;
  2419. CONST Result = TRUE(FALSE)
  2420. END Test.
  2421. negative: indirect type guard on constant booleans
  2422. MODULE Test;
  2423. CONST Constant = TRUE
  2424. CONST Result = Constant(Constant)
  2425. END Test.
  2426. negative: type guard on constant boolean
  2427. MODULE Test;
  2428. CONST Result = TRUE(BOOLEAN)
  2429. END Test.
  2430. negative: indirect type guard on constant boolean
  2431. MODULE Test;
  2432. CONST Constant = TRUE
  2433. CONST Result = Constant(BOOLEAN)
  2434. END Test.
  2435. negative: type guard on constant boolean type
  2436. MODULE Test;
  2437. TYPE Type = BOOLEAN;
  2438. CONST Result = TRUE(Type)
  2439. END Test.
  2440. negative: indirect type guard on constant boolean type
  2441. MODULE Test;
  2442. CONST Constant = TRUE
  2443. TYPE Type = BOOLEAN;
  2444. CONST Result = Constant(Type)
  2445. END Test.
  2446. positive: logical and on constant booleans
  2447. MODULE Test;
  2448. CONST Result = TRUE & FALSE
  2449. BEGIN ASSERT (Result = FALSE);
  2450. END Test.
  2451. positive: logical or on constant booleans
  2452. MODULE Test;
  2453. CONST Result = FALSE OR TRUE
  2454. BEGIN ASSERT (Result = TRUE);
  2455. END Test.
  2456. negative: ordinal value of constant boolean
  2457. MODULE Test;
  2458. CONST Result = ORD (TRUE)
  2459. END Test.
  2460. negative: character value of constant boolean
  2461. MODULE Test;
  2462. CONST Result = CHR (FALSE)
  2463. END Test.
  2464. negative: absolute value of constant boolean
  2465. MODULE Test;
  2466. CONST Result = ABS (FALSE)
  2467. END Test.
  2468. negative: odd test on constant boolean
  2469. MODULE Test;
  2470. CONST Result = ODD (FALSE)
  2471. END Test.
  2472. negative: capital letter of constant boolean
  2473. MODULE Test;
  2474. CONST Result = CAP (TRUE)
  2475. END Test.
  2476. negative: minimal value of boolean
  2477. MODULE Test;
  2478. CONST Result = MIN (BOOLEAN)
  2479. END Test.
  2480. negative: maximal value of boolean
  2481. MODULE Test;
  2482. CONST Result = MAX (BOOLEAN)
  2483. END Test.
  2484. negative: arithmetic shift of constant booleans
  2485. MODULE Test;
  2486. CONST Result = ASH (TRUE, FALSE)
  2487. END Test.
  2488. negative: short on constant boolean
  2489. MODULE Test;
  2490. CONST Result = SHORT (FALSE)
  2491. END Test.
  2492. negative: long on constant boolean
  2493. MODULE Test;
  2494. CONST Result = LONG (FALSE)
  2495. END Test.
  2496. negative: entier on constant boolean
  2497. MODULE Test;
  2498. CONST Result = ENTIER (FALSE)
  2499. END Test.
  2500. negative: unary length of constant boolean
  2501. MODULE Test;
  2502. CONST Result = LEN (FALSE)
  2503. END Test.
  2504. negative: binary length of constant boolean
  2505. MODULE Test;
  2506. CONST Result = LEN (FALSE, 0)
  2507. END Test.
  2508. negative: indexing constant boolean
  2509. MODULE Test;
  2510. CONST Result = TRUE[0]
  2511. END Test.
  2512. negative: indexing constant boolean indirectly
  2513. MODULE Test;
  2514. CONST Constant = TRUE;
  2515. CONST Result = Constant[0]
  2516. END Test.
  2517. negative: constant boolean as index
  2518. MODULE Test;
  2519. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  2520. BEGIN result := array[TRUE]
  2521. END Test.
  2522. negative: member selection on constant boolean
  2523. MODULE Test;
  2524. CONST Result = TRUE.member
  2525. END Test.
  2526. negative: indirect member selection on constant boolean
  2527. MODULE Test;
  2528. CONST Constant = TRUE;
  2529. CONST Result = Constant.member
  2530. END Test.
  2531. negative: calling constant boolean
  2532. MODULE Test;
  2533. BEGIN TRUE ()
  2534. END Test.
  2535. negative: calling constant boolean indirectly
  2536. MODULE Test;
  2537. CONST Constant = TRUE;
  2538. BEGIN Constant
  2539. END Test.
  2540. negative: calling constant boolean indirectly with parentheses
  2541. MODULE Test;
  2542. CONST Constant = TRUE;
  2543. BEGIN Constant ()
  2544. END Test.
  2545. positive: calling procedure with parameter and constant boolean argument
  2546. MODULE Test;
  2547. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  2548. BEGIN Procedure (TRUE);
  2549. END Test.
  2550. negative: calling procedure with variable parameter and constant boolean argument
  2551. MODULE Test;
  2552. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  2553. BEGIN Procedure (TRUE);
  2554. END Test.
  2555. positive: calling procedure with constant parameter and constant boolean argument
  2556. MODULE Test;
  2557. PROCEDURE Procedure (CONST value: BOOLEAN); END Procedure;
  2558. BEGIN Procedure (TRUE);
  2559. END Test.
  2560. # constant characters
  2561. negative: constant character exceeding valid range
  2562. MODULE Test;
  2563. CONST Result = 1234X;
  2564. END Test.
  2565. positive: ordering of constant character ordinals
  2566. MODULE Test;
  2567. BEGIN ASSERT (0X < 0FFX)
  2568. END Test.
  2569. negative: arithmetic negation on constant character
  2570. MODULE Test;
  2571. CONST Result = -'a';
  2572. END Test.
  2573. negative: logical negation on constant character
  2574. MODULE Test;
  2575. CONST Result = ~5X;
  2576. END Test.
  2577. negative: dereferencing constant character
  2578. MODULE Test;
  2579. CONST Result = 't'^;
  2580. END Test.
  2581. negative: dereferencing constant character indirectly
  2582. MODULE Test;
  2583. CONST Constant = 't';
  2584. CONST Result = Constant^;
  2585. END Test.
  2586. negative: addition on constant characters
  2587. MODULE Test;
  2588. CONST Result = 45X + 'r';
  2589. END Test.
  2590. negative: subtraction on constant characters
  2591. MODULE Test;
  2592. CONST Result = '3' - 'a'
  2593. END Test.
  2594. negative: multiplication on constant characters
  2595. MODULE Test;
  2596. CONST Result = '9' * 4FX
  2597. END Test.
  2598. negative: integer division on constant characters
  2599. MODULE Test;
  2600. CONST Result = '@' DIV 'g'
  2601. END Test.
  2602. negative: real division on constant characters
  2603. MODULE Test;
  2604. CONST Result = 'a' / 'b'
  2605. END Test.
  2606. negative: modulo on constant characters
  2607. MODULE Test;
  2608. CONST Result = 8X MOD 2X
  2609. END Test.
  2610. positive: equal relation on constant characters
  2611. MODULE Test;
  2612. CONST Result = 'r' = 'l'
  2613. BEGIN ASSERT (Result = FALSE);
  2614. END Test.
  2615. positive: unequal relation on constant characters
  2616. MODULE Test;
  2617. CONST Result = 4AX # 'z'
  2618. BEGIN ASSERT (Result = TRUE);
  2619. END Test.
  2620. positive: less relation on constant characters
  2621. MODULE Test;
  2622. CONST Result = 's' < 64X
  2623. BEGIN ASSERT (Result = FALSE);
  2624. END Test.
  2625. positive: less or equal relation on constant characters
  2626. MODULE Test;
  2627. CONST Result = 'e' <= 9X
  2628. BEGIN ASSERT (Result = FALSE);
  2629. END Test.
  2630. positive: greater relation on constant characters
  2631. MODULE Test;
  2632. CONST Result = 'r' > 'a'
  2633. BEGIN ASSERT (Result = TRUE);
  2634. END Test.
  2635. positive: greater or equal relation on constant characters
  2636. MODULE Test;
  2637. CONST Result = 'h' >= 0DX
  2638. BEGIN ASSERT (Result = TRUE);
  2639. END Test.
  2640. negative: set membership on constant characters
  2641. MODULE Test;
  2642. CONST Result = 1DX IN 'z'
  2643. END Test.
  2644. negative: type test on constant characters
  2645. MODULE Test;
  2646. CONST Result = '0' IS 0X
  2647. END Test.
  2648. negative: type test on constant character
  2649. MODULE Test;
  2650. CONST Result = '0' IS CHAR
  2651. END Test.
  2652. negative: type test on constant character type
  2653. MODULE Test;
  2654. TYPE Type = CHAR;
  2655. CONST Result = '0' IS Type
  2656. END Test.
  2657. negative: type guard on constant characters
  2658. MODULE Test;
  2659. CONST Result = '0'(0X)
  2660. END Test.
  2661. negative: indirect type guard on constant characters
  2662. MODULE Test;
  2663. CONST Constant = '0'
  2664. CONST Result = Constant(Constant)
  2665. END Test.
  2666. negative: type guard on constant character
  2667. MODULE Test;
  2668. CONST Result = '0'(CHAR)
  2669. END Test.
  2670. negative: indirect type guard on constant character
  2671. MODULE Test;
  2672. CONST Constant = '0'
  2673. CONST Result = Constant(CHAR)
  2674. END Test.
  2675. negative: type guard on constant character type
  2676. MODULE Test;
  2677. TYPE Type = CHAR;
  2678. CONST Result = '0'(Type)
  2679. END Test.
  2680. negative: indirect guard test on constant character type
  2681. MODULE Test;
  2682. CONST Constant = '0'
  2683. TYPE Type = CHAR;
  2684. CONST Result = Constant(Type)
  2685. END Test.
  2686. negative: logical and on constant characters
  2687. MODULE Test;
  2688. CONST Result = 'A' & 't'
  2689. END Test.
  2690. negative: logical or on constant characters
  2691. MODULE Test;
  2692. CONST Result = 0X OR 1X
  2693. END Test.
  2694. positive: ordinal value of constant character
  2695. MODULE Test;
  2696. CONST Result = ORD (10X)
  2697. BEGIN ASSERT (Result = 10H)
  2698. END Test.
  2699. negative: character value of constant character
  2700. MODULE Test;
  2701. CONST Result = CHR (23X)
  2702. END Test.
  2703. negative: absolute value of constant character
  2704. MODULE Test;
  2705. CONST Result = ABS (0X)
  2706. END Test.
  2707. negative: odd test on constant character
  2708. MODULE Test;
  2709. CONST Result = ODD ('2')
  2710. END Test.
  2711. positive: capital letter of constant character
  2712. MODULE Test;
  2713. CONST Result = CAP ('a')
  2714. BEGIN ASSERT (Result = 'A')
  2715. END Test.
  2716. positive: minimal value of character
  2717. MODULE Test;
  2718. CONST Result = MIN (CHAR)
  2719. BEGIN ASSERT (Result = 0X);
  2720. END Test.
  2721. positive: maximal value of character
  2722. MODULE Test;
  2723. CONST Result = MAX (CHAR)
  2724. BEGIN ASSERT (Result = 0FFX);
  2725. END Test.
  2726. negative: arithmetic shift of constant characters
  2727. MODULE Test;
  2728. CONST Result = ASH ('5', '9')
  2729. END Test.
  2730. negative: short on constant character
  2731. MODULE Test;
  2732. CONST Result = SHORT ('t')
  2733. END Test.
  2734. negative: long on constant character
  2735. MODULE Test;
  2736. CONST Result = LONG ('t')
  2737. END Test.
  2738. negative: entier on constant character
  2739. MODULE Test;
  2740. CONST Result = ENTIER ('t')
  2741. END Test.
  2742. negative: unary length of constant character
  2743. MODULE Test;
  2744. CONST Result = LEN (0X)
  2745. END Test.
  2746. negative: binary length of constant character
  2747. MODULE Test;
  2748. CONST Result = LEN (0X, 0)
  2749. END Test.
  2750. negative: indexing constant character
  2751. MODULE Test;
  2752. CONST Result = 'a'[0]
  2753. END Test.
  2754. negative: indexing constant character indirectly
  2755. MODULE Test;
  2756. CONST Constant = 'a';
  2757. CONST Result = Constant[0]
  2758. END Test.
  2759. negative: constant character as index
  2760. MODULE Test;
  2761. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  2762. BEGIN result := array['a']
  2763. END Test.
  2764. negative: member selection on constant character
  2765. MODULE Test;
  2766. CONST Result = '3'.member
  2767. END Test.
  2768. negative: indirect member selection on constant character
  2769. MODULE Test;
  2770. CONST Constant = '3';
  2771. CONST Result = Constant.member
  2772. END Test.
  2773. negative: calling constant character
  2774. MODULE Test;
  2775. BEGIN 'o' ()
  2776. END Test.
  2777. negative: calling constant character indirectly
  2778. MODULE Test;
  2779. CONST Constant = 'o';
  2780. BEGIN Constant
  2781. END Test.
  2782. negative: calling constant character indirectly with parentheses
  2783. MODULE Test;
  2784. CONST Constant = 'o';
  2785. BEGIN Constant ()
  2786. END Test.
  2787. positive: calling procedure with parameter and constant character argument
  2788. MODULE Test;
  2789. PROCEDURE Procedure (value: CHAR); END Procedure;
  2790. BEGIN Procedure ('a');
  2791. END Test.
  2792. negative: calling procedure with variable parameter and constant character argument
  2793. MODULE Test;
  2794. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  2795. BEGIN Procedure (54X);
  2796. END Test.
  2797. positive: calling procedure with constant parameter and constant character argument
  2798. MODULE Test;
  2799. PROCEDURE Procedure (CONST value: CHAR); END Procedure;
  2800. BEGIN Procedure (0AX);
  2801. END Test.
  2802. # constant integers
  2803. negative: constant integer exceeding valid range
  2804. MODULE Test;
  2805. CONST Result = 123456789012345678901234567890;
  2806. END Test.
  2807. positive: arithmetic negation on constant integer
  2808. MODULE Test;
  2809. CONST Result = -5;
  2810. BEGIN ASSERT (Result = -5);
  2811. END Test.
  2812. positive: multiple arithmetic negations on constant integer
  2813. MODULE Test;
  2814. CONST Result = -(-(-9));
  2815. BEGIN ASSERT (Result = -9);
  2816. END Test.
  2817. negative: logical negation on constant integer
  2818. MODULE Test;
  2819. CONST Result = ~788;
  2820. END Test.
  2821. negative: dereferencing constant integer
  2822. MODULE Test;
  2823. CONST Result = 7^;
  2824. END Test.
  2825. negative: dereferencing constant integer indirectly
  2826. MODULE Test;
  2827. CONST Constant = 7;
  2828. CONST Result = Constant^;
  2829. END Test.
  2830. positive: addition on constant integers
  2831. MODULE Test;
  2832. CONST Result = 1 + 057H;
  2833. BEGIN ASSERT (Result = 88);
  2834. END Test.
  2835. positive: subtraction on constant integers
  2836. MODULE Test;
  2837. CONST Result = 0 - 1
  2838. BEGIN ASSERT (Result = -1);
  2839. END Test.
  2840. positive: multiplication on constant integers
  2841. MODULE Test;
  2842. CONST Result = 1AH * 10
  2843. BEGIN ASSERT (Result = 260);
  2844. END Test.
  2845. positive: integer division on constant integers
  2846. MODULE Test;
  2847. CONST Divisor = -2147483648; Dividend = 131072; Result = Divisor DIV Dividend;
  2848. BEGIN ASSERT (Result = -16384);
  2849. END Test.
  2850. negative: integer division on constant integers by zero
  2851. MODULE Test;
  2852. CONST Result = 10 DIV 0
  2853. END Test.
  2854. positive: real division on constant integers
  2855. MODULE Test;
  2856. CONST Result = 680 / 16
  2857. BEGIN ASSERT (Result = 42.5);
  2858. END Test.
  2859. negative: real division on constant integers by zero
  2860. MODULE Test;
  2861. CONST Result = 1ACH / 0
  2862. END Test.
  2863. positive: modulo on constant integers
  2864. MODULE Test;
  2865. CONST Divisor = -2147483648; Dividend = 131072; Result = Divisor MOD Dividend;
  2866. BEGIN ASSERT (Result = 0);
  2867. END Test.
  2868. negative: modulo on constant integers by zero
  2869. MODULE Test;
  2870. CONST Result = 15H MOD 0
  2871. END Test.
  2872. positive: equal relation on constant integers
  2873. MODULE Test;
  2874. CONST Result = 54 = 8
  2875. BEGIN ASSERT (Result = FALSE);
  2876. END Test.
  2877. positive: unequal relation on constant integers
  2878. MODULE Test;
  2879. CONST Result = 0 # 9
  2880. BEGIN ASSERT (Result = TRUE);
  2881. END Test.
  2882. positive: less relation on constant integers
  2883. MODULE Test;
  2884. CONST Result = 5 < 687H
  2885. BEGIN ASSERT (Result = TRUE);
  2886. END Test.
  2887. positive: less or equal relation on constant integers
  2888. MODULE Test;
  2889. CONST Result = 0 <= 1321
  2890. BEGIN ASSERT (Result = TRUE);
  2891. END Test.
  2892. positive: greater relation on constant integers
  2893. MODULE Test;
  2894. CONST Result = 0EFH > 54
  2895. BEGIN ASSERT (Result = TRUE);
  2896. END Test.
  2897. positive: greater or equal relation on constant integers
  2898. MODULE Test;
  2899. CONST Result = 131 >= 9
  2900. BEGIN ASSERT (Result = TRUE);
  2901. END Test.
  2902. negative: set membership on constant integers
  2903. MODULE Test;
  2904. CONST Result = 5 IN 9
  2905. END Test.
  2906. negative: type test on constant integers
  2907. MODULE Test;
  2908. CONST Result = 4 IS 0
  2909. END Test.
  2910. negative: type test on constant integer
  2911. MODULE Test;
  2912. CONST Result = 4 IS INTEGER
  2913. END Test.
  2914. negative: type test on constant integer type
  2915. MODULE Test;
  2916. TYPE Type = INTEGER;
  2917. CONST Result = 4 IS Type
  2918. END Test.
  2919. negative: type guard on constant integers
  2920. MODULE Test;
  2921. CONST Result = 5(0)
  2922. END Test.
  2923. negative: indirect type guard on constant integers
  2924. MODULE Test;
  2925. CONST Constant = 5
  2926. CONST Result = Constant(Constant)
  2927. END Test.
  2928. negative: type guard on constant integer
  2929. MODULE Test;
  2930. CONST Result = 5(INTEGER)
  2931. END Test.
  2932. negative: indirect type guard on constant integer
  2933. MODULE Test;
  2934. CONST Constant = 5
  2935. CONST Result = Constant(INTEGER)
  2936. END Test.
  2937. negative: type guard on constant integer type
  2938. MODULE Test;
  2939. TYPE Type = INTEGER;
  2940. CONST Result = 5(Type)
  2941. END Test.
  2942. negative: indirect guard test on constant integer type
  2943. MODULE Test;
  2944. CONST Constant = 5
  2945. TYPE Type = INTEGER;
  2946. CONST Result = Constant(Type)
  2947. END Test.
  2948. negative: logical and on constant integers
  2949. MODULE Test;
  2950. CONST Result = 123 & 3AH
  2951. END Test.
  2952. negative: logical or on constant integers
  2953. MODULE Test;
  2954. CONST Result = 0 OR 685
  2955. END Test.
  2956. negative: ordinal value of constant integer
  2957. MODULE Test;
  2958. CONST Result = ORD (99)
  2959. END Test.
  2960. positive: character value of constant integer
  2961. MODULE Test;
  2962. CONST Result = CHR (65H)
  2963. BEGIN ASSERT (Result = 65X)
  2964. END Test.
  2965. positive: absolute value of constant integer
  2966. MODULE Test;
  2967. CONST Result = ABS (-5)
  2968. BEGIN ASSERT (Result >= 0)
  2969. END Test.
  2970. positive: odd test on constant integer
  2971. MODULE Test;
  2972. CONST Result = ODD (5)
  2973. BEGIN ASSERT (Result)
  2974. END Test.
  2975. negative: capital letter of constant integer
  2976. MODULE Test;
  2977. CONST Result = CAP (6)
  2978. END Test.
  2979. positive: minimal value of integer
  2980. MODULE Test;
  2981. CONST A = MIN (SHORTINT); B = MIN (INTEGER); C = MIN (LONGINT); D = MIN (HUGEINT)
  2982. END Test.
  2983. positive: maximal value of integer
  2984. MODULE Test;
  2985. CONST A = MAX (SHORTINT); B = MAX (INTEGER); C = MAX (LONGINT); D = MAX (HUGEINT)
  2986. END Test.
  2987. positive: arithmetic left shift of constant integers
  2988. MODULE Test;
  2989. CONST Result = ASH (13, 6)
  2990. BEGIN ASSERT (Result = 13 * (2 * 2 * 2 * 2 * 2 * 2));
  2991. END Test.
  2992. positive: arithmetic right shift of constant integers
  2993. MODULE Test;
  2994. CONST Result = ASH (2379, -6)
  2995. BEGIN ASSERT (Result = 2379 DIV (2 * 2 * 2 * 2 * 2 * 2));
  2996. END Test.
  2997. positive: short on constant integer
  2998. MODULE Test;
  2999. CONST Result = SHORT (3215)
  3000. END Test.
  3001. negative: short on constant short integer
  3002. MODULE Test;
  3003. CONST Result = SHORT (5)
  3004. END Test.
  3005. positive: long on constant integer
  3006. MODULE Test;
  3007. CONST Result = LONG (5)
  3008. END Test.
  3009. negative: long on constant huge integer
  3010. MODULE Test;
  3011. CONST Result = LONG (32154878786668)
  3012. END Test.
  3013. negative: entier on constant integer
  3014. MODULE Test;
  3015. CONST Result = ENTIER (654)
  3016. END Test.
  3017. negative: unary length of constant integer
  3018. MODULE Test;
  3019. CONST Result = LEN (6548)
  3020. END Test.
  3021. negative: binary length of constant integer
  3022. MODULE Test;
  3023. CONST Result = LEN (6548, 0)
  3024. END Test.
  3025. negative: indexing constant integer
  3026. MODULE Test;
  3027. CONST Result = 5[0]
  3028. END Test.
  3029. negative: indexing constant integer indirectly
  3030. MODULE Test;
  3031. CONST Constant = 5;
  3032. CONST Result = Constant[0]
  3033. END Test.
  3034. positive: constant integer as index
  3035. MODULE Test;
  3036. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3037. BEGIN result := array[5]
  3038. END Test.
  3039. positive: zero as index
  3040. MODULE Test;
  3041. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3042. BEGIN result := array[0]
  3043. END Test.
  3044. negative: negative constant integer as index
  3045. MODULE Test;
  3046. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3047. BEGIN result := array[-10]
  3048. END Test.
  3049. negative: array size as index
  3050. MODULE Test;
  3051. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3052. BEGIN result := array[10]
  3053. END Test.
  3054. negative: constant integer as index exceeding valid range
  3055. MODULE Test;
  3056. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3057. BEGIN result := array[2, 20]
  3058. END Test.
  3059. positive: zero as index in two-dimensional array
  3060. MODULE Test;
  3061. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3062. BEGIN result := array[2, 0]
  3063. END Test.
  3064. negative: negative constant integer as index in two-dimensional array
  3065. MODULE Test;
  3066. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3067. BEGIN result := array[2, -10]
  3068. END Test.
  3069. negative: array size as index in two-dimensional array
  3070. MODULE Test;
  3071. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3072. BEGIN result := array[2, 10]
  3073. END Test.
  3074. negative: constant integer as index exceeding valid range in two-dimensional array
  3075. MODULE Test;
  3076. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR;
  3077. BEGIN result := array[2, 20]
  3078. END Test.
  3079. negative: member selection on constant integer
  3080. MODULE Test;
  3081. CONST Result = 654.member
  3082. END Test.
  3083. negative: indirect member selection on constant integer
  3084. MODULE Test;
  3085. CONST Constant = 654;
  3086. CONST Result = Constant.member
  3087. END Test.
  3088. negative: calling constant integer
  3089. MODULE Test;
  3090. BEGIN 007 ()
  3091. END Test.
  3092. negative: calling constant integer indirectly
  3093. MODULE Test;
  3094. CONST Constant = 007;
  3095. BEGIN Constant
  3096. END Test.
  3097. negative: calling constant integer indirectly with parentheses
  3098. MODULE Test;
  3099. CONST Constant = 007;
  3100. BEGIN Constant ()
  3101. END Test.
  3102. positive: calling procedure with parameter and constant integer argument
  3103. MODULE Test;
  3104. PROCEDURE Procedure (value: INTEGER); END Procedure;
  3105. BEGIN Procedure (0);
  3106. END Test.
  3107. negative: calling procedure with variable parameter and constant integer argument
  3108. MODULE Test;
  3109. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  3110. BEGIN Procedure (1);
  3111. END Test.
  3112. positive: calling procedure with constant parameter and constant integer argument
  3113. MODULE Test;
  3114. PROCEDURE Procedure (CONST value: INTEGER); END Procedure;
  3115. BEGIN Procedure (2);
  3116. END Test.
  3117. # constant reals
  3118. positive: constant real in valid real range
  3119. MODULE Test;
  3120. CONST Result = 1.E10;
  3121. END Test.
  3122. positive: constant long real in valid long real range
  3123. MODULE Test;
  3124. CONST Result = 1.D10;
  3125. END Test.
  3126. negative: constant real exceeding valid real range
  3127. MODULE Test;
  3128. CONST Result = 1.E100;
  3129. END Test.
  3130. positive: constant long real exceeding valid real range
  3131. MODULE Test;
  3132. CONST Result = 1.D100;
  3133. END Test.
  3134. negative: constant real exceeding valid long range
  3135. MODULE Test;
  3136. CONST Result = 1.E500;
  3137. END Test.
  3138. negative: constant long real exceeding valid long real range
  3139. MODULE Test;
  3140. CONST Result = 1.D500;
  3141. END Test.
  3142. positive: arithmetic negation on constant real
  3143. MODULE Test;
  3144. CONST Result = -1.0;
  3145. BEGIN ASSERT (Result = -1);
  3146. END Test.
  3147. positive: multiple arithmetic negations on constant real
  3148. MODULE Test;
  3149. CONST Result = -(-(-1.0));
  3150. BEGIN ASSERT (Result = -1);
  3151. END Test.
  3152. negative: logical negation on constant real
  3153. MODULE Test;
  3154. CONST Result = ~1.D4;
  3155. END Test.
  3156. negative: dereferencing constant real
  3157. MODULE Test;
  3158. CONST Result = 2.7^;
  3159. END Test.
  3160. negative: dereferencing constant real indirectly
  3161. MODULE Test;
  3162. CONST Constant = 2.7;
  3163. CONST Result = Constant^;
  3164. END Test.
  3165. positive: addition on constant reals
  3166. MODULE Test;
  3167. CONST Result = 1.75 + 87.25;
  3168. BEGIN ASSERT (Result = 89);
  3169. END Test.
  3170. positive: subtraction on constant reals
  3171. MODULE Test;
  3172. CONST Result = 25.E-2 - 0.75
  3173. BEGIN ASSERT (Result = -0.5);
  3174. END Test.
  3175. positive: multiplication on constant reals
  3176. MODULE Test;
  3177. CONST Result = 0.5 * 1.5
  3178. BEGIN ASSERT (Result = 0.75);
  3179. END Test.
  3180. negative: integer division on constant reals
  3181. MODULE Test;
  3182. CONST Result = 3.E9 DIV 1.
  3183. END Test.
  3184. positive: real division on constant reals
  3185. MODULE Test;
  3186. CONST Result = 0.75 / 0.5
  3187. BEGIN ASSERT (Result = 1.5);
  3188. END Test.
  3189. negative: real division on constant reals by zero
  3190. MODULE Test;
  3191. CONST Result = 0.5 / 0.0
  3192. END Test.
  3193. negative: modulo on constant reals
  3194. MODULE Test;
  3195. CONST Result = 8.9 MOD 7.1
  3196. END Test.
  3197. positive: equal relation on constant reals
  3198. MODULE Test;
  3199. CONST Result = 1.0 = 5.E32
  3200. BEGIN ASSERT (Result = FALSE);
  3201. END Test.
  3202. positive: unequal relation on constant reals
  3203. MODULE Test;
  3204. CONST Result = 0.001 # 9.
  3205. BEGIN ASSERT (Result = TRUE);
  3206. END Test.
  3207. positive: less relation on constant reals
  3208. MODULE Test;
  3209. CONST Result = 1.0 < 97.4
  3210. BEGIN ASSERT (Result = TRUE);
  3211. END Test.
  3212. positive: less or equal relation on constant reals
  3213. MODULE Test;
  3214. CONST Result = 464.1 <= 9.E+7
  3215. BEGIN ASSERT (Result = TRUE);
  3216. END Test.
  3217. positive: greater relation on constant reals
  3218. MODULE Test;
  3219. CONST Result = 0.1 > 1.54
  3220. BEGIN ASSERT (Result = FALSE);
  3221. END Test.
  3222. positive: greater or equal relation on constant reals
  3223. MODULE Test;
  3224. CONST Result = 9.E9 >= 0.0
  3225. BEGIN ASSERT (Result = TRUE);
  3226. END Test.
  3227. negative: set membership on constant reals
  3228. MODULE Test;
  3229. CONST Result = 9.1 IN 1.0
  3230. END Test.
  3231. negative: type test on constant reals
  3232. MODULE Test;
  3233. CONST Result = 4.E9 IS 1.
  3234. END Test.
  3235. negative: type test on constant real
  3236. MODULE Test;
  3237. CONST Result = 4.E9 IS Real
  3238. END Test.
  3239. negative: type test on constant real type
  3240. MODULE Test;
  3241. TYPE Type = REAL;
  3242. CONST Result = 4.E9 IS Type
  3243. END Test.
  3244. negative: type guard on constant reals
  3245. MODULE Test;
  3246. CONST Result = 5.0(0.0)
  3247. END Test.
  3248. negative: indirect type guard on constant reals
  3249. MODULE Test;
  3250. CONST Constant = 5.0
  3251. CONST Result = Constant(Constant)
  3252. END Test.
  3253. negative: type guard on constant real
  3254. MODULE Test;
  3255. CONST Result = 5.0(REAL)
  3256. END Test.
  3257. negative: indirect type guard on constant real
  3258. MODULE Test;
  3259. CONST Constant = 5.0
  3260. CONST Result = Constant(REAL)
  3261. END Test.
  3262. negative: type guard on constant real type
  3263. MODULE Test;
  3264. TYPE Type = REAL;
  3265. CONST Result = 5.0(Type)
  3266. END Test.
  3267. negative: indirect type guard on constant real type
  3268. MODULE Test;
  3269. CONST Constant = 5.0
  3270. TYPE Type = REAL;
  3271. CONST Result = Constant(Type)
  3272. END Test.
  3273. negative: logical and on constant reals
  3274. MODULE Test;
  3275. CONST Result = 9.D54 & 1.974D+9
  3276. END Test.
  3277. negative: logical or on constant reals
  3278. MODULE Test;
  3279. CONST Result = 0.4 OR 0.
  3280. END Test.
  3281. negative: ordinal value of constant real
  3282. MODULE Test;
  3283. CONST Result = ORD (84.4)
  3284. END Test.
  3285. negative: character value of constant real
  3286. MODULE Test;
  3287. CONST Result = CHR (67.4)
  3288. END Test.
  3289. positive: absolute value of constant real
  3290. MODULE Test;
  3291. CONST Result = ABS (-67.4)
  3292. BEGIN ASSERT (Result >= 0);
  3293. END Test.
  3294. negative: odd test on constant real
  3295. MODULE Test;
  3296. CONST Result = ODD (2.5)
  3297. END Test.
  3298. negative: capital letter of constant real
  3299. MODULE Test;
  3300. CONST Result = CAP (-0.5)
  3301. END Test.
  3302. positive: minimal value of real
  3303. MODULE Test;
  3304. CONST A = MIN (REAL); B = MIN (LONGREAL)
  3305. END Test.
  3306. positive: maximal value of real
  3307. MODULE Test;
  3308. CONST A = MAX (REAL); B = MAX (LONGREAL)
  3309. END Test.
  3310. negative: arithmetic shift of constant reals
  3311. MODULE Test;
  3312. CONST Result = ASH (64.5, 3.4)
  3313. END Test.
  3314. negative: short on constant real
  3315. MODULE Test;
  3316. CONST Result = SHORT (5.4)
  3317. END Test.
  3318. positive: short on constant long real
  3319. MODULE Test;
  3320. CONST Result = SHORT (5.0D300)
  3321. END Test.
  3322. positive: long on constant real
  3323. MODULE Test;
  3324. CONST Result = LONG (5.4)
  3325. END Test.
  3326. negative: long on constant long real
  3327. MODULE Test;
  3328. CONST Result = LONG (5.0D300)
  3329. END Test.
  3330. positive: entier on constant real
  3331. MODULE Test;
  3332. CONST Result = ENTIER (5.4)
  3333. END Test.
  3334. positive: entier on constant long real
  3335. MODULE Test;
  3336. CONST Result = ENTIER (5.0D300)
  3337. END Test.
  3338. negative: unary length of constant real
  3339. MODULE Test;
  3340. CONST Result = LEN (0.123)
  3341. END Test.
  3342. negative: binary length of constant real
  3343. MODULE Test;
  3344. CONST Result = LEN (0.123, 0)
  3345. END Test.
  3346. negative: indexing constant real
  3347. MODULE Test;
  3348. CONST Result = 9.7[0]
  3349. END Test.
  3350. negative: indexing constant real indirectly
  3351. MODULE Test;
  3352. CONST Constant = 9.7;
  3353. CONST Result = Constant[0]
  3354. END Test.
  3355. negative: constant real as index
  3356. MODULE Test;
  3357. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3358. BEGIN result := array[9.7]
  3359. END Test.
  3360. negative: member selection on constant real
  3361. MODULE Test;
  3362. CONST Result = 654.654.member
  3363. END Test.
  3364. negative: indirect member selection on constant real
  3365. MODULE Test;
  3366. CONST Constant = 654.654;
  3367. CONST Result = Constant.member
  3368. END Test.
  3369. negative: calling constant real
  3370. MODULE Test;
  3371. BEGIN 1.23 ()
  3372. END Test.
  3373. negative: calling constant real indirectly
  3374. MODULE Test;
  3375. CONST Constant = 1.23;
  3376. BEGIN Constant
  3377. END Test.
  3378. negative: calling constant real indirectly with parentheses
  3379. MODULE Test;
  3380. CONST Constant = 1.23;
  3381. BEGIN Constant ()
  3382. END Test.
  3383. positive: calling procedure with parameter and constant real argument
  3384. MODULE Test;
  3385. PROCEDURE Procedure (value: REAL); END Procedure;
  3386. BEGIN Procedure (0.0);
  3387. END Test.
  3388. negative: calling procedure with variable parameter and constant real argument
  3389. MODULE Test;
  3390. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  3391. BEGIN Procedure (1.1);
  3392. END Test.
  3393. positive: calling procedure with constant parameter and constant real argument
  3394. MODULE Test;
  3395. PROCEDURE Procedure (CONST value: REAL); END Procedure;
  3396. BEGIN Procedure (2.2);
  3397. END Test.
  3398. # constant set
  3399. positive: empty constant set
  3400. MODULE Test;
  3401. CONST Result = {};
  3402. END Test.
  3403. negative: constant boolean as set element
  3404. MODULE Test;
  3405. CONST Result = {FALSE};
  3406. END Test.
  3407. negative: constant character as set element
  3408. MODULE Test;
  3409. CONST Result = {'a'};
  3410. END Test.
  3411. positive: constant integer constant as set element
  3412. MODULE Test;
  3413. CONST Result = {10};
  3414. BEGIN ASSERT (Result = {10});
  3415. END Test.
  3416. negative: constant real as set element
  3417. MODULE Test;
  3418. CONST Result = {45.4};
  3419. END Test.
  3420. negative: constant set as set element
  3421. MODULE Test;
  3422. CONST Result = {{}};
  3423. END Test.
  3424. negative: constant string as set element
  3425. MODULE Test;
  3426. CONST Result = {"string"};
  3427. END Test.
  3428. negative: constant set element exceeding valid range
  3429. MODULE Test;
  3430. CONST Result = {100};
  3431. END Test.
  3432. negative: negative constant set element
  3433. MODULE Test;
  3434. CONST Result = {-1};
  3435. END Test.
  3436. positive: several equal constant set elements
  3437. MODULE Test;
  3438. CONST Result = {0, 0, 0};
  3439. BEGIN ASSERT (Result = {0});
  3440. END Test.
  3441. positive: several different constant set elements
  3442. MODULE Test;
  3443. CONST Result = {0, 1, 2};
  3444. BEGIN ASSERT (Result = {0..2});
  3445. END Test.
  3446. positive: constant set element range
  3447. MODULE Test;
  3448. CONST Result = {5..6};
  3449. BEGIN ASSERT (Result = {5, 6});
  3450. END Test.
  3451. positive: constant set element range with single element
  3452. MODULE Test;
  3453. CONST Result = {6..6};
  3454. BEGIN ASSERT (Result = {6});
  3455. END Test.
  3456. positive: empty constant set element range
  3457. MODULE Test;
  3458. CONST Result = {3..2};
  3459. BEGIN ASSERT (Result = {});
  3460. END Test.
  3461. negative: empty constant set element range with negative start element
  3462. MODULE Test;
  3463. CONST Result = {-1..2};
  3464. END Test.
  3465. negative: empty constant set element range with negative end element
  3466. MODULE Test;
  3467. CONST Result = {3..-4};
  3468. END Test.
  3469. positive: relations on constant sets
  3470. MODULE Test;
  3471. BEGIN
  3472. ASSERT ({1..3,5} <= {1..3,5});
  3473. ASSERT (~({1..3,5,6} < {1..3,5,8}));
  3474. ASSERT (~({1..3,5,6} <= {1..3,5,8}));
  3475. ASSERT (~({1..3,5,6} > {1..3,5,8}));
  3476. ASSERT (~({1..3,5,6} >= {1..3,5,8}));
  3477. ASSERT ({1..3,5} < {1..3,5,7});
  3478. ASSERT ({1..3,5} > {1..3});
  3479. ASSERT ({1..3,5,7} >= {1..3,5,7});
  3480. ASSERT ({1..3,5} = {1..3,5});
  3481. ASSERT ({1..3,5,8} # {1..3,5,7});
  3482. END Test.
  3483. positive: complement on constant set
  3484. MODULE Test;
  3485. CONST Result = -{4, 9};
  3486. BEGIN ASSERT (Result = -{4, 9});
  3487. END Test.
  3488. positive: multiple complements on constant set
  3489. MODULE Test;
  3490. CONST Result = -(-(-{5}));
  3491. BEGIN ASSERT (Result = -{5});
  3492. END Test.
  3493. negative: logical negation on constant set
  3494. MODULE Test;
  3495. CONST Result = ~{};
  3496. END Test.
  3497. negative: dereferencing constant set
  3498. MODULE Test;
  3499. CONST Result = {2..5}^;
  3500. END Test.
  3501. negative: dereferencing constant set indirectly
  3502. MODULE Test;
  3503. CONST Constant = {2..5};
  3504. CONST Result = Constant^;
  3505. END Test.
  3506. positive: union on constant sets
  3507. MODULE Test;
  3508. CONST Result = {4, 6} + {9};
  3509. BEGIN ASSERT (Result = {4, 6, 9});
  3510. END Test.
  3511. positive: difference on constant sets
  3512. MODULE Test;
  3513. CONST Result = {7, 2} - {2..1}
  3514. BEGIN ASSERT (Result = {2, 7});
  3515. END Test.
  3516. positive: intersection on constant sets
  3517. MODULE Test;
  3518. CONST Result = {7..9} * {6..7}
  3519. BEGIN ASSERT (Result = {7});
  3520. END Test.
  3521. negative: integer division on constant sets
  3522. MODULE Test;
  3523. CONST Result = {8} DIV {}
  3524. END Test.
  3525. positive: symmetric difference on constant sets
  3526. MODULE Test;
  3527. CONST Result = {4..9} / {5,4,3,2,1}
  3528. BEGIN ASSERT (Result = {1..3, 6..9});
  3529. END Test.
  3530. negative: modulo on constant sets
  3531. MODULE Test;
  3532. CONST Result = {7} MOD {0}
  3533. END Test.
  3534. positive: equal relation on constant sets
  3535. MODULE Test;
  3536. CONST Result = {4} = {}
  3537. BEGIN ASSERT (Result = FALSE);
  3538. END Test.
  3539. positive: unequal relation on constant sets
  3540. MODULE Test;
  3541. CONST Result = {9, 5} # {0..5}
  3542. BEGIN ASSERT (Result = TRUE);
  3543. END Test.
  3544. positive: less relation on constant sets
  3545. MODULE Test;
  3546. CONST Result = {9} < {7}
  3547. BEGIN ASSERT (Result = FALSE);
  3548. END Test.
  3549. positive: less or equal relation on constant sets
  3550. MODULE Test;
  3551. CONST Result = {8} <= {8}
  3552. BEGIN ASSERT (Result = TRUE);
  3553. END Test.
  3554. positive: greater relation on constant sets
  3555. MODULE Test;
  3556. CONST Result = {0..5} > {0..2}
  3557. BEGIN ASSERT (Result = TRUE);
  3558. END Test.
  3559. positive: greater or equal relation on constant sets
  3560. MODULE Test;
  3561. CONST Result = {4} >= {4..4}
  3562. BEGIN ASSERT (Result = TRUE);
  3563. END Test.
  3564. negative: set membership on constant sets
  3565. MODULE Test;
  3566. CONST Result = {9} IN {1}
  3567. END Test.
  3568. positive: set membership on integer and constant set
  3569. MODULE Test;
  3570. CONST Result = 3 IN {2}
  3571. BEGIN ASSERT (Result = FALSE);
  3572. END Test.
  3573. negative: type test on constant sets
  3574. MODULE Test;
  3575. CONST Result = {7} IS {}
  3576. END Test.
  3577. negative: type test on constant set
  3578. MODULE Test;
  3579. CONST Result = {7} IS Set
  3580. END Test.
  3581. negative: type test on constant set type
  3582. MODULE Test;
  3583. TYPE Type = Set;
  3584. CONST Result = {7} IS Type
  3585. END Test.
  3586. negative: type guard on constant sets
  3587. MODULE Test;
  3588. CONST Result = {}({4})
  3589. END Test.
  3590. negative: indirect type guard on constant sets
  3591. MODULE Test;
  3592. CONST Constant = {}
  3593. CONST Result = Constant(Constant)
  3594. END Test.
  3595. negative: type guard on constant set
  3596. MODULE Test;
  3597. CONST Result = {}(SET)
  3598. END Test.
  3599. negative: indirect type guard on constant set
  3600. MODULE Test;
  3601. CONST Constant = {}
  3602. CONST Result = Constant(SET)
  3603. END Test.
  3604. negative: type guard on constant set type
  3605. MODULE Test;
  3606. TYPE Type = SET;
  3607. CONST Result = {}(Type)
  3608. END Test.
  3609. negative: indirect type guard on constant set type
  3610. MODULE Test;
  3611. CONST Constant = {}
  3612. TYPE Type = SET;
  3613. CONST Result = Constant(Type)
  3614. END Test.
  3615. negative: logical and on constant sets
  3616. MODULE Test;
  3617. CONST Result = {0..7} & {7}
  3618. END Test.
  3619. negative: logical or on constant sets
  3620. MODULE Test;
  3621. CONST Result = {8} OR {}
  3622. END Test.
  3623. negative: ordinal value of constant set
  3624. MODULE Test;
  3625. CONST Result = ORD ({5})
  3626. END Test.
  3627. negative: character value of constant set
  3628. MODULE Test;
  3629. CONST Result = CHR ({1..4})
  3630. END Test.
  3631. negative: absolute value of constant set
  3632. MODULE Test;
  3633. CONST Result = ABS ({1..4})
  3634. END Test.
  3635. negative: odd test on constant set
  3636. MODULE Test;
  3637. CONST Result = ODD ({})
  3638. END Test.
  3639. negative: capital letter of constant set
  3640. MODULE Test;
  3641. CONST Result = CAP ({2..9})
  3642. END Test.
  3643. positive: minimal value of set
  3644. MODULE Test;
  3645. CONST Result = MIN (SET)
  3646. BEGIN ASSERT (Result = 0);
  3647. END Test.
  3648. positive: maximal value of set
  3649. MODULE Test;
  3650. CONST Result = MAX (SET)
  3651. BEGIN ASSERT (-{0..Result} = {})
  3652. END Test.
  3653. negative: arithmetic shift of constant set
  3654. MODULE Test;
  3655. CONST Result = ASH ({6}, {})
  3656. END Test.
  3657. negative: short on constant set
  3658. MODULE Test;
  3659. CONST Result = SHORT ({4, 2})
  3660. END Test.
  3661. negative: long on constant set
  3662. MODULE Test;
  3663. CONST Result = LONG ({4, 2})
  3664. END Test.
  3665. negative: entier on constant set
  3666. MODULE Test;
  3667. CONST Result = ENTIER ({4, 2})
  3668. END Test.
  3669. negative: unary length of constant set
  3670. MODULE Test;
  3671. CONST Result = LEN ({0,3})
  3672. END Test.
  3673. negative: binary length of constant set
  3674. MODULE Test;
  3675. CONST Result = LEN ({0,3}, 0)
  3676. END Test.
  3677. negative: indexing constant set
  3678. MODULE Test;
  3679. CONST Result = {1}[0]
  3680. END Test.
  3681. negative: indexing constant set indirectly
  3682. MODULE Test;
  3683. CONST Constant = {1};
  3684. CONST Result = Constant[0]
  3685. END Test.
  3686. negative: constant set as index
  3687. MODULE Test;
  3688. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3689. BEGIN result := array[{1}]
  3690. END Test.
  3691. negative: member selection on constant set
  3692. MODULE Test;
  3693. CONST Result = {2}.member
  3694. END Test.
  3695. negative: indirect member selection on constant set
  3696. MODULE Test;
  3697. CONST Constant = {2};
  3698. CONST Result = Constant.member
  3699. END Test.
  3700. negative: calling constant set
  3701. MODULE Test;
  3702. BEGIN {} ()
  3703. END Test.
  3704. negative: calling constant set indirectly
  3705. MODULE Test;
  3706. CONST Constant = {};
  3707. BEGIN Constant
  3708. END Test.
  3709. negative: calling constant set indirectly with parentheses
  3710. MODULE Test;
  3711. CONST Constant = {};
  3712. BEGIN Constant ()
  3713. END Test.
  3714. positive: calling procedure with parameter and constant set argument
  3715. MODULE Test;
  3716. PROCEDURE Procedure (value: SET); END Procedure;
  3717. BEGIN Procedure ({0});
  3718. END Test.
  3719. negative: calling procedure with variable parameter and constant set argument
  3720. MODULE Test;
  3721. PROCEDURE Procedure (VAR value: SET); END Procedure;
  3722. BEGIN Procedure ({4..6});
  3723. END Test.
  3724. positive: calling procedure with constant parameter and constant set argument
  3725. MODULE Test;
  3726. PROCEDURE Procedure (CONST value: SET); END Procedure;
  3727. BEGIN Procedure ({1,2});
  3728. END Test.
  3729. # constant strings
  3730. positive: empty constant string
  3731. MODULE Test;
  3732. CONST Result = "";
  3733. END Test.
  3734. negative: arithmetic negation on constant string
  3735. MODULE Test;
  3736. CONST Result = -"123";
  3737. END Test.
  3738. negative: logical negation on constant string
  3739. MODULE Test;
  3740. CONST Result = ~"invalid";
  3741. END Test.
  3742. negative: dereferencing constant string
  3743. MODULE Test;
  3744. CONST Result = "string"^;
  3745. END Test.
  3746. negative: dereferencing constant string indirectly
  3747. MODULE Test;
  3748. CONST Constant = "string";
  3749. CONST Result = Constant^;
  3750. END Test.
  3751. negative: addition on constant strings
  3752. MODULE Test;
  3753. CONST Result = "hello" + "world";
  3754. END Test.
  3755. negative: subtraction on constant strings
  3756. MODULE Test;
  3757. CONST Result = "nice" - "try"
  3758. END Test.
  3759. negative: multiplication on constant strings
  3760. MODULE Test;
  3761. CONST Result = "multiplication" * "disallowed"
  3762. END Test.
  3763. negative: integer division on constant strings
  3764. MODULE Test;
  3765. CONST Result = "abc" DIV "ABC"
  3766. END Test.
  3767. negative: real division on constant strings
  3768. MODULE Test;
  3769. CONST Result = "007" / "008"
  3770. END Test.
  3771. negative: modulo on constant strings
  3772. MODULE Test;
  3773. CONST Result = "one" MOD "two"
  3774. END Test.
  3775. positive: equal relation on constant strings
  3776. MODULE Test;
  3777. CONST Result = "string" = "gnirts"
  3778. BEGIN ASSERT (Result = FALSE);
  3779. END Test.
  3780. positive: unequal relation on constant strings
  3781. MODULE Test;
  3782. CONST Result = "qwerty" # "ytrewq"
  3783. BEGIN ASSERT (Result = TRUE);
  3784. END Test.
  3785. positive: less relation on constant strings
  3786. MODULE Test;
  3787. CONST Result = "av" < "bv"
  3788. BEGIN ASSERT (Result = TRUE);
  3789. END Test.
  3790. positive: less or equal relation on constant strings
  3791. MODULE Test;
  3792. CONST Result = "word1" <= "word2"
  3793. BEGIN ASSERT (Result = TRUE);
  3794. END Test.
  3795. positive: greater relation on constant strings
  3796. MODULE Test;
  3797. CONST Result = "lower" > "UPPER"
  3798. BEGIN ASSERT (Result = TRUE);
  3799. END Test.
  3800. positive: greater or equal relation on constant strings
  3801. MODULE Test;
  3802. CONST Result = "number" >= "text"
  3803. BEGIN ASSERT (Result = FALSE);
  3804. END Test.
  3805. negative: set membership on constant strings
  3806. MODULE Test;
  3807. CONST Result = "name" IN "ninety"
  3808. END Test.
  3809. negative: type test on constant strings
  3810. MODULE Test;
  3811. CONST Result = "not" IS "supported"
  3812. END Test.
  3813. negative: type test on constant string
  3814. MODULE Test;
  3815. CONST Result = "not" IS ARRAY OF CHAR
  3816. END Test.
  3817. negative: type test on string type
  3818. MODULE Test;
  3819. TYPE Type = ARRAY OF CHAR;
  3820. CONST Result = "not" IS Type
  3821. END Test.
  3822. negative: type guard on constant strings
  3823. MODULE Test;
  3824. CONST Result = "type"("guard")
  3825. END Test.
  3826. negative: indirect type guard on constant strings
  3827. MODULE Test;
  3828. CONST Constant = "type"
  3829. CONST Result = Constant(Constant)
  3830. END Test.
  3831. negative: type guard on constant string
  3832. MODULE Test;
  3833. CONST Result = "type"(ARRAY OF CHAR)
  3834. END Test.
  3835. negative: indirect type guard on constant string
  3836. MODULE Test;
  3837. CONST Constant = "type"
  3838. CONST Result = Constant(ARRAY OF CHAR)
  3839. END Test.
  3840. negative: type guard on string type
  3841. MODULE Test;
  3842. TYPE Type = ARRAY OF CHAR;
  3843. CONST Result = "type"(Type)
  3844. END Test.
  3845. negative: indirect type guard on string type
  3846. MODULE Test;
  3847. CONST Constant = "type"
  3848. TYPE Type = ARRAY OF CHAR;
  3849. CONST Result = Constant(Type)
  3850. END Test.
  3851. negative: logical and on constant strings
  3852. MODULE Test;
  3853. CONST Result = "oh" & "dear"
  3854. END Test.
  3855. negative: logical or on constant strings
  3856. MODULE Test;
  3857. CONST Result = "last" OR "one"
  3858. END Test.
  3859. negative: ordinal value of constant string
  3860. MODULE Test;
  3861. CONST Result = ORD ("ORD")
  3862. END Test.
  3863. negative: character value of constant string
  3864. MODULE Test;
  3865. CONST Result = CHR ("CHR")
  3866. END Test.
  3867. negative: absolute value of constant string
  3868. MODULE Test;
  3869. CONST Result = ABS ("ABS")
  3870. END Test.
  3871. negative: odd test on constant string
  3872. MODULE Test;
  3873. CONST Result = ODD ("ODD")
  3874. END Test.
  3875. negative: capital letter of constant string
  3876. MODULE Test;
  3877. CONST Result = CAP ("lowercase")
  3878. END Test.
  3879. negative: arithmetic shift of constant string
  3880. MODULE Test;
  3881. CONST Result = ASH ("shift", "me")
  3882. END Test.
  3883. negative: short on constant string
  3884. MODULE Test;
  3885. CONST Result = SHORT ("integer")
  3886. END Test.
  3887. negative: long on constant string
  3888. MODULE Test;
  3889. CONST Result = LONG ("integer")
  3890. END Test.
  3891. negative: entier on constant string
  3892. MODULE Test;
  3893. CONST Result = ENTIER ("real")
  3894. END Test.
  3895. negative: unary length of constant string
  3896. MODULE Test;
  3897. CONST Result = LEN ("abc")
  3898. END Test.
  3899. negative: binary length of constant string
  3900. MODULE Test;
  3901. CONST Result = LEN ("abc", 0)
  3902. END Test.
  3903. negative: indexing constant string
  3904. MODULE Test;
  3905. CONST Result = "string"[0]
  3906. END Test.
  3907. negative: indexing constant string indirectly
  3908. MODULE Test;
  3909. CONST Constant = "string";
  3910. CONST Result = Constant[0]
  3911. END Test.
  3912. negative: constant string as index
  3913. MODULE Test;
  3914. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  3915. BEGIN result := array["string"]
  3916. END Test.
  3917. negative: member selection on constant string
  3918. MODULE Test;
  3919. CONST Result = "record".member
  3920. END Test.
  3921. negative: indirect member selection on constant string
  3922. MODULE Test;
  3923. CONST Constant = "record";
  3924. CONST Result = Constant.member
  3925. END Test.
  3926. negative: calling constant string
  3927. MODULE Test;
  3928. BEGIN "asdf" ()
  3929. END Test.
  3930. negative: calling constant string indirectly
  3931. MODULE Test;
  3932. CONST Constant = "asdf";
  3933. BEGIN Constant
  3934. END Test.
  3935. negative: calling constant string indirectly with parentheses
  3936. MODULE Test;
  3937. CONST Constant = "asdf";
  3938. BEGIN Constant ()
  3939. END Test.
  3940. positive: calling procedure with parameter and constant string argument
  3941. MODULE Test;
  3942. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  3943. BEGIN Procedure ("argument");
  3944. END Test.
  3945. negative: calling procedure with variable parameter and constant string argument
  3946. MODULE Test;
  3947. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  3948. BEGIN Procedure ("argument");
  3949. END Test.
  3950. positive: calling procedure with constant parameter and constant string argument
  3951. MODULE Test;
  3952. PROCEDURE Procedure (CONST value: ARRAY OF CHAR); END Procedure;
  3953. BEGIN Procedure ("argument");
  3954. END Test.
  3955. # constant nil pointers
  3956. negative: arithmetic negation on nil pointer
  3957. MODULE Test;
  3958. CONST Result = -NIL;
  3959. END Test.
  3960. negative: logical negation on nil pointer
  3961. MODULE Test;
  3962. CONST Result = ~NIL;
  3963. END Test.
  3964. negative: multiple logical negations on nil pointer
  3965. MODULE Test;
  3966. CONST Result = ~~~~NIL;
  3967. END Test.
  3968. negative: dereferencing nil pointer
  3969. MODULE Test;
  3970. CONST Result = NIL^;
  3971. END Test.
  3972. negative: dereferencing constant nil pointer indirectly
  3973. MODULE Test;
  3974. CONST Constant = NIL;
  3975. CONST Result = Constant^;
  3976. END Test.
  3977. negative: addition on nil pointer
  3978. MODULE Test;
  3979. CONST Result = NIL + NIL;
  3980. END Test.
  3981. negative: subtraction on nil pointer
  3982. MODULE Test;
  3983. CONST Result = NIL - NIL
  3984. END Test.
  3985. negative: multiplication on nil pointer
  3986. MODULE Test;
  3987. CONST Result = NIL * NIL
  3988. END Test.
  3989. negative: integer division on nil pointer
  3990. MODULE Test;
  3991. CONST Result = NIL DIV NIL
  3992. END Test.
  3993. negative: real division on nil pointer
  3994. MODULE Test;
  3995. CONST Result = NIL / NIL
  3996. END Test.
  3997. negative: modulo on nil pointer
  3998. MODULE Test;
  3999. CONST Result = NIL MOD NIL
  4000. END Test.
  4001. positive: equal relation on nil pointer
  4002. MODULE Test;
  4003. CONST Result = NIL = NIL
  4004. BEGIN ASSERT (Result = TRUE);
  4005. END Test.
  4006. positive: unequal relation on nil pointer
  4007. MODULE Test;
  4008. CONST Result = NIL # NIL
  4009. BEGIN ASSERT (Result = FALSE);
  4010. END Test.
  4011. negative: less relation on nil pointer
  4012. MODULE Test;
  4013. CONST Result = NIL < NIL
  4014. END Test.
  4015. negative: less or equal relation on nil pointer
  4016. MODULE Test;
  4017. CONST Result = NIL <= NIL
  4018. END Test.
  4019. negative: greater relation on nil pointer
  4020. MODULE Test;
  4021. CONST Result = NIL > NIL
  4022. END Test.
  4023. negative: greater or equal relation on nil pointer
  4024. MODULE Test;
  4025. CONST Result = NIL >= NIL
  4026. END Test.
  4027. negative: set membership on nil pointer
  4028. MODULE Test;
  4029. CONST Result = NIL IN NIL
  4030. END Test.
  4031. negative: type test on nil pointers
  4032. MODULE Test;
  4033. CONST Result = NIL IS NIL
  4034. END Test.
  4035. negative: type test on nil pointer
  4036. MODULE Test;
  4037. CONST Result = NIL IS OBJECT
  4038. END Test.
  4039. negative: type test on nil pointer type
  4040. MODULE Test;
  4041. TYPE Type = OBJECT;
  4042. CONST Result = NIL IS Type
  4043. END Test.
  4044. negative: type guard on nil pointers
  4045. MODULE Test;
  4046. CONST Result = NIL(NIL)
  4047. END Test.
  4048. negative: indirect type guard on nil pointers
  4049. MODULE Test;
  4050. CONST Constant = NIL
  4051. CONST Result = Constant(Constant)
  4052. END Test.
  4053. negative: type guard on nil pointer
  4054. MODULE Test;
  4055. CONST Result = NIL(OBJECT)
  4056. END Test.
  4057. negative: indirect type guard on nil pointer
  4058. MODULE Test;
  4059. CONST Constant = NIL
  4060. CONST Result = Constant(NIL)
  4061. END Test.
  4062. negative: type guard on nil pointer type
  4063. MODULE Test;
  4064. TYPE Type = OBJECT;
  4065. CONST Result = NIL(Type)
  4066. END Test.
  4067. negative: indirect type guard on nil pointer type
  4068. MODULE Test;
  4069. CONST Constant = NIL
  4070. TYPE Type = OBJECT;
  4071. CONST Result = Constant(Type)
  4072. END Test.
  4073. negative: logical and on nil pointer
  4074. MODULE Test;
  4075. CONST Result = NIL & NIL
  4076. END Test.
  4077. negative: logical or on nil pointer
  4078. MODULE Test;
  4079. CONST Result = NIL OR NIL
  4080. END Test.
  4081. negative: ordinal value of nil pointer
  4082. MODULE Test;
  4083. CONST Result = ORD (NIL)
  4084. END Test.
  4085. negative: character value of nil pointer
  4086. MODULE Test;
  4087. CONST Result = CHR (NIL)
  4088. END Test.
  4089. negative: absolute value of nil pointer
  4090. MODULE Test;
  4091. CONST Result = ABS (NIL)
  4092. END Test.
  4093. negative: odd test on nil pointer
  4094. MODULE Test;
  4095. CONST Result = ODD (NIL)
  4096. END Test.
  4097. negative: capital letter of nil pointer
  4098. MODULE Test;
  4099. CONST Result = CAP (NIL)
  4100. END Test.
  4101. negative: arithmetic shift of nil pointer
  4102. MODULE Test;
  4103. CONST Result = ASH (NIL, NIL)
  4104. END Test.
  4105. negative: short on nil pointer
  4106. MODULE Test;
  4107. CONST Result = SHORT (NIL)
  4108. END Test.
  4109. negative: long on nil pointer
  4110. MODULE Test;
  4111. CONST Result = LONG (NIL)
  4112. END Test.
  4113. negative: entier on nil pointer
  4114. MODULE Test;
  4115. CONST Result = ENTIER (NIL)
  4116. END Test.
  4117. negative: unary length of nil pointer
  4118. MODULE Test;
  4119. CONST Result = LEN (NIL)
  4120. END Test.
  4121. negative: binary length of nil pointer
  4122. MODULE Test;
  4123. CONST Result = LEN (NIL, 0)
  4124. END Test.
  4125. negative: indexing nil pointer
  4126. MODULE Test;
  4127. CONST Result = NIL[0]
  4128. END Test.
  4129. negative: indexing nil pointer indirectly
  4130. MODULE Test;
  4131. CONST Constant = NIL;
  4132. CONST Result = Constant[0]
  4133. END Test.
  4134. negative: nil pointer as index
  4135. MODULE Test;
  4136. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  4137. BEGIN result := array[NIL]
  4138. END Test.
  4139. negative: member selection on nil pointer
  4140. MODULE Test;
  4141. CONST Result = NIL.member
  4142. END Test.
  4143. negative: indirect member selection on nil pointer
  4144. MODULE Test;
  4145. CONST Constant = NIL;
  4146. CONST Result = Constant.member
  4147. END Test.
  4148. negative: calling nil pointer
  4149. MODULE Test;
  4150. BEGIN NIL ()
  4151. END Test.
  4152. negative: calling nil pointer indirectly
  4153. MODULE Test;
  4154. CONST Constant = NIL;
  4155. BEGIN Constant
  4156. END Test.
  4157. negative: calling nil pointer indirectly with parentheses
  4158. MODULE Test;
  4159. CONST Constant = NIL;
  4160. BEGIN Constant ()
  4161. END Test.
  4162. positive: calling procedure with parameter and nil pointer argument
  4163. MODULE Test;
  4164. PROCEDURE Procedure (value: OBJECT); END Procedure;
  4165. BEGIN Procedure (NIL);
  4166. END Test.
  4167. negative: calling procedure with variable parameter and nil pointer argument
  4168. MODULE Test;
  4169. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  4170. BEGIN Procedure (NIL);
  4171. END Test.
  4172. positive: calling procedure with constant parameter and nil pointer argument
  4173. MODULE Test;
  4174. PROCEDURE Procedure (CONST value: OBJECT); END Procedure;
  4175. BEGIN Procedure (NIL);
  4176. END Test.
  4177. # implicit constant conversions
  4178. positive: implicit constant short to integer conversion
  4179. MODULE Test;
  4180. CONST Result = 10H + 1000H
  4181. END Test.
  4182. positive: implicit constant short to long integer conversion
  4183. MODULE Test;
  4184. CONST Result = 10H * 100000H
  4185. END Test.
  4186. positive: implicit constant short to huge integer conversion
  4187. MODULE Test;
  4188. CONST Result = 10H DIV 100000000H
  4189. END Test.
  4190. positive: implicit constant integer to long integer conversion
  4191. MODULE Test;
  4192. CONST Result = 1000H - 100000H
  4193. END Test.
  4194. positive: implicit constant integer to huge integer conversion
  4195. MODULE Test;
  4196. CONST Result = 1000H * 100000000H
  4197. END Test.
  4198. positive: implicit constant long to huge integer conversion
  4199. MODULE Test;
  4200. CONST Result = 100000H + 100000000H
  4201. END Test.
  4202. positive: implicit constant integer to real conversion
  4203. MODULE Test;
  4204. CONST Result = 4 + 5.0
  4205. END Test.
  4206. positive: implicit constant integer to long real conversion
  4207. MODULE Test;
  4208. CONST Result = 4.5D127 / 54
  4209. END Test.
  4210. positive: implicit constant real to long real conversion
  4211. MODULE Test;
  4212. CONST Result = 1.2 * 1.7D247
  4213. END Test.
  4214. negative: implicit conversion between constant boolean and character
  4215. MODULE Test;
  4216. CONST Result = TRUE = 's'
  4217. END Test.
  4218. negative: implicit conversion between constant boolean and integer
  4219. MODULE Test;
  4220. CONST Result = TRUE # 5
  4221. END Test.
  4222. negative: implicit conversion between constant boolean and real
  4223. MODULE Test;
  4224. CONST Result = FALSE = 1.0E4
  4225. END Test.
  4226. negative: implicit conversion between constant boolean and set
  4227. MODULE Test;
  4228. CONST Result = TRUE = {3}
  4229. END Test.
  4230. negative: implicit conversion between constant boolean and string
  4231. MODULE Test;
  4232. CONST Result = TRUE = "adsf"
  4233. END Test.
  4234. negative: implicit conversion between constant boolean and nil pointer
  4235. MODULE Test;
  4236. CONST Result = FALSE = NIL
  4237. END Test.
  4238. negative: implicit conversion between constant character and integer
  4239. MODULE Test;
  4240. CONST Result = 's' # 2
  4241. END Test.
  4242. negative: implicit conversion between constant character and real
  4243. MODULE Test;
  4244. CONST Result = 't' # 1.0
  4245. END Test.
  4246. negative: implicit conversion between constant character and set
  4247. MODULE Test;
  4248. CONST Result = 0X = {}
  4249. END Test.
  4250. negative: implicit conversion between constant character and string
  4251. MODULE Test;
  4252. CONST Result = 0X # "string"
  4253. END Test.
  4254. negative: implicit conversion between constant character and nil pointer
  4255. MODULE Test;
  4256. CONST Result = 45X # NIL
  4257. END Test.
  4258. positive: implicit conversion between constant integer and real
  4259. MODULE Test;
  4260. CONST Result = 54 # 2.0
  4261. END Test.
  4262. negative: implicit conversion between constant integer and set
  4263. MODULE Test;
  4264. CONST Result = 0 = {5}
  4265. END Test.
  4266. negative: implicit conversion between constant integer and string
  4267. MODULE Test;
  4268. CONST Result = 9 # "text"
  4269. END Test.
  4270. negative: implicit conversion between constant integer and nil pointer
  4271. MODULE Test;
  4272. CONST Result = 5 # NIL
  4273. END Test.
  4274. negative: implicit conversion between constant real and set
  4275. MODULE Test;
  4276. CONST Result = 54.1 = {0..4}
  4277. END Test.
  4278. negative: implicit conversion between constant real and string
  4279. MODULE Test;
  4280. CONST Result = 0.0 = "zero"
  4281. END Test.
  4282. negative: implicit conversion between constant real and nil pointer
  4283. MODULE Test;
  4284. CONST Result = 5.5 = NIL
  4285. END Test.
  4286. negative: implicit conversion between constant set and string
  4287. MODULE Test;
  4288. CONST Result = {9} # "value"
  4289. END Test.
  4290. negative: implicit conversion between constant set and nil pointer
  4291. MODULE Test;
  4292. CONST Result = {} # NIL
  4293. END Test.
  4294. negative: implicit conversion between constant string and nil pointer
  4295. MODULE Test;
  4296. CONST Result = "NIL" # NIL
  4297. END Test.
  4298. # explicit constant conversions
  4299. positive: explicit constant short integer to integer conversion
  4300. MODULE Test;
  4301. CONST Result = LONG (12H)
  4302. BEGIN ASSERT (Result = 12H)
  4303. END Test.
  4304. positive: explicit constant short to long integer conversion
  4305. MODULE Test;
  4306. CONST Result = LONG (LONG (12H))
  4307. BEGIN ASSERT (Result = 12H)
  4308. END Test.
  4309. positive: explicit constant short to huge integer conversion
  4310. MODULE Test;
  4311. CONST Result = LONG (LONG (LONG (12H)))
  4312. BEGIN ASSERT (Result = 12H)
  4313. END Test.
  4314. positive: explicit constant integer to short integer conversion
  4315. MODULE Test;
  4316. CONST Result = SHORT (1234H)
  4317. BEGIN ASSERT (Result = 34H)
  4318. END Test.
  4319. positive: explicit constant integer to long integer conversion
  4320. MODULE Test;
  4321. CONST Result = LONG (1234H)
  4322. BEGIN ASSERT (Result = 1234H)
  4323. END Test.
  4324. positive: explicit constant integer to huge integer conversion
  4325. MODULE Test;
  4326. CONST Result = LONG (LONG (1234H))
  4327. BEGIN ASSERT (Result = 1234H)
  4328. END Test.
  4329. positive: explicit constant long to short integer conversion
  4330. MODULE Test;
  4331. CONST Result = SHORT (SHORT (123456H))
  4332. BEGIN ASSERT (Result = 56H)
  4333. END Test.
  4334. positive: explicit constant long integer to integer conversion
  4335. MODULE Test;
  4336. CONST Result = SHORT (123456H)
  4337. BEGIN ASSERT (Result = 3456H)
  4338. END Test.
  4339. positive: explicit constant long to huge integer conversion
  4340. MODULE Test;
  4341. CONST Result = LONG (123456H)
  4342. BEGIN ASSERT (Result = 123456H)
  4343. END Test.
  4344. positive: explicit constant huge to short integer conversion
  4345. MODULE Test;
  4346. CONST Result = SHORT (SHORT (SHORT (123456777H)))
  4347. BEGIN ASSERT (Result = 77H)
  4348. END Test.
  4349. positive: explicit constant huge integer to integer conversion
  4350. MODULE Test;
  4351. CONST Result = SHORT (SHORT (123456789H))
  4352. BEGIN ASSERT (Result = 6789H)
  4353. END Test.
  4354. positive: explicit constant huge to long integer conversion
  4355. MODULE Test;
  4356. CONST Result = SHORT (123456789H)
  4357. BEGIN ASSERT (Result = 23456789H)
  4358. END Test.
  4359. positive: explicit positive constant real to integer conversion
  4360. MODULE Test;
  4361. CONST Result = ENTIER (5.9)
  4362. BEGIN ASSERT (Result = 5)
  4363. END Test.
  4364. positive: explicit negative constant real to integer conversion
  4365. MODULE Test;
  4366. CONST Result = ENTIER (-5.1E0)
  4367. BEGIN ASSERT (Result = -6)
  4368. END Test.
  4369. positive: explicit positive constant long real to integer conversion
  4370. MODULE Test;
  4371. CONST Result = ENTIER (5.9D0)
  4372. BEGIN ASSERT (Result = 5)
  4373. END Test.
  4374. positive: explicit negative constant long real to integer conversion
  4375. MODULE Test;
  4376. CONST Result = ENTIER (-5.1D0)
  4377. BEGIN ASSERT (Result = -6)
  4378. END Test.
  4379. # types
  4380. positive: unmarked type
  4381. MODULE Test;
  4382. TYPE Type = RECORD END;
  4383. END Test.
  4384. positive: unmarked type within procedure
  4385. MODULE Test;
  4386. PROCEDURE Procedure;
  4387. TYPE Type = RECORD END;
  4388. END Procedure;
  4389. END Test.
  4390. positive: unmarked type within nested procedure
  4391. MODULE Test;
  4392. PROCEDURE Procedure;
  4393. PROCEDURE Procedure;
  4394. TYPE Type = RECORD END;
  4395. END Procedure;
  4396. END Procedure;
  4397. END Test.
  4398. positive: unmarked type within object
  4399. MODULE Test;
  4400. TYPE Object = OBJECT
  4401. TYPE Type = RECORD END;
  4402. END Object;
  4403. END Test.
  4404. positive: unmarked type within object in procedure
  4405. MODULE Test;
  4406. PROCEDURE Procedure;
  4407. TYPE Object = OBJECT
  4408. TYPE Type = RECORD END;
  4409. END Object;
  4410. END Procedure;
  4411. END Test.
  4412. positive: unmarked type within procedure in object
  4413. MODULE Test;
  4414. TYPE Object = OBJECT
  4415. PROCEDURE Procedure;
  4416. TYPE Type = RECORD END;
  4417. END Procedure;
  4418. END Object;
  4419. END Test.
  4420. positive: type marked as exported
  4421. MODULE Test;
  4422. TYPE Type* = RECORD END;
  4423. END Test.
  4424. negative: type marked as exported within procedure
  4425. MODULE Test;
  4426. PROCEDURE Procedure;
  4427. TYPE Type* = RECORD END;
  4428. END Procedure;
  4429. END Test.
  4430. negative: type marked as exported within nested procedure
  4431. MODULE Test;
  4432. PROCEDURE Procedure;
  4433. PROCEDURE Procedure;
  4434. TYPE Type* = RECORD END;
  4435. END Procedure;
  4436. END Procedure;
  4437. END Test.
  4438. positive: type marked as exported within object
  4439. MODULE Test;
  4440. TYPE Object = OBJECT
  4441. TYPE Type* = RECORD END;
  4442. END Object;
  4443. END Test.
  4444. negative: type marked as exported within object in procedure
  4445. MODULE Test;
  4446. PROCEDURE Procedure;
  4447. TYPE Object = OBJECT
  4448. TYPE Type* = RECORD END;
  4449. END Object;
  4450. END Procedure;
  4451. END Test.
  4452. negative: type marked as exported within procedure in object
  4453. MODULE Test;
  4454. TYPE Object = OBJECT
  4455. PROCEDURE Procedure;
  4456. TYPE Type* = RECORD END;
  4457. END Procedure;
  4458. END Object;
  4459. END Test.
  4460. negative: type marked as read-only
  4461. MODULE Test;
  4462. TYPE Type- = OBJECT;
  4463. END Test.
  4464. negative: type marked as read-only within procedure
  4465. MODULE Test;
  4466. PROCEDURE Procedure;
  4467. TYPE Type- = OBJECT;
  4468. END Procedure;
  4469. END Test.
  4470. negative: type marked as read-only within nested procedure
  4471. MODULE Test;
  4472. PROCEDURE Procedure;
  4473. PROCEDURE Procedure;
  4474. TYPE Type- = OBJECT;
  4475. END Procedure;
  4476. END Procedure;
  4477. END Test.
  4478. negative: type marked as read-only within object
  4479. MODULE Test;
  4480. TYPE Object = OBJECT
  4481. TYPE Type- = OBJECT;
  4482. END Object;
  4483. END Test.
  4484. negative: type marked as read-only within object in procedure
  4485. MODULE Test;
  4486. PROCEDURE Procedure;
  4487. TYPE Object = OBJECT
  4488. TYPE Type- = OBJECT;
  4489. END Object;
  4490. END Procedure;
  4491. END Test.
  4492. negative: type marked as read-only within procedure in object
  4493. MODULE Test;
  4494. TYPE Object = OBJECT
  4495. PROCEDURE Procedure;
  4496. TYPE Type- = OBJECT;
  4497. END Procedure;
  4498. END Object;
  4499. END Test.
  4500. negative: duplicated type
  4501. MODULE Test;
  4502. TYPE Type = RECORD END;
  4503. TYPE Type = OBJECT END Type;
  4504. END Test.
  4505. negative: duplicated type within procedure
  4506. MODULE Test;
  4507. PROCEDURE Procedure;
  4508. TYPE Type = RECORD END;
  4509. TYPE Type = OBJECT END Type;
  4510. END Procedure;
  4511. END Test.
  4512. negative: duplicated type within nested procedure
  4513. MODULE Test;
  4514. PROCEDURE Procedure;
  4515. PROCEDURE Procedure;
  4516. TYPE Type = RECORD END;
  4517. TYPE Type = OBJECT END Type;
  4518. END Procedure;
  4519. END Procedure;
  4520. END Test.
  4521. negative: duplicated type within object
  4522. MODULE Test;
  4523. TYPE Object = OBJECT
  4524. TYPE Type = RECORD END;
  4525. TYPE Type = OBJECT END Type;
  4526. END Object;
  4527. END Test.
  4528. negative: duplicated type within object in procedure
  4529. MODULE Test;
  4530. PROCEDURE Procedure;
  4531. TYPE Object = OBJECT
  4532. TYPE Type = RECORD END;
  4533. TYPE Type = OBJECT END Type;
  4534. END Object;
  4535. END Procedure;
  4536. END Test.
  4537. negative: duplicated type within procedure in object
  4538. MODULE Test;
  4539. TYPE Object = OBJECT
  4540. PROCEDURE Procedure;
  4541. TYPE Type = RECORD END;
  4542. TYPE Type = OBJECT END Type;
  4543. END Procedure;
  4544. END Object;
  4545. END Test.
  4546. positive: backwards referencing type
  4547. MODULE Test;
  4548. TYPE A = RECORD END; B = A;
  4549. END Test.
  4550. positive: backwards referencing type within procedure
  4551. MODULE Test;
  4552. PROCEDURE Procedure;
  4553. TYPE A = RECORD END; B = A;
  4554. END Procedure;
  4555. END Test.
  4556. positive: backwards referencing type within nested procedure
  4557. MODULE Test;
  4558. PROCEDURE Procedure;
  4559. PROCEDURE Procedure;
  4560. TYPE A = RECORD END; B = A;
  4561. END Procedure;
  4562. END Procedure;
  4563. END Test.
  4564. positive: backwards referencing type within object
  4565. MODULE Test;
  4566. TYPE Object = OBJECT
  4567. TYPE A = RECORD END; B = A;
  4568. END Object;
  4569. END Test.
  4570. positive: backwards referencing type within object in procedure
  4571. MODULE Test;
  4572. PROCEDURE Procedure;
  4573. TYPE Object = OBJECT
  4574. TYPE A = RECORD END; B = A;
  4575. END Object;
  4576. END Procedure;
  4577. END Test.
  4578. positive: backwards referencing type within procedure in object
  4579. MODULE Test;
  4580. TYPE Object = OBJECT
  4581. PROCEDURE Procedure;
  4582. TYPE A = RECORD END; B = A;
  4583. END Procedure;
  4584. END Object;
  4585. END Test.
  4586. positive: forwards referencing type
  4587. MODULE Test;
  4588. TYPE A = B; B = RECORD END;
  4589. END Test.
  4590. positive: forwards referencing type within procedure
  4591. MODULE Test;
  4592. PROCEDURE Procedure;
  4593. TYPE A = B; B = RECORD END;
  4594. END Procedure;
  4595. END Test.
  4596. positive: forwards referencing type within nested procedure
  4597. MODULE Test;
  4598. PROCEDURE Procedure;
  4599. PROCEDURE Procedure;
  4600. TYPE A = B; B = RECORD END;
  4601. END Procedure;
  4602. END Procedure;
  4603. END Test.
  4604. positive: forwards referencing type within object
  4605. MODULE Test;
  4606. TYPE Object = OBJECT
  4607. TYPE A = B; B = RECORD END;
  4608. END Object;
  4609. END Test.
  4610. positive: forwards referencing type within object in procedure
  4611. MODULE Test;
  4612. PROCEDURE Procedure;
  4613. TYPE Object = OBJECT
  4614. TYPE A = B; B = RECORD END;
  4615. END Object;
  4616. END Procedure;
  4617. END Test.
  4618. positive: forwards referencing type within procedure in object
  4619. MODULE Test;
  4620. TYPE Object = OBJECT
  4621. PROCEDURE Procedure;
  4622. TYPE A = B; B = RECORD END;
  4623. END Procedure;
  4624. END Object;
  4625. END Test.
  4626. negative: cyclic referencing types
  4627. MODULE Test;
  4628. TYPE A = B; B = A;
  4629. END Test.
  4630. negative: cyclic referencing types within procedure
  4631. MODULE Test;
  4632. PROCEDURE Procedure;
  4633. TYPE A = B; B = A;
  4634. END Procedure;
  4635. END Test.
  4636. negative: cyclic referencing types within nested procedure
  4637. MODULE Test;
  4638. PROCEDURE Procedure;
  4639. PROCEDURE Procedure;
  4640. TYPE A = B; B = A;
  4641. END Procedure;
  4642. END Procedure;
  4643. END Test.
  4644. negative: cyclic referencing types within object
  4645. MODULE Test;
  4646. TYPE Object = OBJECT
  4647. TYPE A = B; B = A;
  4648. END Object;
  4649. END Test.
  4650. negative: cyclic referencing types within object in procedure
  4651. MODULE Test;
  4652. PROCEDURE Procedure;
  4653. TYPE Object = OBJECT
  4654. TYPE A = B; B = A;
  4655. END Object;
  4656. END Procedure;
  4657. END Test.
  4658. negative: cyclic referencing types within procedure in object
  4659. MODULE Test;
  4660. TYPE Object = OBJECT
  4661. PROCEDURE Procedure;
  4662. TYPE A = B; B = A;
  4663. END Procedure;
  4664. END Object;
  4665. END Test.
  4666. negative: self referencing type
  4667. MODULE Test;
  4668. TYPE Type = Type;
  4669. END Test.
  4670. negative: self referencing type within procedure
  4671. MODULE Test;
  4672. PROCEDURE Procedure;
  4673. TYPE Type = Type;
  4674. END Procedure;
  4675. END Test.
  4676. negative: self referencing type within nested procedure
  4677. MODULE Test;
  4678. PROCEDURE Procedure;
  4679. PROCEDURE Procedure;
  4680. TYPE Type = Type;
  4681. END Procedure;
  4682. END Procedure;
  4683. END Test.
  4684. negative: self referencing type within object
  4685. MODULE Test;
  4686. TYPE Object = OBJECT
  4687. TYPE Type = Type;
  4688. END Object;
  4689. END Test.
  4690. negative: self referencing type within object in procedure
  4691. MODULE Test;
  4692. PROCEDURE Procedure;
  4693. TYPE Object = OBJECT
  4694. TYPE Type = Type;
  4695. END Object;
  4696. END Procedure;
  4697. END Test.
  4698. negative: self referencing type within procedure in object
  4699. MODULE Test;
  4700. TYPE Object = OBJECT
  4701. PROCEDURE Procedure;
  4702. TYPE Type = Type;
  4703. END Procedure;
  4704. END Object;
  4705. END Test.
  4706. positive: dummy module exporting types
  4707. MODULE Dummy;
  4708. TYPE Exported* = RECORD END;
  4709. TYPE Private = RECORD END;
  4710. END Dummy.
  4711. positive: importing exported type
  4712. MODULE Test;
  4713. IMPORT Dummy;
  4714. TYPE Type = Dummy.Exported;
  4715. END Test.
  4716. negative: importing private type
  4717. MODULE Test;
  4718. IMPORT Dummy;
  4719. TYPE Type = Dummy.Private;
  4720. END Test.
  4721. negative: importing invalid type
  4722. MODULE Test;
  4723. IMPORT Dummy;
  4724. TYPE Type = Dummy.Invalid;
  4725. END Test.
  4726. negative: import as type
  4727. MODULE Test;
  4728. IMPORT Import := Dummy;
  4729. TYPE Type = Import;
  4730. END Test.
  4731. negative: constant as type
  4732. MODULE Test;
  4733. CONST Constant = 0;
  4734. TYPE Type = Constant;
  4735. END Test.
  4736. negative: variable as type
  4737. MODULE Test;
  4738. TYPE Type = variable;
  4739. VAR variable: INTEGER;
  4740. END Test.
  4741. negative: procedure as type
  4742. MODULE Test;
  4743. TYPE Type = Procedure;
  4744. PROCEDURE Procedure; END Procedure;
  4745. END Test.
  4746. negative: parameter as type
  4747. MODULE Test;
  4748. PROCEDURE Procedure (parameter: INTEGER);
  4749. TYPE Type = parameter;
  4750. END Procedure;
  4751. END Test.
  4752. # basic types
  4753. positive: predefined basic character type
  4754. MODULE Test;
  4755. TYPE BasicType = CHAR;
  4756. END Test.
  4757. positive: predefined basic boolean type
  4758. MODULE Test;
  4759. TYPE BasicType = BOOLEAN;
  4760. END Test.
  4761. positive: predefined basic short integer type
  4762. MODULE Test;
  4763. TYPE BasicType = SHORTINT;
  4764. END Test.
  4765. positive: predefined basic integer type
  4766. MODULE Test;
  4767. TYPE BasicType = INTEGER;
  4768. END Test.
  4769. positive: predefined basic long integer type
  4770. MODULE Test;
  4771. TYPE BasicType = LONGINT;
  4772. END Test.
  4773. positive: predefined basic huge integer type
  4774. MODULE Test;
  4775. TYPE BasicType = HUGEINT;
  4776. END Test.
  4777. positive: predefined basic real type
  4778. MODULE Test;
  4779. TYPE BasicType = REAL;
  4780. END Test.
  4781. positive: predefined basic long real type
  4782. MODULE Test;
  4783. TYPE BasicType = LONGREAL;
  4784. END Test.
  4785. positive: predefined basic set type
  4786. MODULE Test;
  4787. TYPE BasicType = SET;
  4788. END Test.
  4789. # arrays
  4790. positive: open array type definition
  4791. MODULE Test;
  4792. TYPE Array = ARRAY OF RECORD END;
  4793. END Test.
  4794. positive: two-dimensional open array type definition
  4795. MODULE Test;
  4796. TYPE Array = ARRAY OF ARRAY OF RECORD END;
  4797. END Test.
  4798. negative: fixed size array with open array element type
  4799. MODULE Test;
  4800. TYPE Array = ARRAY 10 OF ARRAY OF RECORD END;
  4801. END Test.
  4802. negative: array with negative size
  4803. MODULE Test;
  4804. TYPE Array = ARRAY -1 OF RECORD END;
  4805. END Test.
  4806. negative: multidimensional array with negative size
  4807. MODULE Test;
  4808. TYPE Array = ARRAY 5, 3, -1 OF RECORD END;
  4809. END Test.
  4810. positive: array with size zero
  4811. MODULE Test;
  4812. TYPE Array = ARRAY 0 OF RECORD END;
  4813. END Test.
  4814. positive: multidimensional array with size zero
  4815. MODULE Test;
  4816. TYPE Array = ARRAY 2, 7, 0 OF RECORD END;
  4817. END Test.
  4818. positive: array with positive size
  4819. MODULE Test;
  4820. TYPE Array = ARRAY 5 OF RECORD END;
  4821. END Test.
  4822. positive: multidimensional array with positive size
  4823. MODULE Test;
  4824. TYPE Array = ARRAY 2, 4, 6 OF RECORD END;
  4825. END Test.
  4826. negative: array with size of type real
  4827. MODULE Test;
  4828. TYPE Array = ARRAY 5.4 OF RECORD END;
  4829. END Test.
  4830. negative: array with constant base type
  4831. MODULE Test;
  4832. CONST Base = 5;
  4833. TYPE Array = ARRAY 5 OF Base;
  4834. END Test.
  4835. negative: fixed size array of open array
  4836. MODULE Test;
  4837. TYPE Array = ARRAY 10 OF ARRAY OF RECORD END;
  4838. END Test.
  4839. positive: open array of fixed size array
  4840. MODULE Test;
  4841. TYPE Array = ARRAY OF ARRAY 10 OF RECORD END;
  4842. END Test.
  4843. negative: self referencing array type
  4844. MODULE Test;
  4845. TYPE Array = ARRAY 10 OF Array;
  4846. END Test.
  4847. negative: indirectly self referencing array type
  4848. MODULE Test;
  4849. TYPE A = ARRAY 10 OF B;
  4850. TYPE B = ARRAY 10 OF A;
  4851. END Test.
  4852. positive: self referencing array type with pointer
  4853. MODULE Test;
  4854. TYPE A = ARRAY 10 OF POINTER TO A;
  4855. END Test.
  4856. positive: indirectly self referencing array type with pointer
  4857. MODULE Test;
  4858. TYPE A = ARRAY 10 OF B;
  4859. TYPE B = ARRAY 10 OF POINTER TO A;
  4860. END Test.
  4861. positive: array of basic character type
  4862. MODULE Test;
  4863. TYPE Array = ARRAY 10 OF CHAR;
  4864. END Test.
  4865. positive: array of basic boolean type
  4866. MODULE Test;
  4867. TYPE Array = ARRAY 10 OF BOOLEAN;
  4868. END Test.
  4869. positive: array of basic short integer type
  4870. MODULE Test;
  4871. TYPE Array = ARRAY 10 OF SHORTINT;
  4872. END Test.
  4873. positive: array of basic integer type
  4874. MODULE Test;
  4875. TYPE Array = ARRAY 10 OF INTEGER;
  4876. END Test.
  4877. positive: array of basic long integer type
  4878. MODULE Test;
  4879. TYPE Array = ARRAY 10 OF LONGINT;
  4880. END Test.
  4881. positive: array of basic huge integer type
  4882. MODULE Test;
  4883. TYPE Array = ARRAY 10 OF HUGEINT;
  4884. END Test.
  4885. positive: array of basic real type
  4886. MODULE Test;
  4887. TYPE Array = ARRAY 10 OF REAL;
  4888. END Test.
  4889. positive: array of basic long real type
  4890. MODULE Test;
  4891. TYPE Array = ARRAY 10 OF LONGREAL;
  4892. END Test.
  4893. positive: array of basic set type
  4894. MODULE Test;
  4895. TYPE Array = ARRAY 10 OF SET;
  4896. END Test.
  4897. negative: array of basic nil pointer type
  4898. MODULE Test;
  4899. TYPE Array = ARRAY 10 OF NIL;
  4900. END Test.
  4901. positive: array of records
  4902. MODULE Test;
  4903. TYPE Array = ARRAY 10 OF RECORD END;
  4904. END Test.
  4905. positive: array of objects
  4906. MODULE Test;
  4907. TYPE Array = ARRAY 10 OF OBJECT;
  4908. END Test.
  4909. positive: array of pointers
  4910. MODULE Test;
  4911. TYPE Array = ARRAY 10 OF POINTER TO RECORD END;
  4912. END Test.
  4913. positive: array of procedures
  4914. MODULE Test;
  4915. TYPE Array = ARRAY 10 OF PROCEDURE;
  4916. END Test.
  4917. # records
  4918. negative: record extending itself
  4919. MODULE Test;
  4920. TYPE Record = RECORD (Record) END;
  4921. END Test.
  4922. negative: record extending itself indirectly
  4923. MODULE Test;
  4924. TYPE A = RECORD (B) END; B = RECORD (A) END;
  4925. END Test.
  4926. negative: record extending a constant
  4927. MODULE Test;
  4928. CONST Constant = 5;
  4929. TYPE Record = RECORD (Constant) END;
  4930. END Test.
  4931. negative: record extending a variable
  4932. MODULE Test;
  4933. TYPE Record = RECORD (variable) END;
  4934. VAR variable: Record;
  4935. END Test.
  4936. negative: record extending a basic type
  4937. MODULE Test;
  4938. TYPE Record = RECORD (LONGINT) END;
  4939. END Test.
  4940. negative: record extending an array
  4941. MODULE Test;
  4942. TYPE Array = ARRAY 10 OF OBJECT; Record = RECORD (Array) END;
  4943. END Test.
  4944. positive: record extending a record
  4945. MODULE Test;
  4946. TYPE A = RECORD END; B = RECORD (A) END;
  4947. END Test.
  4948. positive: record extending a record from outer scope
  4949. MODULE Test;
  4950. TYPE Outer = RECORD END;
  4951. PROCEDURE Procedure;
  4952. TYPE Inner = RECORD (Outer) END;
  4953. END Procedure;
  4954. END Test.
  4955. negative: record extending a record from inner scope
  4956. MODULE Test;
  4957. TYPE Outer = RECORD (Inner) END;
  4958. PROCEDURE Procedure;
  4959. TYPE Inner = RECORD END;
  4960. END Procedure;
  4961. END Test.
  4962. negative: record extending an object
  4963. MODULE Test;
  4964. TYPE Object = OBJECT; Record = RECORD (Object) END;
  4965. END Test.
  4966. negative: record extending a pointer
  4967. MODULE Test;
  4968. TYPE Pointer = POINTER TO RECORD END; Record = RECORD (Pointer) END;
  4969. END Test.
  4970. negative: record extending a procedure
  4971. MODULE Test;
  4972. TYPE Procedure = PROCEDURE; Record = RECORD (Procedure) END;
  4973. END Test.
  4974. negative: record containing itself
  4975. MODULE Test;
  4976. TYPE Record = RECORD r: Record END;
  4977. END Test.
  4978. positive: record containing pointer to itself
  4979. MODULE Test;
  4980. TYPE Record = RECORD r: POINTER TO Record END;
  4981. END Test.
  4982. negative: record containing itself indirectly
  4983. MODULE Test;
  4984. TYPE A = RECORD b: B END;
  4985. TYPE B = RECORD a: A END;
  4986. END Test.
  4987. positive: record containing pointer to itself indirectly
  4988. MODULE Test;
  4989. TYPE A = RECORD b: POINTER TO B END;
  4990. TYPE B = RECORD a: A END;
  4991. END Test.
  4992. positive: record containing pointer in declaration to itself indirectly
  4993. MODULE Test;
  4994. TYPE A = RECORD b: B END;
  4995. TYPE B = POINTER TO RECORD a: A END;
  4996. END Test.
  4997. positive: record containing backward referenced type
  4998. MODULE Test;
  4999. TYPE A = RECORD END;
  5000. TYPE B = RECORD a: A END;
  5001. END Test.
  5002. positive: record containing forward referenced type
  5003. MODULE Test;
  5004. TYPE A = RECORD b: B END;
  5005. TYPE B = OBJECT;
  5006. END Test.
  5007. positive: record containing anonymous records
  5008. MODULE Test;
  5009. TYPE Record = RECORD r: RECORD r: RECORD r: RECORD END END END END;
  5010. END Test.
  5011. positive: deeply nested records
  5012. MODULE Test;
  5013. TYPE A = RECORD b: B END;
  5014. TYPE F = RECORD END;
  5015. TYPE B = RECORD c: C END;
  5016. TYPE E = RECORD f: F END;
  5017. TYPE D = RECORD e: E END;
  5018. TYPE C = RECORD d: D END;
  5019. END Test.
  5020. negative: record containing itself deeply indirectly
  5021. MODULE Test;
  5022. TYPE A = RECORD b: B END;
  5023. TYPE F = RECORD a: A END;
  5024. TYPE B = RECORD c: C END;
  5025. TYPE E = RECORD f: F END;
  5026. TYPE D = RECORD e: E END;
  5027. TYPE C = RECORD d: D END;
  5028. END Test.
  5029. negative: nested record containing itself indirectly
  5030. MODULE Test;
  5031. TYPE A = RECORD b: B END;
  5032. TYPE B = RECORD c: C END;
  5033. TYPE C = RECORD d: D END;
  5034. TYPE D = RECORD b: B END;
  5035. END Test.
  5036. positive: record containing pointer to record
  5037. MODULE Test;
  5038. TYPE Record = RECORD p: POINTER TO RECORD END END;
  5039. END Test.
  5040. positive: record containing pointer to record containing the first record
  5041. MODULE Test;
  5042. TYPE Record = RECORD p: POINTER TO RECORD r: Record END END;
  5043. END Test.
  5044. positive: record containing record containing pointer to record containing the first record
  5045. MODULE Test;
  5046. TYPE A = RECORD b: B END;
  5047. TYPE B = RECORD p: POINTER TO RECORD a: A END END;
  5048. END Test.
  5049. positive: pointer to record containing record containing record containing the pointer
  5050. MODULE Test;
  5051. TYPE A = POINTER TO RECORD b: B END;
  5052. TYPE B = RECORD r: RECORD a: A END END;
  5053. END Test.
  5054. positive: record containing basic types
  5055. MODULE Test;
  5056. TYPE Record = RECORD i: INTEGER; s: SET; b: BOOLEAN END;
  5057. END Test.
  5058. positive: record containing an array
  5059. MODULE Test;
  5060. TYPE Record = RECORD a: ARRAY 10 OF OBJECT; END;
  5061. END Test.
  5062. negative: record containing an open array
  5063. MODULE Test;
  5064. TYPE Record = RECORD a: ARRAY OF RECORD END END;
  5065. END Test.
  5066. positive: record containing an object
  5067. MODULE Test;
  5068. TYPE Record = RECORD o: OBJECT; END;
  5069. END Test.
  5070. positive: record containing a procedure
  5071. MODULE Test;
  5072. TYPE Record = RECORD p: PROCEDURE END;
  5073. END Test.
  5074. negative: record with variable with same name as its type
  5075. MODULE Test;
  5076. TYPE Type = RECORD END;
  5077. TYPE Record = RECORD Type: Type END;
  5078. END Test.
  5079. # objects
  5080. negative: object extending itself
  5081. MODULE Test;
  5082. TYPE Object = OBJECT (Object) END Object;
  5083. END Test.
  5084. negative: object extending itself indirectly
  5085. MODULE Test;
  5086. TYPE A = OBJECT (B) END A; B = OBJECT (A) END B;
  5087. END Test.
  5088. negative: object extending a constant
  5089. MODULE Test;
  5090. CONST Constant = 5;
  5091. TYPE Object = OBJECT (Constant) END Object;
  5092. END Test.
  5093. negative: object extending a variable
  5094. MODULE Test;
  5095. TYPE Object = OBJECT (variable) END Object;
  5096. VAR variable: Object;
  5097. END Test.
  5098. negative: object extending a basic type
  5099. MODULE Test;
  5100. TYPE Object = OBJECT (LONGINT) END Object;
  5101. END Test.
  5102. negative: object extending an array
  5103. MODULE Test;
  5104. TYPE Array = ARRAY 10 OF OBJECT; Object = OBJECT (Array) END Object;
  5105. END Test.
  5106. negative: object extending a record
  5107. MODULE Test;
  5108. TYPE Record = RECORD END; Object = OBJECT (Record) END Object;
  5109. END Test.
  5110. positive: object extending an object
  5111. MODULE Test;
  5112. TYPE A = OBJECT; B = OBJECT (A) END B;
  5113. END Test.
  5114. negative: object extending the base object
  5115. MODULE Test;
  5116. TYPE Object = OBJECT (OBJECT) END Object;
  5117. END Test.
  5118. positive: object extending a pointer to record
  5119. MODULE Test;
  5120. TYPE Pointer = POINTER TO RECORD END; Object = OBJECT (Pointer) END Object;
  5121. END Test.
  5122. negative: object extending a procedure
  5123. MODULE Test;
  5124. TYPE Procedure = PROCEDURE; Object = OBJECT (Procedure) END Object;
  5125. END Test.
  5126. positive: object containing itself
  5127. MODULE Test;
  5128. TYPE Object = OBJECT VAR o: Object END Object;
  5129. END Test.
  5130. positive: object containing itself indirectly
  5131. MODULE Test;
  5132. TYPE A = OBJECT VAR b: B END A;
  5133. TYPE B = OBJECT VAR a: A END B;
  5134. END Test.
  5135. positive: object containing backward referenced type
  5136. MODULE Test;
  5137. TYPE A = OBJECT;
  5138. TYPE B = OBJECT VAR a: A END B;
  5139. END Test.
  5140. positive: object containing forward referenced type
  5141. MODULE Test;
  5142. TYPE A = OBJECT VAR b: B END A;
  5143. TYPE B = OBJECT;
  5144. END Test.
  5145. positive: object containing anonymous records
  5146. MODULE Test;
  5147. TYPE Object = OBJECT VAR r: RECORD r: RECORD r: RECORD END END END END Object;
  5148. END Test.
  5149. positive: deeply nested objects
  5150. MODULE Test;
  5151. TYPE A = OBJECT VAR b: B END A;
  5152. TYPE F = OBJECT;
  5153. TYPE B = OBJECT VAR c: C END B;
  5154. TYPE E = OBJECT VAR f: F END E;
  5155. TYPE D = OBJECT VAR e: E END D;
  5156. TYPE C = OBJECT VAR d: D END C;
  5157. END Test.
  5158. positive: object containing itself deeply indirectly
  5159. MODULE Test;
  5160. TYPE A = OBJECT VAR b: B END A;
  5161. TYPE F = OBJECT VAR a: A END F;
  5162. TYPE B = OBJECT VAR c: C END B;
  5163. TYPE E = OBJECT VAR f: F END E;
  5164. TYPE D = OBJECT VAR e: E END D;
  5165. TYPE C = OBJECT VAR d: D END C;
  5166. END Test.
  5167. positive: nested object containing itself indirectly
  5168. MODULE Test;
  5169. TYPE A = OBJECT VAR b: B END A;
  5170. TYPE B = OBJECT VAR c: C END B;
  5171. TYPE C = OBJECT VAR d: D END C;
  5172. TYPE D = OBJECT VAR b: B END D;
  5173. END Test.
  5174. positive: object containing basic types
  5175. MODULE Test;
  5176. TYPE Object = OBJECT VAR i: INTEGER; s: SET; b: BOOLEAN END Object;
  5177. END Test.
  5178. positive: object containing an array
  5179. MODULE Test;
  5180. TYPE Object = OBJECT VAR a: ARRAY 10 OF OBJECT; END Object;
  5181. END Test.
  5182. negative: object containing an open array
  5183. MODULE Test;
  5184. TYPE Object = OBJECT VAR a: ARRAY OF OBJECT; END Object;
  5185. END Test.
  5186. positive: object containing an object
  5187. MODULE Test;
  5188. TYPE Object = OBJECT VAR o: OBJECT; END Object;
  5189. END Test.
  5190. positive: object containing a procedure
  5191. MODULE Test;
  5192. TYPE Object = OBJECT VAR p: PROCEDURE END Object;
  5193. END Test.
  5194. positive: object referenced in procedure variable
  5195. MODULE Test;
  5196. TYPE Object = OBJECT PROCEDURE Object; END Object; END Object;
  5197. VAR procedure : PROCEDURE (object: Object);
  5198. END Test.
  5199. positive: local object accessing local constant
  5200. MODULE Test;
  5201. PROCEDURE P;
  5202. CONST Constant = TRUE;
  5203. VAR o: OBJECT VAR v: BOOLEAN BEGIN v := Constant END;
  5204. END P;
  5205. END Test.
  5206. positive: local object accessing local type
  5207. MODULE Test;
  5208. PROCEDURE P;
  5209. TYPE Type = BOOLEAN;
  5210. VAR o: OBJECT VAR v: Type END;
  5211. END P;
  5212. END Test.
  5213. negative: local object accessing local variable
  5214. MODULE Test;
  5215. PROCEDURE P;
  5216. VAR o: OBJECT BEGIN v := TRUE END; v: BOOLEAN;
  5217. END P;
  5218. END Test.
  5219. negative: local object accessing local procedure
  5220. MODULE Test;
  5221. PROCEDURE P;
  5222. VAR o: OBJECT BEGIN Procedure END;
  5223. PROCEDURE Procedure; END Procedure;
  5224. END P;
  5225. END Test.
  5226. negative: local object accessing local parameter
  5227. MODULE Test;
  5228. PROCEDURE P (p: BOOLEAN);
  5229. VAR o: OBJECT BEGIN p := TRUE END;
  5230. END P;
  5231. END Test.
  5232. positive: local object accessing global constant
  5233. MODULE Test;
  5234. CONST Constant = TRUE;
  5235. PROCEDURE P;
  5236. VAR o: OBJECT VAR v: BOOLEAN BEGIN v := Constant END;
  5237. END P;
  5238. END Test.
  5239. positive: local object accessing global type
  5240. MODULE Test;
  5241. TYPE Type = BOOLEAN;
  5242. PROCEDURE P;
  5243. VAR o: OBJECT VAR v: Type END;
  5244. END P;
  5245. END Test.
  5246. positive: local object accessing global variable
  5247. MODULE Test;
  5248. VAR v: BOOLEAN;
  5249. PROCEDURE P;
  5250. VAR o: OBJECT BEGIN v := TRUE END;
  5251. END P;
  5252. END Test.
  5253. positive: local object accessing global procedure
  5254. MODULE Test;
  5255. PROCEDURE P;
  5256. VAR o: OBJECT BEGIN Procedure END;
  5257. END P;
  5258. PROCEDURE Procedure; END Procedure;
  5259. END Test.
  5260. # pointers
  5261. negative: pointer to basic character type
  5262. MODULE Test;
  5263. TYPE Pointer = POINTER TO CHAR;
  5264. END Test.
  5265. negative: pointer to basic boolean type
  5266. MODULE Test;
  5267. TYPE Pointer = POINTER TO BOOLEAN;
  5268. END Test.
  5269. negative: pointer to basic short integer type
  5270. MODULE Test;
  5271. TYPE Pointer = POINTER TO SHORTINT;
  5272. END Test.
  5273. negative: pointer to basic integer type
  5274. MODULE Test;
  5275. TYPE Pointer = POINTER TO INTEGER;
  5276. END Test.
  5277. negative: pointer to basic long integer type
  5278. MODULE Test;
  5279. TYPE Pointer = POINTER TO LONGINT;
  5280. END Test.
  5281. negative: pointer to basic huge integer type
  5282. MODULE Test;
  5283. TYPE Pointer = POINTER TO HUGEINT;
  5284. END Test.
  5285. negative: pointer to basic real type
  5286. MODULE Test;
  5287. TYPE Pointer = POINTER TO REAL;
  5288. END Test.
  5289. negative: pointer to basic long real type
  5290. MODULE Test;
  5291. TYPE Pointer = POINTER TO LONGREAL;
  5292. END Test.
  5293. negative: pointer to basic set type
  5294. MODULE Test;
  5295. TYPE Pointer = POINTER TO SET;
  5296. END Test.
  5297. positive: pointer to record
  5298. MODULE Test;
  5299. TYPE Pointer = POINTER TO RECORD END;
  5300. END Test.
  5301. positive: pointer to record from outer scope
  5302. MODULE Test;
  5303. TYPE Record = RECORD END;
  5304. PROCEDURE Procedure;
  5305. TYPE Pointer = POINTER TO Record;
  5306. END Procedure;
  5307. END Test.
  5308. positive: pointer to record from with variable of nested type
  5309. MODULE Test;
  5310. PROCEDURE Procedure;
  5311. TYPE Pointer = POINTER TO RECORD pointer: Pointer END;
  5312. END Procedure;
  5313. END Test.
  5314. negative: pointer to record inside object
  5315. MODULE Test;
  5316. TYPE Pointer = POINTER TO Record;
  5317. TYPE Object = OBJECT
  5318. TYPE Record = RECORD END;
  5319. END Object;
  5320. END Test.
  5321. negative: pointer to record inside procedure
  5322. MODULE Test;
  5323. TYPE Pointer = POINTER TO Record;
  5324. PROCEDURE Procedure;
  5325. TYPE Record = RECORD END;
  5326. END Procedure;
  5327. END Test.
  5328. positive: pointer to array
  5329. MODULE Test;
  5330. TYPE Pointer = POINTER TO ARRAY 10 OF RECORD END;
  5331. END Test.
  5332. positive: pointer to open array
  5333. MODULE Test;
  5334. TYPE Pointer = POINTER TO ARRAY OF RECORD END;
  5335. END Test.
  5336. positive: pointer to array of same pointer
  5337. MODULE Test;
  5338. TYPE Pointer = POINTER TO ARRAY 10 OF Pointer;
  5339. END Test.
  5340. positive: pointers to array of same pointer
  5341. MODULE Test;
  5342. TYPE A = POINTER TO ARRAY 10 OF B;
  5343. TYPE B = POINTER TO ARRAY 10 OF C;
  5344. TYPE C = POINTER TO ARRAY 10 OF D;
  5345. TYPE D = POINTER TO ARRAY 10 OF A;
  5346. END Test.
  5347. positive: pointer to open array of same pointer
  5348. MODULE Test;
  5349. TYPE Pointer = POINTER TO ARRAY OF Pointer;
  5350. END Test.
  5351. positive: pointers to open array of same pointer
  5352. MODULE Test;
  5353. TYPE A = POINTER TO ARRAY OF B;
  5354. TYPE B = POINTER TO ARRAY OF C;
  5355. TYPE C = POINTER TO ARRAY OF D;
  5356. TYPE D = POINTER TO ARRAY OF A;
  5357. END Test.
  5358. negative: pointer to pointer
  5359. MODULE Test;
  5360. TYPE Pointer = POINTER TO POINTER TO RECORD END;
  5361. END Test.
  5362. negative: pointer to object
  5363. MODULE Test;
  5364. TYPE Pointer = POINTER TO OBJECT;
  5365. END Test.
  5366. negative: pointer to procedure
  5367. MODULE Test;
  5368. TYPE Pointer = POINTER TO PROCEDURE;
  5369. END Test.
  5370. # procedure types
  5371. positive: plain procedure type
  5372. MODULE Test;
  5373. TYPE Procedure = PROCEDURE;
  5374. END Test.
  5375. positive: procedure type returning basic character type
  5376. MODULE Test;
  5377. TYPE Procedure = PROCEDURE (): CHAR;
  5378. END Test.
  5379. positive: procedure type returning basic boolean type
  5380. MODULE Test;
  5381. TYPE Procedure = PROCEDURE (): BOOLEAN;
  5382. END Test.
  5383. positive: procedure type returning basic short integer type
  5384. MODULE Test;
  5385. TYPE Procedure = PROCEDURE (): SHORTINT;
  5386. END Test.
  5387. positive: procedure type returning basic integer type
  5388. MODULE Test;
  5389. TYPE Procedure = PROCEDURE (): INTEGER;
  5390. END Test.
  5391. positive: procedure type returning basic long integer type
  5392. MODULE Test;
  5393. TYPE Procedure = PROCEDURE (): LONGINT;
  5394. END Test.
  5395. positive: procedure type returning basic huge integer type
  5396. MODULE Test;
  5397. TYPE Procedure = PROCEDURE (): HUGEINT;
  5398. END Test.
  5399. positive: procedure type returning basic real type
  5400. MODULE Test;
  5401. TYPE Procedure = PROCEDURE (): REAL;
  5402. END Test.
  5403. positive: procedure type returning basic long real type
  5404. MODULE Test;
  5405. TYPE Procedure = PROCEDURE (): LONGREAL;
  5406. END Test.
  5407. positive: procedure type returning basic set type
  5408. MODULE Test;
  5409. TYPE Procedure = PROCEDURE (): SET;
  5410. END Test.
  5411. positive: procedure type returning record type
  5412. MODULE Test;
  5413. TYPE Record = RECORD END;
  5414. TYPE Procedure = PROCEDURE (): Record;
  5415. END Test.
  5416. positive: procedure type returning anonymous record type
  5417. MODULE Test;
  5418. TYPE Procedure = PROCEDURE (): RECORD END;
  5419. END Test.
  5420. positive: procedure type returning array type
  5421. MODULE Test;
  5422. TYPE Array = ARRAY 10 OF RECORD END;
  5423. TYPE Procedure = PROCEDURE (): Array;
  5424. END Test.
  5425. positive: procedure type returning anonymous array type
  5426. MODULE Test;
  5427. TYPE Procedure = PROCEDURE (): ARRAY 10 OF RECORD END;
  5428. END Test.
  5429. negative: procedure type returning open array type
  5430. MODULE Test;
  5431. TYPE Array = ARRAY OF RECORD END;
  5432. TYPE Procedure = PROCEDURE (): Array;
  5433. END Test.
  5434. negative: procedure type returning anonymous open array type
  5435. MODULE Test;
  5436. TYPE Procedure = PROCEDURE (): ARRAY OF RECORD END;
  5437. END Test.
  5438. positive: procedure type returning object type
  5439. MODULE Test;
  5440. TYPE Object = OBJECT;
  5441. TYPE Procedure = PROCEDURE (): Object;
  5442. END Test.
  5443. positive: procedure type returning anonymous object type
  5444. MODULE Test;
  5445. TYPE Procedure = PROCEDURE (): OBJECT;
  5446. END Test.
  5447. positive: procedure type returning pointer type
  5448. MODULE Test;
  5449. TYPE Pointer = POINTER TO RECORD END;
  5450. TYPE Procedure = PROCEDURE (): Pointer;
  5451. END Test.
  5452. positive: procedure type returning anonymous pointer type
  5453. MODULE Test;
  5454. TYPE Procedure = PROCEDURE (): POINTER TO RECORD END;
  5455. END Test.
  5456. positive: procedure type returning procedure type
  5457. MODULE Test;
  5458. TYPE Proc = PROCEDURE;
  5459. TYPE Procedure = PROCEDURE (): Proc;
  5460. END Test.
  5461. positive: procedure type returning anonymous procedure type
  5462. MODULE Test;
  5463. TYPE Procedure = PROCEDURE (): PROCEDURE;
  5464. END Test.
  5465. positive: procedure type returning anonymous procedure returning anonymous procedure
  5466. MODULE Test;
  5467. TYPE Procedure = PROCEDURE (): PROCEDURE (): PROCEDURE;
  5468. END Test.
  5469. positive: procedure type returning itself
  5470. MODULE Test;
  5471. TYPE Procedure = PROCEDURE (): Procedure;
  5472. END Test.
  5473. positive: procedure types returning themselves
  5474. MODULE Test;
  5475. TYPE A = PROCEDURE (): B;
  5476. TYPE B = PROCEDURE (): C;
  5477. TYPE C = PROCEDURE (): D;
  5478. TYPE D = PROCEDURE (): A;
  5479. END Test.
  5480. positive: procedure type with parameter of same type
  5481. MODULE Test;
  5482. TYPE Procedure = PROCEDURE (procedure: Procedure);
  5483. END Test.
  5484. positive: procedure types with parameters of same type
  5485. MODULE Test;
  5486. TYPE A = PROCEDURE (b: B);
  5487. TYPE B = PROCEDURE (c: C);
  5488. TYPE C = PROCEDURE (d: D);
  5489. TYPE D = PROCEDURE (a: A);
  5490. END Test.
  5491. negative: procedure type with multiple variable parameter
  5492. MODULE Test;
  5493. TYPE Procedure = PROCEDURE (VAR VAR parameter: SET);
  5494. END Test.
  5495. negative: procedure type with multiple constant parameter
  5496. MODULE Test;
  5497. TYPE Procedure = PROCEDURE (CONST CONST parameter: SET);
  5498. END Test.
  5499. negative: procedure type with variable and constant parameter
  5500. MODULE Test;
  5501. TYPE Procedure = PROCEDURE (VAR CONST parameter: SET);
  5502. END Test.
  5503. negative: procedure type with constant and variable parameter
  5504. MODULE Test;
  5505. TYPE Procedure = PROCEDURE (VAR CONST parameter: SET);
  5506. END Test.
  5507. negative: procedure type with parameter marked as exported
  5508. MODULE Test;
  5509. TYPE Procedure = PROCEDURE (parameter*: CHAR);
  5510. END Test.
  5511. negative: procedure type with parameter marked as read-only
  5512. MODULE Test;
  5513. TYPE Procedure = PROCEDURE (parameter-: CHAR);
  5514. END Test.
  5515. positive: procedure type with a parameter of basic character type
  5516. MODULE Test;
  5517. TYPE Procedure = PROCEDURE (parameter: CHAR);
  5518. END Test.
  5519. positive: procedure type with parameters of basic character type
  5520. MODULE Test;
  5521. TYPE Procedure = PROCEDURE (a, b, c: CHAR);
  5522. END Test.
  5523. positive: procedure type with a parameter of variable character type
  5524. MODULE Test;
  5525. TYPE Procedure = PROCEDURE (VAR parameter: CHAR);
  5526. END Test.
  5527. positive: procedure type with parameters of variable character type
  5528. MODULE Test;
  5529. TYPE Procedure = PROCEDURE (VAR a, b, c: CHAR);
  5530. END Test.
  5531. positive: procedure type with a parameter of constant character type
  5532. MODULE Test;
  5533. TYPE Procedure = PROCEDURE (CONST parameter: CHAR);
  5534. END Test.
  5535. positive: procedure type with parameters of constant character type
  5536. MODULE Test;
  5537. TYPE Procedure = PROCEDURE (CONST a, b, c: CHAR);
  5538. END Test.
  5539. positive: procedure type with intermixed parameters of character type
  5540. MODULE Test;
  5541. TYPE Procedure = PROCEDURE (a: CHAR; VAR b: CHAR; CONST c: CHAR);
  5542. END Test.
  5543. positive: procedure type with a parameter of basic boolean type
  5544. MODULE Test;
  5545. TYPE Procedure = PROCEDURE (parameter: BOOLEAN);
  5546. END Test.
  5547. positive: procedure type with parameters of basic boolean type
  5548. MODULE Test;
  5549. TYPE Procedure = PROCEDURE (a, b, c: BOOLEAN);
  5550. END Test.
  5551. positive: procedure type with a parameter of variable boolean type
  5552. MODULE Test;
  5553. TYPE Procedure = PROCEDURE (VAR parameter: BOOLEAN);
  5554. END Test.
  5555. positive: procedure type with parameters of variable boolean type
  5556. MODULE Test;
  5557. TYPE Procedure = PROCEDURE (VAR a, b, c: BOOLEAN);
  5558. END Test.
  5559. positive: procedure type with a parameter of constant boolean type
  5560. MODULE Test;
  5561. TYPE Procedure = PROCEDURE (CONST parameter: BOOLEAN);
  5562. END Test.
  5563. positive: procedure type with parameters of constant boolean type
  5564. MODULE Test;
  5565. TYPE Procedure = PROCEDURE (CONST a, b, c: BOOLEAN);
  5566. END Test.
  5567. positive: procedure type with intermixed parameters of boolean type
  5568. MODULE Test;
  5569. TYPE Procedure = PROCEDURE (a: BOOLEAN; VAR b: BOOLEAN; CONST c: BOOLEAN);
  5570. END Test.
  5571. positive: procedure type with a parameter of basic short integer type
  5572. MODULE Test;
  5573. TYPE Procedure = PROCEDURE (parameter: SHORTINT);
  5574. END Test.
  5575. positive: procedure type with parameters of basic short integer type
  5576. MODULE Test;
  5577. TYPE Procedure = PROCEDURE (a, b, c: SHORTINT);
  5578. END Test.
  5579. positive: procedure type with a parameter of variable short integer type
  5580. MODULE Test;
  5581. TYPE Procedure = PROCEDURE (VAR parameter: SHORTINT);
  5582. END Test.
  5583. positive: procedure type with parameters of variable short integer type
  5584. MODULE Test;
  5585. TYPE Procedure = PROCEDURE (VAR a, b, c: SHORTINT);
  5586. END Test.
  5587. positive: procedure type with a parameter of constant short integer type
  5588. MODULE Test;
  5589. TYPE Procedure = PROCEDURE (CONST parameter: SHORTINT);
  5590. END Test.
  5591. positive: procedure type with parameters of constant short integer type
  5592. MODULE Test;
  5593. TYPE Procedure = PROCEDURE (CONST a, b, c: SHORTINT);
  5594. END Test.
  5595. positive: procedure type with intermixed parameters of short integer type
  5596. MODULE Test;
  5597. TYPE Procedure = PROCEDURE (a: SHORTINT; VAR b: SHORTINT; CONST c: SHORTINT);
  5598. END Test.
  5599. positive: procedure type with a parameter of basic integer type
  5600. MODULE Test;
  5601. TYPE Procedure = PROCEDURE (parameter: INTEGER);
  5602. END Test.
  5603. positive: procedure type with parameters of basic integer type
  5604. MODULE Test;
  5605. TYPE Procedure = PROCEDURE (a, b, c: INTEGER);
  5606. END Test.
  5607. positive: procedure type with a parameter of variable integer type
  5608. MODULE Test;
  5609. TYPE Procedure = PROCEDURE (VAR parameter: INTEGER);
  5610. END Test.
  5611. positive: procedure type with parameters of variable integer type
  5612. MODULE Test;
  5613. TYPE Procedure = PROCEDURE (VAR a, b, c: INTEGER);
  5614. END Test.
  5615. positive: procedure type with a parameter of constant integer type
  5616. MODULE Test;
  5617. TYPE Procedure = PROCEDURE (CONST parameter: INTEGER);
  5618. END Test.
  5619. positive: procedure type with parameters of constant integer type
  5620. MODULE Test;
  5621. TYPE Procedure = PROCEDURE (CONST a, b, c: INTEGER);
  5622. END Test.
  5623. positive: procedure type with intermixed parameters of integer type
  5624. MODULE Test;
  5625. TYPE Procedure = PROCEDURE (a: INTEGER; VAR b: INTEGER; CONST c: INTEGER);
  5626. END Test.
  5627. positive: procedure type with a parameter of basic long integer type
  5628. MODULE Test;
  5629. TYPE Procedure = PROCEDURE (parameter: LONGINT);
  5630. END Test.
  5631. positive: procedure type with parameters of basic long integer type
  5632. MODULE Test;
  5633. TYPE Procedure = PROCEDURE (a, b, c: LONGINT);
  5634. END Test.
  5635. positive: procedure type with a parameter of variable long integer type
  5636. MODULE Test;
  5637. TYPE Procedure = PROCEDURE (VAR parameter: LONGINT);
  5638. END Test.
  5639. positive: procedure type with parameters of variable long integer type
  5640. MODULE Test;
  5641. TYPE Procedure = PROCEDURE (VAR a, b, c: LONGINT);
  5642. END Test.
  5643. positive: procedure type with a parameter of constant long integer type
  5644. MODULE Test;
  5645. TYPE Procedure = PROCEDURE (CONST parameter: LONGINT);
  5646. END Test.
  5647. positive: procedure type with parameters of constant long integer type
  5648. MODULE Test;
  5649. TYPE Procedure = PROCEDURE (CONST a, b, c: LONGINT);
  5650. END Test.
  5651. positive: procedure type with intermixed parameters of long integer type
  5652. MODULE Test;
  5653. TYPE Procedure = PROCEDURE (a: LONGINT; VAR b: LONGINT; CONST c: LONGINT);
  5654. END Test.
  5655. positive: procedure type with a parameter of basic huge integer type
  5656. MODULE Test;
  5657. TYPE Procedure = PROCEDURE (parameter: HUGEINT);
  5658. END Test.
  5659. positive: procedure type with parameters of basic huge integer type
  5660. MODULE Test;
  5661. TYPE Procedure = PROCEDURE (a, b, c: HUGEINT);
  5662. END Test.
  5663. positive: procedure type with a parameter of variable huge integer type
  5664. MODULE Test;
  5665. TYPE Procedure = PROCEDURE (VAR parameter: HUGEINT);
  5666. END Test.
  5667. positive: procedure type with parameters of variable huge integer type
  5668. MODULE Test;
  5669. TYPE Procedure = PROCEDURE (VAR a, b, c: HUGEINT);
  5670. END Test.
  5671. positive: procedure type with a parameter of constant huge integer type
  5672. MODULE Test;
  5673. TYPE Procedure = PROCEDURE (CONST parameter: HUGEINT);
  5674. END Test.
  5675. positive: procedure type with parameters of constant huge integer type
  5676. MODULE Test;
  5677. TYPE Procedure = PROCEDURE (CONST a, b, c: HUGEINT);
  5678. END Test.
  5679. positive: procedure type with intermixed parameters of huge integer type
  5680. MODULE Test;
  5681. TYPE Procedure = PROCEDURE (a: HUGEINT; VAR b: HUGEINT; CONST c: HUGEINT);
  5682. END Test.
  5683. positive: procedure type with a parameter of basic real type
  5684. MODULE Test;
  5685. TYPE Procedure = PROCEDURE (parameter: REAL);
  5686. END Test.
  5687. positive: procedure type with parameters of basic real type
  5688. MODULE Test;
  5689. TYPE Procedure = PROCEDURE (a, b, c: REAL);
  5690. END Test.
  5691. positive: procedure type with a parameter of variable real type
  5692. MODULE Test;
  5693. TYPE Procedure = PROCEDURE (VAR parameter: REAL);
  5694. END Test.
  5695. positive: procedure type with parameters of variable real type
  5696. MODULE Test;
  5697. TYPE Procedure = PROCEDURE (VAR a, b, c: REAL);
  5698. END Test.
  5699. positive: procedure type with a parameter of constant real type
  5700. MODULE Test;
  5701. TYPE Procedure = PROCEDURE (CONST parameter: REAL);
  5702. END Test.
  5703. positive: procedure type with parameters of constant real type
  5704. MODULE Test;
  5705. TYPE Procedure = PROCEDURE (CONST a, b, c: REAL);
  5706. END Test.
  5707. positive: procedure type with intermixed parameters of real type
  5708. MODULE Test;
  5709. TYPE Procedure = PROCEDURE (a: REAL; VAR b: REAL; CONST c: REAL);
  5710. END Test.
  5711. positive: procedure type with a parameter of basic long real type
  5712. MODULE Test;
  5713. TYPE Procedure = PROCEDURE (parameter: LONGREAL);
  5714. END Test.
  5715. positive: procedure type with parameters of basic long real type
  5716. MODULE Test;
  5717. TYPE Procedure = PROCEDURE (a, b, c: LONGREAL);
  5718. END Test.
  5719. positive: procedure type with a parameter of variable long real type
  5720. MODULE Test;
  5721. TYPE Procedure = PROCEDURE (VAR parameter: LONGREAL);
  5722. END Test.
  5723. positive: procedure type with parameters of variable long real type
  5724. MODULE Test;
  5725. TYPE Procedure = PROCEDURE (VAR a, b, c: LONGREAL);
  5726. END Test.
  5727. positive: procedure type with a parameter of constant long real type
  5728. MODULE Test;
  5729. TYPE Procedure = PROCEDURE (CONST parameter: LONGREAL);
  5730. END Test.
  5731. positive: procedure type with parameters of constant long real type
  5732. MODULE Test;
  5733. TYPE Procedure = PROCEDURE (CONST a, b, c: LONGREAL);
  5734. END Test.
  5735. positive: procedure type with intermixed parameters of long real type
  5736. MODULE Test;
  5737. TYPE Procedure = PROCEDURE (a: LONGREAL; VAR b: LONGREAL; CONST c: LONGREAL);
  5738. END Test.
  5739. positive: procedure type with a parameter of basic set type
  5740. MODULE Test;
  5741. TYPE Procedure = PROCEDURE (parameter: SET);
  5742. END Test.
  5743. positive: procedure type with parameters of basic set type
  5744. MODULE Test;
  5745. TYPE Procedure = PROCEDURE (a, b, c: SET);
  5746. END Test.
  5747. positive: procedure type with a parameter of variable set type
  5748. MODULE Test;
  5749. TYPE Procedure = PROCEDURE (VAR parameter: SET);
  5750. END Test.
  5751. positive: procedure type with parameters of variable set type
  5752. MODULE Test;
  5753. TYPE Procedure = PROCEDURE (VAR a, b, c: SET);
  5754. END Test.
  5755. positive: procedure type with a parameter of constant set type
  5756. MODULE Test;
  5757. TYPE Procedure = PROCEDURE (CONST parameter: SET);
  5758. END Test.
  5759. positive: procedure type with parameters of constant set type
  5760. MODULE Test;
  5761. TYPE Procedure = PROCEDURE (CONST a, b, c: SET);
  5762. END Test.
  5763. positive: procedure type with intermixed parameters of set type
  5764. MODULE Test;
  5765. TYPE Procedure = PROCEDURE (a: SET; VAR b: SET; CONST c: SET);
  5766. END Test.
  5767. positive: procedure type with a parameter of record type
  5768. MODULE Test;
  5769. TYPE Record = RECORD END;
  5770. TYPE Procedure = PROCEDURE (parameter: Record);
  5771. END Test.
  5772. positive: procedure type with parameters of record type
  5773. MODULE Test;
  5774. TYPE Record = RECORD END;
  5775. TYPE Procedure = PROCEDURE (a, b, c: Record);
  5776. END Test.
  5777. positive: procedure type with a parameter of variable record type
  5778. MODULE Test;
  5779. TYPE Record = RECORD END;
  5780. TYPE Procedure = PROCEDURE (VAR parameter: Record);
  5781. END Test.
  5782. positive: procedure type with parameters of variable record type
  5783. MODULE Test;
  5784. TYPE Record = RECORD END;
  5785. TYPE Procedure = PROCEDURE (VAR a, b, c: Record);
  5786. END Test.
  5787. positive: procedure type with a parameter of constant record type
  5788. MODULE Test;
  5789. TYPE Record = RECORD END;
  5790. TYPE Procedure = PROCEDURE (CONST parameter: Record);
  5791. END Test.
  5792. positive: procedure type with parameters of constant record type
  5793. MODULE Test;
  5794. TYPE Record = RECORD END;
  5795. TYPE Procedure = PROCEDURE (CONST a, b, c: Record);
  5796. END Test.
  5797. positive: procedure type with intermixed parameters of record type
  5798. MODULE Test;
  5799. TYPE Record = RECORD END;
  5800. TYPE Procedure = PROCEDURE (a: Record; VAR b: Record; CONST c: Record);
  5801. END Test.
  5802. positive: procedure type with a parameter of anonymous record type
  5803. MODULE Test;
  5804. TYPE Record = RECORD END;
  5805. TYPE Procedure = PROCEDURE (parameter: RECORD END);
  5806. END Test.
  5807. positive: procedure type with parameters of anonymous record type
  5808. MODULE Test;
  5809. TYPE Procedure = PROCEDURE (a, b, c: RECORD END);
  5810. END Test.
  5811. positive: procedure type with a parameter of variable anonymous record type
  5812. MODULE Test;
  5813. TYPE Procedure = PROCEDURE (VAR parameter: RECORD END);
  5814. END Test.
  5815. positive: procedure type with parameters of variable anonymous record type
  5816. MODULE Test;
  5817. TYPE Procedure = PROCEDURE (VAR a, b, c: RECORD END);
  5818. END Test.
  5819. positive: procedure type with a parameter of constant anonymous record type
  5820. MODULE Test;
  5821. TYPE Procedure = PROCEDURE (CONST parameter: RECORD END);
  5822. END Test.
  5823. positive: procedure type with parameters of constant anonymous record type
  5824. MODULE Test;
  5825. TYPE Procedure = PROCEDURE (CONST a, b, c: RECORD END);
  5826. END Test.
  5827. positive: procedure type with intermixed parameters of anonymous record type
  5828. MODULE Test;
  5829. TYPE Procedure = PROCEDURE (a: RECORD END; VAR b: RECORD END; CONST c: RECORD END);
  5830. END Test.
  5831. positive: procedure type with a parameter of array type
  5832. MODULE Test;
  5833. TYPE Array = ARRAY 10 OF RECORD END;
  5834. TYPE Procedure = PROCEDURE (parameter: Array);
  5835. END Test.
  5836. positive: procedure type with parameters of array type
  5837. MODULE Test;
  5838. TYPE Array = ARRAY 10 OF RECORD END;
  5839. TYPE Procedure = PROCEDURE (a, b, c: Array);
  5840. END Test.
  5841. positive: procedure type with a parameter of variable array type
  5842. MODULE Test;
  5843. TYPE Array = ARRAY 10 OF RECORD END;
  5844. TYPE Procedure = PROCEDURE (VAR parameter: Array);
  5845. END Test.
  5846. positive: procedure type with parameters of variable array type
  5847. MODULE Test;
  5848. TYPE Array = ARRAY 10 OF RECORD END;
  5849. TYPE Procedure = PROCEDURE (VAR a, b, c: Array);
  5850. END Test.
  5851. positive: procedure type with a parameter of constant array type
  5852. MODULE Test;
  5853. TYPE Array = ARRAY 10 OF RECORD END;
  5854. TYPE Procedure = PROCEDURE (CONST parameter: Array);
  5855. END Test.
  5856. positive: procedure type with parameters of constant array type
  5857. MODULE Test;
  5858. TYPE Array = ARRAY 10 OF RECORD END;
  5859. TYPE Procedure = PROCEDURE (CONST a, b, c: Array);
  5860. END Test.
  5861. positive: procedure type with intermixed parameters of array type
  5862. MODULE Test;
  5863. TYPE Array = ARRAY 10 OF RECORD END;
  5864. TYPE Procedure = PROCEDURE (a: Array; VAR b: Array; CONST c: Array);
  5865. END Test.
  5866. positive: procedure type with a parameter of anonymous array type
  5867. MODULE Test;
  5868. TYPE Procedure = PROCEDURE (parameter: ARRAY 10 OF RECORD END);
  5869. END Test.
  5870. positive: procedure type with parameters of anonymous array type
  5871. MODULE Test;
  5872. TYPE Procedure = PROCEDURE (a, b, c: ARRAY 10 OF RECORD END);
  5873. END Test.
  5874. positive: procedure type with a parameter of variable anonymous array type
  5875. MODULE Test;
  5876. TYPE Procedure = PROCEDURE (VAR parameter: ARRAY 10 OF RECORD END);
  5877. END Test.
  5878. positive: procedure type with parameters of variable anonymous array type
  5879. MODULE Test;
  5880. TYPE Procedure = PROCEDURE (VAR a, b, c: ARRAY 10 OF RECORD END);
  5881. END Test.
  5882. positive: procedure type with a parameter of constant anonymous array type
  5883. MODULE Test;
  5884. TYPE Procedure = PROCEDURE (CONST parameter: ARRAY 10 OF RECORD END);
  5885. END Test.
  5886. positive: procedure type with parameters of constant anonymous array type
  5887. MODULE Test;
  5888. TYPE Procedure = PROCEDURE (CONST a, b, c: ARRAY 10 OF RECORD END);
  5889. END Test.
  5890. positive: procedure type with intermixed parameters of anonymous array type
  5891. MODULE Test;
  5892. TYPE Procedure = PROCEDURE (a: ARRAY 10 OF RECORD END; VAR b: ARRAY 10 OF RECORD END; CONST c: ARRAY 10 OF RECORD END);
  5893. END Test.
  5894. positive: procedure type with a parameter of open array type
  5895. MODULE Test;
  5896. TYPE Array = ARRAY OF RECORD END;
  5897. TYPE Procedure = PROCEDURE (parameter: Array);
  5898. END Test.
  5899. positive: procedure type with parameters of open array type
  5900. MODULE Test;
  5901. TYPE Array = ARRAY OF RECORD END;
  5902. TYPE Procedure = PROCEDURE (a, b, c: Array);
  5903. END Test.
  5904. positive: procedure type with a parameter of variable open array type
  5905. MODULE Test;
  5906. TYPE Array = ARRAY OF RECORD END;
  5907. TYPE Procedure = PROCEDURE (VAR parameter: Array);
  5908. END Test.
  5909. positive: procedure type with parameters of variable open array type
  5910. MODULE Test;
  5911. TYPE Array = ARRAY OF RECORD END;
  5912. TYPE Procedure = PROCEDURE (VAR a, b, c: Array);
  5913. END Test.
  5914. positive: procedure type with a parameter of constant open array type
  5915. MODULE Test;
  5916. TYPE Array = ARRAY OF RECORD END;
  5917. TYPE Procedure = PROCEDURE (CONST parameter: Array);
  5918. END Test.
  5919. positive: procedure type with parameters of constant open array type
  5920. MODULE Test;
  5921. TYPE Array = ARRAY OF RECORD END;
  5922. TYPE Procedure = PROCEDURE (CONST a, b, c: Array);
  5923. END Test.
  5924. positive: procedure type with intermixed parameters of open array type
  5925. MODULE Test;
  5926. TYPE Array = ARRAY OF RECORD END;
  5927. TYPE Procedure = PROCEDURE (a: Array; VAR b: Array; CONST c: Array);
  5928. END Test.
  5929. positive: procedure type with a parameter of anonymous open array type
  5930. MODULE Test;
  5931. TYPE Procedure = PROCEDURE (parameter: ARRAY OF RECORD END);
  5932. END Test.
  5933. positive: procedure type with parameters of anonymous open array type
  5934. MODULE Test;
  5935. TYPE Procedure = PROCEDURE (a, b, c: ARRAY OF RECORD END);
  5936. END Test.
  5937. positive: procedure type with a parameter of variable anonymous open array type
  5938. MODULE Test;
  5939. TYPE Procedure = PROCEDURE (VAR parameter: ARRAY OF RECORD END);
  5940. END Test.
  5941. positive: procedure type with parameters of variable anonymous open array type
  5942. MODULE Test;
  5943. TYPE Procedure = PROCEDURE (VAR a, b, c: ARRAY OF RECORD END);
  5944. END Test.
  5945. positive: procedure type with a parameter of constant anonymous open array type
  5946. MODULE Test;
  5947. TYPE Procedure = PROCEDURE (CONST parameter: ARRAY OF RECORD END);
  5948. END Test.
  5949. positive: procedure type with parameters of constant anonymous open array type
  5950. MODULE Test;
  5951. TYPE Procedure = PROCEDURE (CONST a, b, c: ARRAY OF RECORD END);
  5952. END Test.
  5953. positive: procedure type with intermixed parameters of anonymous open array type
  5954. MODULE Test;
  5955. TYPE Procedure = PROCEDURE (a: ARRAY OF RECORD END; VAR b: ARRAY OF RECORD END; CONST c: ARRAY OF RECORD END);
  5956. END Test.
  5957. positive: procedure type with a parameter of object type
  5958. MODULE Test;
  5959. TYPE Object = OBJECT END Object;
  5960. TYPE Procedure = PROCEDURE (parameter: Object);
  5961. END Test.
  5962. positive: procedure type with parameters of object type
  5963. MODULE Test;
  5964. TYPE Object = OBJECT END Object;
  5965. TYPE Procedure = PROCEDURE (a, b, c: Object);
  5966. END Test.
  5967. positive: procedure type with a parameter of variable object type
  5968. MODULE Test;
  5969. TYPE Object = OBJECT END Object;
  5970. TYPE Procedure = PROCEDURE (VAR parameter: Object);
  5971. END Test.
  5972. positive: procedure type with parameters of variable object type
  5973. MODULE Test;
  5974. TYPE Object = OBJECT END Object;
  5975. TYPE Procedure = PROCEDURE (VAR a, b, c: Object);
  5976. END Test.
  5977. positive: procedure type with a parameter of constant object type
  5978. MODULE Test;
  5979. TYPE Object = OBJECT END Object;
  5980. TYPE Procedure = PROCEDURE (CONST parameter: Object);
  5981. END Test.
  5982. positive: procedure type with parameters of constant object type
  5983. MODULE Test;
  5984. TYPE Object = OBJECT END Object;
  5985. TYPE Procedure = PROCEDURE (CONST a, b, c: Object);
  5986. END Test.
  5987. positive: procedure type with intermixed parameters of object type
  5988. MODULE Test;
  5989. TYPE Object = OBJECT END Object;
  5990. TYPE Procedure = PROCEDURE (a: Object; VAR b: Object; CONST c: Object);
  5991. END Test.
  5992. positive: procedure type with a parameter of anonymous object type
  5993. MODULE Test;
  5994. TYPE Procedure = PROCEDURE (parameter: OBJECT END);
  5995. END Test.
  5996. positive: procedure type with parameters of anonymous object type
  5997. MODULE Test;
  5998. TYPE Procedure = PROCEDURE (a, b, c: OBJECT END);
  5999. END Test.
  6000. positive: procedure type with a parameter of variable anonymous object type
  6001. MODULE Test;
  6002. TYPE Procedure = PROCEDURE (VAR parameter: OBJECT END);
  6003. END Test.
  6004. positive: procedure type with parameters of variable anonymous object type
  6005. MODULE Test;
  6006. TYPE Procedure = PROCEDURE (VAR a, b, c: OBJECT END);
  6007. END Test.
  6008. positive: procedure type with a parameter of constant anonymous object type
  6009. MODULE Test;
  6010. TYPE Procedure = PROCEDURE (CONST parameter: OBJECT END);
  6011. END Test.
  6012. positive: procedure type with parameters of constant anonymous object type
  6013. MODULE Test;
  6014. TYPE Procedure = PROCEDURE (CONST a, b, c: OBJECT END);
  6015. END Test.
  6016. positive: procedure type with intermixed parameters of anonymous object type
  6017. MODULE Test;
  6018. TYPE Procedure = PROCEDURE (a: OBJECT END; VAR b: OBJECT END; CONST c: OBJECT END);
  6019. END Test.
  6020. positive: procedure type with a parameter of pointer type
  6021. MODULE Test;
  6022. TYPE Pointer = POINTER TO RECORD END;
  6023. TYPE Procedure = PROCEDURE (parameter: Pointer);
  6024. END Test.
  6025. positive: procedure type with parameters of pointer type
  6026. MODULE Test;
  6027. TYPE Pointer = POINTER TO RECORD END;
  6028. TYPE Procedure = PROCEDURE (a, b, c: Pointer);
  6029. END Test.
  6030. positive: procedure type with a parameter of variable pointer type
  6031. MODULE Test;
  6032. TYPE Pointer = POINTER TO RECORD END;
  6033. TYPE Procedure = PROCEDURE (VAR parameter: Pointer);
  6034. END Test.
  6035. positive: procedure type with parameters of variable pointer type
  6036. MODULE Test;
  6037. TYPE Pointer = POINTER TO RECORD END;
  6038. TYPE Procedure = PROCEDURE (VAR a, b, c: Pointer);
  6039. END Test.
  6040. positive: procedure type with a parameter of constant pointer type
  6041. MODULE Test;
  6042. TYPE Pointer = POINTER TO RECORD END;
  6043. TYPE Procedure = PROCEDURE (CONST parameter: Pointer);
  6044. END Test.
  6045. positive: procedure type with parameters of constant pointer type
  6046. MODULE Test;
  6047. TYPE Pointer = POINTER TO RECORD END;
  6048. TYPE Procedure = PROCEDURE (CONST a, b, c: Pointer);
  6049. END Test.
  6050. positive: procedure type with intermixed parameters of pointer type
  6051. MODULE Test;
  6052. TYPE Pointer = POINTER TO RECORD END;
  6053. TYPE Procedure = PROCEDURE (a: Pointer; VAR b: Pointer; CONST c: Pointer);
  6054. END Test.
  6055. positive: procedure type with a parameter of anonymous pointer type
  6056. MODULE Test;
  6057. TYPE Procedure = PROCEDURE (parameter: POINTER TO RECORD END);
  6058. END Test.
  6059. positive: procedure type with parameters of anonymous pointer type
  6060. MODULE Test;
  6061. TYPE Procedure = PROCEDURE (a, b, c: POINTER TO RECORD END);
  6062. END Test.
  6063. positive: procedure type with a parameter of variable anonymous pointer type
  6064. MODULE Test;
  6065. TYPE Procedure = PROCEDURE (VAR parameter: POINTER TO RECORD END);
  6066. END Test.
  6067. positive: procedure type with parameters of variable anonymous pointer type
  6068. MODULE Test;
  6069. TYPE Procedure = PROCEDURE (VAR a, b, c: POINTER TO RECORD END);
  6070. END Test.
  6071. positive: procedure type with a parameter of constant anonymous pointer type
  6072. MODULE Test;
  6073. TYPE Procedure = PROCEDURE (CONST parameter: OBJECT END);
  6074. END Test.
  6075. positive: procedure type with parameters of constant anonymous pointer type
  6076. MODULE Test;
  6077. TYPE Procedure = PROCEDURE (CONST a, b, c: POINTER TO RECORD END);
  6078. END Test.
  6079. positive: procedure type with intermixed parameters of anonymous pointer type
  6080. MODULE Test;
  6081. TYPE Procedure = PROCEDURE (a: POINTER TO RECORD END; VAR b: POINTER TO RECORD END; CONST c: POINTER TO RECORD END);
  6082. END Test.
  6083. positive: procedure type with a parameter of procedure type
  6084. MODULE Test;
  6085. TYPE ProcedureType = PROCEDURE;
  6086. TYPE Procedure = PROCEDURE (parameter: ProcedureType);
  6087. END Test.
  6088. positive: procedure type with parameters of procedure type
  6089. MODULE Test;
  6090. TYPE ProcedureType = PROCEDURE;
  6091. TYPE Procedure = PROCEDURE (a, b, c: ProcedureType);
  6092. END Test.
  6093. positive: procedure type with a parameter of variable procedure type
  6094. MODULE Test;
  6095. TYPE ProcedureType = PROCEDURE;
  6096. TYPE Procedure = PROCEDURE (VAR parameter: ProcedureType);
  6097. END Test.
  6098. positive: procedure type with parameters of variable procedure type
  6099. MODULE Test;
  6100. TYPE ProcedureType = PROCEDURE;
  6101. TYPE Procedure = PROCEDURE (VAR a, b, c: ProcedureType);
  6102. END Test.
  6103. positive: procedure type with a parameter of constant procedure type
  6104. MODULE Test;
  6105. TYPE ProcedureType = PROCEDURE;
  6106. TYPE Procedure = PROCEDURE (CONST parameter: ProcedureType);
  6107. END Test.
  6108. positive: procedure type with parameters of constant procedure type
  6109. MODULE Test;
  6110. TYPE ProcedureType = PROCEDURE;
  6111. TYPE Procedure = PROCEDURE (CONST a, b, c: ProcedureType);
  6112. END Test.
  6113. positive: procedure type with intermixed parameters of procedure type
  6114. MODULE Test;
  6115. TYPE ProcedureType = PROCEDURE;
  6116. TYPE Procedure = PROCEDURE (a: ProcedureType; VAR b: ProcedureType; CONST c: ProcedureType);
  6117. END Test.
  6118. positive: procedure type with a parameter of anonymous procedure type
  6119. MODULE Test;
  6120. TYPE Procedure = PROCEDURE (parameter: PROCEDURE);
  6121. END Test.
  6122. positive: procedure type with parameters of anonymous procedure type
  6123. MODULE Test;
  6124. TYPE Procedure = PROCEDURE (a, b, c: PROCEDURE);
  6125. END Test.
  6126. positive: procedure type with a parameter of variable anonymous procedure type
  6127. MODULE Test;
  6128. TYPE Procedure = PROCEDURE (VAR parameter: PROCEDURE);
  6129. END Test.
  6130. positive: procedure type with parameters of variable anonymous procedure type
  6131. MODULE Test;
  6132. TYPE Procedure = PROCEDURE (VAR a, b, c: PROCEDURE);
  6133. END Test.
  6134. positive: procedure type with a parameter of constant anonymous procedure type
  6135. MODULE Test;
  6136. TYPE Procedure = PROCEDURE (CONST parameter: PROCEDURE);
  6137. END Test.
  6138. positive: procedure type with parameters of constant anonymous procedure type
  6139. MODULE Test;
  6140. TYPE Procedure = PROCEDURE (CONST a, b, c: PROCEDURE);
  6141. END Test.
  6142. positive: procedure type with intermixed parameters of anonymous procedure type
  6143. MODULE Test;
  6144. TYPE Procedure = PROCEDURE (a: PROCEDURE; VAR b: PROCEDURE; CONST c: PROCEDURE);
  6145. END Test.
  6146. # enumerations
  6147. positive: simple enumeration
  6148. MODULE Test;
  6149. TYPE Color=ENUM red, green, blue END;
  6150. VAR color: Color;
  6151. BEGIN color := Color.red END Test.
  6152. positive: enumeration type extension
  6153. MODULE Test;
  6154. TYPE Color=ENUM red, green, blue END;
  6155. FineColor=ENUM (Color) black, white END;
  6156. VAR color: FineColor;
  6157. BEGIN color := Color.red; color := FineColor.white END Test.
  6158. positive: enumeration assignment compatibility
  6159. MODULE Test;
  6160. TYPE Color=ENUM red, green, blue END;
  6161. FineColor=ENUM(Color) black, white END;
  6162. VAR color,color2: Color; fineColor,fineColor2: FineColor;
  6163. BEGIN color := Color.blue; fineColor := Color.red; fineColor := FineColor.black;
  6164. color2 := color; fineColor2 := fineColor;
  6165. fineColor := color;
  6166. END Test.
  6167. negative: wrong enumeration assignment
  6168. MODULE Test;
  6169. TYPE Color=ENUM red, green, blue END;
  6170. FineColor=ENUM(Color) black, white END;
  6171. VAR color,color2: Color; fineColor,fineColor2: FineColor;
  6172. BEGIN color := fineColor
  6173. END Test.
  6174. positive: enumeration comparison compatibility
  6175. MODULE Test;
  6176. TYPE Color=ENUM red, green, blue END;
  6177. FineColor=ENUM(Color) black, white END;
  6178. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6179. BEGIN
  6180. b := color = color2;
  6181. b := color # color2;
  6182. b := fineColor = fineColor2;
  6183. b := fineColor # fineColor2;
  6184. b := color = fineColor;
  6185. b := fineColor = color;
  6186. END Test.
  6187. positive: enumeration comparison with impossible value (extension)
  6188. MODULE Test;
  6189. TYPE Color=ENUM red, green, blue END;
  6190. FineColor=ENUM(Color) black, white END;
  6191. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6192. BEGIN
  6193. b := color = FineColor.white;
  6194. END Test.
  6195. positive: passing enumeration as parameter
  6196. MODULE Test;
  6197. TYPE Color=ENUM red, green, blue END;
  6198. FineColor=ENUM(Color) black, white END;
  6199. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6200. PROCEDURE P1(color: Color);
  6201. BEGIN END P1;
  6202. PROCEDURE P2(color: FineColor);
  6203. BEGIN END P2;
  6204. PROCEDURE P1V(VAR color: Color);
  6205. BEGIN END P1V;
  6206. PROCEDURE P2V(VAR color: FineColor);
  6207. BEGIN END P2V;
  6208. BEGIN
  6209. P1(color);
  6210. P2(fineColor);
  6211. P2(color);
  6212. P1V(color);
  6213. P2V(fineColor);
  6214. END Test.
  6215. negative: passing enumeration extension on base type
  6216. MODULE Test;
  6217. TYPE Color=ENUM red, green, blue END;
  6218. FineColor=ENUM(Color) black, white END;
  6219. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6220. PROCEDURE P1(color: Color);
  6221. BEGIN END P1;
  6222. BEGIN
  6223. P1(fineColor);
  6224. END Test.
  6225. negative: passing enumeration extension on extended type as var parameter
  6226. MODULE Test;
  6227. TYPE Color=ENUM red, green, blue END;
  6228. FineColor=ENUM(Color) black, white END;
  6229. VAR color,color2: Color; fineColor,fineColor2: FineColor; b: BOOLEAN;
  6230. PROCEDURE P1(VAR color: Color);
  6231. BEGIN END P1;
  6232. BEGIN
  6233. P1(fineColor);
  6234. END Test.
  6235. positive: returning enumeration type
  6236. MODULE Test;
  6237. TYPE
  6238. Enumeration = ENUM
  6239. red, green, blue
  6240. END;
  6241. PROCEDURE Test(): Enumeration;
  6242. BEGIN
  6243. RETURN Enumeration.green;
  6244. END Test;
  6245. BEGIN
  6246. ASSERT(Test() = Enumeration.green);
  6247. END Test.
  6248. # variables
  6249. positive: unmarked variable
  6250. MODULE Test;
  6251. VAR variable: RECORD END;
  6252. END Test.
  6253. positive: initializing unmarked variable
  6254. MODULE Test;
  6255. VAR variable: INTEGER;
  6256. BEGIN variable := 0
  6257. END Test.
  6258. positive: unmarked variable within procedure
  6259. MODULE Test;
  6260. PROCEDURE Procedure;
  6261. VAR variable: RECORD END;
  6262. END Procedure;
  6263. END Test.
  6264. positive: initializing unmarked variable within procedure
  6265. MODULE Test;
  6266. PROCEDURE Procedure;
  6267. VAR variable: INTEGER;
  6268. BEGIN variable := 0
  6269. END Procedure;
  6270. END Test.
  6271. positive: unmarked variable within nested procedure
  6272. MODULE Test;
  6273. PROCEDURE Procedure;
  6274. PROCEDURE Procedure;
  6275. VAR variable: RECORD END;
  6276. END Procedure;
  6277. END Procedure;
  6278. END Test.
  6279. positive: initializing unmarked variable within nested procedure
  6280. MODULE Test;
  6281. PROCEDURE Procedure;
  6282. PROCEDURE Procedure;
  6283. VAR variable: INTEGER;
  6284. BEGIN variable := 0
  6285. END Procedure;
  6286. END Procedure;
  6287. END Test.
  6288. positive: unmarked variable within record
  6289. MODULE Test;
  6290. TYPE Record = RECORD
  6291. variable: RECORD END;
  6292. END;
  6293. END Test.
  6294. positive: initializing unmarked variable within record
  6295. MODULE Test;
  6296. TYPE Record = RECORD
  6297. variable: INTEGER;
  6298. END;
  6299. VAR record: Record;
  6300. BEGIN record.variable := 0
  6301. END Test.
  6302. positive: unmarked variable within object
  6303. MODULE Test;
  6304. TYPE Object = OBJECT
  6305. VAR variable: RECORD END;
  6306. END Object;
  6307. END Test.
  6308. positive: initializing unmarked variable within object
  6309. MODULE Test;
  6310. TYPE Object = OBJECT
  6311. VAR variable: INTEGER;
  6312. BEGIN variable := 0
  6313. END Object;
  6314. END Test.
  6315. positive: unmarked variable within record in procedure
  6316. MODULE Test;
  6317. PROCEDURE Procedure;
  6318. TYPE Record = RECORD
  6319. variable: RECORD END;
  6320. END;
  6321. END Procedure;
  6322. END Test.
  6323. positive: initializing unmarked variable within record in procedure
  6324. MODULE Test;
  6325. PROCEDURE Procedure;
  6326. TYPE Record = RECORD
  6327. variable: INTEGER;
  6328. END;
  6329. VAR record: Record;
  6330. BEGIN record.variable := 0
  6331. END Procedure;
  6332. END Test.
  6333. positive: unmarked variable within object in procedure
  6334. MODULE Test;
  6335. PROCEDURE Procedure;
  6336. TYPE Object = OBJECT
  6337. VAR variable: RECORD END;
  6338. END Object;
  6339. END Procedure;
  6340. END Test.
  6341. positive: initializing unmarked variable within object in procedure
  6342. MODULE Test;
  6343. PROCEDURE Procedure;
  6344. TYPE Object = OBJECT
  6345. VAR variable: INTEGER;
  6346. BEGIN variable := 0
  6347. END Object;
  6348. END Procedure;
  6349. END Test.
  6350. positive: unmarked variable within procedure in object
  6351. MODULE Test;
  6352. TYPE Object = OBJECT
  6353. PROCEDURE Procedure;
  6354. VAR variable: RECORD END;
  6355. END Procedure;
  6356. END Object;
  6357. END Test.
  6358. positive: initializing unmarked variable within procedure in object
  6359. MODULE Test;
  6360. TYPE Object = OBJECT
  6361. PROCEDURE Procedure;
  6362. VAR variable: INTEGER;
  6363. BEGIN variable := 0
  6364. END Procedure;
  6365. END Object;
  6366. END Test.
  6367. positive: variable marked as exported
  6368. MODULE Test;
  6369. VAR variable*: RECORD END;
  6370. END Test.
  6371. positive: initializing variable marked as exported
  6372. MODULE Test;
  6373. VAR variable*: INTEGER;
  6374. BEGIN variable := 0
  6375. END Test.
  6376. negative: variable marked as exported within procedure
  6377. MODULE Test;
  6378. PROCEDURE Procedure;
  6379. VAR variable*: RECORD END;
  6380. END Procedure;
  6381. END Test.
  6382. negative: variable marked as exported within nested procedure
  6383. MODULE Test;
  6384. PROCEDURE Procedure;
  6385. PROCEDURE Procedure;
  6386. VAR variable*: RECORD END;
  6387. END Procedure;
  6388. END Procedure;
  6389. END Test.
  6390. positive: variable marked as exported within record
  6391. MODULE Test;
  6392. TYPE Record = RECORD
  6393. variable*: RECORD END;
  6394. END;
  6395. END Test.
  6396. positive: initializing variable marked as exported within record
  6397. MODULE Test;
  6398. TYPE Record = RECORD
  6399. variable*: INTEGER;
  6400. END;
  6401. VAR record: Record;
  6402. BEGIN record.variable := 0
  6403. END Test.
  6404. positive: variable marked as exported within object
  6405. MODULE Test;
  6406. TYPE Object = OBJECT
  6407. VAR variable*: RECORD END;
  6408. END Object;
  6409. END Test.
  6410. positive: initializing variable marked as exported within object
  6411. MODULE Test;
  6412. TYPE Object = OBJECT
  6413. VAR variable*: INTEGER;
  6414. BEGIN variable := 0
  6415. END Object;
  6416. END Test.
  6417. negative: variable marked as exported within record in procedure
  6418. MODULE Test;
  6419. PROCEDURE Procedure;
  6420. TYPE Record = RECORD
  6421. variable*: RECORD END;
  6422. END;
  6423. END Procedure;
  6424. END Test.
  6425. negative: variable marked as exported within object in procedure
  6426. MODULE Test;
  6427. PROCEDURE Procedure;
  6428. TYPE Object = OBJECT
  6429. VAR variable*: RECORD END;
  6430. END Object;
  6431. END Procedure;
  6432. END Test.
  6433. negative: variable marked as exported within procedure in object
  6434. MODULE Test;
  6435. TYPE Object = OBJECT
  6436. PROCEDURE Procedure;
  6437. VAR variable*: RECORD END;
  6438. END Procedure;
  6439. END Object;
  6440. END Test.
  6441. positive: variable marked as read-only
  6442. MODULE Test;
  6443. VAR variable-: RECORD END;
  6444. END Test.
  6445. positive: initializing variable marked as read-only
  6446. MODULE Test;
  6447. VAR variable-: INTEGER;
  6448. BEGIN variable := 0
  6449. END Test.
  6450. negative: variable marked as read-only within procedure
  6451. MODULE Test;
  6452. PROCEDURE Procedure;
  6453. VAR variable-: RECORD END;
  6454. END Procedure;
  6455. END Test.
  6456. negative: variable marked as read-only within nested procedure
  6457. MODULE Test;
  6458. PROCEDURE Procedure;
  6459. PROCEDURE Procedure;
  6460. VAR variable-: RECORD END;
  6461. END Procedure;
  6462. END Procedure;
  6463. END Test.
  6464. positive: variable marked as read-only within record
  6465. MODULE Test;
  6466. TYPE Record = RECORD
  6467. variable-: RECORD END;
  6468. END;
  6469. END Test.
  6470. positive: initializing variable marked as read-only within record
  6471. MODULE Test;
  6472. TYPE Record = RECORD
  6473. variable-: INTEGER;
  6474. END;
  6475. VAR record: Record;
  6476. BEGIN record.variable := 0
  6477. END Test.
  6478. positive: variable marked as read-only within object
  6479. MODULE Test;
  6480. TYPE Object = OBJECT
  6481. VAR variable-: RECORD END;
  6482. END Object;
  6483. END Test.
  6484. positive: initializing variable marked as read-only within object
  6485. MODULE Test;
  6486. TYPE Object = OBJECT
  6487. VAR variable-: INTEGER;
  6488. BEGIN variable := 0
  6489. END Object;
  6490. END Test.
  6491. negative: variable marked as read-only within record in procedure
  6492. MODULE Test;
  6493. PROCEDURE Procedure;
  6494. TYPE Record = RECORD
  6495. variable-: RECORD END;
  6496. END;
  6497. END Procedure;
  6498. END Test.
  6499. negative: variable marked as read-only within object in procedure
  6500. MODULE Test;
  6501. PROCEDURE Procedure;
  6502. TYPE Object = OBJECT
  6503. VAR variable-: RECORD END;
  6504. END Object;
  6505. END Procedure;
  6506. END Test.
  6507. negative: variable marked as read-only within procedure in object
  6508. MODULE Test;
  6509. TYPE Object = OBJECT
  6510. PROCEDURE Procedure;
  6511. VAR variable-: RECORD END;
  6512. END Procedure;
  6513. END Object;
  6514. END Test.
  6515. negative: duplicated variable
  6516. MODULE Test;
  6517. VAR variable: LONGINT;
  6518. VAR variable: RECORD END;
  6519. END Test.
  6520. negative: duplicated variable within procedure
  6521. MODULE Test;
  6522. PROCEDURE Procedure;
  6523. VAR variable: LONGINT;
  6524. VAR variable: RECORD END;
  6525. END Procedure;
  6526. END Test.
  6527. negative: duplicated variable within nested procedure
  6528. MODULE Test;
  6529. PROCEDURE Procedure;
  6530. PROCEDURE Procedure;
  6531. VAR variable: LONGINT;
  6532. VAR variable: RECORD END;
  6533. END Procedure;
  6534. END Procedure;
  6535. END Test.
  6536. negative: duplicated variable within record
  6537. MODULE Test;
  6538. TYPE Record = RECORD
  6539. variable: LONGINT;
  6540. variable: RECORD END;
  6541. END;
  6542. END Test.
  6543. negative: duplicated variable within object
  6544. MODULE Test;
  6545. TYPE Object = OBJECT
  6546. VAR variable: LONGINT;
  6547. VAR variable: RECORD END;
  6548. END Object;
  6549. END Test.
  6550. negative: duplicated variable within record in procedure
  6551. MODULE Test;
  6552. PROCEDURE Procedure;
  6553. TYPE Record = RECORD
  6554. variable: LONGINT;
  6555. variable: RECORD END;
  6556. END;
  6557. END Procedure;
  6558. END Test.
  6559. negative: duplicated variable within object in procedure
  6560. MODULE Test;
  6561. PROCEDURE Procedure;
  6562. TYPE Object = OBJECT
  6563. VAR variable: LONGINT;
  6564. VAR variable: RECORD END;
  6565. END Object;
  6566. END Procedure;
  6567. END Test.
  6568. negative: duplicated variable within procedure in object
  6569. MODULE Test;
  6570. TYPE Object = OBJECT
  6571. PROCEDURE Procedure;
  6572. VAR variable: LONGINT;
  6573. VAR variable: RECORD END;
  6574. END Procedure;
  6575. END Object;
  6576. END Test.
  6577. negative: duplicated variable in same declaration
  6578. MODULE Test;
  6579. VAR variable, variable: LONGINT;
  6580. END Test.
  6581. negative: duplicated variable in same declaration within procedure
  6582. MODULE Test;
  6583. PROCEDURE Procedure;
  6584. VAR variable, variable: LONGINT;
  6585. END Procedure;
  6586. END Test.
  6587. negative: duplicated variable in same declaration within nested procedure
  6588. MODULE Test;
  6589. PROCEDURE Procedure;
  6590. PROCEDURE Procedure;
  6591. VAR variable, variable: LONGINT;
  6592. END Procedure;
  6593. END Procedure;
  6594. END Test.
  6595. negative: duplicated variable in same declaration within record
  6596. MODULE Test;
  6597. TYPE Record = RECORD
  6598. variable, variable: LONGINT;
  6599. END;
  6600. END Test.
  6601. negative: duplicated variable in same declaration within object
  6602. MODULE Test;
  6603. TYPE Object = OBJECT
  6604. VAR variable, variable: LONGINT;
  6605. END Object;
  6606. END Test.
  6607. negative: duplicated variable in same declaration within record in procedure
  6608. MODULE Test;
  6609. PROCEDURE Procedure;
  6610. TYPE Record = RECORD
  6611. variable, variable: LONGINT;
  6612. END;
  6613. END Procedure;
  6614. END Test.
  6615. negative: duplicated variable in same declaration within object in procedure
  6616. MODULE Test;
  6617. PROCEDURE Procedure;
  6618. TYPE Object = OBJECT
  6619. VAR variable, variable: LONGINT;
  6620. END Object;
  6621. END Procedure;
  6622. END Test.
  6623. negative: duplicated variable in same declaration within procedure in object
  6624. MODULE Test;
  6625. TYPE Object = OBJECT
  6626. PROCEDURE Procedure;
  6627. VAR variable, variable: LONGINT;
  6628. END Procedure;
  6629. END Object;
  6630. END Test.
  6631. negative: import as variable
  6632. MODULE Test;
  6633. IMPORT Import := Dummy;
  6634. VAR variable: Import;
  6635. END Test.
  6636. negative: constant as variable
  6637. MODULE Test;
  6638. CONST Constant = 0;
  6639. VAR variable: Constant;
  6640. END Test.
  6641. positive: type as variable
  6642. MODULE Test;
  6643. TYPE Type = INTEGER;
  6644. VAR variable: Type;
  6645. END Test.
  6646. negative: procedure as variable
  6647. MODULE Test;
  6648. VAR variable: Procedure;
  6649. PROCEDURE Procedure; END Procedure;
  6650. END Test.
  6651. negative: parameter as variable
  6652. MODULE Test;
  6653. PROCEDURE Procedure (parameter: INTEGER);
  6654. VAR variable: parameter;
  6655. END Procedure;
  6656. END Test.
  6657. positive: variable of basic character type
  6658. MODULE Test;
  6659. VAR variable: CHAR;
  6660. END Test.
  6661. positive: variable of basic boolean type
  6662. MODULE Test;
  6663. VAR variable: BOOLEAN;
  6664. END Test.
  6665. positive: variable of basic short integer type
  6666. MODULE Test;
  6667. VAR variable: SHORTINT;
  6668. END Test.
  6669. positive: variable of basic integer type
  6670. MODULE Test;
  6671. VAR variable: INTEGER;
  6672. END Test.
  6673. positive: variable of basic long integer type
  6674. MODULE Test;
  6675. VAR variable: LONGINT;
  6676. END Test.
  6677. positive: variable of basic huge integer type
  6678. MODULE Test;
  6679. VAR variable: HUGEINT;
  6680. END Test.
  6681. positive: variable of basic real type
  6682. MODULE Test;
  6683. VAR variable: REAL;
  6684. END Test.
  6685. positive: variable of basic long real type
  6686. MODULE Test;
  6687. VAR variable: LONGREAL;
  6688. END Test.
  6689. positive: variable of basic set type
  6690. MODULE Test;
  6691. VAR variable: SET;
  6692. END Test.
  6693. positive: variable of record type
  6694. MODULE Test;
  6695. TYPE Record = RECORD c: CHAR END;
  6696. VAR variable: Record;
  6697. END Test.
  6698. positive: variables of record type
  6699. MODULE Test;
  6700. TYPE Record = RECORD c: CHAR END;
  6701. VAR a, b, c: Record;
  6702. END Test.
  6703. positive: variable of anonymous record type
  6704. MODULE Test;
  6705. VAR variable: RECORD c: CHAR END;
  6706. END Test.
  6707. positive: variables of anonymous record type
  6708. MODULE Test;
  6709. VAR a, b, c: RECORD c: CHAR END;
  6710. END Test.
  6711. positive: variable of array type
  6712. MODULE Test;
  6713. TYPE Array = ARRAY 10 OF RECORD END;
  6714. VAR variable: Array;
  6715. END Test.
  6716. positive: variables of array type
  6717. MODULE Test;
  6718. TYPE Array = ARRAY 10 OF RECORD END;
  6719. VAR a, b, c: Array;
  6720. END Test.
  6721. positive: variable of anonymous array type
  6722. MODULE Test;
  6723. VAR variable: ARRAY 10 OF RECORD END;
  6724. END Test.
  6725. positive: variables of anonymous array type
  6726. MODULE Test;
  6727. VAR a, b, c: ARRAY 10 OF RECORD END;
  6728. END Test.
  6729. negative: variable of open array type
  6730. MODULE Test;
  6731. TYPE Array = ARRAY OF RECORD END;
  6732. VAR variable: Array;
  6733. END Test.
  6734. negative: variables of open array type
  6735. MODULE Test;
  6736. TYPE Array = ARRAY OF RECORD END;
  6737. VAR a, v, c: Array;
  6738. END Test.
  6739. negative: variable of anonymous open array type
  6740. MODULE Test;
  6741. VAR variable: ARRAY OF RECORD END;
  6742. END Test.
  6743. negative: variables of anonymous open array type
  6744. MODULE Test;
  6745. VAR a, b, c: ARRAY OF RECORD END;
  6746. END Test.
  6747. positive: variable of object type
  6748. MODULE Test;
  6749. TYPE Object = OBJECT VAR c: CHAR END Object;
  6750. VAR variable: Object;
  6751. END Test.
  6752. positive: variables of object type
  6753. MODULE Test;
  6754. TYPE Object = OBJECT VAR c: CHAR END Object;
  6755. VAR a, b, c: Object;
  6756. END Test.
  6757. positive: variable of anonymous object type
  6758. MODULE Test;
  6759. VAR variable: OBJECT VAR c: CHAR END;
  6760. END Test.
  6761. positive: variables of anonymous object type
  6762. MODULE Test;
  6763. VAR a, b, c: OBJECT VAR c: CHAR END;
  6764. END Test.
  6765. positive: variable of pointer type
  6766. MODULE Test;
  6767. TYPE Pointer = POINTER TO RECORD c: CHAR END;
  6768. VAR variable: Pointer;
  6769. END Test.
  6770. positive: variables of pointer type
  6771. MODULE Test;
  6772. TYPE Pointer = POINTER TO RECORD c: CHAR END;
  6773. VAR a, b, c: Pointer;
  6774. END Test.
  6775. positive: variable of anonymous pointer type
  6776. MODULE Test;
  6777. VAR variable: POINTER TO RECORD c: CHAR END;
  6778. END Test.
  6779. positive: variables of anonymous pointer type
  6780. MODULE Test;
  6781. VAR a, b, c: POINTER TO RECORD c: CHAR END;
  6782. END Test.
  6783. positive: variable of procedure type
  6784. MODULE Test;
  6785. TYPE Procedure = PROCEDURE;
  6786. VAR variable: Procedure;
  6787. END Test.
  6788. positive: variables of procedure type
  6789. MODULE Test;
  6790. TYPE Procedure = PROCEDURE;
  6791. VAR a, b, c: Procedure;
  6792. END Test.
  6793. positive: variable of anonymous procedure type
  6794. MODULE Test;
  6795. VAR variable: PROCEDURE;
  6796. END Test.
  6797. positive: variables of anonymous procedure type
  6798. MODULE Test;
  6799. VAR a, b, c: PROCEDURE;
  6800. END Test.
  6801. negative: definition of self in module
  6802. MODULE Test;
  6803. VAR SELF: OBJECT;
  6804. END Test.
  6805. negative: definition of self in procedure
  6806. MODULE Test;
  6807. PROCEDURE Procedure;
  6808. VAR SELF: OBJECT;
  6809. END Procedure;
  6810. END Test.
  6811. negative: definition of self in object
  6812. MODULE Test;
  6813. TYPE Object = OBJECT
  6814. VAR SELF: OBJECT;
  6815. END Object;
  6816. END Test.
  6817. negative: definition of self in procedure in object
  6818. MODULE Test;
  6819. TYPE Object = OBJECT
  6820. PROCEDURE Procedure;
  6821. VAR SELF: OBJECT;
  6822. END Procedure;
  6823. END Object;
  6824. END Test.
  6825. negative: definition of self in nested procedure in object
  6826. MODULE Test;
  6827. TYPE Object = OBJECT
  6828. PROCEDURE Procedure;
  6829. PROCEDURE Procedure;
  6830. VAR SELF: OBJECT;
  6831. END Procedure;
  6832. END Procedure;
  6833. END Object;
  6834. END Test.
  6835. negative: modification of self in module
  6836. MODULE Test;
  6837. BEGIN SELF := NIL;
  6838. END Test.
  6839. negative: modification of self in procedure
  6840. MODULE Test;
  6841. PROCEDURE Procedure;
  6842. BEGIN SELF := NIL;
  6843. END Procedure;
  6844. END Test.
  6845. negative: modification of self in object
  6846. MODULE Test;
  6847. TYPE Object = OBJECT
  6848. BEGIN SELF := NIL;
  6849. END Object;
  6850. END Test.
  6851. negative: modification of self in procedure in object
  6852. MODULE Test;
  6853. TYPE Object = OBJECT
  6854. PROCEDURE Procedure;
  6855. BEGIN SELF := NIL;
  6856. END Procedure;
  6857. END Object;
  6858. END Test.
  6859. negative: modification of self in nested procedure in object
  6860. MODULE Test;
  6861. TYPE Object = OBJECT
  6862. PROCEDURE Procedure;
  6863. PROCEDURE Procedure;
  6864. BEGIN SELF := NIL;
  6865. END Procedure;
  6866. END Procedure;
  6867. END Object;
  6868. END Test.
  6869. negative: reading self in module
  6870. MODULE Test;
  6871. VAR a: INTEGER;
  6872. BEGIN a := SELF.a;
  6873. END Test.
  6874. negative: reading self in procedure
  6875. MODULE Test;
  6876. VAR a: INTEGER;
  6877. PROCEDURE Procedure;
  6878. BEGIN a := SELF.a;
  6879. END Procedure;
  6880. END Test.
  6881. positive: reading self in object
  6882. MODULE Test;
  6883. TYPE Object = OBJECT
  6884. VAR a: INTEGER;
  6885. BEGIN a := SELF.a;
  6886. END Object;
  6887. END Test.
  6888. positive: reading self in procedure in object
  6889. MODULE Test;
  6890. TYPE Object = OBJECT
  6891. VAR a: INTEGER;
  6892. PROCEDURE Procedure;
  6893. BEGIN a := SELF.a;
  6894. END Procedure;
  6895. END Object;
  6896. END Test.
  6897. positive: reading self in nested procedure in object
  6898. MODULE Test;
  6899. TYPE Object = OBJECT
  6900. VAR a: INTEGER;
  6901. PROCEDURE Procedure;
  6902. PROCEDURE Procedure;
  6903. BEGIN a := SELF.a;
  6904. END Procedure;
  6905. END Procedure;
  6906. END Object;
  6907. END Test.
  6908. negative: writing self in module
  6909. MODULE Test;
  6910. VAR a: INTEGER;
  6911. BEGIN SELF.a := a;
  6912. END Test.
  6913. negative: writing self in procedure
  6914. MODULE Test;
  6915. VAR a: INTEGER;
  6916. PROCEDURE Procedure;
  6917. BEGIN SELF.a := a;
  6918. END Procedure;
  6919. END Test.
  6920. positive: writing self in object
  6921. MODULE Test;
  6922. TYPE Object = OBJECT
  6923. VAR a: INTEGER;
  6924. BEGIN SELF.a := a;
  6925. END Object;
  6926. END Test.
  6927. positive: writing self in procedure in object
  6928. MODULE Test;
  6929. TYPE Object = OBJECT
  6930. VAR a: INTEGER;
  6931. PROCEDURE Procedure;
  6932. BEGIN SELF.a := a;
  6933. END Procedure;
  6934. END Object;
  6935. END Test.
  6936. positive: writing self in nested procedure in object
  6937. MODULE Test;
  6938. TYPE Object = OBJECT
  6939. VAR a: INTEGER;
  6940. PROCEDURE Procedure;
  6941. PROCEDURE Procedure;
  6942. BEGIN SELF.a := a;
  6943. END Procedure;
  6944. END Procedure;
  6945. END Object;
  6946. END Test.
  6947. positive: usage of self in object
  6948. MODULE Test;
  6949. TYPE Object = OBJECT
  6950. VAR object: Object;
  6951. BEGIN object := SELF;
  6952. END Object;
  6953. END Test.
  6954. positive: usage of self in procedure in object
  6955. MODULE Test;
  6956. TYPE Object = OBJECT
  6957. VAR object: Object;
  6958. PROCEDURE Procedure;
  6959. BEGIN object := SELF;
  6960. END Procedure;
  6961. END Object;
  6962. END Test.
  6963. positive: usage of self in nested procedure in object
  6964. MODULE Test;
  6965. TYPE Object = OBJECT
  6966. VAR object: Object;
  6967. PROCEDURE Procedure;
  6968. PROCEDURE Procedure;
  6969. BEGIN object := SELF;
  6970. END Procedure;
  6971. END Procedure;
  6972. END Object;
  6973. END Test.
  6974. positive: usage of self as base object in object
  6975. MODULE Test;
  6976. TYPE Object = OBJECT
  6977. VAR object: OBJECT;
  6978. BEGIN object := SELF;
  6979. END Object;
  6980. END Test.
  6981. positive: usage of self as base object in procedure in object
  6982. MODULE Test;
  6983. TYPE Object = OBJECT
  6984. VAR object: OBJECT;
  6985. PROCEDURE Procedure;
  6986. BEGIN object := SELF;
  6987. END Procedure;
  6988. END Object;
  6989. END Test.
  6990. positive: usage of self as base object in nested procedure in object
  6991. MODULE Test;
  6992. TYPE Object = OBJECT
  6993. VAR object: OBJECT;
  6994. PROCEDURE Procedure;
  6995. PROCEDURE Procedure;
  6996. BEGIN object := SELF;
  6997. END Procedure;
  6998. END Procedure;
  6999. END Object;
  7000. END Test.
  7001. positive: dummy module exporting variables
  7002. MODULE Dummy;
  7003. VAR exported*, readonly-, private: INTEGER;
  7004. END Dummy.
  7005. positive: importing exported variable
  7006. MODULE Test;
  7007. IMPORT Dummy;
  7008. VAR result: INTEGER;
  7009. BEGIN result := Dummy.exported;
  7010. END Test.
  7011. positive: changing imported exported variable
  7012. MODULE Test;
  7013. IMPORT Dummy;
  7014. BEGIN Dummy.exported := 0;
  7015. END Test.
  7016. positive: importing read-only variable
  7017. MODULE Test;
  7018. IMPORT Dummy;
  7019. VAR result: INTEGER;
  7020. BEGIN result := Dummy.readonly;
  7021. END Test.
  7022. negative: changing imported read-only variable
  7023. MODULE Test;
  7024. IMPORT Dummy;
  7025. BEGIN Dummy.readonly := 0;
  7026. END Test.
  7027. negative: importing private variable
  7028. MODULE Test;
  7029. IMPORT Dummy;
  7030. VAR result: INTEGER;
  7031. BEGIN result := Dummy.private;
  7032. END Test.
  7033. negative: changing imported private variable
  7034. MODULE Test;
  7035. IMPORT Dummy;
  7036. BEGIN Dummy.private := 0;
  7037. END Test.
  7038. negative: importing invalid variable
  7039. MODULE Test;
  7040. IMPORT Dummy;
  7041. VAR result: INTEGER;
  7042. BEGIN result := Dummy.invalid;
  7043. END Test.
  7044. # procedures
  7045. positive: unmarked procedure
  7046. MODULE Test;
  7047. PROCEDURE Procedure;
  7048. END Procedure;
  7049. END Test.
  7050. positive: unmarked procedure within procedure
  7051. MODULE Test;
  7052. PROCEDURE Procedure;
  7053. PROCEDURE Procedure;
  7054. END Procedure;
  7055. END Procedure;
  7056. END Test.
  7057. positive: unmarked procedure within nested procedure
  7058. MODULE Test;
  7059. PROCEDURE Procedure;
  7060. PROCEDURE Procedure;
  7061. PROCEDURE Procedure;
  7062. END Procedure;
  7063. END Procedure;
  7064. END Procedure;
  7065. END Test.
  7066. positive: unmarked procedure within object
  7067. MODULE Test;
  7068. TYPE Object = OBJECT
  7069. PROCEDURE Procedure;
  7070. END Procedure;
  7071. END Object;
  7072. END Test.
  7073. positive: unmarked procedure within object in procedure
  7074. MODULE Test;
  7075. PROCEDURE Procedure;
  7076. TYPE Object = OBJECT
  7077. PROCEDURE Procedure;
  7078. END Procedure;
  7079. END Object;
  7080. END Procedure;
  7081. END Test.
  7082. positive: unmarked procedure within procedure in object
  7083. MODULE Test;
  7084. TYPE Object = OBJECT
  7085. PROCEDURE Procedure;
  7086. PROCEDURE Procedure;
  7087. END Procedure;
  7088. END Procedure;
  7089. END Object;
  7090. END Test.
  7091. positive: procedure marked as exported
  7092. MODULE Test;
  7093. PROCEDURE Procedure*;
  7094. END Procedure;
  7095. END Test.
  7096. negative: procedure marked as exported within procedure
  7097. MODULE Test;
  7098. PROCEDURE Procedure;
  7099. PROCEDURE Procedure*;
  7100. END Procedure;
  7101. END Procedure;
  7102. END Test.
  7103. negative: procedure marked as exported within nested procedure
  7104. MODULE Test;
  7105. PROCEDURE Procedure;
  7106. PROCEDURE Procedure;
  7107. PROCEDURE Procedure*;
  7108. END Procedure;
  7109. END Procedure;
  7110. END Procedure;
  7111. END Test.
  7112. positive: procedure marked as exported within object
  7113. MODULE Test;
  7114. TYPE Object = OBJECT
  7115. PROCEDURE Procedure*;
  7116. END Procedure;
  7117. END Object;
  7118. END Test.
  7119. negative: procedure marked as exported within object in procedure
  7120. MODULE Test;
  7121. PROCEDURE Procedure;
  7122. TYPE Object = OBJECT
  7123. PROCEDURE Procedure*;
  7124. END Procedure;
  7125. END Object;
  7126. END Procedure;
  7127. END Test.
  7128. negative: procedure marked as exported within procedure in object
  7129. MODULE Test;
  7130. TYPE Object = OBJECT
  7131. PROCEDURE Procedure;
  7132. PROCEDURE Procedure*;
  7133. END Procedure;
  7134. END Procedure;
  7135. END Object;
  7136. END Test.
  7137. positive: procedure marked as read-only
  7138. MODULE Test;
  7139. PROCEDURE Procedure-;
  7140. END Procedure;
  7141. END Test.
  7142. negative: procedure marked as read-only within procedure
  7143. MODULE Test;
  7144. PROCEDURE Procedure;
  7145. PROCEDURE Procedure-;
  7146. END Procedure;
  7147. END Procedure;
  7148. END Test.
  7149. negative: procedure marked as read-only within nested procedure
  7150. MODULE Test;
  7151. PROCEDURE Procedure;
  7152. PROCEDURE Procedure;
  7153. PROCEDURE Procedure-;
  7154. END Procedure;
  7155. END Procedure;
  7156. END Procedure;
  7157. END Test.
  7158. positive: procedure marked as read-only within object
  7159. MODULE Test;
  7160. TYPE Object = OBJECT
  7161. PROCEDURE Procedure-;
  7162. END Procedure;
  7163. END Object;
  7164. END Test.
  7165. negative: procedure marked as read-only within object in procedure
  7166. MODULE Test;
  7167. PROCEDURE Procedure;
  7168. TYPE Object = OBJECT
  7169. PROCEDURE Procedure-;
  7170. END Procedure;
  7171. END Object;
  7172. END Procedure;
  7173. END Test.
  7174. negative: procedure marked as read-only within procedure in object
  7175. MODULE Test;
  7176. TYPE Object = OBJECT
  7177. PROCEDURE Procedure;
  7178. PROCEDURE Procedure-;
  7179. END Procedure;
  7180. END Procedure;
  7181. END Object;
  7182. END Test.
  7183. negative: duplicated procedure
  7184. MODULE Test;
  7185. PROCEDURE Procedure; END Procedure;
  7186. PROCEDURE Procedure; END Procedure;
  7187. END Test.
  7188. negative: duplicated procedure within procedure
  7189. MODULE Test;
  7190. PROCEDURE Procedure;
  7191. PROCEDURE Procedure; END Procedure;
  7192. PROCEDURE Procedure; END Procedure;
  7193. END Procedure;
  7194. END Test.
  7195. negative: duplicated procedure within nested procedure
  7196. MODULE Test;
  7197. PROCEDURE Procedure;
  7198. PROCEDURE Procedure;
  7199. PROCEDURE Procedure; END Procedure;
  7200. PROCEDURE Procedure; END Procedure;
  7201. END Procedure;
  7202. END Procedure;
  7203. END Test.
  7204. negative: duplicated procedure within object
  7205. MODULE Test;
  7206. TYPE Object = OBJECT
  7207. PROCEDURE Procedure; END Procedure;
  7208. PROCEDURE Procedure; END Procedure;
  7209. END Object;
  7210. END Test.
  7211. negative: duplicated procedure within object in procedure
  7212. MODULE Test;
  7213. PROCEDURE Procedure;
  7214. TYPE Object = OBJECT
  7215. PROCEDURE Procedure; END Procedure;
  7216. PROCEDURE Procedure; END Procedure;
  7217. END Object;
  7218. END Procedure;
  7219. END Test.
  7220. negative: duplicated procedure within procedure in object
  7221. MODULE Test;
  7222. TYPE Object = OBJECT
  7223. PROCEDURE Procedure;
  7224. PROCEDURE Procedure; END Procedure;
  7225. PROCEDURE Procedure; END Procedure;
  7226. END Procedure;
  7227. END Object;
  7228. END Test.
  7229. positive: calling procedure in module
  7230. MODULE Test;
  7231. PROCEDURE Procedure; END Procedure;
  7232. BEGIN Procedure
  7233. END Test.
  7234. positive: calling procedure in module with parentheses
  7235. MODULE Test;
  7236. PROCEDURE Procedure; END Procedure;
  7237. BEGIN Procedure ()
  7238. END Test.
  7239. positive: calling procedure recursively
  7240. MODULE Test;
  7241. PROCEDURE Procedure;
  7242. BEGIN Procedure
  7243. END Procedure;
  7244. END Test.
  7245. positive: calling procedure recursively with parentheses
  7246. MODULE Test;
  7247. PROCEDURE Procedure;
  7248. BEGIN Procedure
  7249. END Procedure;
  7250. END Test.
  7251. positive: calling nested procedure in procedure
  7252. MODULE Test;
  7253. PROCEDURE Procedure;
  7254. PROCEDURE Nested; END Nested;
  7255. BEGIN Nested
  7256. END Procedure;
  7257. END Test.
  7258. positive: calling nested procedure in procedure with parentheses
  7259. MODULE Test;
  7260. PROCEDURE Procedure;
  7261. PROCEDURE Nested; END Nested;
  7262. BEGIN Nested ()
  7263. END Procedure;
  7264. END Test.
  7265. positive: calling nested procedure in procedure recursively
  7266. MODULE Test;
  7267. PROCEDURE Procedure;
  7268. PROCEDURE Nested;
  7269. BEGIN Nested
  7270. END Nested;
  7271. END Procedure;
  7272. END Test.
  7273. positive: calling nested procedure in procedure recursively with parentheses
  7274. MODULE Test;
  7275. PROCEDURE Procedure;
  7276. PROCEDURE Nested;
  7277. BEGIN Nested ()
  7278. END Nested;
  7279. END Procedure;
  7280. END Test.
  7281. positive: calling method in object
  7282. MODULE Test;
  7283. TYPE Object = OBJECT
  7284. PROCEDURE Procedure; END Procedure;
  7285. BEGIN Procedure
  7286. END Object;
  7287. END Test.
  7288. positive: calling method in object with parentheses
  7289. MODULE Test;
  7290. TYPE Object = OBJECT
  7291. PROCEDURE Procedure; END Procedure;
  7292. BEGIN Procedure
  7293. END Object;
  7294. END Test.
  7295. positive: calling method recursively
  7296. MODULE Test;
  7297. TYPE Object = OBJECT
  7298. PROCEDURE Procedure;
  7299. BEGIN Procedure
  7300. END Procedure;
  7301. END Object;
  7302. END Test.
  7303. positive: calling method recursively with parentheses
  7304. MODULE Test;
  7305. TYPE Object = OBJECT
  7306. PROCEDURE Procedure;
  7307. BEGIN Procedure ()
  7308. END Procedure;
  7309. END Object;
  7310. END Test.
  7311. positive: calling nested procedure in method
  7312. MODULE Test;
  7313. TYPE Object = OBJECT
  7314. PROCEDURE Procedure;
  7315. PROCEDURE Nested; END Nested;
  7316. BEGIN Nested
  7317. END Procedure;
  7318. END Object;
  7319. END Test.
  7320. positive: calling nested procedure in method with parentheses
  7321. MODULE Test;
  7322. TYPE Object = OBJECT
  7323. PROCEDURE Procedure;
  7324. PROCEDURE Nested; END Nested;
  7325. BEGIN Nested ()
  7326. END Procedure;
  7327. END Object;
  7328. END Test.
  7329. positive: calling nested procedure in method recursively
  7330. MODULE Test;
  7331. TYPE Object = OBJECT
  7332. PROCEDURE Procedure;
  7333. PROCEDURE Nested;
  7334. BEGIN Nested
  7335. END Nested;
  7336. END Procedure;
  7337. END Object;
  7338. END Test.
  7339. positive: calling nested procedure in method recursively with parentheses
  7340. MODULE Test;
  7341. TYPE Object = OBJECT
  7342. PROCEDURE Procedure;
  7343. PROCEDURE Nested;
  7344. BEGIN Nested ()
  7345. END Nested;
  7346. END Procedure;
  7347. END Object;
  7348. END Test.
  7349. positive: calling procedure variable in module
  7350. MODULE Test;
  7351. VAR procedure: PROCEDURE;
  7352. BEGIN procedure
  7353. END Test.
  7354. positive: calling procedure variable in module with parentheses
  7355. MODULE Test;
  7356. VAR procedure: PROCEDURE;
  7357. BEGIN procedure ()
  7358. END Test.
  7359. positive: calling procedure variable in procedure
  7360. MODULE Test;
  7361. VAR procedure: PROCEDURE;
  7362. PROCEDURE Procedure;
  7363. BEGIN procedure
  7364. END Procedure;
  7365. END Test.
  7366. positive: calling procedure variable in procedure with parentheses
  7367. MODULE Test;
  7368. VAR procedure: PROCEDURE;
  7369. PROCEDURE Procedure;
  7370. BEGIN procedure ()
  7371. END Procedure;
  7372. END Test.
  7373. positive: calling procedure variable in object
  7374. MODULE Test;
  7375. TYPE Object = OBJECT
  7376. VAR procedure: PROCEDURE;
  7377. BEGIN procedure
  7378. END Object;
  7379. END Test.
  7380. VAR procedure: PROCEDURE;
  7381. BEGIN procedure
  7382. positive: calling procedure variable in object with parentheses
  7383. MODULE Test;
  7384. TYPE Object = OBJECT
  7385. VAR procedure: PROCEDURE;
  7386. BEGIN procedure ()
  7387. END Object;
  7388. END Test.
  7389. VAR procedure: PROCEDURE;
  7390. BEGIN procedure
  7391. positive: calling procedure variable in method
  7392. MODULE Test;
  7393. TYPE Object = OBJECT
  7394. VAR procedure: PROCEDURE;
  7395. PROCEDURE Procedure;
  7396. BEGIN procedure
  7397. END Procedure;
  7398. END Object;
  7399. END Test.
  7400. positive: calling procedure variable in method with parentheses
  7401. MODULE Test;
  7402. TYPE Object = OBJECT
  7403. VAR procedure: PROCEDURE;
  7404. PROCEDURE Procedure;
  7405. BEGIN procedure ()
  7406. END Procedure;
  7407. END Object;
  7408. END Test.
  7409. positive: calling procedure with no parameters with no arguments
  7410. MODULE Test;
  7411. PROCEDURE Procedure; END Procedure;
  7412. BEGIN Procedure
  7413. END Test.
  7414. negative: calling procedure with one parameter with no arguments
  7415. MODULE Test;
  7416. PROCEDURE Procedure (one: INTEGER); END Procedure;
  7417. BEGIN Procedure
  7418. END Test.
  7419. negative: calling procedure with two parameter with no arguments
  7420. MODULE Test;
  7421. PROCEDURE Procedure (one, two: INTEGER); END Procedure;
  7422. BEGIN Procedure
  7423. END Test.
  7424. negative: calling procedure with no parameters with one argument
  7425. MODULE Test;
  7426. PROCEDURE Procedure; END Procedure;
  7427. BEGIN Procedure (0)
  7428. END Test.
  7429. positive: calling procedure with one parameter with one argument
  7430. MODULE Test;
  7431. PROCEDURE Procedure (one: INTEGER); END Procedure;
  7432. BEGIN Procedure (0)
  7433. END Test.
  7434. negative: calling procedure with two parameter with one argument
  7435. MODULE Test;
  7436. PROCEDURE Procedure (one, two: INTEGER); END Procedure;
  7437. BEGIN Procedure (0)
  7438. END Test.
  7439. negative: calling procedure with no parameters with two arguments
  7440. MODULE Test;
  7441. PROCEDURE Procedure; END Procedure;
  7442. BEGIN Procedure (1, 2)
  7443. END Test.
  7444. negative: calling procedure with one parameter with two arguments
  7445. MODULE Test;
  7446. PROCEDURE Procedure (one: INTEGER); END Procedure;
  7447. BEGIN Procedure (1, 2)
  7448. END Test.
  7449. positive: calling procedure with two parameter with two arguments
  7450. MODULE Test;
  7451. PROCEDURE Procedure (one, two: INTEGER); END Procedure;
  7452. BEGIN Procedure (1, 2)
  7453. END Test.
  7454. positive: calling procedure variable with no parameters with no arguments
  7455. MODULE Test;
  7456. VAR procedure: PROCEDURE;
  7457. BEGIN procedure
  7458. END Test.
  7459. negative: calling procedure variable with one parameter with no arguments
  7460. MODULE Test;
  7461. VAR procedure: PROCEDURE (one: INTEGER);
  7462. BEGIN procedure
  7463. END Test.
  7464. negative: calling procedure variable with two parameter with no arguments
  7465. MODULE Test;
  7466. VAR procedure: PROCEDURE (one, two: INTEGER);
  7467. BEGIN procedure
  7468. END Test.
  7469. negative: calling procedure variable with no parameters with one argument
  7470. MODULE Test;
  7471. VAR procedure: PROCEDURE;
  7472. BEGIN procedure (0)
  7473. END Test.
  7474. positive: calling procedure variable with one parameter with one argument
  7475. MODULE Test;
  7476. VAR procedure: PROCEDURE (one: INTEGER);
  7477. BEGIN procedure (0)
  7478. END Test.
  7479. negative: calling procedure variable with two parameter with one argument
  7480. MODULE Test;
  7481. VAR procedure: PROCEDURE (one, two: INTEGER);
  7482. BEGIN procedure (0)
  7483. END Test.
  7484. negative: calling procedure variable with no parameters with two arguments
  7485. MODULE Test;
  7486. VAR procedure: PROCEDURE;
  7487. BEGIN procedure (1, 2)
  7488. END Test.
  7489. negative: calling procedure variable with one parameter with two arguments
  7490. MODULE Test;
  7491. VAR procedure: PROCEDURE (one: INTEGER);
  7492. BEGIN procedure (1, 2)
  7493. END Test.
  7494. positive: calling procedure variable with two parameter with two arguments
  7495. MODULE Test;
  7496. VAR procedure: PROCEDURE (one, two: INTEGER);
  7497. BEGIN procedure (1, 2)
  7498. END Test.
  7499. # procedure return types
  7500. positive: procedure returning basic character type
  7501. MODULE Test;
  7502. PROCEDURE Procedure (): CHAR;
  7503. END Procedure;
  7504. END Test.
  7505. positive: procedure returning basic boolean type
  7506. MODULE Test;
  7507. PROCEDURE Procedure (): BOOLEAN;
  7508. END Procedure;
  7509. END Test.
  7510. positive: procedure returning basic short integer type
  7511. MODULE Test;
  7512. PROCEDURE Procedure (): SHORTINT;
  7513. END Procedure;
  7514. END Test.
  7515. positive: procedure returning basic integer type
  7516. MODULE Test;
  7517. PROCEDURE Procedure (): INTEGER;
  7518. END Procedure;
  7519. END Test.
  7520. positive: procedure returning basic long integer type
  7521. MODULE Test;
  7522. PROCEDURE Procedure (): LONGINT;
  7523. END Procedure;
  7524. END Test.
  7525. positive: procedure returning basic huge integer type
  7526. MODULE Test;
  7527. PROCEDURE Procedure (): HUGEINT;
  7528. END Procedure;
  7529. END Test.
  7530. positive: procedure returning basic real type
  7531. MODULE Test;
  7532. PROCEDURE Procedure (): REAL;
  7533. END Procedure;
  7534. END Test.
  7535. positive: procedure returning basic long real type
  7536. MODULE Test;
  7537. PROCEDURE Procedure (): LONGREAL;
  7538. END Procedure;
  7539. END Test.
  7540. positive: procedure returning basic set type
  7541. MODULE Test;
  7542. PROCEDURE Procedure (): SET;
  7543. END Procedure;
  7544. END Test.
  7545. positive: procedure returning record type
  7546. MODULE Test;
  7547. TYPE Record = RECORD END;
  7548. PROCEDURE Procedure (): Record;
  7549. END Procedure;
  7550. END Test.
  7551. positive: procedure returning anonymous record type
  7552. MODULE Test;
  7553. PROCEDURE Procedure (): RECORD END;
  7554. END Procedure;
  7555. END Test.
  7556. positive: procedure returning array type
  7557. MODULE Test;
  7558. TYPE Array = ARRAY 10 OF RECORD END;
  7559. PROCEDURE Procedure (): Array;
  7560. END Procedure;
  7561. END Test.
  7562. positive: procedure returning anonymous array type
  7563. MODULE Test;
  7564. PROCEDURE Procedure (): ARRAY 10 OF RECORD END;
  7565. END Procedure;
  7566. END Test.
  7567. negative: procedure returning open array type
  7568. MODULE Test;
  7569. TYPE Array = ARRAY OF RECORD END;
  7570. PROCEDURE Procedure (): Array;
  7571. END Procedure;
  7572. END Test.
  7573. negative: procedure returning anonymous open array type
  7574. MODULE Test;
  7575. PROCEDURE Procedure (): ARRAY OF RECORD END;
  7576. END Procedure;
  7577. END Test.
  7578. positive: procedure returning object type
  7579. MODULE Test;
  7580. TYPE Object = OBJECT;
  7581. PROCEDURE Procedure (): Object;
  7582. END Procedure;
  7583. END Test.
  7584. positive: procedure returning anonymous object type
  7585. MODULE Test;
  7586. PROCEDURE Procedure (): OBJECT;
  7587. END Procedure;
  7588. END Test.
  7589. positive: procedure returning pointer type
  7590. MODULE Test;
  7591. TYPE Pointer = POINTER TO RECORD END;
  7592. PROCEDURE Procedure (): Pointer;
  7593. END Procedure;
  7594. END Test.
  7595. positive: procedure returning anonymous pointer type
  7596. MODULE Test;
  7597. PROCEDURE Procedure (): POINTER TO RECORD END;
  7598. END Procedure;
  7599. END Test.
  7600. positive: procedure returning procedure type
  7601. MODULE Test;
  7602. TYPE Proc = PROCEDURE;
  7603. PROCEDURE Procedure (): Proc;
  7604. END Procedure;
  7605. END Test.
  7606. positive: procedure returning anonymous procedure type
  7607. MODULE Test;
  7608. PROCEDURE Procedure (): PROCEDURE;
  7609. END Procedure;
  7610. END Test.
  7611. positive: procedure returning anonymous procedure returning anonymous procedure
  7612. MODULE Test;
  7613. PROCEDURE Procedure (): PROCEDURE (): PROCEDURE;
  7614. END Procedure;
  7615. END Test.
  7616. negative: procedure returning itself
  7617. MODULE Test;
  7618. PROCEDURE Procedure (): Procedure;
  7619. END Procedure;
  7620. END Test.
  7621. negative: procedure with returning local type
  7622. MODULE Test;
  7623. PROCEDURE Procedure (): Type;
  7624. TYPE Type = RECORD END;
  7625. END Procedure;
  7626. END Test.
  7627. # procedure parameters
  7628. negative: parameter marked as exported
  7629. MODULE Test;
  7630. PROCEDURE Procedure (parameter*: OBJECT);
  7631. END Procedure;
  7632. END Test.
  7633. negative: parameter marked as read-only
  7634. MODULE Test;
  7635. PROCEDURE Procedure (parameter*: OBJECT);
  7636. END Procedure;
  7637. END Test.
  7638. negative: duplicated parameters
  7639. MODULE Test;
  7640. PROCEDURE Procedure (parameter: LONGINT; parameter: LONGINT);
  7641. END Procedure;
  7642. END Test.
  7643. negative: duplicated parameters in same declaration
  7644. MODULE Test;
  7645. PROCEDURE Procedure (parameter, parameter: LONGINT);
  7646. END Procedure;
  7647. END Test.
  7648. positive: procedure with parameter of same type
  7649. MODULE Test;
  7650. TYPE Proc = PROCEDURE;
  7651. PROCEDURE Procedure (procedure: Proc);
  7652. END Procedure;
  7653. END Test.
  7654. negative: procedure with multiple variable parameter
  7655. MODULE Test;
  7656. PROCEDURE Procedure (VAR VAR parameter: SET);
  7657. END Procedure;
  7658. END Test.
  7659. negative: procedure with multiple constant parameter
  7660. MODULE Test;
  7661. PROCEDURE Procedure (CONST CONST parameter: SET);
  7662. END Procedure;
  7663. END Test.
  7664. negative: procedure with variable and constant parameter
  7665. MODULE Test;
  7666. PROCEDURE Procedure (VAR CONST parameter: SET);
  7667. END Procedure;
  7668. END Test.
  7669. negative: procedure with constant and variable parameter
  7670. MODULE Test;
  7671. PROCEDURE Procedure (VAR CONST parameter: SET);
  7672. END Procedure;
  7673. END Test.
  7674. negative: procedure with parameter marked as exported
  7675. MODULE Test;
  7676. PROCEDURE Procedure (parameter*: CHAR);
  7677. END Procedure;
  7678. END Test.
  7679. negative: procedure with parameter marked as read-only
  7680. MODULE Test;
  7681. PROCEDURE Procedure (parameter-: CHAR);
  7682. END Procedure;
  7683. END Test.
  7684. positive: procedure with a parameter of basic character type
  7685. MODULE Test;
  7686. PROCEDURE Procedure (parameter: CHAR);
  7687. END Procedure;
  7688. END Test.
  7689. positive: procedure with parameters of basic character type
  7690. MODULE Test;
  7691. PROCEDURE Procedure (a, b, c: CHAR);
  7692. END Procedure;
  7693. END Test.
  7694. positive: procedure with a parameter of variable character type
  7695. MODULE Test;
  7696. PROCEDURE Procedure (VAR parameter: CHAR);
  7697. END Procedure;
  7698. END Test.
  7699. positive: procedure with parameters of variable character type
  7700. MODULE Test;
  7701. PROCEDURE Procedure (VAR a, b, c: CHAR);
  7702. END Procedure;
  7703. END Test.
  7704. positive: procedure with a parameter of constant character type
  7705. MODULE Test;
  7706. PROCEDURE Procedure (CONST parameter: CHAR);
  7707. END Procedure;
  7708. END Test.
  7709. positive: procedure with parameters of constant character type
  7710. MODULE Test;
  7711. PROCEDURE Procedure (CONST a, b, c: CHAR);
  7712. END Procedure;
  7713. END Test.
  7714. positive: procedure with intermixed parameters of character type
  7715. MODULE Test;
  7716. PROCEDURE Procedure (a: CHAR; VAR b: CHAR; CONST c: CHAR);
  7717. END Procedure;
  7718. END Test.
  7719. positive: procedure with a parameter of basic boolean type
  7720. MODULE Test;
  7721. PROCEDURE Procedure (parameter: BOOLEAN);
  7722. END Procedure;
  7723. END Test.
  7724. positive: procedure with parameters of basic boolean type
  7725. MODULE Test;
  7726. PROCEDURE Procedure (a, b, c: BOOLEAN);
  7727. END Procedure;
  7728. END Test.
  7729. positive: procedure with a parameter of variable boolean type
  7730. MODULE Test;
  7731. PROCEDURE Procedure (VAR parameter: BOOLEAN);
  7732. END Procedure;
  7733. END Test.
  7734. positive: procedure with parameters of variable boolean type
  7735. MODULE Test;
  7736. PROCEDURE Procedure (VAR a, b, c: BOOLEAN);
  7737. END Procedure;
  7738. END Test.
  7739. positive: procedure with a parameter of constant boolean type
  7740. MODULE Test;
  7741. PROCEDURE Procedure (CONST parameter: BOOLEAN);
  7742. END Procedure;
  7743. END Test.
  7744. positive: procedure with parameters of constant boolean type
  7745. MODULE Test;
  7746. PROCEDURE Procedure (CONST a, b, c: BOOLEAN);
  7747. END Procedure;
  7748. END Test.
  7749. positive: procedure with intermixed parameters of boolean type
  7750. MODULE Test;
  7751. PROCEDURE Procedure (a: BOOLEAN; VAR b: BOOLEAN; CONST c: BOOLEAN);
  7752. END Procedure;
  7753. END Test.
  7754. positive: procedure with a parameter of basic short integer type
  7755. MODULE Test;
  7756. PROCEDURE Procedure (parameter: SHORTINT);
  7757. END Procedure;
  7758. END Test.
  7759. positive: procedure with parameters of basic short integer type
  7760. MODULE Test;
  7761. PROCEDURE Procedure (a, b, c: SHORTINT);
  7762. END Procedure;
  7763. END Test.
  7764. positive: procedure with a parameter of variable short integer type
  7765. MODULE Test;
  7766. PROCEDURE Procedure (VAR parameter: SHORTINT);
  7767. END Procedure;
  7768. END Test.
  7769. positive: procedure with parameters of variable short integer type
  7770. MODULE Test;
  7771. PROCEDURE Procedure (VAR a, b, c: SHORTINT);
  7772. END Procedure;
  7773. END Test.
  7774. positive: procedure with a parameter of constant short integer type
  7775. MODULE Test;
  7776. PROCEDURE Procedure (CONST parameter: SHORTINT);
  7777. END Procedure;
  7778. END Test.
  7779. positive: procedure with parameters of constant short integer type
  7780. MODULE Test;
  7781. PROCEDURE Procedure (CONST a, b, c: SHORTINT);
  7782. END Procedure;
  7783. END Test.
  7784. positive: procedure with intermixed parameters of short integer type
  7785. MODULE Test;
  7786. PROCEDURE Procedure (a: SHORTINT; VAR b: SHORTINT; CONST c: SHORTINT);
  7787. END Procedure;
  7788. END Test.
  7789. positive: procedure with a parameter of basic integer type
  7790. MODULE Test;
  7791. PROCEDURE Procedure (parameter: INTEGER);
  7792. END Procedure;
  7793. END Test.
  7794. positive: procedure with parameters of basic integer type
  7795. MODULE Test;
  7796. PROCEDURE Procedure (a, b, c: INTEGER);
  7797. END Procedure;
  7798. END Test.
  7799. positive: procedure with a parameter of variable integer type
  7800. MODULE Test;
  7801. PROCEDURE Procedure (VAR parameter: INTEGER);
  7802. END Procedure;
  7803. END Test.
  7804. positive: procedure with parameters of variable integer type
  7805. MODULE Test;
  7806. PROCEDURE Procedure (VAR a, b, c: INTEGER);
  7807. END Procedure;
  7808. END Test.
  7809. positive: procedure with a parameter of constant integer type
  7810. MODULE Test;
  7811. PROCEDURE Procedure (CONST parameter: INTEGER);
  7812. END Procedure;
  7813. END Test.
  7814. positive: procedure with parameters of constant integer type
  7815. MODULE Test;
  7816. PROCEDURE Procedure (CONST a, b, c: INTEGER);
  7817. END Procedure;
  7818. END Test.
  7819. positive: procedure with intermixed parameters of integer type
  7820. MODULE Test;
  7821. PROCEDURE Procedure (a: INTEGER; VAR b: INTEGER; CONST c: INTEGER);
  7822. END Procedure;
  7823. END Test.
  7824. positive: procedure with a parameter of basic long integer type
  7825. MODULE Test;
  7826. PROCEDURE Procedure (parameter: LONGINT);
  7827. END Procedure;
  7828. END Test.
  7829. positive: procedure with parameters of basic long integer type
  7830. MODULE Test;
  7831. PROCEDURE Procedure (a, b, c: LONGINT);
  7832. END Procedure;
  7833. END Test.
  7834. positive: procedure with a parameter of variable long integer type
  7835. MODULE Test;
  7836. PROCEDURE Procedure (VAR parameter: LONGINT);
  7837. END Procedure;
  7838. END Test.
  7839. positive: procedure with parameters of variable long integer type
  7840. MODULE Test;
  7841. PROCEDURE Procedure (VAR a, b, c: LONGINT);
  7842. END Procedure;
  7843. END Test.
  7844. positive: procedure with a parameter of constant long integer type
  7845. MODULE Test;
  7846. PROCEDURE Procedure (CONST parameter: LONGINT);
  7847. END Procedure;
  7848. END Test.
  7849. positive: procedure with parameters of constant long integer type
  7850. MODULE Test;
  7851. PROCEDURE Procedure (CONST a, b, c: LONGINT);
  7852. END Procedure;
  7853. END Test.
  7854. positive: procedure with intermixed parameters of long integer type
  7855. MODULE Test;
  7856. PROCEDURE Procedure (a: LONGINT; VAR b: LONGINT; CONST c: LONGINT);
  7857. END Procedure;
  7858. END Test.
  7859. positive: procedure with a parameter of basic huge integer type
  7860. MODULE Test;
  7861. PROCEDURE Procedure (parameter: HUGEINT);
  7862. END Procedure;
  7863. END Test.
  7864. positive: procedure with parameters of basic huge integer type
  7865. MODULE Test;
  7866. PROCEDURE Procedure (a, b, c: HUGEINT);
  7867. END Procedure;
  7868. END Test.
  7869. positive: procedure with a parameter of variable huge integer type
  7870. MODULE Test;
  7871. PROCEDURE Procedure (VAR parameter: HUGEINT);
  7872. END Procedure;
  7873. END Test.
  7874. positive: procedure with parameters of variable huge integer type
  7875. MODULE Test;
  7876. PROCEDURE Procedure (VAR a, b, c: HUGEINT);
  7877. END Procedure;
  7878. END Test.
  7879. positive: procedure with a parameter of constant huge integer type
  7880. MODULE Test;
  7881. PROCEDURE Procedure (CONST parameter: HUGEINT);
  7882. END Procedure;
  7883. END Test.
  7884. positive: procedure with parameters of constant huge integer type
  7885. MODULE Test;
  7886. PROCEDURE Procedure (CONST a, b, c: HUGEINT);
  7887. END Procedure;
  7888. END Test.
  7889. positive: procedure with intermixed parameters of huge integer type
  7890. MODULE Test;
  7891. PROCEDURE Procedure (a: HUGEINT; VAR b: HUGEINT; CONST c: HUGEINT);
  7892. END Procedure;
  7893. END Test.
  7894. positive: procedure with a parameter of basic real type
  7895. MODULE Test;
  7896. PROCEDURE Procedure (parameter: REAL);
  7897. END Procedure;
  7898. END Test.
  7899. positive: procedure with parameters of basic real type
  7900. MODULE Test;
  7901. PROCEDURE Procedure (a, b, c: REAL);
  7902. END Procedure;
  7903. END Test.
  7904. positive: procedure with a parameter of variable real type
  7905. MODULE Test;
  7906. PROCEDURE Procedure (VAR parameter: REAL);
  7907. END Procedure;
  7908. END Test.
  7909. positive: procedure with parameters of variable real type
  7910. MODULE Test;
  7911. PROCEDURE Procedure (VAR a, b, c: REAL);
  7912. END Procedure;
  7913. END Test.
  7914. positive: procedure with a parameter of constant real type
  7915. MODULE Test;
  7916. PROCEDURE Procedure (CONST parameter: REAL);
  7917. END Procedure;
  7918. END Test.
  7919. positive: procedure with parameters of constant real type
  7920. MODULE Test;
  7921. PROCEDURE Procedure (CONST a, b, c: REAL);
  7922. END Procedure;
  7923. END Test.
  7924. positive: procedure with intermixed parameters of real type
  7925. MODULE Test;
  7926. PROCEDURE Procedure (a: REAL; VAR b: REAL; CONST c: REAL);
  7927. END Procedure;
  7928. END Test.
  7929. positive: procedure with a parameter of basic long real type
  7930. MODULE Test;
  7931. PROCEDURE Procedure (parameter: LONGREAL);
  7932. END Procedure;
  7933. END Test.
  7934. positive: procedure with parameters of basic long real type
  7935. MODULE Test;
  7936. PROCEDURE Procedure (a, b, c: LONGREAL);
  7937. END Procedure;
  7938. END Test.
  7939. positive: procedure with a parameter of variable long real type
  7940. MODULE Test;
  7941. PROCEDURE Procedure (VAR parameter: LONGREAL);
  7942. END Procedure;
  7943. END Test.
  7944. positive: procedure with parameters of variable long real type
  7945. MODULE Test;
  7946. PROCEDURE Procedure (VAR a, b, c: LONGREAL);
  7947. END Procedure;
  7948. END Test.
  7949. positive: procedure with a parameter of constant long real type
  7950. MODULE Test;
  7951. PROCEDURE Procedure (CONST parameter: LONGREAL);
  7952. END Procedure;
  7953. END Test.
  7954. positive: procedure with parameters of constant long real type
  7955. MODULE Test;
  7956. PROCEDURE Procedure (CONST a, b, c: LONGREAL);
  7957. END Procedure;
  7958. END Test.
  7959. positive: procedure with intermixed parameters of long real type
  7960. MODULE Test;
  7961. PROCEDURE Procedure (a: LONGREAL; VAR b: LONGREAL; CONST c: LONGREAL);
  7962. END Procedure;
  7963. END Test.
  7964. positive: procedure with a parameter of basic set type
  7965. MODULE Test;
  7966. PROCEDURE Procedure (parameter: SET);
  7967. END Procedure;
  7968. END Test.
  7969. positive: procedure with parameters of basic set type
  7970. MODULE Test;
  7971. PROCEDURE Procedure (a, b, c: SET);
  7972. END Procedure;
  7973. END Test.
  7974. positive: procedure with a parameter of variable set type
  7975. MODULE Test;
  7976. PROCEDURE Procedure (VAR parameter: SET);
  7977. END Procedure;
  7978. END Test.
  7979. positive: procedure with parameters of variable set type
  7980. MODULE Test;
  7981. PROCEDURE Procedure (VAR a, b, c: SET);
  7982. END Procedure;
  7983. END Test.
  7984. positive: procedure with a parameter of constant set type
  7985. MODULE Test;
  7986. PROCEDURE Procedure (CONST parameter: SET);
  7987. END Procedure;
  7988. END Test.
  7989. positive: procedure with parameters of constant set type
  7990. MODULE Test;
  7991. PROCEDURE Procedure (CONST a, b, c: SET);
  7992. END Procedure;
  7993. END Test.
  7994. positive: procedure with intermixed parameters of set type
  7995. MODULE Test;
  7996. PROCEDURE Procedure (a: SET; VAR b: SET; CONST c: SET);
  7997. END Procedure;
  7998. END Test.
  7999. positive: procedure with a parameter of record type
  8000. MODULE Test;
  8001. TYPE Record = RECORD END;
  8002. PROCEDURE Procedure (parameter: Record);
  8003. END Procedure;
  8004. END Test.
  8005. positive: procedure with parameters of record type
  8006. MODULE Test;
  8007. TYPE Record = RECORD END;
  8008. PROCEDURE Procedure (a, b, c: Record);
  8009. END Procedure;
  8010. END Test.
  8011. positive: procedure with a parameter of variable record type
  8012. MODULE Test;
  8013. TYPE Record = RECORD END;
  8014. PROCEDURE Procedure (VAR parameter: Record);
  8015. END Procedure;
  8016. END Test.
  8017. positive: procedure with parameters of variable record type
  8018. MODULE Test;
  8019. TYPE Record = RECORD END;
  8020. PROCEDURE Procedure (VAR a, b, c: Record);
  8021. END Procedure;
  8022. END Test.
  8023. positive: procedure with a parameter of constant record type
  8024. MODULE Test;
  8025. TYPE Record = RECORD END;
  8026. PROCEDURE Procedure (CONST parameter: Record);
  8027. END Procedure;
  8028. END Test.
  8029. positive: procedure with parameters of constant record type
  8030. MODULE Test;
  8031. TYPE Record = RECORD END;
  8032. PROCEDURE Procedure (CONST a, b, c: Record);
  8033. END Procedure;
  8034. END Test.
  8035. positive: procedure with intermixed parameters of record type
  8036. MODULE Test;
  8037. TYPE Record = RECORD END;
  8038. PROCEDURE Procedure (a: Record; VAR b: Record; CONST c: Record);
  8039. END Procedure;
  8040. END Test.
  8041. positive: procedure with a parameter of anonymous record type
  8042. MODULE Test;
  8043. TYPE Record = RECORD END;
  8044. PROCEDURE Procedure (parameter: RECORD END);
  8045. END Procedure;
  8046. END Test.
  8047. positive: procedure with parameters of anonymous record type
  8048. MODULE Test;
  8049. PROCEDURE Procedure (a, b, c: RECORD END);
  8050. END Procedure;
  8051. END Test.
  8052. positive: procedure with a parameter of variable anonymous record type
  8053. MODULE Test;
  8054. PROCEDURE Procedure (VAR parameter: RECORD END);
  8055. END Procedure;
  8056. END Test.
  8057. positive: procedure with parameters of variable anonymous record type
  8058. MODULE Test;
  8059. PROCEDURE Procedure (VAR a, b, c: RECORD END);
  8060. END Procedure;
  8061. END Test.
  8062. positive: procedure with a parameter of constant anonymous record type
  8063. MODULE Test;
  8064. PROCEDURE Procedure (CONST parameter: RECORD END);
  8065. END Procedure;
  8066. END Test.
  8067. positive: procedure with parameters of constant anonymous record type
  8068. MODULE Test;
  8069. PROCEDURE Procedure (CONST a, b, c: RECORD END);
  8070. END Procedure;
  8071. END Test.
  8072. positive: procedure with intermixed parameters of anonymous record type
  8073. MODULE Test;
  8074. PROCEDURE Procedure (a: RECORD END; VAR b: RECORD END; CONST c: RECORD END);
  8075. END Procedure;
  8076. END Test.
  8077. positive: procedure with a parameter of array type
  8078. MODULE Test;
  8079. TYPE Array = ARRAY 10 OF RECORD END;
  8080. PROCEDURE Procedure (parameter: Array);
  8081. END Procedure;
  8082. END Test.
  8083. positive: procedure with parameters of array type
  8084. MODULE Test;
  8085. TYPE Array = ARRAY 10 OF RECORD END;
  8086. PROCEDURE Procedure (a, b, c: Array);
  8087. END Procedure;
  8088. END Test.
  8089. positive: procedure with a parameter of variable array type
  8090. MODULE Test;
  8091. TYPE Array = ARRAY 10 OF RECORD END;
  8092. PROCEDURE Procedure (VAR parameter: Array);
  8093. END Procedure;
  8094. END Test.
  8095. positive: procedure with parameters of variable array type
  8096. MODULE Test;
  8097. TYPE Array = ARRAY 10 OF RECORD END;
  8098. PROCEDURE Procedure (VAR a, b, c: Array);
  8099. END Procedure;
  8100. END Test.
  8101. positive: procedure with a parameter of constant array type
  8102. MODULE Test;
  8103. TYPE Array = ARRAY 10 OF RECORD END;
  8104. PROCEDURE Procedure (CONST parameter: Array);
  8105. END Procedure;
  8106. END Test.
  8107. positive: procedure with parameters of constant array type
  8108. MODULE Test;
  8109. TYPE Array = ARRAY 10 OF RECORD END;
  8110. PROCEDURE Procedure (CONST a, b, c: Array);
  8111. END Procedure;
  8112. END Test.
  8113. positive: procedure with intermixed parameters of array type
  8114. MODULE Test;
  8115. TYPE Array = ARRAY 10 OF RECORD END;
  8116. PROCEDURE Procedure (a: Array; VAR b: Array; CONST c: Array);
  8117. END Procedure;
  8118. END Test.
  8119. positive: procedure with a parameter of anonymous array type
  8120. MODULE Test;
  8121. PROCEDURE Procedure (parameter: ARRAY 10 OF RECORD END);
  8122. END Procedure;
  8123. END Test.
  8124. positive: procedure with parameters of anonymous array type
  8125. MODULE Test;
  8126. PROCEDURE Procedure (a, b, c: ARRAY 10 OF RECORD END);
  8127. END Procedure;
  8128. END Test.
  8129. positive: procedure with a parameter of variable anonymous array type
  8130. MODULE Test;
  8131. PROCEDURE Procedure (VAR parameter: ARRAY 10 OF RECORD END);
  8132. END Procedure;
  8133. END Test.
  8134. positive: procedure with parameters of variable anonymous array type
  8135. MODULE Test;
  8136. PROCEDURE Procedure (VAR a, b, c: ARRAY 10 OF RECORD END);
  8137. END Procedure;
  8138. END Test.
  8139. positive: procedure with a parameter of constant anonymous array type
  8140. MODULE Test;
  8141. PROCEDURE Procedure (CONST parameter: ARRAY 10 OF RECORD END);
  8142. END Procedure;
  8143. END Test.
  8144. positive: procedure with parameters of constant anonymous array type
  8145. MODULE Test;
  8146. PROCEDURE Procedure (CONST a, b, c: ARRAY 10 OF RECORD END);
  8147. END Procedure;
  8148. END Test.
  8149. positive: procedure with intermixed parameters of anonymous array type
  8150. MODULE Test;
  8151. PROCEDURE Procedure (a: ARRAY 10 OF RECORD END; VAR b: ARRAY 10 OF RECORD END; CONST c: ARRAY 10 OF RECORD END);
  8152. END Procedure;
  8153. END Test.
  8154. positive: procedure with a parameter of open array type
  8155. MODULE Test;
  8156. TYPE Array = ARRAY OF RECORD END;
  8157. PROCEDURE Procedure (parameter: Array);
  8158. END Procedure;
  8159. END Test.
  8160. positive: procedure with parameters of open array type
  8161. MODULE Test;
  8162. TYPE Array = ARRAY OF RECORD END;
  8163. PROCEDURE Procedure (a, b, c: Array);
  8164. END Procedure;
  8165. END Test.
  8166. positive: procedure with a parameter of variable open array type
  8167. MODULE Test;
  8168. TYPE Array = ARRAY OF RECORD END;
  8169. PROCEDURE Procedure (VAR parameter: Array);
  8170. END Procedure;
  8171. END Test.
  8172. positive: procedure with parameters of variable open array type
  8173. MODULE Test;
  8174. TYPE Array = ARRAY OF RECORD END;
  8175. PROCEDURE Procedure (VAR a, b, c: Array);
  8176. END Procedure;
  8177. END Test.
  8178. positive: procedure with a parameter of constant open array type
  8179. MODULE Test;
  8180. TYPE Array = ARRAY OF RECORD END;
  8181. PROCEDURE Procedure (CONST parameter: Array);
  8182. END Procedure;
  8183. END Test.
  8184. positive: procedure with parameters of constant open array type
  8185. MODULE Test;
  8186. TYPE Array = ARRAY OF RECORD END;
  8187. PROCEDURE Procedure (CONST a, b, c: Array);
  8188. END Procedure;
  8189. END Test.
  8190. positive: procedure with intermixed parameters of open array type
  8191. MODULE Test;
  8192. TYPE Array = ARRAY OF RECORD END;
  8193. PROCEDURE Procedure (a: Array; VAR b: Array; CONST c: Array);
  8194. END Procedure;
  8195. END Test.
  8196. positive: procedure with a parameter of anonymous open array type
  8197. MODULE Test;
  8198. PROCEDURE Procedure (parameter: ARRAY OF RECORD END);
  8199. END Procedure;
  8200. END Test.
  8201. positive: procedure with parameters of anonymous open array type
  8202. MODULE Test;
  8203. PROCEDURE Procedure (a, b, c: ARRAY OF RECORD END);
  8204. END Procedure;
  8205. END Test.
  8206. positive: procedure with a parameter of variable anonymous open array type
  8207. MODULE Test;
  8208. PROCEDURE Procedure (VAR parameter: ARRAY OF RECORD END);
  8209. END Procedure;
  8210. END Test.
  8211. positive: procedure with parameters of variable anonymous open array type
  8212. MODULE Test;
  8213. PROCEDURE Procedure (VAR a, b, c: ARRAY OF RECORD END);
  8214. END Procedure;
  8215. END Test.
  8216. positive: procedure with a parameter of constant anonymous open array type
  8217. MODULE Test;
  8218. PROCEDURE Procedure (CONST parameter: ARRAY OF RECORD END);
  8219. END Procedure;
  8220. END Test.
  8221. positive: procedure with parameters of constant anonymous open array type
  8222. MODULE Test;
  8223. PROCEDURE Procedure (CONST a, b, c: ARRAY OF RECORD END);
  8224. END Procedure;
  8225. END Test.
  8226. positive: procedure with intermixed parameters of anonymous open array type
  8227. MODULE Test;
  8228. PROCEDURE Procedure (a: ARRAY OF RECORD END; VAR b: ARRAY OF RECORD END; CONST c: ARRAY OF RECORD END);
  8229. END Procedure;
  8230. END Test.
  8231. positive: procedure with a parameter of object type
  8232. MODULE Test;
  8233. TYPE Object = OBJECT END Object;
  8234. PROCEDURE Procedure (parameter: Object);
  8235. END Procedure;
  8236. END Test.
  8237. positive: procedure with a parameter of plain object type
  8238. MODULE Test;
  8239. TYPE Object = OBJECT;
  8240. PROCEDURE Procedure (parameter: Object);
  8241. END Procedure;
  8242. END Test.
  8243. positive: procedure with parameters of object type
  8244. MODULE Test;
  8245. TYPE Object = OBJECT END Object;
  8246. PROCEDURE Procedure (a, b, c: Object);
  8247. END Procedure;
  8248. END Test.
  8249. positive: procedure with a parameter of variable object type
  8250. MODULE Test;
  8251. TYPE Object = OBJECT END Object;
  8252. PROCEDURE Procedure (VAR parameter: Object);
  8253. END Procedure;
  8254. END Test.
  8255. positive: procedure with parameters of variable object type
  8256. MODULE Test;
  8257. TYPE Object = OBJECT END Object;
  8258. PROCEDURE Procedure (VAR a, b, c: Object);
  8259. END Procedure;
  8260. END Test.
  8261. positive: procedure with a parameter of constant object type
  8262. MODULE Test;
  8263. TYPE Object = OBJECT END Object;
  8264. PROCEDURE Procedure (CONST parameter: Object);
  8265. END Procedure;
  8266. END Test.
  8267. positive: procedure with parameters of constant object type
  8268. MODULE Test;
  8269. TYPE Object = OBJECT END Object;
  8270. PROCEDURE Procedure (CONST a, b, c: Object);
  8271. END Procedure;
  8272. END Test.
  8273. positive: procedure with intermixed parameters of object type
  8274. MODULE Test;
  8275. TYPE Object = OBJECT END Object;
  8276. PROCEDURE Procedure (a: Object; VAR b: Object; CONST c: Object);
  8277. END Procedure;
  8278. END Test.
  8279. positive: procedure with intermixed parameters of plain object type
  8280. MODULE Test;
  8281. TYPE Object = OBJECT;
  8282. PROCEDURE Procedure (a: Object; VAR b: Object; CONST c: Object);
  8283. END Procedure;
  8284. END Test.
  8285. positive: procedure with a parameter of anonymous object type
  8286. MODULE Test;
  8287. PROCEDURE Procedure (parameter: OBJECT END);
  8288. END Procedure;
  8289. END Test.
  8290. positive: procedure with a parameter of anonymous plain object type
  8291. MODULE Test;
  8292. PROCEDURE Procedure (parameter: OBJECT);
  8293. END Procedure;
  8294. END Test.
  8295. positive: procedure with parameters of anonymous object type
  8296. MODULE Test;
  8297. PROCEDURE Procedure (a, b, c: OBJECT END);
  8298. END Procedure;
  8299. END Test.
  8300. positive: procedure with a parameter of variable anonymous object type
  8301. MODULE Test;
  8302. PROCEDURE Procedure (VAR parameter: OBJECT END);
  8303. END Procedure;
  8304. END Test.
  8305. positive: procedure with parameters of variable anonymous object type
  8306. MODULE Test;
  8307. PROCEDURE Procedure (VAR a, b, c: OBJECT END);
  8308. END Procedure;
  8309. END Test.
  8310. positive: procedure with a parameter of constant anonymous object type
  8311. MODULE Test;
  8312. PROCEDURE Procedure (CONST parameter: OBJECT END);
  8313. END Procedure;
  8314. END Test.
  8315. positive: procedure with parameters of constant anonymous object type
  8316. MODULE Test;
  8317. PROCEDURE Procedure (CONST a, b, c: OBJECT END);
  8318. END Procedure;
  8319. END Test.
  8320. positive: procedure with intermixed parameters of anonymous object type
  8321. MODULE Test;
  8322. PROCEDURE Procedure (a: OBJECT END; VAR b: OBJECT END; CONST c: OBJECT END);
  8323. END Procedure;
  8324. END Test.
  8325. positive: procedure with intermixed parameters of anonymous plain object type
  8326. MODULE Test;
  8327. PROCEDURE Procedure (a: OBJECT; VAR b: OBJECT; CONST c: OBJECT);
  8328. END Procedure;
  8329. END Test.
  8330. positive: procedure with a parameter of pointer type
  8331. MODULE Test;
  8332. TYPE Pointer = POINTER TO RECORD END;
  8333. PROCEDURE Procedure (parameter: Pointer);
  8334. END Procedure;
  8335. END Test.
  8336. positive: procedure with parameters of pointer type
  8337. MODULE Test;
  8338. TYPE Pointer = POINTER TO RECORD END;
  8339. PROCEDURE Procedure (a, b, c: Pointer);
  8340. END Procedure;
  8341. END Test.
  8342. positive: procedure with a parameter of variable pointer type
  8343. MODULE Test;
  8344. TYPE Pointer = POINTER TO RECORD END;
  8345. PROCEDURE Procedure (VAR parameter: Pointer);
  8346. END Procedure;
  8347. END Test.
  8348. positive: procedure with parameters of variable pointer type
  8349. MODULE Test;
  8350. TYPE Pointer = POINTER TO RECORD END;
  8351. PROCEDURE Procedure (VAR a, b, c: Pointer);
  8352. END Procedure;
  8353. END Test.
  8354. positive: procedure with a parameter of constant pointer type
  8355. MODULE Test;
  8356. TYPE Pointer = POINTER TO RECORD END;
  8357. PROCEDURE Procedure (CONST parameter: Pointer);
  8358. END Procedure;
  8359. END Test.
  8360. positive: procedure with parameters of constant pointer type
  8361. MODULE Test;
  8362. TYPE Pointer = POINTER TO RECORD END;
  8363. PROCEDURE Procedure (CONST a, b, c: Pointer);
  8364. END Procedure;
  8365. END Test.
  8366. positive: procedure with intermixed parameters of pointer type
  8367. MODULE Test;
  8368. TYPE Pointer = POINTER TO RECORD END;
  8369. PROCEDURE Procedure (a: Pointer; VAR b: Pointer; CONST c: Pointer);
  8370. END Procedure;
  8371. END Test.
  8372. positive: procedure with a parameter of anonymous pointer type
  8373. MODULE Test;
  8374. PROCEDURE Procedure (parameter: POINTER TO RECORD END);
  8375. END Procedure;
  8376. END Test.
  8377. positive: procedure with parameters of anonymous pointer type
  8378. MODULE Test;
  8379. PROCEDURE Procedure (a, b, c: POINTER TO RECORD END);
  8380. END Procedure;
  8381. END Test.
  8382. positive: procedure with a parameter of variable anonymous pointer type
  8383. MODULE Test;
  8384. PROCEDURE Procedure (VAR parameter: POINTER TO RECORD END);
  8385. END Procedure;
  8386. END Test.
  8387. positive: procedure with parameters of variable anonymous pointer type
  8388. MODULE Test;
  8389. PROCEDURE Procedure (VAR a, b, c: POINTER TO RECORD END);
  8390. END Procedure;
  8391. END Test.
  8392. positive: procedure with a parameter of constant anonymous pointer type
  8393. MODULE Test;
  8394. PROCEDURE Procedure (CONST parameter: OBJECT END);
  8395. END Procedure;
  8396. END Test.
  8397. positive: procedure with parameters of constant anonymous pointer type
  8398. MODULE Test;
  8399. PROCEDURE Procedure (CONST a, b, c: POINTER TO RECORD END);
  8400. END Procedure;
  8401. END Test.
  8402. positive: procedure with intermixed parameters of anonymous pointer type
  8403. MODULE Test;
  8404. PROCEDURE Procedure (a: POINTER TO RECORD END; VAR b: POINTER TO RECORD END; CONST c: POINTER TO RECORD END);
  8405. END Procedure;
  8406. END Test.
  8407. positive: procedure with a parameter of procedure type
  8408. MODULE Test;
  8409. TYPE Proc = PROCEDURE;
  8410. PROCEDURE Procedure (parameter: Proc);
  8411. END Procedure;
  8412. END Test.
  8413. positive: procedure with parameters of procedure type
  8414. MODULE Test;
  8415. TYPE Proc = PROCEDURE;
  8416. PROCEDURE Procedure (a, b, c: Proc);
  8417. END Procedure;
  8418. END Test.
  8419. positive: procedure with a parameter of variable procedure type
  8420. MODULE Test;
  8421. TYPE Proc = PROCEDURE;
  8422. PROCEDURE Procedure (VAR parameter: Proc);
  8423. END Procedure;
  8424. END Test.
  8425. positive: procedure with parameters of variable procedure type
  8426. MODULE Test;
  8427. TYPE Proc = PROCEDURE;
  8428. PROCEDURE Procedure (VAR a, b, c: Proc);
  8429. END Procedure;
  8430. END Test.
  8431. positive: procedure with a parameter of constant procedure type
  8432. MODULE Test;
  8433. TYPE Proc = PROCEDURE;
  8434. PROCEDURE Procedure (CONST parameter: Proc);
  8435. END Procedure;
  8436. END Test.
  8437. positive: procedure with parameters of constant procedure type
  8438. MODULE Test;
  8439. TYPE Proc = PROCEDURE;
  8440. PROCEDURE Procedure (CONST a, b, c: Proc);
  8441. END Procedure;
  8442. END Test.
  8443. positive: procedure with intermixed parameters of procedure type
  8444. MODULE Test;
  8445. TYPE Proc = PROCEDURE;
  8446. PROCEDURE Procedure (a: Proc; VAR b: Proc; CONST c: Proc);
  8447. END Procedure;
  8448. END Test.
  8449. positive: procedure with a parameter of anonymous procedure type
  8450. MODULE Test;
  8451. PROCEDURE Procedure (parameter: PROCEDURE);
  8452. END Procedure;
  8453. END Test.
  8454. positive: procedure with parameters of anonymous procedure type
  8455. MODULE Test;
  8456. PROCEDURE Procedure (a, b, c: PROCEDURE);
  8457. END Procedure;
  8458. END Test.
  8459. positive: procedure with a parameter of variable anonymous procedure type
  8460. MODULE Test;
  8461. PROCEDURE Procedure (VAR parameter: PROCEDURE);
  8462. END Procedure;
  8463. END Test.
  8464. positive: procedure with parameters of variable anonymous procedure type
  8465. MODULE Test;
  8466. PROCEDURE Procedure (VAR a, b, c: PROCEDURE);
  8467. END Procedure;
  8468. END Test.
  8469. positive: procedure with a parameter of constant anonymous procedure type
  8470. MODULE Test;
  8471. PROCEDURE Procedure (CONST parameter: PROCEDURE);
  8472. END Procedure;
  8473. END Test.
  8474. positive: procedure with parameters of constant anonymous procedure type
  8475. MODULE Test;
  8476. PROCEDURE Procedure (CONST a, b, c: PROCEDURE);
  8477. END Procedure;
  8478. END Test.
  8479. positive: procedure with intermixed parameters of anonymous procedure type
  8480. MODULE Test;
  8481. PROCEDURE Procedure (a: PROCEDURE; VAR b: PROCEDURE; CONST c: PROCEDURE);
  8482. END Procedure;
  8483. END Test.
  8484. negative: procedure with parameters of local type
  8485. MODULE Test;
  8486. PROCEDURE Procedure (parameter: Type);
  8487. TYPE Type = RECORD END;
  8488. END Procedure;
  8489. END Test.
  8490. negative: procedure with parameter and local constant with same name
  8491. MODULE Test;
  8492. PROCEDURE Procedure (parameter: SET);
  8493. CONST parameter = 10;
  8494. END Procedure;
  8495. END Test.
  8496. negative: procedure with parameter and local type with same name
  8497. MODULE Test;
  8498. PROCEDURE Procedure (parameter: SET);
  8499. TYPE parameter = RECORD END;
  8500. END Procedure;
  8501. END Test.
  8502. negative: procedure with parameter and local variable with same name
  8503. MODULE Test;
  8504. PROCEDURE Procedure (parameter: SET);
  8505. VAR parameter: LONGINT;
  8506. END Procedure;
  8507. END Test.
  8508. negative: procedure with parameter and nested procedure with same name
  8509. MODULE Test;
  8510. PROCEDURE Procedure (parameter: SET);
  8511. PROCEDURE parameter; END parameter;
  8512. END Procedure;
  8513. END Test.
  8514. positive: boolean parameter assignment
  8515. MODULE Test;
  8516. PROCEDURE Procedure (value: BOOLEAN); BEGIN value := value; END Procedure;
  8517. END Test.
  8518. positive: char parameter assignment
  8519. MODULE Test;
  8520. PROCEDURE Procedure (value: CHAR); BEGIN value := value; END Procedure;
  8521. END Test.
  8522. positive: short integer parameter assignment
  8523. MODULE Test;
  8524. PROCEDURE Procedure (value: SHORTINT); BEGIN value := value; END Procedure;
  8525. END Test.
  8526. positive: integer parameter assignment
  8527. MODULE Test;
  8528. PROCEDURE Procedure (VAR value: INTEGER); BEGIN value := value; END Procedure;
  8529. END Test.
  8530. positive: long integer parameter assignment
  8531. MODULE Test;
  8532. PROCEDURE Procedure (value: LONGINT); BEGIN value := value; END Procedure;
  8533. END Test.
  8534. positive: huge integer parameter assignment
  8535. MODULE Test;
  8536. PROCEDURE Procedure (value: HUGEINT); BEGIN value := value; END Procedure;
  8537. END Test.
  8538. positive: real parameter assignment
  8539. MODULE Test;
  8540. PROCEDURE Procedure (value: REAL); BEGIN value := value; END Procedure;
  8541. END Test.
  8542. positive: long real parameter assignment
  8543. MODULE Test;
  8544. PROCEDURE Procedure (value: LONGREAL); BEGIN value := value; END Procedure;
  8545. END Test.
  8546. positive: set parameter assignment
  8547. MODULE Test;
  8548. PROCEDURE Procedure (value: SET); BEGIN value := value; END Procedure;
  8549. END Test.
  8550. positive: array parameter assignment
  8551. MODULE Test;
  8552. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8553. END Test.
  8554. positive: array parameter element assignment
  8555. MODULE Test;
  8556. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8557. END Test.
  8558. negative: open array parameter assignment
  8559. MODULE Test;
  8560. PROCEDURE Procedure (value: ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8561. END Test.
  8562. positive: open array parameter element assignment
  8563. MODULE Test;
  8564. PROCEDURE Procedure (value: ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8565. END Test.
  8566. positive: record parameter assignment
  8567. MODULE Test;
  8568. PROCEDURE Procedure (value: RECORD END); BEGIN value := value; END Procedure;
  8569. END Test.
  8570. positive: record parameter member assignment
  8571. MODULE Test;
  8572. PROCEDURE Procedure (value: RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8573. END Test.
  8574. positive: object parameter assignment
  8575. MODULE Test;
  8576. PROCEDURE Procedure (value: OBJECT END); BEGIN value := value; END Procedure;
  8577. END Test.
  8578. positive: object parameter member assignment
  8579. MODULE Test;
  8580. PROCEDURE Procedure (value: OBJECT VAR member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8581. END Test.
  8582. positive: base object parameter assignment
  8583. MODULE Test;
  8584. PROCEDURE Procedure (value: OBJECT); BEGIN value := value; END Procedure;
  8585. END Test.
  8586. positive: pointer to array parameter assignment
  8587. MODULE Test;
  8588. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8589. END Test.
  8590. positive: pointer to array parameter element assignment
  8591. MODULE Test;
  8592. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8593. END Test.
  8594. positive: pointer to open array parameter assignment
  8595. MODULE Test;
  8596. PROCEDURE Procedure (value: POINTER TO ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8597. END Test.
  8598. positive: pointer to open array parameter element assignment
  8599. MODULE Test;
  8600. PROCEDURE Procedure (value: POINTER TO ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8601. END Test.
  8602. positive: pointer to record parameter assignment
  8603. MODULE Test;
  8604. PROCEDURE Procedure (value: POINTER TO RECORD END); BEGIN value := value; END Procedure;
  8605. END Test.
  8606. positive: pointer to record parameter member assignment
  8607. MODULE Test;
  8608. PROCEDURE Procedure (value: POINTER TO RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8609. END Test.
  8610. positive: procedure parameter assignment
  8611. MODULE Test;
  8612. PROCEDURE Procedure (value: PROCEDURE); BEGIN value := value; END Procedure;
  8613. END Test.
  8614. positive: variable boolean parameter assignment
  8615. MODULE Test;
  8616. PROCEDURE Procedure (VAR value: BOOLEAN); BEGIN value := value; END Procedure;
  8617. END Test.
  8618. positive: variable char parameter assignment
  8619. MODULE Test;
  8620. PROCEDURE Procedure (VAR value: CHAR); BEGIN value := value; END Procedure;
  8621. END Test.
  8622. positive: variable short integer parameter assignment
  8623. MODULE Test;
  8624. PROCEDURE Procedure (VAR value: SHORTINT); BEGIN value := value; END Procedure;
  8625. END Test.
  8626. positive: variable integer parameter assignment
  8627. MODULE Test;
  8628. PROCEDURE Procedure (VAR value: INTEGER); BEGIN value := value; END Procedure;
  8629. END Test.
  8630. positive: variable long integer parameter assignment
  8631. MODULE Test;
  8632. PROCEDURE Procedure (VAR value: LONGINT); BEGIN value := value; END Procedure;
  8633. END Test.
  8634. positive: variable huge integer parameter assignment
  8635. MODULE Test;
  8636. PROCEDURE Procedure (VAR value: HUGEINT); BEGIN value := value; END Procedure;
  8637. END Test.
  8638. positive: variable real parameter assignment
  8639. MODULE Test;
  8640. PROCEDURE Procedure (VAR value: REAL); BEGIN value := value; END Procedure;
  8641. END Test.
  8642. positive: variable long real parameter assignment
  8643. MODULE Test;
  8644. PROCEDURE Procedure (VAR value: LONGREAL); BEGIN value := value; END Procedure;
  8645. END Test.
  8646. positive: variable set parameter assignment
  8647. MODULE Test;
  8648. PROCEDURE Procedure (VAR value: SET); BEGIN value := value; END Procedure;
  8649. END Test.
  8650. positive: variable array parameter assignment
  8651. MODULE Test;
  8652. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8653. END Test.
  8654. positive: variable array parameter element assignment
  8655. MODULE Test;
  8656. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8657. END Test.
  8658. negative: variable open array parameter assignment
  8659. MODULE Test;
  8660. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8661. END Test.
  8662. positive: variable open array parameter element assignment
  8663. MODULE Test;
  8664. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8665. END Test.
  8666. positive: variable record parameter assignment
  8667. MODULE Test;
  8668. PROCEDURE Procedure (VAR value: RECORD END); BEGIN value := value; END Procedure;
  8669. END Test.
  8670. positive: variable record parameter member assignment
  8671. MODULE Test;
  8672. PROCEDURE Procedure (VAR value: RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8673. END Test.
  8674. positive: variable object parameter assignment
  8675. MODULE Test;
  8676. PROCEDURE Procedure (VAR value: OBJECT END); BEGIN value := value; END Procedure;
  8677. END Test.
  8678. positive: variable object parameter member assignment
  8679. MODULE Test;
  8680. PROCEDURE Procedure (VAR value: OBJECT VAR member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8681. END Test.
  8682. positive: variable base object parameter assignment
  8683. MODULE Test;
  8684. PROCEDURE Procedure (VAR value: OBJECT); BEGIN value := value; END Procedure;
  8685. END Test.
  8686. positive: variable pointer to array parameter assignment
  8687. MODULE Test;
  8688. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8689. END Test.
  8690. positive: variable pointer to array parameter element assignment
  8691. MODULE Test;
  8692. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8693. END Test.
  8694. positive: variable pointer to open array parameter assignment
  8695. MODULE Test;
  8696. PROCEDURE Procedure (VAR value: POINTER TO ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8697. END Test.
  8698. positive: variable pointer to open array parameter element assignment
  8699. MODULE Test;
  8700. PROCEDURE Procedure (VAR value: POINTER TO ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8701. END Test.
  8702. positive: variable pointer to record parameter assignment
  8703. MODULE Test;
  8704. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); BEGIN value := value; END Procedure;
  8705. END Test.
  8706. positive: variable pointer to record parameter member assignment
  8707. MODULE Test;
  8708. PROCEDURE Procedure (VAR value: POINTER TO RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8709. END Test.
  8710. positive: variable procedure parameter assignment
  8711. MODULE Test;
  8712. PROCEDURE Procedure (VAR value: PROCEDURE); BEGIN value := value; END Procedure;
  8713. END Test.
  8714. negative: constant boolean parameter assignment
  8715. MODULE Test;
  8716. PROCEDURE Procedure (CONST value: BOOLEAN); BEGIN value := value; END Procedure;
  8717. END Test.
  8718. negative: constant char parameter assignment
  8719. MODULE Test;
  8720. PROCEDURE Procedure (CONST value: CHAR); BEGIN value := value; END Procedure;
  8721. END Test.
  8722. negative: constant short integer parameter assignment
  8723. MODULE Test;
  8724. PROCEDURE Procedure (CONST value: SHORTINT); BEGIN value := value; END Procedure;
  8725. END Test.
  8726. negative: constant integer parameter assignment
  8727. MODULE Test;
  8728. PROCEDURE Procedure (CONST value: INTEGER); BEGIN value := value; END Procedure;
  8729. END Test.
  8730. negative: constant long integer parameter assignment
  8731. MODULE Test;
  8732. PROCEDURE Procedure (CONST value: LONGINT); BEGIN value := value; END Procedure;
  8733. END Test.
  8734. negative: constant huge integer parameter assignment
  8735. MODULE Test;
  8736. PROCEDURE Procedure (CONST value: HUGEINT); BEGIN value := value; END Procedure;
  8737. END Test.
  8738. negative: constant real parameter assignment
  8739. MODULE Test;
  8740. PROCEDURE Procedure (CONST value: REAL); BEGIN value := value; END Procedure;
  8741. END Test.
  8742. negative: constant long real parameter assignment
  8743. MODULE Test;
  8744. PROCEDURE Procedure (CONST value: LONGREAL); BEGIN value := value; END Procedure;
  8745. END Test.
  8746. negative: constant set parameter assignment
  8747. MODULE Test;
  8748. PROCEDURE Procedure (CONST value: SET); BEGIN value := value; END Procedure;
  8749. END Test.
  8750. negative: constant array parameter assignment
  8751. MODULE Test;
  8752. PROCEDURE Procedure (CONST value: ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8753. END Test.
  8754. negative: constant array parameter element assignment
  8755. MODULE Test;
  8756. PROCEDURE Procedure (CONST value: ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8757. END Test.
  8758. negative: constant open array parameter assignment
  8759. MODULE Test;
  8760. PROCEDURE Procedure (CONST value: ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8761. END Test.
  8762. negative: constant open array parameter element assignment
  8763. MODULE Test;
  8764. PROCEDURE Procedure (CONST value: ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8765. END Test.
  8766. negative: constant record parameter assignment
  8767. MODULE Test;
  8768. PROCEDURE Procedure (CONST value: RECORD END); BEGIN value := value; END Procedure;
  8769. END Test.
  8770. negative: constant record parameter member assignment
  8771. MODULE Test;
  8772. PROCEDURE Procedure (CONST value: RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8773. END Test.
  8774. negative: constant object parameter assignment
  8775. MODULE Test;
  8776. PROCEDURE Procedure (CONST value: OBJECT END); BEGIN value := value; END Procedure;
  8777. END Test.
  8778. positive: constant object parameter member assignment
  8779. MODULE Test;
  8780. PROCEDURE Procedure (CONST value: OBJECT VAR member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8781. END Test.
  8782. negative: constant base object parameter assignment
  8783. MODULE Test;
  8784. PROCEDURE Procedure (CONST value: OBJECT); BEGIN value := value; END Procedure;
  8785. END Test.
  8786. negative: constant pointer to array parameter assignment
  8787. MODULE Test;
  8788. PROCEDURE Procedure (CONST value: POINTER TO ARRAY 10 OF CHAR); BEGIN value := value; END Procedure;
  8789. END Test.
  8790. positive: constant pointer to array parameter element assignment
  8791. MODULE Test;
  8792. PROCEDURE Procedure (CONST value: POINTER TO ARRAY 10 OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8793. END Test.
  8794. negative: constant pointer to open array parameter assignment
  8795. MODULE Test;
  8796. PROCEDURE Procedure (CONST value: POINTER TO ARRAY OF CHAR); BEGIN value := value; END Procedure;
  8797. END Test.
  8798. positive: constant pointer to open array parameter element assignment
  8799. MODULE Test;
  8800. PROCEDURE Procedure (CONST value: POINTER TO ARRAY OF CHAR); BEGIN value[0] := value[0]; END Procedure;
  8801. END Test.
  8802. negative: constant pointer to record parameter assignment
  8803. MODULE Test;
  8804. PROCEDURE Procedure (CONST value: POINTER TO RECORD END); BEGIN value := value; END Procedure;
  8805. END Test.
  8806. positive: constant pointer to record parameter member assignment
  8807. MODULE Test;
  8808. PROCEDURE Procedure (CONST value: POINTER TO RECORD member: INTEGER END); BEGIN value.member := value.member; END Procedure;
  8809. END Test.
  8810. negative: constant procedure parameter assignment
  8811. MODULE Test;
  8812. PROCEDURE Procedure (CONST value: PROCEDURE); BEGIN value := value; END Procedure;
  8813. END Test.
  8814. positive: calling procedure with boolean parameter with boolean argument
  8815. MODULE Test;
  8816. VAR argument: BOOLEAN;
  8817. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8818. BEGIN Procedure (argument);
  8819. END Test.
  8820. negative: calling procedure with boolean parameter with character argument
  8821. MODULE Test;
  8822. VAR argument: CHAR;
  8823. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8824. BEGIN Procedure (argument);
  8825. END Test.
  8826. negative: calling procedure with boolean parameter with short integer argument
  8827. MODULE Test;
  8828. VAR argument: SHORTINT;
  8829. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8830. BEGIN Procedure (argument);
  8831. END Test.
  8832. negative: calling procedure with boolean parameter with integer argument
  8833. MODULE Test;
  8834. VAR argument: INTEGER;
  8835. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8836. BEGIN Procedure (argument);
  8837. END Test.
  8838. negative: calling procedure with boolean parameter with long integer argument
  8839. MODULE Test;
  8840. VAR argument: LONGINT;
  8841. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8842. BEGIN Procedure (argument);
  8843. END Test.
  8844. negative: calling procedure with boolean parameter with huge integer argument
  8845. MODULE Test;
  8846. VAR argument: HUGEINT;
  8847. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8848. BEGIN Procedure (argument);
  8849. END Test.
  8850. negative: calling procedure with boolean parameter with real argument
  8851. MODULE Test;
  8852. VAR argument: REAL;
  8853. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8854. BEGIN Procedure (argument);
  8855. END Test.
  8856. negative: calling procedure with boolean parameter with long real argument
  8857. MODULE Test;
  8858. VAR argument: LONGREAL;
  8859. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8860. BEGIN Procedure (argument);
  8861. END Test.
  8862. negative: calling procedure with boolean parameter with set argument
  8863. MODULE Test;
  8864. VAR argument: SET;
  8865. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8866. BEGIN Procedure (argument);
  8867. END Test.
  8868. negative: calling procedure with boolean parameter with array argument
  8869. MODULE Test;
  8870. VAR argument: ARRAY 10 OF CHAR;
  8871. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8872. BEGIN Procedure (argument);
  8873. END Test.
  8874. negative: calling procedure with boolean parameter with record argument
  8875. MODULE Test;
  8876. VAR argument: RECORD END;
  8877. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8878. BEGIN Procedure (argument);
  8879. END Test.
  8880. negative: calling procedure with boolean parameter with object argument
  8881. MODULE Test;
  8882. VAR argument: OBJECT END;
  8883. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8884. BEGIN Procedure (argument);
  8885. END Test.
  8886. negative: calling procedure with boolean parameter with base object argument
  8887. MODULE Test;
  8888. VAR argument: OBJECT;
  8889. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8890. BEGIN Procedure (argument);
  8891. END Test.
  8892. negative: calling procedure with boolean parameter with pointer to array argument
  8893. MODULE Test;
  8894. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  8895. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8896. BEGIN Procedure (argument);
  8897. END Test.
  8898. negative: calling procedure with boolean parameter with pointer to record argument
  8899. MODULE Test;
  8900. VAR argument: POINTER TO RECORD END;
  8901. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8902. BEGIN Procedure (argument);
  8903. END Test.
  8904. negative: calling procedure with boolean parameter with procedure argument
  8905. MODULE Test;
  8906. VAR argument: PROCEDURE;
  8907. PROCEDURE Procedure (value: BOOLEAN); END Procedure;
  8908. BEGIN Procedure (argument);
  8909. END Test.
  8910. negative: calling procedure with character parameter with boolean argument
  8911. MODULE Test;
  8912. VAR argument: BOOLEAN;
  8913. PROCEDURE Procedure (value: CHAR); END Procedure;
  8914. BEGIN Procedure (argument);
  8915. END Test.
  8916. positive: calling procedure with character parameter with character argument
  8917. MODULE Test;
  8918. VAR argument: CHAR;
  8919. PROCEDURE Procedure (value: CHAR); END Procedure;
  8920. BEGIN Procedure (argument);
  8921. END Test.
  8922. negative: calling procedure with character parameter with short integer argument
  8923. MODULE Test;
  8924. VAR argument: SHORTINT;
  8925. PROCEDURE Procedure (value: CHAR); END Procedure;
  8926. BEGIN Procedure (argument);
  8927. END Test.
  8928. negative: calling procedure with character parameter with integer argument
  8929. MODULE Test;
  8930. VAR argument: INTEGER;
  8931. PROCEDURE Procedure (value: CHAR); END Procedure;
  8932. BEGIN Procedure (argument);
  8933. END Test.
  8934. negative: calling procedure with character parameter with long integer argument
  8935. MODULE Test;
  8936. VAR argument: LONGINT;
  8937. PROCEDURE Procedure (value: CHAR); END Procedure;
  8938. BEGIN Procedure (argument);
  8939. END Test.
  8940. negative: calling procedure with character parameter with huge integer argument
  8941. MODULE Test;
  8942. VAR argument: HUGEINT;
  8943. PROCEDURE Procedure (value: CHAR); END Procedure;
  8944. BEGIN Procedure (argument);
  8945. END Test.
  8946. negative: calling procedure with character parameter with real argument
  8947. MODULE Test;
  8948. VAR argument: REAL;
  8949. PROCEDURE Procedure (value: CHAR); END Procedure;
  8950. BEGIN Procedure (argument);
  8951. END Test.
  8952. negative: calling procedure with character parameter with long real argument
  8953. MODULE Test;
  8954. VAR argument: LONGREAL;
  8955. PROCEDURE Procedure (value: CHAR); END Procedure;
  8956. BEGIN Procedure (argument);
  8957. END Test.
  8958. negative: calling procedure with character parameter with set argument
  8959. MODULE Test;
  8960. VAR argument: SET;
  8961. PROCEDURE Procedure (value: CHAR); END Procedure;
  8962. BEGIN Procedure (argument);
  8963. END Test.
  8964. negative: calling procedure with character parameter with array argument
  8965. MODULE Test;
  8966. VAR argument: ARRAY 10 OF CHAR;
  8967. PROCEDURE Procedure (value: CHAR); END Procedure;
  8968. BEGIN Procedure (argument);
  8969. END Test.
  8970. negative: calling procedure with character parameter with record argument
  8971. MODULE Test;
  8972. VAR argument: RECORD END;
  8973. PROCEDURE Procedure (value: CHAR); END Procedure;
  8974. BEGIN Procedure (argument);
  8975. END Test.
  8976. negative: calling procedure with character parameter with object argument
  8977. MODULE Test;
  8978. VAR argument: OBJECT END;
  8979. PROCEDURE Procedure (value: CHAR); END Procedure;
  8980. BEGIN Procedure (argument);
  8981. END Test.
  8982. negative: calling procedure with character parameter with base object argument
  8983. MODULE Test;
  8984. VAR argument: OBJECT;
  8985. PROCEDURE Procedure (value: CHAR); END Procedure;
  8986. BEGIN Procedure (argument);
  8987. END Test.
  8988. negative: calling procedure with character parameter with pointer to array argument
  8989. MODULE Test;
  8990. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  8991. PROCEDURE Procedure (value: CHAR); END Procedure;
  8992. BEGIN Procedure (argument);
  8993. END Test.
  8994. negative: calling procedure with character parameter with pointer to record argument
  8995. MODULE Test;
  8996. VAR argument: POINTER TO RECORD END;
  8997. PROCEDURE Procedure (value: CHAR); END Procedure;
  8998. BEGIN Procedure (argument);
  8999. END Test.
  9000. negative: calling procedure with character parameter with procedure argument
  9001. MODULE Test;
  9002. VAR argument: PROCEDURE;
  9003. PROCEDURE Procedure (value: CHAR); END Procedure;
  9004. BEGIN Procedure (argument);
  9005. END Test.
  9006. negative: calling procedure with short integer parameter with boolean argument
  9007. MODULE Test;
  9008. VAR argument: BOOLEAN;
  9009. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9010. BEGIN Procedure (argument);
  9011. END Test.
  9012. negative: calling procedure with short integer parameter with character argument
  9013. MODULE Test;
  9014. VAR argument: CHAR;
  9015. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9016. BEGIN Procedure (argument);
  9017. END Test.
  9018. positive: calling procedure with short integer parameter with short integer argument
  9019. MODULE Test;
  9020. VAR argument: SHORTINT;
  9021. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9022. BEGIN Procedure (argument);
  9023. END Test.
  9024. negative: calling procedure with short integer parameter with integer argument
  9025. MODULE Test;
  9026. VAR argument: INTEGER;
  9027. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9028. BEGIN Procedure (argument);
  9029. END Test.
  9030. negative: calling procedure with short integer parameter with long integer argument
  9031. MODULE Test;
  9032. VAR argument: LONGINT;
  9033. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9034. BEGIN Procedure (argument);
  9035. END Test.
  9036. negative: calling procedure with short integer parameter with huge integer argument
  9037. MODULE Test;
  9038. VAR argument: HUGEINT;
  9039. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9040. BEGIN Procedure (argument);
  9041. END Test.
  9042. negative: calling procedure with short integer parameter with real argument
  9043. MODULE Test;
  9044. VAR argument: REAL;
  9045. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9046. BEGIN Procedure (argument);
  9047. END Test.
  9048. negative: calling procedure with short integer parameter with long real argument
  9049. MODULE Test;
  9050. VAR argument: LONGREAL;
  9051. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9052. BEGIN Procedure (argument);
  9053. END Test.
  9054. negative: calling procedure with short integer parameter with set argument
  9055. MODULE Test;
  9056. VAR argument: SET;
  9057. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9058. BEGIN Procedure (argument);
  9059. END Test.
  9060. negative: calling procedure with short integer parameter with array argument
  9061. MODULE Test;
  9062. VAR argument: ARRAY 10 OF CHAR;
  9063. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9064. BEGIN Procedure (argument);
  9065. END Test.
  9066. negative: calling procedure with short integer parameter with record argument
  9067. MODULE Test;
  9068. VAR argument: RECORD END;
  9069. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9070. BEGIN Procedure (argument);
  9071. END Test.
  9072. negative: calling procedure with short integer parameter with object argument
  9073. MODULE Test;
  9074. VAR argument: OBJECT END;
  9075. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9076. BEGIN Procedure (argument);
  9077. END Test.
  9078. negative: calling procedure with short integer parameter with base object argument
  9079. MODULE Test;
  9080. VAR argument: OBJECT;
  9081. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9082. BEGIN Procedure (argument);
  9083. END Test.
  9084. negative: calling procedure with short integer parameter with pointer to array argument
  9085. MODULE Test;
  9086. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9087. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9088. BEGIN Procedure (argument);
  9089. END Test.
  9090. negative: calling procedure with short integer parameter with pointer to record argument
  9091. MODULE Test;
  9092. VAR argument: POINTER TO RECORD END;
  9093. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9094. BEGIN Procedure (argument);
  9095. END Test.
  9096. negative: calling procedure with short integer parameter with procedure argument
  9097. MODULE Test;
  9098. VAR argument: PROCEDURE;
  9099. PROCEDURE Procedure (value: SHORTINT); END Procedure;
  9100. BEGIN Procedure (argument);
  9101. END Test.
  9102. negative: calling procedure with integer parameter with boolean argument
  9103. MODULE Test;
  9104. VAR argument: BOOLEAN;
  9105. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9106. BEGIN Procedure (argument);
  9107. END Test.
  9108. negative: calling procedure with integer parameter with character argument
  9109. MODULE Test;
  9110. VAR argument: CHAR;
  9111. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9112. BEGIN Procedure (argument);
  9113. END Test.
  9114. positive: calling procedure with integer parameter with short integer argument
  9115. MODULE Test;
  9116. VAR argument: SHORTINT;
  9117. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9118. BEGIN Procedure (argument);
  9119. END Test.
  9120. positive: calling procedure with integer parameter with integer argument
  9121. MODULE Test;
  9122. VAR argument: INTEGER;
  9123. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9124. BEGIN Procedure (argument);
  9125. END Test.
  9126. negative: calling procedure with integer parameter with long integer argument
  9127. MODULE Test;
  9128. VAR argument: LONGINT;
  9129. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9130. BEGIN Procedure (argument);
  9131. END Test.
  9132. negative: calling procedure with integer parameter with huge integer argument
  9133. MODULE Test;
  9134. VAR argument: HUGEINT;
  9135. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9136. BEGIN Procedure (argument);
  9137. END Test.
  9138. negative: calling procedure with integer parameter with real argument
  9139. MODULE Test;
  9140. VAR argument: REAL;
  9141. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9142. BEGIN Procedure (argument);
  9143. END Test.
  9144. negative: calling procedure with integer parameter with long real argument
  9145. MODULE Test;
  9146. VAR argument: LONGREAL;
  9147. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9148. BEGIN Procedure (argument);
  9149. END Test.
  9150. negative: calling procedure with integer parameter with set argument
  9151. MODULE Test;
  9152. VAR argument: SET;
  9153. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9154. BEGIN Procedure (argument);
  9155. END Test.
  9156. negative: calling procedure with integer parameter with array argument
  9157. MODULE Test;
  9158. VAR argument: ARRAY 10 OF CHAR;
  9159. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9160. BEGIN Procedure (argument);
  9161. END Test.
  9162. negative: calling procedure with integer parameter with record argument
  9163. MODULE Test;
  9164. VAR argument: RECORD END;
  9165. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9166. BEGIN Procedure (argument);
  9167. END Test.
  9168. negative: calling procedure with integer parameter with object argument
  9169. MODULE Test;
  9170. VAR argument: OBJECT END;
  9171. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9172. BEGIN Procedure (argument);
  9173. END Test.
  9174. negative: calling procedure with integer parameter with base object argument
  9175. MODULE Test;
  9176. VAR argument: OBJECT;
  9177. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9178. BEGIN Procedure (argument);
  9179. END Test.
  9180. negative: calling procedure with integer parameter with pointer to array argument
  9181. MODULE Test;
  9182. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9183. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9184. BEGIN Procedure (argument);
  9185. END Test.
  9186. negative: calling procedure with integer parameter with pointer to record argument
  9187. MODULE Test;
  9188. VAR argument: POINTER TO RECORD END;
  9189. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9190. BEGIN Procedure (argument);
  9191. END Test.
  9192. negative: calling procedure with integer parameter with procedure argument
  9193. MODULE Test;
  9194. VAR argument: PROCEDURE;
  9195. PROCEDURE Procedure (value: INTEGER); END Procedure;
  9196. BEGIN Procedure (argument);
  9197. END Test.
  9198. negative: calling procedure with long integer parameter with boolean argument
  9199. MODULE Test;
  9200. VAR argument: BOOLEAN;
  9201. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9202. BEGIN Procedure (argument);
  9203. END Test.
  9204. negative: calling procedure with long integer parameter with character argument
  9205. MODULE Test;
  9206. VAR argument: CHAR;
  9207. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9208. BEGIN Procedure (argument);
  9209. END Test.
  9210. positive: calling procedure with long integer parameter with short integer argument
  9211. MODULE Test;
  9212. VAR argument: SHORTINT;
  9213. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9214. BEGIN Procedure (argument);
  9215. END Test.
  9216. positive: calling procedure with long integer parameter with integer argument
  9217. MODULE Test;
  9218. VAR argument: INTEGER;
  9219. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9220. BEGIN Procedure (argument);
  9221. END Test.
  9222. positive: calling procedure with long integer parameter with long integer argument
  9223. MODULE Test;
  9224. VAR argument: LONGINT;
  9225. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9226. BEGIN Procedure (argument);
  9227. END Test.
  9228. negative: calling procedure with long integer parameter with huge integer argument
  9229. MODULE Test;
  9230. VAR argument: HUGEINT;
  9231. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9232. BEGIN Procedure (argument);
  9233. END Test.
  9234. negative: calling procedure with long integer parameter with real argument
  9235. MODULE Test;
  9236. VAR argument: REAL;
  9237. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9238. BEGIN Procedure (argument);
  9239. END Test.
  9240. negative: calling procedure with long integer parameter with long real argument
  9241. MODULE Test;
  9242. VAR argument: LONGREAL;
  9243. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9244. BEGIN Procedure (argument);
  9245. END Test.
  9246. negative: calling procedure with long integer parameter with set argument
  9247. MODULE Test;
  9248. VAR argument: SET;
  9249. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9250. BEGIN Procedure (argument);
  9251. END Test.
  9252. negative: calling procedure with long integer parameter with array argument
  9253. MODULE Test;
  9254. VAR argument: ARRAY 10 OF CHAR;
  9255. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9256. BEGIN Procedure (argument);
  9257. END Test.
  9258. negative: calling procedure with long integer parameter with record argument
  9259. MODULE Test;
  9260. VAR argument: RECORD END;
  9261. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9262. BEGIN Procedure (argument);
  9263. END Test.
  9264. negative: calling procedure with long integer parameter with object argument
  9265. MODULE Test;
  9266. VAR argument: OBJECT END;
  9267. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9268. BEGIN Procedure (argument);
  9269. END Test.
  9270. negative: calling procedure with long integer parameter with base object argument
  9271. MODULE Test;
  9272. VAR argument: OBJECT;
  9273. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9274. BEGIN Procedure (argument);
  9275. END Test.
  9276. negative: calling procedure with long integer parameter with pointer to array argument
  9277. MODULE Test;
  9278. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9279. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9280. BEGIN Procedure (argument);
  9281. END Test.
  9282. negative: calling procedure with long integer parameter with pointer to record argument
  9283. MODULE Test;
  9284. VAR argument: POINTER TO RECORD END;
  9285. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9286. BEGIN Procedure (argument);
  9287. END Test.
  9288. negative: calling procedure with long integer parameter with procedure argument
  9289. MODULE Test;
  9290. VAR argument: PROCEDURE;
  9291. PROCEDURE Procedure (value: LONGINT); END Procedure;
  9292. BEGIN Procedure (argument);
  9293. END Test.
  9294. negative: calling procedure with huge integer parameter with boolean argument
  9295. MODULE Test;
  9296. VAR argument: BOOLEAN;
  9297. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9298. BEGIN Procedure (argument);
  9299. END Test.
  9300. negative: calling procedure with huge integer parameter with character argument
  9301. MODULE Test;
  9302. VAR argument: CHAR;
  9303. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9304. BEGIN Procedure (argument);
  9305. END Test.
  9306. positive: calling procedure with huge integer parameter with short integer argument
  9307. MODULE Test;
  9308. VAR argument: SHORTINT;
  9309. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9310. BEGIN Procedure (argument);
  9311. END Test.
  9312. positive: calling procedure with huge integer parameter with integer argument
  9313. MODULE Test;
  9314. VAR argument: INTEGER;
  9315. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9316. BEGIN Procedure (argument);
  9317. END Test.
  9318. positive: calling procedure with huge integer parameter with long integer argument
  9319. MODULE Test;
  9320. VAR argument: LONGINT;
  9321. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9322. BEGIN Procedure (argument);
  9323. END Test.
  9324. positive: calling procedure with huge integer parameter with huge integer argument
  9325. MODULE Test;
  9326. VAR argument: HUGEINT;
  9327. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9328. BEGIN Procedure (argument);
  9329. END Test.
  9330. negative: calling procedure with huge integer parameter with real argument
  9331. MODULE Test;
  9332. VAR argument: REAL;
  9333. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9334. BEGIN Procedure (argument);
  9335. END Test.
  9336. negative: calling procedure with huge integer parameter with long real argument
  9337. MODULE Test;
  9338. VAR argument: LONGREAL;
  9339. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9340. BEGIN Procedure (argument);
  9341. END Test.
  9342. negative: calling procedure with huge integer parameter with set argument
  9343. MODULE Test;
  9344. VAR argument: SET;
  9345. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9346. BEGIN Procedure (argument);
  9347. END Test.
  9348. negative: calling procedure with huge integer parameter with array argument
  9349. MODULE Test;
  9350. VAR argument: ARRAY 10 OF CHAR;
  9351. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9352. BEGIN Procedure (argument);
  9353. END Test.
  9354. negative: calling procedure with huge integer parameter with record argument
  9355. MODULE Test;
  9356. VAR argument: RECORD END;
  9357. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9358. BEGIN Procedure (argument);
  9359. END Test.
  9360. negative: calling procedure with huge integer parameter with object argument
  9361. MODULE Test;
  9362. VAR argument: OBJECT END;
  9363. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9364. BEGIN Procedure (argument);
  9365. END Test.
  9366. negative: calling procedure with huge integer parameter with base object argument
  9367. MODULE Test;
  9368. VAR argument: OBJECT;
  9369. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9370. BEGIN Procedure (argument);
  9371. END Test.
  9372. negative: calling procedure with huge integer parameter with pointer to array argument
  9373. MODULE Test;
  9374. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9375. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9376. BEGIN Procedure (argument);
  9377. END Test.
  9378. negative: calling procedure with huge integer parameter with pointer to record argument
  9379. MODULE Test;
  9380. VAR argument: POINTER TO RECORD END;
  9381. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9382. BEGIN Procedure (argument);
  9383. END Test.
  9384. negative: calling procedure with huge integer parameter with procedure argument
  9385. MODULE Test;
  9386. VAR argument: PROCEDURE;
  9387. PROCEDURE Procedure (value: HUGEINT); END Procedure;
  9388. BEGIN Procedure (argument);
  9389. END Test.
  9390. negative: calling procedure with real parameter with boolean argument
  9391. MODULE Test;
  9392. VAR argument: BOOLEAN;
  9393. PROCEDURE Procedure (value: REAL); END Procedure;
  9394. BEGIN Procedure (argument);
  9395. END Test.
  9396. negative: calling procedure with real parameter with character argument
  9397. MODULE Test;
  9398. VAR argument: CHAR;
  9399. PROCEDURE Procedure (value: REAL); END Procedure;
  9400. BEGIN Procedure (argument);
  9401. END Test.
  9402. positive: calling procedure with real parameter with short integer argument
  9403. MODULE Test;
  9404. VAR argument: SHORTINT;
  9405. PROCEDURE Procedure (value: REAL); END Procedure;
  9406. BEGIN Procedure (argument);
  9407. END Test.
  9408. positive: calling procedure with real parameter with integer argument
  9409. MODULE Test;
  9410. VAR argument: INTEGER;
  9411. PROCEDURE Procedure (value: REAL); END Procedure;
  9412. BEGIN Procedure (argument);
  9413. END Test.
  9414. positive: calling procedure with real parameter with long integer argument
  9415. MODULE Test;
  9416. VAR argument: LONGINT;
  9417. PROCEDURE Procedure (value: REAL); END Procedure;
  9418. BEGIN Procedure (argument);
  9419. END Test.
  9420. positive: calling procedure with real parameter with huge integer argument
  9421. MODULE Test;
  9422. VAR argument: HUGEINT;
  9423. PROCEDURE Procedure (value: REAL); END Procedure;
  9424. BEGIN Procedure (argument);
  9425. END Test.
  9426. positive: calling procedure with real parameter with real argument
  9427. MODULE Test;
  9428. VAR argument: REAL;
  9429. PROCEDURE Procedure (value: REAL); END Procedure;
  9430. BEGIN Procedure (argument);
  9431. END Test.
  9432. negative: calling procedure with real parameter with long real argument
  9433. MODULE Test;
  9434. VAR argument: LONGREAL;
  9435. PROCEDURE Procedure (value: REAL); END Procedure;
  9436. BEGIN Procedure (argument);
  9437. END Test.
  9438. negative: calling procedure with real parameter with set argument
  9439. MODULE Test;
  9440. VAR argument: SET;
  9441. PROCEDURE Procedure (value: REAL); END Procedure;
  9442. BEGIN Procedure (argument);
  9443. END Test.
  9444. negative: calling procedure with real parameter with array argument
  9445. MODULE Test;
  9446. VAR argument: ARRAY 10 OF CHAR;
  9447. PROCEDURE Procedure (value: REAL); END Procedure;
  9448. BEGIN Procedure (argument);
  9449. END Test.
  9450. negative: calling procedure with real parameter with record argument
  9451. MODULE Test;
  9452. VAR argument: RECORD END;
  9453. PROCEDURE Procedure (value: REAL); END Procedure;
  9454. BEGIN Procedure (argument);
  9455. END Test.
  9456. negative: calling procedure with real parameter with object argument
  9457. MODULE Test;
  9458. VAR argument: OBJECT END;
  9459. PROCEDURE Procedure (value: REAL); END Procedure;
  9460. BEGIN Procedure (argument);
  9461. END Test.
  9462. negative: calling procedure with real parameter with base object argument
  9463. MODULE Test;
  9464. VAR argument: OBJECT;
  9465. PROCEDURE Procedure (value: REAL); END Procedure;
  9466. BEGIN Procedure (argument);
  9467. END Test.
  9468. negative: calling procedure with real parameter with pointer to array argument
  9469. MODULE Test;
  9470. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9471. PROCEDURE Procedure (value: REAL); END Procedure;
  9472. BEGIN Procedure (argument);
  9473. END Test.
  9474. negative: calling procedure with real parameter with pointer to record argument
  9475. MODULE Test;
  9476. VAR argument: POINTER TO RECORD END;
  9477. PROCEDURE Procedure (value: REAL); END Procedure;
  9478. BEGIN Procedure (argument);
  9479. END Test.
  9480. negative: calling procedure with real parameter with procedure argument
  9481. MODULE Test;
  9482. VAR argument: PROCEDURE;
  9483. PROCEDURE Procedure (value: REAL); END Procedure;
  9484. BEGIN Procedure (argument);
  9485. END Test.
  9486. negative: calling procedure with long real parameter with boolean argument
  9487. MODULE Test;
  9488. VAR argument: BOOLEAN;
  9489. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9490. BEGIN Procedure (argument);
  9491. END Test.
  9492. negative: calling procedure with long real parameter with character argument
  9493. MODULE Test;
  9494. VAR argument: CHAR;
  9495. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9496. BEGIN Procedure (argument);
  9497. END Test.
  9498. positive: calling procedure with long real parameter with short integer argument
  9499. MODULE Test;
  9500. VAR argument: SHORTINT;
  9501. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9502. BEGIN Procedure (argument);
  9503. END Test.
  9504. positive: calling procedure with long real parameter with integer argument
  9505. MODULE Test;
  9506. VAR argument: INTEGER;
  9507. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9508. BEGIN Procedure (argument);
  9509. END Test.
  9510. positive: calling procedure with long real parameter with long integer argument
  9511. MODULE Test;
  9512. VAR argument: LONGINT;
  9513. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9514. BEGIN Procedure (argument);
  9515. END Test.
  9516. positive: calling procedure with long real parameter with huge integer argument
  9517. MODULE Test;
  9518. VAR argument: HUGEINT;
  9519. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9520. BEGIN Procedure (argument);
  9521. END Test.
  9522. positive: calling procedure with long real parameter with real argument
  9523. MODULE Test;
  9524. VAR argument: REAL;
  9525. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9526. BEGIN Procedure (argument);
  9527. END Test.
  9528. positive: calling procedure with long real parameter with long real argument
  9529. MODULE Test;
  9530. VAR argument: LONGREAL;
  9531. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9532. BEGIN Procedure (argument);
  9533. END Test.
  9534. negative: calling procedure with long real parameter with set argument
  9535. MODULE Test;
  9536. VAR argument: SET;
  9537. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9538. BEGIN Procedure (argument);
  9539. END Test.
  9540. negative: calling procedure with long real parameter with array argument
  9541. MODULE Test;
  9542. VAR argument: ARRAY 10 OF CHAR;
  9543. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9544. BEGIN Procedure (argument);
  9545. END Test.
  9546. negative: calling procedure with long real parameter with record argument
  9547. MODULE Test;
  9548. VAR argument: RECORD END;
  9549. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9550. BEGIN Procedure (argument);
  9551. END Test.
  9552. negative: calling procedure with long real parameter with object argument
  9553. MODULE Test;
  9554. VAR argument: OBJECT END;
  9555. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9556. BEGIN Procedure (argument);
  9557. END Test.
  9558. negative: calling procedure with long real parameter with base object argument
  9559. MODULE Test;
  9560. VAR argument: OBJECT;
  9561. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9562. BEGIN Procedure (argument);
  9563. END Test.
  9564. negative: calling procedure with long real parameter with pointer to array argument
  9565. MODULE Test;
  9566. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9567. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9568. BEGIN Procedure (argument);
  9569. END Test.
  9570. negative: calling procedure with long real parameter with pointer to record argument
  9571. MODULE Test;
  9572. VAR argument: POINTER TO RECORD END;
  9573. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9574. BEGIN Procedure (argument);
  9575. END Test.
  9576. negative: calling procedure with long real parameter with procedure argument
  9577. MODULE Test;
  9578. VAR argument: PROCEDURE;
  9579. PROCEDURE Procedure (value: LONGREAL); END Procedure;
  9580. BEGIN Procedure (argument);
  9581. END Test.
  9582. negative: calling procedure with set parameter with boolean argument
  9583. MODULE Test;
  9584. VAR argument: BOOLEAN;
  9585. PROCEDURE Procedure (value: SET); END Procedure;
  9586. BEGIN Procedure (argument);
  9587. END Test.
  9588. negative: calling procedure with set parameter with character argument
  9589. MODULE Test;
  9590. VAR argument: CHAR;
  9591. PROCEDURE Procedure (value: SET); END Procedure;
  9592. BEGIN Procedure (argument);
  9593. END Test.
  9594. negative: calling procedure with set parameter with short integer argument
  9595. MODULE Test;
  9596. VAR argument: SHORTINT;
  9597. PROCEDURE Procedure (value: SET); END Procedure;
  9598. BEGIN Procedure (argument);
  9599. END Test.
  9600. negative: calling procedure with set parameter with integer argument
  9601. MODULE Test;
  9602. VAR argument: INTEGER;
  9603. PROCEDURE Procedure (value: SET); END Procedure;
  9604. BEGIN Procedure (argument);
  9605. END Test.
  9606. negative: calling procedure with set parameter with long integer argument
  9607. MODULE Test;
  9608. VAR argument: LONGINT;
  9609. PROCEDURE Procedure (value: SET); END Procedure;
  9610. BEGIN Procedure (argument);
  9611. END Test.
  9612. negative: calling procedure with set parameter with huge integer argument
  9613. MODULE Test;
  9614. VAR argument: HUGEINT;
  9615. PROCEDURE Procedure (value: SET); END Procedure;
  9616. BEGIN Procedure (argument);
  9617. END Test.
  9618. negative: calling procedure with set parameter with real argument
  9619. MODULE Test;
  9620. VAR argument: REAL;
  9621. PROCEDURE Procedure (value: SET); END Procedure;
  9622. BEGIN Procedure (argument);
  9623. END Test.
  9624. negative: calling procedure with set parameter with long real argument
  9625. MODULE Test;
  9626. VAR argument: LONGREAL;
  9627. PROCEDURE Procedure (value: SET); END Procedure;
  9628. BEGIN Procedure (argument);
  9629. END Test.
  9630. positive: calling procedure with set parameter with set argument
  9631. MODULE Test;
  9632. VAR argument: SET;
  9633. PROCEDURE Procedure (value: SET); END Procedure;
  9634. BEGIN Procedure (argument);
  9635. END Test.
  9636. negative: calling procedure with set parameter with array argument
  9637. MODULE Test;
  9638. VAR argument: ARRAY 10 OF CHAR;
  9639. PROCEDURE Procedure (value: SET); END Procedure;
  9640. BEGIN Procedure (argument);
  9641. END Test.
  9642. negative: calling procedure with set parameter with record argument
  9643. MODULE Test;
  9644. VAR argument: RECORD END;
  9645. PROCEDURE Procedure (value: SET); END Procedure;
  9646. BEGIN Procedure (argument);
  9647. END Test.
  9648. negative: calling procedure with set parameter with object argument
  9649. MODULE Test;
  9650. VAR argument: OBJECT END;
  9651. PROCEDURE Procedure (value: SET); END Procedure;
  9652. BEGIN Procedure (argument);
  9653. END Test.
  9654. negative: calling procedure with set parameter with base object argument
  9655. MODULE Test;
  9656. VAR argument: OBJECT;
  9657. PROCEDURE Procedure (value: SET); END Procedure;
  9658. BEGIN Procedure (argument);
  9659. END Test.
  9660. negative: calling procedure with set parameter with pointer to array argument
  9661. MODULE Test;
  9662. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9663. PROCEDURE Procedure (value: SET); END Procedure;
  9664. BEGIN Procedure (argument);
  9665. END Test.
  9666. negative: calling procedure with set parameter with pointer to record argument
  9667. MODULE Test;
  9668. VAR argument: POINTER TO RECORD END;
  9669. PROCEDURE Procedure (value: SET); END Procedure;
  9670. BEGIN Procedure (argument);
  9671. END Test.
  9672. negative: calling procedure with set parameter with procedure argument
  9673. MODULE Test;
  9674. VAR argument: PROCEDURE;
  9675. PROCEDURE Procedure (value: SET); END Procedure;
  9676. BEGIN Procedure (argument);
  9677. END Test.
  9678. negative: calling procedure with array parameter with boolean argument
  9679. MODULE Test;
  9680. VAR argument: BOOLEAN;
  9681. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9682. BEGIN Procedure (argument);
  9683. END Test.
  9684. negative: calling procedure with array parameter with character argument
  9685. MODULE Test;
  9686. VAR argument: CHAR;
  9687. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9688. BEGIN Procedure (argument);
  9689. END Test.
  9690. negative: calling procedure with array parameter with short integer argument
  9691. MODULE Test;
  9692. VAR argument: SHORTINT;
  9693. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9694. BEGIN Procedure (argument);
  9695. END Test.
  9696. negative: calling procedure with array parameter with integer argument
  9697. MODULE Test;
  9698. VAR argument: INTEGER;
  9699. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9700. BEGIN Procedure (argument);
  9701. END Test.
  9702. negative: calling procedure with array parameter with long integer argument
  9703. MODULE Test;
  9704. VAR argument: LONGINT;
  9705. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9706. BEGIN Procedure (argument);
  9707. END Test.
  9708. negative: calling procedure with array parameter with huge integer argument
  9709. MODULE Test;
  9710. VAR argument: HUGEINT;
  9711. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9712. BEGIN Procedure (argument);
  9713. END Test.
  9714. negative: calling procedure with array parameter with real argument
  9715. MODULE Test;
  9716. VAR argument: REAL;
  9717. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9718. BEGIN Procedure (argument);
  9719. END Test.
  9720. negative: calling procedure with array parameter with long real argument
  9721. MODULE Test;
  9722. VAR argument: LONGREAL;
  9723. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9724. BEGIN Procedure (argument);
  9725. END Test.
  9726. negative: calling procedure with array parameter with set argument
  9727. MODULE Test;
  9728. VAR argument: SET;
  9729. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9730. BEGIN Procedure (argument);
  9731. END Test.
  9732. positive: calling procedure with array parameter with array argument
  9733. MODULE Test;
  9734. VAR argument: ARRAY 10 OF CHAR;
  9735. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9736. BEGIN Procedure (argument);
  9737. END Test.
  9738. negative: calling procedure with array parameter with longer array argument
  9739. MODULE Test;
  9740. VAR argument: ARRAY 20 OF CHAR;
  9741. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9742. BEGIN Procedure (argument);
  9743. END Test.
  9744. negative: calling procedure with array parameter with shorter array argument
  9745. MODULE Test;
  9746. VAR argument: ARRAY 10 OF CHAR;
  9747. PROCEDURE Procedure (value: ARRAY 20 OF CHAR); END Procedure;
  9748. BEGIN Procedure (argument);
  9749. END Test.
  9750. negative: calling procedure with array parameter with open array argument
  9751. MODULE Test;
  9752. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9753. PROCEDURE Test (argument: ARRAY OF CHAR); BEGIN Procedure (argument); END Test;
  9754. END Test.
  9755. negative: calling procedure with array parameter with record argument
  9756. MODULE Test;
  9757. VAR argument: RECORD END;
  9758. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9759. BEGIN Procedure (argument);
  9760. END Test.
  9761. negative: calling procedure with array parameter with object argument
  9762. MODULE Test;
  9763. VAR argument: OBJECT END;
  9764. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9765. BEGIN Procedure (argument);
  9766. END Test.
  9767. negative: calling procedure with array parameter with base object argument
  9768. MODULE Test;
  9769. VAR argument: OBJECT;
  9770. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9771. BEGIN Procedure (argument);
  9772. END Test.
  9773. negative: calling procedure with array parameter with pointer to array argument
  9774. MODULE Test;
  9775. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9776. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9777. BEGIN Procedure (argument);
  9778. END Test.
  9779. negative: calling procedure with array parameter with pointer to record argument
  9780. MODULE Test;
  9781. VAR argument: POINTER TO RECORD END;
  9782. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9783. BEGIN Procedure (argument);
  9784. END Test.
  9785. negative: calling procedure with array parameter with procedure argument
  9786. MODULE Test;
  9787. VAR argument: PROCEDURE;
  9788. PROCEDURE Procedure (value: ARRAY 10 OF CHAR); END Procedure;
  9789. BEGIN Procedure (argument);
  9790. END Test.
  9791. negative: calling procedure with open array parameter with boolean argument
  9792. MODULE Test;
  9793. VAR argument: BOOLEAN;
  9794. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9795. BEGIN Procedure (argument);
  9796. END Test.
  9797. negative: calling procedure with open array parameter with character argument
  9798. MODULE Test;
  9799. VAR argument: CHAR;
  9800. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9801. BEGIN Procedure (argument);
  9802. END Test.
  9803. negative: calling procedure with open array parameter with short integer argument
  9804. MODULE Test;
  9805. VAR argument: SHORTINT;
  9806. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9807. BEGIN Procedure (argument);
  9808. END Test.
  9809. negative: calling procedure with open array parameter with integer argument
  9810. MODULE Test;
  9811. VAR argument: INTEGER;
  9812. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9813. BEGIN Procedure (argument);
  9814. END Test.
  9815. negative: calling procedure with open array parameter with long integer argument
  9816. MODULE Test;
  9817. VAR argument: LONGINT;
  9818. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9819. BEGIN Procedure (argument);
  9820. END Test.
  9821. negative: calling procedure with open array parameter with huge integer argument
  9822. MODULE Test;
  9823. VAR argument: HUGEINT;
  9824. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9825. BEGIN Procedure (argument);
  9826. END Test.
  9827. negative: calling procedure with open array parameter with real argument
  9828. MODULE Test;
  9829. VAR argument: REAL;
  9830. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9831. BEGIN Procedure (argument);
  9832. END Test.
  9833. negative: calling procedure with open array parameter with long real argument
  9834. MODULE Test;
  9835. VAR argument: LONGREAL;
  9836. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9837. BEGIN Procedure (argument);
  9838. END Test.
  9839. negative: calling procedure with open array parameter with set argument
  9840. MODULE Test;
  9841. VAR argument: SET;
  9842. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9843. BEGIN Procedure (argument);
  9844. END Test.
  9845. positive: calling procedure with open array parameter with array argument
  9846. MODULE Test;
  9847. VAR argument: ARRAY 10 OF CHAR;
  9848. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9849. BEGIN Procedure (argument);
  9850. END Test.
  9851. positive: calling procedure with open array parameter with open array argument
  9852. MODULE Test;
  9853. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9854. PROCEDURE Test (argument: ARRAY OF CHAR); BEGIN Procedure (argument); END Test;
  9855. END Test.
  9856. negative: calling procedure with open array parameter with record argument
  9857. MODULE Test;
  9858. VAR argument: RECORD END;
  9859. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9860. BEGIN Procedure (argument);
  9861. END Test.
  9862. negative: calling procedure with open array parameter with object argument
  9863. MODULE Test;
  9864. VAR argument: OBJECT END;
  9865. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9866. BEGIN Procedure (argument);
  9867. END Test.
  9868. negative: calling procedure with open array parameter with base object argument
  9869. MODULE Test;
  9870. VAR argument: OBJECT;
  9871. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9872. BEGIN Procedure (argument);
  9873. END Test.
  9874. negative: calling procedure with open array parameter with pointer to array argument
  9875. MODULE Test;
  9876. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9877. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9878. BEGIN Procedure (argument);
  9879. END Test.
  9880. negative: calling procedure with open array parameter with pointer to record argument
  9881. MODULE Test;
  9882. VAR argument: POINTER TO RECORD END;
  9883. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9884. BEGIN Procedure (argument);
  9885. END Test.
  9886. negative: calling procedure with open array parameter with procedure argument
  9887. MODULE Test;
  9888. VAR argument: PROCEDURE;
  9889. PROCEDURE Procedure (value: ARRAY OF CHAR); END Procedure;
  9890. BEGIN Procedure (argument);
  9891. END Test.
  9892. negative: calling procedure with record parameter with boolean argument
  9893. MODULE Test;
  9894. VAR argument: BOOLEAN;
  9895. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9896. BEGIN Procedure (argument);
  9897. END Test.
  9898. negative: calling procedure with record parameter with character argument
  9899. MODULE Test;
  9900. VAR argument: CHAR;
  9901. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9902. BEGIN Procedure (argument);
  9903. END Test.
  9904. negative: calling procedure with record parameter with short integer argument
  9905. MODULE Test;
  9906. VAR argument: SHORTINT;
  9907. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9908. BEGIN Procedure (argument);
  9909. END Test.
  9910. negative: calling procedure with record parameter with integer argument
  9911. MODULE Test;
  9912. VAR argument: INTEGER;
  9913. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9914. BEGIN Procedure (argument);
  9915. END Test.
  9916. negative: calling procedure with record parameter with long integer argument
  9917. MODULE Test;
  9918. VAR argument: LONGINT;
  9919. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9920. BEGIN Procedure (argument);
  9921. END Test.
  9922. negative: calling procedure with record parameter with huge integer argument
  9923. MODULE Test;
  9924. VAR argument: HUGEINT;
  9925. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9926. BEGIN Procedure (argument);
  9927. END Test.
  9928. negative: calling procedure with record parameter with real argument
  9929. MODULE Test;
  9930. VAR argument: REAL;
  9931. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9932. BEGIN Procedure (argument);
  9933. END Test.
  9934. negative: calling procedure with record parameter with long real argument
  9935. MODULE Test;
  9936. VAR argument: LONGREAL;
  9937. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9938. BEGIN Procedure (argument);
  9939. END Test.
  9940. negative: calling procedure with record parameter with set argument
  9941. MODULE Test;
  9942. VAR argument: SET;
  9943. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9944. BEGIN Procedure (argument);
  9945. END Test.
  9946. negative: calling procedure with record parameter with array argument
  9947. MODULE Test;
  9948. VAR argument: ARRAY 10 OF CHAR;
  9949. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9950. BEGIN Procedure (argument);
  9951. END Test.
  9952. positive: calling procedure with record parameter with record argument
  9953. MODULE Test;
  9954. TYPE Record = RECORD END;
  9955. VAR argument: Record;
  9956. PROCEDURE Procedure (value: Record); END Procedure;
  9957. BEGIN Procedure (argument);
  9958. END Test.
  9959. positive: calling procedure with record parameter with compatible record argument
  9960. MODULE Test;
  9961. TYPE Record = RECORD END;
  9962. VAR argument: RECORD (Record) END;
  9963. PROCEDURE Procedure (value: Record); END Procedure;
  9964. BEGIN Procedure (argument);
  9965. END Test.
  9966. negative: calling procedure with record parameter with incompatible record argument
  9967. MODULE Test;
  9968. TYPE Record = RECORD END;
  9969. VAR argument: Record;
  9970. PROCEDURE Procedure (value: RECORD (Record) END); END Procedure;
  9971. BEGIN Procedure (argument);
  9972. END Test.
  9973. negative: calling procedure with record parameter with object argument
  9974. MODULE Test;
  9975. VAR argument: OBJECT END;
  9976. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9977. BEGIN Procedure (argument);
  9978. END Test.
  9979. negative: calling procedure with record parameter with base object argument
  9980. MODULE Test;
  9981. VAR argument: OBJECT;
  9982. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9983. BEGIN Procedure (argument);
  9984. END Test.
  9985. negative: calling procedure with record parameter with pointer to array argument
  9986. MODULE Test;
  9987. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  9988. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9989. BEGIN Procedure (argument);
  9990. END Test.
  9991. negative: calling procedure with record parameter with pointer to record argument
  9992. MODULE Test;
  9993. VAR argument: POINTER TO RECORD END;
  9994. PROCEDURE Procedure (value: RECORD END); END Procedure;
  9995. BEGIN Procedure (argument);
  9996. END Test.
  9997. negative: calling procedure with record parameter with procedure argument
  9998. MODULE Test;
  9999. VAR argument: PROCEDURE;
  10000. PROCEDURE Procedure (value: RECORD END); END Procedure;
  10001. BEGIN Procedure (argument);
  10002. END Test.
  10003. negative: calling procedure with object parameter with boolean argument
  10004. MODULE Test;
  10005. VAR argument: BOOLEAN;
  10006. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10007. BEGIN Procedure (argument);
  10008. END Test.
  10009. negative: calling procedure with object parameter with character argument
  10010. MODULE Test;
  10011. VAR argument: CHAR;
  10012. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10013. BEGIN Procedure (argument);
  10014. END Test.
  10015. negative: calling procedure with object parameter with short integer argument
  10016. MODULE Test;
  10017. VAR argument: SHORTINT;
  10018. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10019. BEGIN Procedure (argument);
  10020. END Test.
  10021. negative: calling procedure with object parameter with integer argument
  10022. MODULE Test;
  10023. VAR argument: INTEGER;
  10024. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10025. BEGIN Procedure (argument);
  10026. END Test.
  10027. negative: calling procedure with object parameter with long integer argument
  10028. MODULE Test;
  10029. VAR argument: LONGINT;
  10030. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10031. BEGIN Procedure (argument);
  10032. END Test.
  10033. negative: calling procedure with object parameter with huge integer argument
  10034. MODULE Test;
  10035. VAR argument: HUGEINT;
  10036. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10037. BEGIN Procedure (argument);
  10038. END Test.
  10039. negative: calling procedure with object parameter with real argument
  10040. MODULE Test;
  10041. VAR argument: REAL;
  10042. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10043. BEGIN Procedure (argument);
  10044. END Test.
  10045. negative: calling procedure with object parameter with long real argument
  10046. MODULE Test;
  10047. VAR argument: LONGREAL;
  10048. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10049. BEGIN Procedure (argument);
  10050. END Test.
  10051. negative: calling procedure with object parameter with set argument
  10052. MODULE Test;
  10053. VAR argument: SET;
  10054. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10055. BEGIN Procedure (argument);
  10056. END Test.
  10057. negative: calling procedure with object parameter with array argument
  10058. MODULE Test;
  10059. VAR argument: ARRAY 10 OF CHAR;
  10060. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10061. BEGIN Procedure (argument);
  10062. END Test.
  10063. negative: calling procedure with object parameter with record argument
  10064. MODULE Test;
  10065. VAR argument: RECORD END;
  10066. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10067. BEGIN Procedure (argument);
  10068. END Test.
  10069. positive: calling procedure with object parameter with object argument
  10070. MODULE Test;
  10071. TYPE Object = OBJECT END Object;
  10072. VAR argument: Object;
  10073. PROCEDURE Procedure (value: Object); END Procedure;
  10074. BEGIN Procedure (argument);
  10075. END Test.
  10076. positive: calling procedure with object parameter with compatible object argument
  10077. MODULE Test;
  10078. TYPE Object = OBJECT END Object;
  10079. VAR argument: OBJECT (Object) END;
  10080. PROCEDURE Procedure (value: Object); END Procedure;
  10081. BEGIN Procedure (argument);
  10082. END Test.
  10083. negative: calling procedure with object parameter with incompatible object argument
  10084. MODULE Test;
  10085. TYPE Object = OBJECT END Object;
  10086. VAR argument: Object;
  10087. PROCEDURE Procedure (value: OBJECT (Object) END); END Procedure;
  10088. BEGIN Procedure (argument);
  10089. END Test.
  10090. negative: calling procedure with object parameter with base object argument
  10091. MODULE Test;
  10092. VAR argument: OBJECT;
  10093. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10094. BEGIN Procedure (argument);
  10095. END Test.
  10096. negative: calling procedure with object parameter with pointer to array argument
  10097. MODULE Test;
  10098. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10099. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10100. BEGIN Procedure (argument);
  10101. END Test.
  10102. negative: calling procedure with object parameter with pointer to record argument
  10103. MODULE Test;
  10104. VAR argument: POINTER TO RECORD END;
  10105. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10106. BEGIN Procedure (argument);
  10107. END Test.
  10108. negative: calling procedure with object parameter with procedure argument
  10109. MODULE Test;
  10110. VAR argument: PROCEDURE;
  10111. PROCEDURE Procedure (value: OBJECT END); END Procedure;
  10112. BEGIN Procedure (argument);
  10113. END Test.
  10114. negative: calling procedure with base object parameter with boolean argument
  10115. MODULE Test;
  10116. VAR argument: BOOLEAN;
  10117. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10118. BEGIN Procedure (argument);
  10119. END Test.
  10120. negative: calling procedure with base object parameter with character argument
  10121. MODULE Test;
  10122. VAR argument: CHAR;
  10123. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10124. BEGIN Procedure (argument);
  10125. END Test.
  10126. negative: calling procedure with base object parameter with short integer argument
  10127. MODULE Test;
  10128. VAR argument: SHORTINT;
  10129. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10130. BEGIN Procedure (argument);
  10131. END Test.
  10132. negative: calling procedure with base object parameter with integer argument
  10133. MODULE Test;
  10134. VAR argument: INTEGER;
  10135. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10136. BEGIN Procedure (argument);
  10137. END Test.
  10138. negative: calling procedure with base object parameter with long integer argument
  10139. MODULE Test;
  10140. VAR argument: LONGINT;
  10141. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10142. BEGIN Procedure (argument);
  10143. END Test.
  10144. negative: calling procedure with base object parameter with huge integer argument
  10145. MODULE Test;
  10146. VAR argument: HUGEINT;
  10147. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10148. BEGIN Procedure (argument);
  10149. END Test.
  10150. negative: calling procedure with base object parameter with real argument
  10151. MODULE Test;
  10152. VAR argument: REAL;
  10153. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10154. BEGIN Procedure (argument);
  10155. END Test.
  10156. negative: calling procedure with base object parameter with long real argument
  10157. MODULE Test;
  10158. VAR argument: LONGREAL;
  10159. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10160. BEGIN Procedure (argument);
  10161. END Test.
  10162. negative: calling procedure with base object parameter with set argument
  10163. MODULE Test;
  10164. VAR argument: SET;
  10165. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10166. BEGIN Procedure (argument);
  10167. END Test.
  10168. negative: calling procedure with base object parameter with array argument
  10169. MODULE Test;
  10170. VAR argument: ARRAY 10 OF CHAR;
  10171. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10172. BEGIN Procedure (argument);
  10173. END Test.
  10174. negative: calling procedure with base object parameter with record argument
  10175. MODULE Test;
  10176. VAR argument: RECORD END;
  10177. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10178. BEGIN Procedure (argument);
  10179. END Test.
  10180. positive: calling procedure with base object parameter with object argument
  10181. MODULE Test;
  10182. VAR argument: OBJECT END;
  10183. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10184. BEGIN Procedure (argument);
  10185. END Test.
  10186. positive: calling procedure with base object parameter with base object argument
  10187. MODULE Test;
  10188. VAR argument: OBJECT;
  10189. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10190. BEGIN Procedure (argument);
  10191. END Test.
  10192. positive: calling procedure with base object parameter with pointer to record argument
  10193. MODULE Test;
  10194. VAR argument: POINTER TO RECORD END;
  10195. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10196. BEGIN Procedure (argument);
  10197. END Test.
  10198. negative: calling procedure with base object parameter with pointer to array argument
  10199. MODULE Test;
  10200. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10201. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10202. BEGIN Procedure (argument);
  10203. END Test.
  10204. negative: calling procedure with base object parameter with procedure argument
  10205. MODULE Test;
  10206. VAR argument: PROCEDURE;
  10207. PROCEDURE Procedure (value: OBJECT); END Procedure;
  10208. BEGIN Procedure (argument);
  10209. END Test.
  10210. negative: calling procedure with pointer to array parameter with boolean argument
  10211. MODULE Test;
  10212. VAR argument: BOOLEAN;
  10213. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10214. BEGIN Procedure (argument);
  10215. END Test.
  10216. negative: calling procedure with pointer to array parameter with character argument
  10217. MODULE Test;
  10218. VAR argument: CHAR;
  10219. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10220. BEGIN Procedure (argument);
  10221. END Test.
  10222. negative: calling procedure with pointer to array parameter with short integer argument
  10223. MODULE Test;
  10224. VAR argument: SHORTINT;
  10225. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10226. BEGIN Procedure (argument);
  10227. END Test.
  10228. negative: calling procedure with pointer to array parameter with integer argument
  10229. MODULE Test;
  10230. VAR argument: INTEGER;
  10231. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10232. BEGIN Procedure (argument);
  10233. END Test.
  10234. negative: calling procedure with pointer to array parameter with long integer argument
  10235. MODULE Test;
  10236. VAR argument: LONGINT;
  10237. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10238. BEGIN Procedure (argument);
  10239. END Test.
  10240. negative: calling procedure with pointer to array parameter with huge integer argument
  10241. MODULE Test;
  10242. VAR argument: HUGEINT;
  10243. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10244. BEGIN Procedure (argument);
  10245. END Test.
  10246. negative: calling procedure with pointer to array parameter with real argument
  10247. MODULE Test;
  10248. VAR argument: REAL;
  10249. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10250. BEGIN Procedure (argument);
  10251. END Test.
  10252. negative: calling procedure with pointer to array parameter with long real argument
  10253. MODULE Test;
  10254. VAR argument: LONGREAL;
  10255. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10256. BEGIN Procedure (argument);
  10257. END Test.
  10258. negative: calling procedure with pointer to array parameter with set argument
  10259. MODULE Test;
  10260. VAR argument: SET;
  10261. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10262. BEGIN Procedure (argument);
  10263. END Test.
  10264. negative: calling procedure with pointer to array parameter with array argument
  10265. MODULE Test;
  10266. VAR argument: ARRAY 10 OF CHAR;
  10267. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10268. BEGIN Procedure (argument);
  10269. END Test.
  10270. negative: calling procedure with pointer to array parameter with record argument
  10271. MODULE Test;
  10272. VAR argument: RECORD END;
  10273. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10274. BEGIN Procedure (argument);
  10275. END Test.
  10276. negative: calling procedure with pointer to array parameter with object argument
  10277. MODULE Test;
  10278. VAR argument: OBJECT END;
  10279. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10280. BEGIN Procedure (argument);
  10281. END Test.
  10282. negative: calling procedure with pointer to array parameter with base object argument
  10283. MODULE Test;
  10284. VAR argument: OBJECT;
  10285. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10286. BEGIN Procedure (argument);
  10287. END Test.
  10288. positive: calling procedure with pointer to array parameter with pointer to array argument
  10289. MODULE Test;
  10290. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10291. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10292. BEGIN Procedure (argument);
  10293. END Test.
  10294. negative: calling procedure with pointer to array parameter with pointer to record argument
  10295. MODULE Test;
  10296. VAR argument: POINTER TO RECORD END;
  10297. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10298. BEGIN Procedure (argument);
  10299. END Test.
  10300. negative: calling procedure with pointer to array parameter with procedure argument
  10301. MODULE Test;
  10302. VAR argument: PROCEDURE;
  10303. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  10304. BEGIN Procedure (argument);
  10305. END Test.
  10306. negative: calling procedure with pointer to record parameter with boolean argument
  10307. MODULE Test;
  10308. VAR argument: BOOLEAN;
  10309. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10310. BEGIN Procedure (argument);
  10311. END Test.
  10312. negative: calling procedure with pointer to record parameter with character argument
  10313. MODULE Test;
  10314. VAR argument: CHAR;
  10315. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10316. BEGIN Procedure (argument);
  10317. END Test.
  10318. negative: calling procedure with pointer to record parameter with short integer argument
  10319. MODULE Test;
  10320. VAR argument: SHORTINT;
  10321. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10322. BEGIN Procedure (argument);
  10323. END Test.
  10324. negative: calling procedure with pointer to record parameter with integer argument
  10325. MODULE Test;
  10326. VAR argument: INTEGER;
  10327. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10328. BEGIN Procedure (argument);
  10329. END Test.
  10330. negative: calling procedure with pointer to record parameter with long integer argument
  10331. MODULE Test;
  10332. VAR argument: LONGINT;
  10333. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10334. BEGIN Procedure (argument);
  10335. END Test.
  10336. negative: calling procedure with pointer to record parameter with huge integer argument
  10337. MODULE Test;
  10338. VAR argument: HUGEINT;
  10339. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10340. BEGIN Procedure (argument);
  10341. END Test.
  10342. negative: calling procedure with pointer to record parameter with real argument
  10343. MODULE Test;
  10344. VAR argument: REAL;
  10345. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10346. BEGIN Procedure (argument);
  10347. END Test.
  10348. negative: calling procedure with pointer to record parameter with long real argument
  10349. MODULE Test;
  10350. VAR argument: LONGREAL;
  10351. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10352. BEGIN Procedure (argument);
  10353. END Test.
  10354. negative: calling procedure with pointer to record parameter with set argument
  10355. MODULE Test;
  10356. VAR argument: SET;
  10357. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10358. BEGIN Procedure (argument);
  10359. END Test.
  10360. negative: calling procedure with pointer to record parameter with array argument
  10361. MODULE Test;
  10362. VAR argument: ARRAY 10 OF CHAR;
  10363. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10364. BEGIN Procedure (argument);
  10365. END Test.
  10366. negative: calling procedure with pointer to record parameter with record argument
  10367. MODULE Test;
  10368. VAR argument: RECORD END;
  10369. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10370. BEGIN Procedure (argument);
  10371. END Test.
  10372. negative: calling procedure with pointer to record parameter with object argument
  10373. MODULE Test;
  10374. VAR argument: OBJECT END;
  10375. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10376. BEGIN Procedure (argument);
  10377. END Test.
  10378. negative: calling procedure with pointer to record parameter with base object argument
  10379. MODULE Test;
  10380. VAR argument: OBJECT;
  10381. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10382. BEGIN Procedure (argument);
  10383. END Test.
  10384. negative: calling procedure with pointer to record parameter with pointer to array argument
  10385. MODULE Test;
  10386. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10387. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10388. BEGIN Procedure (argument);
  10389. END Test.
  10390. positive: calling procedure with pointer to record parameter with pointer to record argument
  10391. MODULE Test;
  10392. TYPE Record = RECORD END;
  10393. VAR argument: POINTER TO Record;
  10394. PROCEDURE Procedure (value: POINTER TO Record); END Procedure;
  10395. BEGIN Procedure (argument);
  10396. END Test.
  10397. positive: calling procedure with pointer to record parameter with compatible pointer to record argument
  10398. MODULE Test;
  10399. TYPE Record = RECORD END;
  10400. VAR argument: POINTER TO RECORD (Record) END;
  10401. PROCEDURE Procedure (value: POINTER TO Record); END Procedure;
  10402. BEGIN Procedure (argument);
  10403. END Test.
  10404. negative: calling procedure with pointer to record parameter with incompatible pointer to record argument
  10405. MODULE Test;
  10406. TYPE Record = RECORD END;
  10407. VAR argument: POINTER TO Record;
  10408. PROCEDURE Procedure (value: POINTER TO RECORD (Record) END); END Procedure;
  10409. BEGIN Procedure (argument);
  10410. END Test.
  10411. negative: calling procedure with pointer to record parameter with procedure argument
  10412. MODULE Test;
  10413. VAR argument: PROCEDURE;
  10414. PROCEDURE Procedure (value: POINTER TO RECORD END); END Procedure;
  10415. BEGIN Procedure (argument);
  10416. END Test.
  10417. negative: calling procedure with procedure parameter with boolean argument
  10418. MODULE Test;
  10419. VAR argument: BOOLEAN;
  10420. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10421. BEGIN Procedure (argument);
  10422. END Test.
  10423. negative: calling procedure with procedure parameter with character argument
  10424. MODULE Test;
  10425. VAR argument: CHAR;
  10426. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10427. BEGIN Procedure (argument);
  10428. END Test.
  10429. negative: calling procedure with procedure parameter with short integer argument
  10430. MODULE Test;
  10431. VAR argument: SHORTINT;
  10432. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10433. BEGIN Procedure (argument);
  10434. END Test.
  10435. negative: calling procedure with procedure parameter with integer argument
  10436. MODULE Test;
  10437. VAR argument: INTEGER;
  10438. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10439. BEGIN Procedure (argument);
  10440. END Test.
  10441. negative: calling procedure with procedure parameter with long integer argument
  10442. MODULE Test;
  10443. VAR argument: LONGINT;
  10444. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10445. BEGIN Procedure (argument);
  10446. END Test.
  10447. negative: calling procedure with procedure parameter with huge integer argument
  10448. MODULE Test;
  10449. VAR argument: HUGEINT;
  10450. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10451. BEGIN Procedure (argument);
  10452. END Test.
  10453. negative: calling procedure with procedure parameter with real argument
  10454. MODULE Test;
  10455. VAR argument: REAL;
  10456. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10457. BEGIN Procedure (argument);
  10458. END Test.
  10459. negative: calling procedure with procedure parameter with long real argument
  10460. MODULE Test;
  10461. VAR argument: LONGREAL;
  10462. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10463. BEGIN Procedure (argument);
  10464. END Test.
  10465. negative: calling procedure with procedure parameter with set argument
  10466. MODULE Test;
  10467. VAR argument: SET;
  10468. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10469. BEGIN Procedure (argument);
  10470. END Test.
  10471. negative: calling procedure with procedure parameter with array argument
  10472. MODULE Test;
  10473. VAR argument: ARRAY 10 OF CHAR;
  10474. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10475. BEGIN Procedure (argument);
  10476. END Test.
  10477. negative: calling procedure with procedure parameter with record argument
  10478. MODULE Test;
  10479. VAR argument: RECORD END;
  10480. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10481. BEGIN Procedure (argument);
  10482. END Test.
  10483. negative: calling procedure with procedure parameter with object argument
  10484. MODULE Test;
  10485. VAR argument: OBJECT END;
  10486. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10487. BEGIN Procedure (argument);
  10488. END Test.
  10489. negative: calling procedure with procedure parameter with base object argument
  10490. MODULE Test;
  10491. VAR argument: OBJECT;
  10492. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10493. BEGIN Procedure (argument);
  10494. END Test.
  10495. negative: calling procedure with procedure parameter with pointer to array argument
  10496. MODULE Test;
  10497. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10498. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10499. BEGIN Procedure (argument);
  10500. END Test.
  10501. negative: calling procedure with procedure parameter with pointer to record argument
  10502. MODULE Test;
  10503. VAR argument: POINTER TO RECORD END;
  10504. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10505. BEGIN Procedure (argument);
  10506. END Test.
  10507. positive: calling procedure with procedure parameter with procedure argument
  10508. MODULE Test;
  10509. VAR argument: PROCEDURE;
  10510. PROCEDURE Procedure (value: PROCEDURE); END Procedure;
  10511. BEGIN Procedure (argument);
  10512. END Test.
  10513. positive: calling procedure with boolean variable parameter with boolean argument
  10514. MODULE Test;
  10515. VAR argument: BOOLEAN;
  10516. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10517. BEGIN Procedure (argument);
  10518. END Test.
  10519. negative: calling procedure with boolean variable parameter with character argument
  10520. MODULE Test;
  10521. VAR argument: CHAR;
  10522. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10523. BEGIN Procedure (argument);
  10524. END Test.
  10525. negative: calling procedure with boolean variable parameter with short integer argument
  10526. MODULE Test;
  10527. VAR argument: SHORTINT;
  10528. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10529. BEGIN Procedure (argument);
  10530. END Test.
  10531. negative: calling procedure with boolean variable parameter with integer argument
  10532. MODULE Test;
  10533. VAR argument: INTEGER;
  10534. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10535. BEGIN Procedure (argument);
  10536. END Test.
  10537. negative: calling procedure with boolean variable parameter with long integer argument
  10538. MODULE Test;
  10539. VAR argument: LONGINT;
  10540. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10541. BEGIN Procedure (argument);
  10542. END Test.
  10543. negative: calling procedure with boolean variable parameter with huge integer argument
  10544. MODULE Test;
  10545. VAR argument: HUGEINT;
  10546. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10547. BEGIN Procedure (argument);
  10548. END Test.
  10549. negative: calling procedure with boolean variable parameter with real argument
  10550. MODULE Test;
  10551. VAR argument: REAL;
  10552. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10553. BEGIN Procedure (argument);
  10554. END Test.
  10555. negative: calling procedure with boolean variable parameter with long real argument
  10556. MODULE Test;
  10557. VAR argument: LONGREAL;
  10558. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10559. BEGIN Procedure (argument);
  10560. END Test.
  10561. negative: calling procedure with boolean variable parameter with set argument
  10562. MODULE Test;
  10563. VAR argument: SET;
  10564. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10565. BEGIN Procedure (argument);
  10566. END Test.
  10567. negative: calling procedure with boolean variable parameter with array argument
  10568. MODULE Test;
  10569. VAR argument: ARRAY 10 OF CHAR;
  10570. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10571. BEGIN Procedure (argument);
  10572. END Test.
  10573. negative: calling procedure with boolean variable parameter with record argument
  10574. MODULE Test;
  10575. VAR argument: RECORD END;
  10576. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10577. BEGIN Procedure (argument);
  10578. END Test.
  10579. negative: calling procedure with boolean variable parameter with object argument
  10580. MODULE Test;
  10581. VAR argument: OBJECT END;
  10582. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10583. BEGIN Procedure (argument);
  10584. END Test.
  10585. negative: calling procedure with boolean variable parameter with base object argument
  10586. MODULE Test;
  10587. VAR argument: OBJECT;
  10588. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10589. BEGIN Procedure (argument);
  10590. END Test.
  10591. negative: calling procedure with boolean variable parameter with pointer to array argument
  10592. MODULE Test;
  10593. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10594. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10595. BEGIN Procedure (argument);
  10596. END Test.
  10597. negative: calling procedure with boolean variable parameter with pointer to record argument
  10598. MODULE Test;
  10599. VAR argument: POINTER TO RECORD END;
  10600. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10601. BEGIN Procedure (argument);
  10602. END Test.
  10603. negative: calling procedure with boolean variable parameter with procedure argument
  10604. MODULE Test;
  10605. VAR argument: PROCEDURE;
  10606. PROCEDURE Procedure (VAR value: BOOLEAN); END Procedure;
  10607. BEGIN Procedure (argument);
  10608. END Test.
  10609. negative: calling procedure with character variable parameter with boolean argument
  10610. MODULE Test;
  10611. VAR argument: BOOLEAN;
  10612. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10613. BEGIN Procedure (argument);
  10614. END Test.
  10615. positive: calling procedure with character variable parameter with character argument
  10616. MODULE Test;
  10617. VAR argument: CHAR;
  10618. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10619. BEGIN Procedure (argument);
  10620. END Test.
  10621. negative: calling procedure with character variable parameter with short integer argument
  10622. MODULE Test;
  10623. VAR argument: SHORTINT;
  10624. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10625. BEGIN Procedure (argument);
  10626. END Test.
  10627. negative: calling procedure with character variable parameter with integer argument
  10628. MODULE Test;
  10629. VAR argument: INTEGER;
  10630. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10631. BEGIN Procedure (argument);
  10632. END Test.
  10633. negative: calling procedure with character variable parameter with long integer argument
  10634. MODULE Test;
  10635. VAR argument: LONGINT;
  10636. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10637. BEGIN Procedure (argument);
  10638. END Test.
  10639. negative: calling procedure with character variable parameter with huge integer argument
  10640. MODULE Test;
  10641. VAR argument: HUGEINT;
  10642. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10643. BEGIN Procedure (argument);
  10644. END Test.
  10645. negative: calling procedure with character variable parameter with real argument
  10646. MODULE Test;
  10647. VAR argument: REAL;
  10648. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10649. BEGIN Procedure (argument);
  10650. END Test.
  10651. negative: calling procedure with character variable parameter with long real argument
  10652. MODULE Test;
  10653. VAR argument: LONGREAL;
  10654. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10655. BEGIN Procedure (argument);
  10656. END Test.
  10657. negative: calling procedure with character variable parameter with set argument
  10658. MODULE Test;
  10659. VAR argument: SET;
  10660. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10661. BEGIN Procedure (argument);
  10662. END Test.
  10663. negative: calling procedure with character variable parameter with array argument
  10664. MODULE Test;
  10665. VAR argument: ARRAY 10 OF CHAR;
  10666. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10667. BEGIN Procedure (argument);
  10668. END Test.
  10669. negative: calling procedure with character variable parameter with record argument
  10670. MODULE Test;
  10671. VAR argument: RECORD END;
  10672. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10673. BEGIN Procedure (argument);
  10674. END Test.
  10675. negative: calling procedure with character variable parameter with object argument
  10676. MODULE Test;
  10677. VAR argument: OBJECT END;
  10678. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10679. BEGIN Procedure (argument);
  10680. END Test.
  10681. negative: calling procedure with character variable parameter with base object argument
  10682. MODULE Test;
  10683. VAR argument: OBJECT;
  10684. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10685. BEGIN Procedure (argument);
  10686. END Test.
  10687. negative: calling procedure with character variable parameter with pointer to array argument
  10688. MODULE Test;
  10689. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10690. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10691. BEGIN Procedure (argument);
  10692. END Test.
  10693. negative: calling procedure with character variable parameter with pointer to record argument
  10694. MODULE Test;
  10695. VAR argument: POINTER TO RECORD END;
  10696. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10697. BEGIN Procedure (argument);
  10698. END Test.
  10699. negative: calling procedure with character variable parameter with procedure argument
  10700. MODULE Test;
  10701. VAR argument: PROCEDURE;
  10702. PROCEDURE Procedure (VAR value: CHAR); END Procedure;
  10703. BEGIN Procedure (argument);
  10704. END Test.
  10705. negative: calling procedure with short integer variable parameter with boolean argument
  10706. MODULE Test;
  10707. VAR argument: BOOLEAN;
  10708. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10709. BEGIN Procedure (argument);
  10710. END Test.
  10711. negative: calling procedure with short integer variable parameter with character argument
  10712. MODULE Test;
  10713. VAR argument: CHAR;
  10714. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10715. BEGIN Procedure (argument);
  10716. END Test.
  10717. positive: calling procedure with short integer variable parameter with short integer argument
  10718. MODULE Test;
  10719. VAR argument: SHORTINT;
  10720. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10721. BEGIN Procedure (argument);
  10722. END Test.
  10723. negative: calling procedure with short integer variable parameter with integer argument
  10724. MODULE Test;
  10725. VAR argument: INTEGER;
  10726. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10727. BEGIN Procedure (argument);
  10728. END Test.
  10729. negative: calling procedure with short integer variable parameter with long integer argument
  10730. MODULE Test;
  10731. VAR argument: LONGINT;
  10732. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10733. BEGIN Procedure (argument);
  10734. END Test.
  10735. negative: calling procedure with short integer variable parameter with huge integer argument
  10736. MODULE Test;
  10737. VAR argument: HUGEINT;
  10738. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10739. BEGIN Procedure (argument);
  10740. END Test.
  10741. negative: calling procedure with short integer variable parameter with real argument
  10742. MODULE Test;
  10743. VAR argument: REAL;
  10744. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10745. BEGIN Procedure (argument);
  10746. END Test.
  10747. negative: calling procedure with short integer variable parameter with long real argument
  10748. MODULE Test;
  10749. VAR argument: LONGREAL;
  10750. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10751. BEGIN Procedure (argument);
  10752. END Test.
  10753. negative: calling procedure with short integer variable parameter with set argument
  10754. MODULE Test;
  10755. VAR argument: SET;
  10756. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10757. BEGIN Procedure (argument);
  10758. END Test.
  10759. negative: calling procedure with short integer variable parameter with array argument
  10760. MODULE Test;
  10761. VAR argument: ARRAY 10 OF CHAR;
  10762. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10763. BEGIN Procedure (argument);
  10764. END Test.
  10765. negative: calling procedure with short integer variable parameter with record argument
  10766. MODULE Test;
  10767. VAR argument: RECORD END;
  10768. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10769. BEGIN Procedure (argument);
  10770. END Test.
  10771. negative: calling procedure with short integer variable parameter with object argument
  10772. MODULE Test;
  10773. VAR argument: OBJECT END;
  10774. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10775. BEGIN Procedure (argument);
  10776. END Test.
  10777. negative: calling procedure with short integer variable parameter with base object argument
  10778. MODULE Test;
  10779. VAR argument: OBJECT;
  10780. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10781. BEGIN Procedure (argument);
  10782. END Test.
  10783. negative: calling procedure with short integer variable parameter with pointer to array argument
  10784. MODULE Test;
  10785. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10786. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10787. BEGIN Procedure (argument);
  10788. END Test.
  10789. negative: calling procedure with short integer variable parameter with pointer to record argument
  10790. MODULE Test;
  10791. VAR argument: POINTER TO RECORD END;
  10792. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10793. BEGIN Procedure (argument);
  10794. END Test.
  10795. negative: calling procedure with short integer variable parameter with procedure argument
  10796. MODULE Test;
  10797. VAR argument: PROCEDURE;
  10798. PROCEDURE Procedure (VAR value: SHORTINT); END Procedure;
  10799. BEGIN Procedure (argument);
  10800. END Test.
  10801. negative: calling procedure with integer variable parameter with boolean argument
  10802. MODULE Test;
  10803. VAR argument: BOOLEAN;
  10804. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10805. BEGIN Procedure (argument);
  10806. END Test.
  10807. negative: calling procedure with integer variable parameter with character argument
  10808. MODULE Test;
  10809. VAR argument: CHAR;
  10810. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10811. BEGIN Procedure (argument);
  10812. END Test.
  10813. negative: calling procedure with integer variable parameter with short integer argument
  10814. MODULE Test;
  10815. VAR argument: SHORTINT;
  10816. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10817. BEGIN Procedure (argument);
  10818. END Test.
  10819. positive: calling procedure with integer variable parameter with integer argument
  10820. MODULE Test;
  10821. VAR argument: INTEGER;
  10822. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10823. BEGIN Procedure (argument);
  10824. END Test.
  10825. negative: calling procedure with integer variable parameter with long integer argument
  10826. MODULE Test;
  10827. VAR argument: LONGINT;
  10828. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10829. BEGIN Procedure (argument);
  10830. END Test.
  10831. negative: calling procedure with integer variable parameter with huge integer argument
  10832. MODULE Test;
  10833. VAR argument: HUGEINT;
  10834. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10835. BEGIN Procedure (argument);
  10836. END Test.
  10837. negative: calling procedure with integer variable parameter with real argument
  10838. MODULE Test;
  10839. VAR argument: REAL;
  10840. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10841. BEGIN Procedure (argument);
  10842. END Test.
  10843. negative: calling procedure with integer variable parameter with long real argument
  10844. MODULE Test;
  10845. VAR argument: LONGREAL;
  10846. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10847. BEGIN Procedure (argument);
  10848. END Test.
  10849. negative: calling procedure with integer variable parameter with set argument
  10850. MODULE Test;
  10851. VAR argument: SET;
  10852. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10853. BEGIN Procedure (argument);
  10854. END Test.
  10855. negative: calling procedure with integer variable parameter with array argument
  10856. MODULE Test;
  10857. VAR argument: ARRAY 10 OF CHAR;
  10858. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10859. BEGIN Procedure (argument);
  10860. END Test.
  10861. negative: calling procedure with integer variable parameter with record argument
  10862. MODULE Test;
  10863. VAR argument: RECORD END;
  10864. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10865. BEGIN Procedure (argument);
  10866. END Test.
  10867. negative: calling procedure with integer variable parameter with object argument
  10868. MODULE Test;
  10869. VAR argument: OBJECT END;
  10870. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10871. BEGIN Procedure (argument);
  10872. END Test.
  10873. negative: calling procedure with integer variable parameter with base object argument
  10874. MODULE Test;
  10875. VAR argument: OBJECT;
  10876. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10877. BEGIN Procedure (argument);
  10878. END Test.
  10879. negative: calling procedure with integer variable parameter with pointer to array argument
  10880. MODULE Test;
  10881. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10882. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10883. BEGIN Procedure (argument);
  10884. END Test.
  10885. negative: calling procedure with integer variable parameter with pointer to record argument
  10886. MODULE Test;
  10887. VAR argument: POINTER TO RECORD END;
  10888. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10889. BEGIN Procedure (argument);
  10890. END Test.
  10891. negative: calling procedure with integer variable parameter with procedure argument
  10892. MODULE Test;
  10893. VAR argument: PROCEDURE;
  10894. PROCEDURE Procedure (VAR value: INTEGER); END Procedure;
  10895. BEGIN Procedure (argument);
  10896. END Test.
  10897. negative: calling procedure with long integer variable parameter with boolean argument
  10898. MODULE Test;
  10899. VAR argument: BOOLEAN;
  10900. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10901. BEGIN Procedure (argument);
  10902. END Test.
  10903. negative: calling procedure with long integer variable parameter with character argument
  10904. MODULE Test;
  10905. VAR argument: CHAR;
  10906. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10907. BEGIN Procedure (argument);
  10908. END Test.
  10909. negative: calling procedure with long integer variable parameter with short integer argument
  10910. MODULE Test;
  10911. VAR argument: SHORTINT;
  10912. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10913. BEGIN Procedure (argument);
  10914. END Test.
  10915. negative: calling procedure with long integer variable parameter with integer argument
  10916. MODULE Test;
  10917. VAR argument: INTEGER;
  10918. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10919. BEGIN Procedure (argument);
  10920. END Test.
  10921. positive: calling procedure with long integer variable parameter with long integer argument
  10922. MODULE Test;
  10923. VAR argument: LONGINT;
  10924. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10925. BEGIN Procedure (argument);
  10926. END Test.
  10927. negative: calling procedure with long integer variable parameter with huge integer argument
  10928. MODULE Test;
  10929. VAR argument: HUGEINT;
  10930. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10931. BEGIN Procedure (argument);
  10932. END Test.
  10933. negative: calling procedure with long integer variable parameter with real argument
  10934. MODULE Test;
  10935. VAR argument: REAL;
  10936. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10937. BEGIN Procedure (argument);
  10938. END Test.
  10939. negative: calling procedure with long integer variable parameter with long real argument
  10940. MODULE Test;
  10941. VAR argument: LONGREAL;
  10942. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10943. BEGIN Procedure (argument);
  10944. END Test.
  10945. negative: calling procedure with long integer variable parameter with set argument
  10946. MODULE Test;
  10947. VAR argument: SET;
  10948. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10949. BEGIN Procedure (argument);
  10950. END Test.
  10951. negative: calling procedure with long integer variable parameter with array argument
  10952. MODULE Test;
  10953. VAR argument: ARRAY 10 OF CHAR;
  10954. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10955. BEGIN Procedure (argument);
  10956. END Test.
  10957. negative: calling procedure with long integer variable parameter with record argument
  10958. MODULE Test;
  10959. VAR argument: RECORD END;
  10960. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10961. BEGIN Procedure (argument);
  10962. END Test.
  10963. negative: calling procedure with long integer variable parameter with object argument
  10964. MODULE Test;
  10965. VAR argument: OBJECT END;
  10966. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10967. BEGIN Procedure (argument);
  10968. END Test.
  10969. negative: calling procedure with long integer variable parameter with base object argument
  10970. MODULE Test;
  10971. VAR argument: OBJECT;
  10972. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10973. BEGIN Procedure (argument);
  10974. END Test.
  10975. negative: calling procedure with long integer variable parameter with pointer to array argument
  10976. MODULE Test;
  10977. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  10978. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10979. BEGIN Procedure (argument);
  10980. END Test.
  10981. negative: calling procedure with long integer variable parameter with pointer to record argument
  10982. MODULE Test;
  10983. VAR argument: POINTER TO RECORD END;
  10984. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10985. BEGIN Procedure (argument);
  10986. END Test.
  10987. negative: calling procedure with long integer variable parameter with procedure argument
  10988. MODULE Test;
  10989. VAR argument: PROCEDURE;
  10990. PROCEDURE Procedure (VAR value: LONGINT); END Procedure;
  10991. BEGIN Procedure (argument);
  10992. END Test.
  10993. negative: calling procedure with huge integer variable parameter with boolean argument
  10994. MODULE Test;
  10995. VAR argument: BOOLEAN;
  10996. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  10997. BEGIN Procedure (argument);
  10998. END Test.
  10999. negative: calling procedure with huge integer variable parameter with character argument
  11000. MODULE Test;
  11001. VAR argument: CHAR;
  11002. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11003. BEGIN Procedure (argument);
  11004. END Test.
  11005. negative: calling procedure with huge integer variable parameter with short integer argument
  11006. MODULE Test;
  11007. VAR argument: SHORTINT;
  11008. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11009. BEGIN Procedure (argument);
  11010. END Test.
  11011. negative: calling procedure with huge integer variable parameter with integer argument
  11012. MODULE Test;
  11013. VAR argument: INTEGER;
  11014. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11015. BEGIN Procedure (argument);
  11016. END Test.
  11017. negative: calling procedure with huge integer variable parameter with long integer argument
  11018. MODULE Test;
  11019. VAR argument: LONGINT;
  11020. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11021. BEGIN Procedure (argument);
  11022. END Test.
  11023. positive: calling procedure with huge integer variable parameter with huge integer argument
  11024. MODULE Test;
  11025. VAR argument: HUGEINT;
  11026. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11027. BEGIN Procedure (argument);
  11028. END Test.
  11029. negative: calling procedure with huge integer variable parameter with real argument
  11030. MODULE Test;
  11031. VAR argument: REAL;
  11032. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11033. BEGIN Procedure (argument);
  11034. END Test.
  11035. negative: calling procedure with huge integer variable parameter with long real argument
  11036. MODULE Test;
  11037. VAR argument: LONGREAL;
  11038. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11039. BEGIN Procedure (argument);
  11040. END Test.
  11041. negative: calling procedure with huge integer variable parameter with set argument
  11042. MODULE Test;
  11043. VAR argument: SET;
  11044. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11045. BEGIN Procedure (argument);
  11046. END Test.
  11047. negative: calling procedure with huge integer variable parameter with array argument
  11048. MODULE Test;
  11049. VAR argument: ARRAY 10 OF CHAR;
  11050. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11051. BEGIN Procedure (argument);
  11052. END Test.
  11053. negative: calling procedure with huge integer variable parameter with record argument
  11054. MODULE Test;
  11055. VAR argument: RECORD END;
  11056. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11057. BEGIN Procedure (argument);
  11058. END Test.
  11059. negative: calling procedure with huge integer variable parameter with object argument
  11060. MODULE Test;
  11061. VAR argument: OBJECT END;
  11062. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11063. BEGIN Procedure (argument);
  11064. END Test.
  11065. negative: calling procedure with huge integer variable parameter with base object argument
  11066. MODULE Test;
  11067. VAR argument: OBJECT;
  11068. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11069. BEGIN Procedure (argument);
  11070. END Test.
  11071. negative: calling procedure with huge integer variable parameter with pointer to array argument
  11072. MODULE Test;
  11073. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11074. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11075. BEGIN Procedure (argument);
  11076. END Test.
  11077. negative: calling procedure with huge integer variable parameter with pointer to record argument
  11078. MODULE Test;
  11079. VAR argument: POINTER TO RECORD END;
  11080. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11081. BEGIN Procedure (argument);
  11082. END Test.
  11083. negative: calling procedure with huge integer variable parameter with procedure argument
  11084. MODULE Test;
  11085. VAR argument: PROCEDURE;
  11086. PROCEDURE Procedure (VAR value: HUGEINT); END Procedure;
  11087. BEGIN Procedure (argument);
  11088. END Test.
  11089. negative: calling procedure with real variable parameter with boolean argument
  11090. MODULE Test;
  11091. VAR argument: BOOLEAN;
  11092. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11093. BEGIN Procedure (argument);
  11094. END Test.
  11095. negative: calling procedure with real variable parameter with character argument
  11096. MODULE Test;
  11097. VAR argument: CHAR;
  11098. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11099. BEGIN Procedure (argument);
  11100. END Test.
  11101. negative: calling procedure with real variable parameter with short integer argument
  11102. MODULE Test;
  11103. VAR argument: SHORTINT;
  11104. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11105. BEGIN Procedure (argument);
  11106. END Test.
  11107. negative: calling procedure with real variable parameter with integer argument
  11108. MODULE Test;
  11109. VAR argument: INTEGER;
  11110. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11111. BEGIN Procedure (argument);
  11112. END Test.
  11113. negative: calling procedure with real variable parameter with long integer argument
  11114. MODULE Test;
  11115. VAR argument: LONGINT;
  11116. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11117. BEGIN Procedure (argument);
  11118. END Test.
  11119. negative: calling procedure with real variable parameter with huge integer argument
  11120. MODULE Test;
  11121. VAR argument: HUGEINT;
  11122. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11123. BEGIN Procedure (argument);
  11124. END Test.
  11125. positive: calling procedure with real variable parameter with real argument
  11126. MODULE Test;
  11127. VAR argument: REAL;
  11128. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11129. BEGIN Procedure (argument);
  11130. END Test.
  11131. negative: calling procedure with real variable parameter with long real argument
  11132. MODULE Test;
  11133. VAR argument: LONGREAL;
  11134. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11135. BEGIN Procedure (argument);
  11136. END Test.
  11137. negative: calling procedure with real variable parameter with set argument
  11138. MODULE Test;
  11139. VAR argument: SET;
  11140. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11141. BEGIN Procedure (argument);
  11142. END Test.
  11143. negative: calling procedure with real variable parameter with array argument
  11144. MODULE Test;
  11145. VAR argument: ARRAY 10 OF CHAR;
  11146. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11147. BEGIN Procedure (argument);
  11148. END Test.
  11149. negative: calling procedure with real variable parameter with record argument
  11150. MODULE Test;
  11151. VAR argument: RECORD END;
  11152. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11153. BEGIN Procedure (argument);
  11154. END Test.
  11155. negative: calling procedure with real variable parameter with object argument
  11156. MODULE Test;
  11157. VAR argument: OBJECT END;
  11158. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11159. BEGIN Procedure (argument);
  11160. END Test.
  11161. negative: calling procedure with real variable parameter with base object argument
  11162. MODULE Test;
  11163. VAR argument: OBJECT;
  11164. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11165. BEGIN Procedure (argument);
  11166. END Test.
  11167. negative: calling procedure with real variable parameter with pointer to array argument
  11168. MODULE Test;
  11169. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11170. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11171. BEGIN Procedure (argument);
  11172. END Test.
  11173. negative: calling procedure with real variable parameter with pointer to record argument
  11174. MODULE Test;
  11175. VAR argument: POINTER TO RECORD END;
  11176. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11177. BEGIN Procedure (argument);
  11178. END Test.
  11179. negative: calling procedure with real variable parameter with procedure argument
  11180. MODULE Test;
  11181. VAR argument: PROCEDURE;
  11182. PROCEDURE Procedure (VAR value: REAL); END Procedure;
  11183. BEGIN Procedure (argument);
  11184. END Test.
  11185. negative: calling procedure with long real variable parameter with boolean argument
  11186. MODULE Test;
  11187. VAR argument: BOOLEAN;
  11188. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11189. BEGIN Procedure (argument);
  11190. END Test.
  11191. negative: calling procedure with long real variable parameter with character argument
  11192. MODULE Test;
  11193. VAR argument: CHAR;
  11194. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11195. BEGIN Procedure (argument);
  11196. END Test.
  11197. negative: calling procedure with long real variable parameter with short integer argument
  11198. MODULE Test;
  11199. VAR argument: SHORTINT;
  11200. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11201. BEGIN Procedure (argument);
  11202. END Test.
  11203. negative: calling procedure with long real variable parameter with integer argument
  11204. MODULE Test;
  11205. VAR argument: INTEGER;
  11206. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11207. BEGIN Procedure (argument);
  11208. END Test.
  11209. negative: calling procedure with long real variable parameter with long integer argument
  11210. MODULE Test;
  11211. VAR argument: LONGINT;
  11212. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11213. BEGIN Procedure (argument);
  11214. END Test.
  11215. negative: calling procedure with long real variable parameter with huge integer argument
  11216. MODULE Test;
  11217. VAR argument: HUGEINT;
  11218. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11219. BEGIN Procedure (argument);
  11220. END Test.
  11221. negative: calling procedure with long real variable parameter with real argument
  11222. MODULE Test;
  11223. VAR argument: REAL;
  11224. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11225. BEGIN Procedure (argument);
  11226. END Test.
  11227. positive: calling procedure with long real variable parameter with long real argument
  11228. MODULE Test;
  11229. VAR argument: LONGREAL;
  11230. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11231. BEGIN Procedure (argument);
  11232. END Test.
  11233. negative: calling procedure with long real variable parameter with set argument
  11234. MODULE Test;
  11235. VAR argument: SET;
  11236. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11237. BEGIN Procedure (argument);
  11238. END Test.
  11239. negative: calling procedure with long real variable parameter with array argument
  11240. MODULE Test;
  11241. VAR argument: ARRAY 10 OF CHAR;
  11242. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11243. BEGIN Procedure (argument);
  11244. END Test.
  11245. negative: calling procedure with long real variable parameter with record argument
  11246. MODULE Test;
  11247. VAR argument: RECORD END;
  11248. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11249. BEGIN Procedure (argument);
  11250. END Test.
  11251. negative: calling procedure with long real variable parameter with object argument
  11252. MODULE Test;
  11253. VAR argument: OBJECT END;
  11254. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11255. BEGIN Procedure (argument);
  11256. END Test.
  11257. negative: calling procedure with long real variable parameter with base object argument
  11258. MODULE Test;
  11259. VAR argument: OBJECT;
  11260. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11261. BEGIN Procedure (argument);
  11262. END Test.
  11263. negative: calling procedure with long real variable parameter with pointer to array argument
  11264. MODULE Test;
  11265. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11266. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11267. BEGIN Procedure (argument);
  11268. END Test.
  11269. negative: calling procedure with long real variable parameter with pointer to record argument
  11270. MODULE Test;
  11271. VAR argument: POINTER TO RECORD END;
  11272. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11273. BEGIN Procedure (argument);
  11274. END Test.
  11275. negative: calling procedure with long real variable parameter with procedure argument
  11276. MODULE Test;
  11277. VAR argument: PROCEDURE;
  11278. PROCEDURE Procedure (VAR value: LONGREAL); END Procedure;
  11279. BEGIN Procedure (argument);
  11280. END Test.
  11281. negative: calling procedure with set variable parameter with boolean argument
  11282. MODULE Test;
  11283. VAR argument: BOOLEAN;
  11284. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11285. BEGIN Procedure (argument);
  11286. END Test.
  11287. negative: calling procedure with set variable parameter with character argument
  11288. MODULE Test;
  11289. VAR argument: CHAR;
  11290. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11291. BEGIN Procedure (argument);
  11292. END Test.
  11293. negative: calling procedure with set variable parameter with short integer argument
  11294. MODULE Test;
  11295. VAR argument: SHORTINT;
  11296. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11297. BEGIN Procedure (argument);
  11298. END Test.
  11299. negative: calling procedure with set variable parameter with integer argument
  11300. MODULE Test;
  11301. VAR argument: INTEGER;
  11302. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11303. BEGIN Procedure (argument);
  11304. END Test.
  11305. negative: calling procedure with set variable parameter with long integer argument
  11306. MODULE Test;
  11307. VAR argument: LONGINT;
  11308. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11309. BEGIN Procedure (argument);
  11310. END Test.
  11311. negative: calling procedure with set variable parameter with huge integer argument
  11312. MODULE Test;
  11313. VAR argument: HUGEINT;
  11314. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11315. BEGIN Procedure (argument);
  11316. END Test.
  11317. negative: calling procedure with set variable parameter with real argument
  11318. MODULE Test;
  11319. VAR argument: REAL;
  11320. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11321. BEGIN Procedure (argument);
  11322. END Test.
  11323. negative: calling procedure with set variable parameter with long real argument
  11324. MODULE Test;
  11325. VAR argument: LONGREAL;
  11326. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11327. BEGIN Procedure (argument);
  11328. END Test.
  11329. positive: calling procedure with set variable parameter with set argument
  11330. MODULE Test;
  11331. VAR argument: SET;
  11332. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11333. BEGIN Procedure (argument);
  11334. END Test.
  11335. negative: calling procedure with set variable parameter with array argument
  11336. MODULE Test;
  11337. VAR argument: ARRAY 10 OF CHAR;
  11338. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11339. BEGIN Procedure (argument);
  11340. END Test.
  11341. negative: calling procedure with set variable parameter with record argument
  11342. MODULE Test;
  11343. VAR argument: RECORD END;
  11344. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11345. BEGIN Procedure (argument);
  11346. END Test.
  11347. negative: calling procedure with set variable parameter with object argument
  11348. MODULE Test;
  11349. VAR argument: OBJECT END;
  11350. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11351. BEGIN Procedure (argument);
  11352. END Test.
  11353. negative: calling procedure with set variable parameter with base object argument
  11354. MODULE Test;
  11355. VAR argument: OBJECT;
  11356. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11357. BEGIN Procedure (argument);
  11358. END Test.
  11359. negative: calling procedure with set variable parameter with pointer to array argument
  11360. MODULE Test;
  11361. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11362. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11363. BEGIN Procedure (argument);
  11364. END Test.
  11365. negative: calling procedure with set variable parameter with pointer to record argument
  11366. MODULE Test;
  11367. VAR argument: POINTER TO RECORD END;
  11368. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11369. BEGIN Procedure (argument);
  11370. END Test.
  11371. negative: calling procedure with set variable parameter with procedure argument
  11372. MODULE Test;
  11373. VAR argument: PROCEDURE;
  11374. PROCEDURE Procedure (VAR value: SET); END Procedure;
  11375. BEGIN Procedure (argument);
  11376. END Test.
  11377. negative: calling procedure with array variable parameter with boolean argument
  11378. MODULE Test;
  11379. VAR argument: BOOLEAN;
  11380. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11381. BEGIN Procedure (argument);
  11382. END Test.
  11383. negative: calling procedure with array variable parameter with character argument
  11384. MODULE Test;
  11385. VAR argument: CHAR;
  11386. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11387. BEGIN Procedure (argument);
  11388. END Test.
  11389. negative: calling procedure with array variable parameter with short integer argument
  11390. MODULE Test;
  11391. VAR argument: SHORTINT;
  11392. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11393. BEGIN Procedure (argument);
  11394. END Test.
  11395. negative: calling procedure with array variable parameter with integer argument
  11396. MODULE Test;
  11397. VAR argument: INTEGER;
  11398. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11399. BEGIN Procedure (argument);
  11400. END Test.
  11401. negative: calling procedure with array variable parameter with long integer argument
  11402. MODULE Test;
  11403. VAR argument: LONGINT;
  11404. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11405. BEGIN Procedure (argument);
  11406. END Test.
  11407. negative: calling procedure with array variable parameter with huge integer argument
  11408. MODULE Test;
  11409. VAR argument: HUGEINT;
  11410. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11411. BEGIN Procedure (argument);
  11412. END Test.
  11413. negative: calling procedure with array variable parameter with real argument
  11414. MODULE Test;
  11415. VAR argument: REAL;
  11416. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11417. BEGIN Procedure (argument);
  11418. END Test.
  11419. negative: calling procedure with array variable parameter with long real argument
  11420. MODULE Test;
  11421. VAR argument: LONGREAL;
  11422. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11423. BEGIN Procedure (argument);
  11424. END Test.
  11425. negative: calling procedure with array variable parameter with set argument
  11426. MODULE Test;
  11427. VAR argument: SET;
  11428. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11429. BEGIN Procedure (argument);
  11430. END Test.
  11431. positive: calling procedure with array variable parameter with array argument
  11432. MODULE Test;
  11433. VAR argument: ARRAY 10 OF CHAR;
  11434. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11435. BEGIN Procedure (argument);
  11436. END Test.
  11437. negative: calling procedure with array variable parameter with longer array argument
  11438. MODULE Test;
  11439. VAR argument: ARRAY 20 OF CHAR;
  11440. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11441. BEGIN Procedure (argument);
  11442. END Test.
  11443. negative: calling procedure with array variable parameter with record argument
  11444. MODULE Test;
  11445. VAR argument: RECORD END;
  11446. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11447. BEGIN Procedure (argument);
  11448. END Test.
  11449. negative: calling procedure with array variable parameter with object argument
  11450. MODULE Test;
  11451. VAR argument: OBJECT END;
  11452. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11453. BEGIN Procedure (argument);
  11454. END Test.
  11455. negative: calling procedure with array variable parameter with base object argument
  11456. MODULE Test;
  11457. VAR argument: OBJECT;
  11458. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11459. BEGIN Procedure (argument);
  11460. END Test.
  11461. negative: calling procedure with array variable parameter with pointer to array argument
  11462. MODULE Test;
  11463. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11464. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11465. BEGIN Procedure (argument);
  11466. END Test.
  11467. negative: calling procedure with array variable parameter with pointer to record argument
  11468. MODULE Test;
  11469. VAR argument: POINTER TO RECORD END;
  11470. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11471. BEGIN Procedure (argument);
  11472. END Test.
  11473. negative: calling procedure with array variable parameter with procedure argument
  11474. MODULE Test;
  11475. VAR argument: PROCEDURE;
  11476. PROCEDURE Procedure (VAR value: ARRAY 10 OF CHAR); END Procedure;
  11477. BEGIN Procedure (argument);
  11478. END Test.
  11479. negative: calling procedure with open array variable parameter with boolean argument
  11480. MODULE Test;
  11481. VAR argument: BOOLEAN;
  11482. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11483. BEGIN Procedure (argument);
  11484. END Test.
  11485. negative: calling procedure with open array variable parameter with character argument
  11486. MODULE Test;
  11487. VAR argument: CHAR;
  11488. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11489. BEGIN Procedure (argument);
  11490. END Test.
  11491. negative: calling procedure with open array variable parameter with short integer argument
  11492. MODULE Test;
  11493. VAR argument: SHORTINT;
  11494. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11495. BEGIN Procedure (argument);
  11496. END Test.
  11497. negative: calling procedure with open array variable parameter with integer argument
  11498. MODULE Test;
  11499. VAR argument: INTEGER;
  11500. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11501. BEGIN Procedure (argument);
  11502. END Test.
  11503. negative: calling procedure with open array variable parameter with long integer argument
  11504. MODULE Test;
  11505. VAR argument: LONGINT;
  11506. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11507. BEGIN Procedure (argument);
  11508. END Test.
  11509. negative: calling procedure with open array variable parameter with huge integer argument
  11510. MODULE Test;
  11511. VAR argument: HUGEINT;
  11512. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11513. BEGIN Procedure (argument);
  11514. END Test.
  11515. negative: calling procedure with open array variable parameter with real argument
  11516. MODULE Test;
  11517. VAR argument: REAL;
  11518. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11519. BEGIN Procedure (argument);
  11520. END Test.
  11521. negative: calling procedure with open array variable parameter with long real argument
  11522. MODULE Test;
  11523. VAR argument: LONGREAL;
  11524. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11525. BEGIN Procedure (argument);
  11526. END Test.
  11527. negative: calling procedure with open array variable parameter with set argument
  11528. MODULE Test;
  11529. VAR argument: SET;
  11530. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11531. BEGIN Procedure (argument);
  11532. END Test.
  11533. positive: calling procedure with open array variable parameter with array argument
  11534. MODULE Test;
  11535. VAR argument: ARRAY 10 OF CHAR;
  11536. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11537. BEGIN Procedure (argument);
  11538. END Test.
  11539. negative: calling procedure with open array variable parameter with record argument
  11540. MODULE Test;
  11541. VAR argument: RECORD END;
  11542. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11543. BEGIN Procedure (argument);
  11544. END Test.
  11545. negative: calling procedure with open array variable parameter with object argument
  11546. MODULE Test;
  11547. VAR argument: OBJECT END;
  11548. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11549. BEGIN Procedure (argument);
  11550. END Test.
  11551. negative: calling procedure with open array variable parameter with base object argument
  11552. MODULE Test;
  11553. VAR argument: OBJECT;
  11554. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11555. BEGIN Procedure (argument);
  11556. END Test.
  11557. negative: calling procedure with open array variable parameter with pointer to array argument
  11558. MODULE Test;
  11559. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11560. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11561. BEGIN Procedure (argument);
  11562. END Test.
  11563. negative: calling procedure with open array variable parameter with pointer to record argument
  11564. MODULE Test;
  11565. VAR argument: POINTER TO RECORD END;
  11566. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11567. BEGIN Procedure (argument);
  11568. END Test.
  11569. negative: calling procedure with open array variable parameter with procedure argument
  11570. MODULE Test;
  11571. VAR argument: PROCEDURE;
  11572. PROCEDURE Procedure (VAR value: ARRAY OF CHAR); END Procedure;
  11573. BEGIN Procedure (argument);
  11574. END Test.
  11575. negative: calling procedure with record variable parameter with boolean argument
  11576. MODULE Test;
  11577. VAR argument: BOOLEAN;
  11578. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11579. BEGIN Procedure (argument);
  11580. END Test.
  11581. negative: calling procedure with record variable parameter with character argument
  11582. MODULE Test;
  11583. VAR argument: CHAR;
  11584. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11585. BEGIN Procedure (argument);
  11586. END Test.
  11587. negative: calling procedure with record variable parameter with short integer argument
  11588. MODULE Test;
  11589. VAR argument: SHORTINT;
  11590. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11591. BEGIN Procedure (argument);
  11592. END Test.
  11593. negative: calling procedure with record variable parameter with integer argument
  11594. MODULE Test;
  11595. VAR argument: INTEGER;
  11596. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11597. BEGIN Procedure (argument);
  11598. END Test.
  11599. negative: calling procedure with record variable parameter with long integer argument
  11600. MODULE Test;
  11601. VAR argument: LONGINT;
  11602. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11603. BEGIN Procedure (argument);
  11604. END Test.
  11605. negative: calling procedure with record variable parameter with huge integer argument
  11606. MODULE Test;
  11607. VAR argument: HUGEINT;
  11608. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11609. BEGIN Procedure (argument);
  11610. END Test.
  11611. negative: calling procedure with record variable parameter with real argument
  11612. MODULE Test;
  11613. VAR argument: REAL;
  11614. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11615. BEGIN Procedure (argument);
  11616. END Test.
  11617. negative: calling procedure with record variable parameter with long real argument
  11618. MODULE Test;
  11619. VAR argument: LONGREAL;
  11620. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11621. BEGIN Procedure (argument);
  11622. END Test.
  11623. negative: calling procedure with record variable parameter with set argument
  11624. MODULE Test;
  11625. VAR argument: SET;
  11626. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11627. BEGIN Procedure (argument);
  11628. END Test.
  11629. negative: calling procedure with record variable parameter with array argument
  11630. MODULE Test;
  11631. VAR argument: ARRAY 10 OF CHAR;
  11632. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11633. BEGIN Procedure (argument);
  11634. END Test.
  11635. positive: calling procedure with record variable parameter with record argument
  11636. MODULE Test;
  11637. TYPE Record = RECORD END;
  11638. VAR argument: Record;
  11639. PROCEDURE Procedure (VAR value: Record); END Procedure;
  11640. BEGIN Procedure (argument);
  11641. END Test.
  11642. positive: calling procedure with record variable parameter with compatible record argument
  11643. MODULE Test;
  11644. TYPE Record = RECORD END;
  11645. VAR argument: RECORD (Record) END;
  11646. PROCEDURE Procedure (VAR value: Record); END Procedure;
  11647. BEGIN Procedure (argument);
  11648. END Test.
  11649. negative: calling procedure with record variable parameter with incompatible record argument
  11650. MODULE Test;
  11651. TYPE Record = RECORD END;
  11652. VAR argument: Record;
  11653. PROCEDURE Procedure (VAR value: RECORD (Record) END); END Procedure;
  11654. BEGIN Procedure (argument);
  11655. END Test.
  11656. negative: calling procedure with record variable parameter with object argument
  11657. MODULE Test;
  11658. VAR argument: OBJECT END;
  11659. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11660. BEGIN Procedure (argument);
  11661. END Test.
  11662. negative: calling procedure with record variable parameter with base object argument
  11663. MODULE Test;
  11664. VAR argument: OBJECT;
  11665. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11666. BEGIN Procedure (argument);
  11667. END Test.
  11668. negative: calling procedure with record variable parameter with pointer to array argument
  11669. MODULE Test;
  11670. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11671. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11672. BEGIN Procedure (argument);
  11673. END Test.
  11674. negative: calling procedure with record variable parameter with pointer to record argument
  11675. MODULE Test;
  11676. VAR argument: POINTER TO RECORD END;
  11677. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11678. BEGIN Procedure (argument);
  11679. END Test.
  11680. negative: calling procedure with record variable parameter with procedure argument
  11681. MODULE Test;
  11682. VAR argument: PROCEDURE;
  11683. PROCEDURE Procedure (VAR value: RECORD END); END Procedure;
  11684. BEGIN Procedure (argument);
  11685. END Test.
  11686. negative: calling procedure with object variable parameter with boolean argument
  11687. MODULE Test;
  11688. VAR argument: BOOLEAN;
  11689. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11690. BEGIN Procedure (argument);
  11691. END Test.
  11692. negative: calling procedure with object variable parameter with character argument
  11693. MODULE Test;
  11694. VAR argument: CHAR;
  11695. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11696. BEGIN Procedure (argument);
  11697. END Test.
  11698. negative: calling procedure with object variable parameter with short integer argument
  11699. MODULE Test;
  11700. VAR argument: SHORTINT;
  11701. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11702. BEGIN Procedure (argument);
  11703. END Test.
  11704. negative: calling procedure with object variable parameter with integer argument
  11705. MODULE Test;
  11706. VAR argument: INTEGER;
  11707. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11708. BEGIN Procedure (argument);
  11709. END Test.
  11710. negative: calling procedure with object variable parameter with long integer argument
  11711. MODULE Test;
  11712. VAR argument: LONGINT;
  11713. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11714. BEGIN Procedure (argument);
  11715. END Test.
  11716. negative: calling procedure with object variable parameter with huge integer argument
  11717. MODULE Test;
  11718. VAR argument: HUGEINT;
  11719. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11720. BEGIN Procedure (argument);
  11721. END Test.
  11722. negative: calling procedure with object variable parameter with real argument
  11723. MODULE Test;
  11724. VAR argument: REAL;
  11725. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11726. BEGIN Procedure (argument);
  11727. END Test.
  11728. negative: calling procedure with object variable parameter with long real argument
  11729. MODULE Test;
  11730. VAR argument: LONGREAL;
  11731. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11732. BEGIN Procedure (argument);
  11733. END Test.
  11734. negative: calling procedure with object variable parameter with set argument
  11735. MODULE Test;
  11736. VAR argument: SET;
  11737. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11738. BEGIN Procedure (argument);
  11739. END Test.
  11740. negative: calling procedure with object variable parameter with array argument
  11741. MODULE Test;
  11742. VAR argument: ARRAY 10 OF CHAR;
  11743. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11744. BEGIN Procedure (argument);
  11745. END Test.
  11746. negative: calling procedure with object variable parameter with record argument
  11747. MODULE Test;
  11748. VAR argument: RECORD END;
  11749. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11750. BEGIN Procedure (argument);
  11751. END Test.
  11752. positive: calling procedure with object variable parameter with object argument
  11753. MODULE Test;
  11754. TYPE Object = OBJECT END Object;
  11755. VAR argument: Object;
  11756. PROCEDURE Procedure (VAR value: Object); END Procedure;
  11757. BEGIN Procedure (argument);
  11758. END Test.
  11759. negative: calling procedure with object variable parameter with compatible object argument
  11760. MODULE Test;
  11761. TYPE Object = OBJECT END Object;
  11762. VAR argument: OBJECT (Object) END;
  11763. PROCEDURE Procedure (VAR value: Object); END Procedure;
  11764. BEGIN Procedure (argument);
  11765. END Test.
  11766. negative: calling procedure with object variable parameter with incompatible object argument
  11767. MODULE Test;
  11768. TYPE Object = OBJECT END Object;
  11769. VAR argument: Object;
  11770. PROCEDURE Procedure (VAR value: OBJECT (Object) END); END Procedure;
  11771. BEGIN Procedure (argument);
  11772. END Test.
  11773. negative: calling procedure with object variable parameter with base object argument
  11774. MODULE Test;
  11775. VAR argument: OBJECT;
  11776. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11777. BEGIN Procedure (argument);
  11778. END Test.
  11779. negative: calling procedure with object variable parameter with pointer to array argument
  11780. MODULE Test;
  11781. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11782. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11783. BEGIN Procedure (argument);
  11784. END Test.
  11785. negative: calling procedure with object variable parameter with pointer to record argument
  11786. MODULE Test;
  11787. VAR argument: POINTER TO RECORD END;
  11788. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11789. BEGIN Procedure (argument);
  11790. END Test.
  11791. negative: calling procedure with object variable parameter with procedure argument
  11792. MODULE Test;
  11793. VAR argument: PROCEDURE;
  11794. PROCEDURE Procedure (VAR value: OBJECT END); END Procedure;
  11795. BEGIN Procedure (argument);
  11796. END Test.
  11797. negative: calling procedure with base object variable parameter with boolean argument
  11798. MODULE Test;
  11799. VAR argument: BOOLEAN;
  11800. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11801. BEGIN Procedure (argument);
  11802. END Test.
  11803. negative: calling procedure with base object variable parameter with character argument
  11804. MODULE Test;
  11805. VAR argument: CHAR;
  11806. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11807. BEGIN Procedure (argument);
  11808. END Test.
  11809. negative: calling procedure with base object variable parameter with short integer argument
  11810. MODULE Test;
  11811. VAR argument: SHORTINT;
  11812. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11813. BEGIN Procedure (argument);
  11814. END Test.
  11815. negative: calling procedure with base object variable parameter with integer argument
  11816. MODULE Test;
  11817. VAR argument: INTEGER;
  11818. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11819. BEGIN Procedure (argument);
  11820. END Test.
  11821. negative: calling procedure with base object variable parameter with long integer argument
  11822. MODULE Test;
  11823. VAR argument: LONGINT;
  11824. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11825. BEGIN Procedure (argument);
  11826. END Test.
  11827. negative: calling procedure with base object variable parameter with huge integer argument
  11828. MODULE Test;
  11829. VAR argument: HUGEINT;
  11830. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11831. BEGIN Procedure (argument);
  11832. END Test.
  11833. negative: calling procedure with base object variable parameter with real argument
  11834. MODULE Test;
  11835. VAR argument: REAL;
  11836. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11837. BEGIN Procedure (argument);
  11838. END Test.
  11839. negative: calling procedure with base object variable parameter with long real argument
  11840. MODULE Test;
  11841. VAR argument: LONGREAL;
  11842. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11843. BEGIN Procedure (argument);
  11844. END Test.
  11845. negative: calling procedure with base object variable parameter with set argument
  11846. MODULE Test;
  11847. VAR argument: SET;
  11848. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11849. BEGIN Procedure (argument);
  11850. END Test.
  11851. negative: calling procedure with base object variable parameter with array argument
  11852. MODULE Test;
  11853. VAR argument: ARRAY 10 OF CHAR;
  11854. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11855. BEGIN Procedure (argument);
  11856. END Test.
  11857. negative: calling procedure with base object variable parameter with record argument
  11858. MODULE Test;
  11859. VAR argument: RECORD END;
  11860. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11861. BEGIN Procedure (argument);
  11862. END Test.
  11863. negative: calling procedure with base object variable parameter with object argument
  11864. MODULE Test;
  11865. VAR argument: OBJECT END;
  11866. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11867. BEGIN Procedure (argument);
  11868. END Test.
  11869. positive: calling procedure with base object variable parameter with base object argument
  11870. MODULE Test;
  11871. VAR argument: OBJECT;
  11872. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11873. BEGIN Procedure (argument);
  11874. END Test.
  11875. negative: calling procedure with base object variable parameter with pointer to array argument
  11876. MODULE Test;
  11877. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11878. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11879. BEGIN Procedure (argument);
  11880. END Test.
  11881. negative: calling procedure with base object variable parameter with pointer to record argument
  11882. MODULE Test;
  11883. VAR argument: POINTER TO RECORD END;
  11884. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11885. BEGIN Procedure (argument);
  11886. END Test.
  11887. negative: calling procedure with base object variable parameter with procedure argument
  11888. MODULE Test;
  11889. VAR argument: PROCEDURE;
  11890. PROCEDURE Procedure (VAR value: OBJECT); END Procedure;
  11891. BEGIN Procedure (argument);
  11892. END Test.
  11893. negative: calling procedure with pointer to array variable parameter with boolean argument
  11894. MODULE Test;
  11895. VAR argument: BOOLEAN;
  11896. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11897. BEGIN Procedure (argument);
  11898. END Test.
  11899. negative: calling procedure with pointer to array variable parameter with character argument
  11900. MODULE Test;
  11901. VAR argument: CHAR;
  11902. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11903. BEGIN Procedure (argument);
  11904. END Test.
  11905. negative: calling procedure with pointer to array variable parameter with short integer argument
  11906. MODULE Test;
  11907. VAR argument: SHORTINT;
  11908. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11909. BEGIN Procedure (argument);
  11910. END Test.
  11911. negative: calling procedure with pointer to array variable parameter with integer argument
  11912. MODULE Test;
  11913. VAR argument: INTEGER;
  11914. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11915. BEGIN Procedure (argument);
  11916. END Test.
  11917. negative: calling procedure with pointer to array variable parameter with long integer argument
  11918. MODULE Test;
  11919. VAR argument: LONGINT;
  11920. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11921. BEGIN Procedure (argument);
  11922. END Test.
  11923. negative: calling procedure with pointer to array variable parameter with huge integer argument
  11924. MODULE Test;
  11925. VAR argument: HUGEINT;
  11926. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11927. BEGIN Procedure (argument);
  11928. END Test.
  11929. negative: calling procedure with pointer to array variable parameter with real argument
  11930. MODULE Test;
  11931. VAR argument: REAL;
  11932. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11933. BEGIN Procedure (argument);
  11934. END Test.
  11935. negative: calling procedure with pointer to array variable parameter with long real argument
  11936. MODULE Test;
  11937. VAR argument: LONGREAL;
  11938. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11939. BEGIN Procedure (argument);
  11940. END Test.
  11941. negative: calling procedure with pointer to array variable parameter with set argument
  11942. MODULE Test;
  11943. VAR argument: SET;
  11944. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11945. BEGIN Procedure (argument);
  11946. END Test.
  11947. negative: calling procedure with pointer to array variable parameter with array argument
  11948. MODULE Test;
  11949. VAR argument: ARRAY 10 OF CHAR;
  11950. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11951. BEGIN Procedure (argument);
  11952. END Test.
  11953. negative: calling procedure with pointer to array variable parameter with record argument
  11954. MODULE Test;
  11955. VAR argument: RECORD END;
  11956. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11957. BEGIN Procedure (argument);
  11958. END Test.
  11959. negative: calling procedure with pointer to array variable parameter with object argument
  11960. MODULE Test;
  11961. VAR argument: OBJECT END;
  11962. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11963. BEGIN Procedure (argument);
  11964. END Test.
  11965. negative: calling procedure with pointer to array variable parameter with base object argument
  11966. MODULE Test;
  11967. VAR argument: OBJECT;
  11968. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11969. BEGIN Procedure (argument);
  11970. END Test.
  11971. positive: calling procedure with pointer to array variable parameter with pointer to array argument
  11972. MODULE Test;
  11973. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  11974. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11975. BEGIN Procedure (argument);
  11976. END Test.
  11977. negative: calling procedure with pointer to array variable parameter with pointer to record argument
  11978. MODULE Test;
  11979. VAR argument: POINTER TO RECORD END;
  11980. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11981. BEGIN Procedure (argument);
  11982. END Test.
  11983. negative: calling procedure with pointer to array variable parameter with procedure argument
  11984. MODULE Test;
  11985. VAR argument: PROCEDURE;
  11986. PROCEDURE Procedure (VAR value: POINTER TO ARRAY 10 OF CHAR); END Procedure;
  11987. BEGIN Procedure (argument);
  11988. END Test.
  11989. negative: calling procedure with pointer to record variable parameter with boolean argument
  11990. MODULE Test;
  11991. VAR argument: BOOLEAN;
  11992. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  11993. BEGIN Procedure (argument);
  11994. END Test.
  11995. negative: calling procedure with pointer to record variable parameter with character argument
  11996. MODULE Test;
  11997. VAR argument: CHAR;
  11998. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  11999. BEGIN Procedure (argument);
  12000. END Test.
  12001. negative: calling procedure with pointer to record variable parameter with short integer argument
  12002. MODULE Test;
  12003. VAR argument: SHORTINT;
  12004. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12005. BEGIN Procedure (argument);
  12006. END Test.
  12007. negative: calling procedure with pointer to record variable parameter with integer argument
  12008. MODULE Test;
  12009. VAR argument: INTEGER;
  12010. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12011. BEGIN Procedure (argument);
  12012. END Test.
  12013. negative: calling procedure with pointer to record variable parameter with long integer argument
  12014. MODULE Test;
  12015. VAR argument: LONGINT;
  12016. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12017. BEGIN Procedure (argument);
  12018. END Test.
  12019. negative: calling procedure with pointer to record variable parameter with huge integer argument
  12020. MODULE Test;
  12021. VAR argument: HUGEINT;
  12022. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12023. BEGIN Procedure (argument);
  12024. END Test.
  12025. negative: calling procedure with pointer to record variable parameter with real argument
  12026. MODULE Test;
  12027. VAR argument: REAL;
  12028. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12029. BEGIN Procedure (argument);
  12030. END Test.
  12031. negative: calling procedure with pointer to record variable parameter with long real argument
  12032. MODULE Test;
  12033. VAR argument: LONGREAL;
  12034. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12035. BEGIN Procedure (argument);
  12036. END Test.
  12037. negative: calling procedure with pointer to record variable parameter with set argument
  12038. MODULE Test;
  12039. VAR argument: SET;
  12040. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12041. BEGIN Procedure (argument);
  12042. END Test.
  12043. negative: calling procedure with pointer to record variable parameter with array argument
  12044. MODULE Test;
  12045. VAR argument: ARRAY 10 OF CHAR;
  12046. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12047. BEGIN Procedure (argument);
  12048. END Test.
  12049. negative: calling procedure with pointer to record variable parameter with record argument
  12050. MODULE Test;
  12051. VAR argument: RECORD END;
  12052. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12053. BEGIN Procedure (argument);
  12054. END Test.
  12055. negative: calling procedure with pointer to record variable parameter with object argument
  12056. MODULE Test;
  12057. VAR argument: OBJECT END;
  12058. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12059. BEGIN Procedure (argument);
  12060. END Test.
  12061. negative: calling procedure with pointer to record variable parameter with base object argument
  12062. MODULE Test;
  12063. VAR argument: OBJECT;
  12064. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12065. BEGIN Procedure (argument);
  12066. END Test.
  12067. negative: calling procedure with pointer to record variable parameter with pointer to array argument
  12068. MODULE Test;
  12069. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  12070. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12071. BEGIN Procedure (argument);
  12072. END Test.
  12073. positive: calling procedure with pointer to record variable parameter with pointer to record argument
  12074. MODULE Test;
  12075. TYPE Record = RECORD END;
  12076. VAR argument: POINTER TO Record;
  12077. PROCEDURE Procedure (VAR value: POINTER TO Record); END Procedure;
  12078. BEGIN Procedure (argument);
  12079. END Test.
  12080. negative: calling procedure with pointer to record variable parameter with compatible pointer to record argument
  12081. MODULE Test;
  12082. TYPE Record = RECORD END;
  12083. VAR argument: POINTER TO RECORD (Record) END;
  12084. PROCEDURE Procedure (VAR value: POINTER TO Record); END Procedure;
  12085. BEGIN Procedure (argument);
  12086. END Test.
  12087. negative: calling procedure with pointer to record variable parameter with incompatible pointer to record argument
  12088. MODULE Test;
  12089. TYPE Record = RECORD END;
  12090. VAR argument: POINTER TO Record;
  12091. PROCEDURE Procedure (VAR value: POINTER TO RECORD (Record) END); END Procedure;
  12092. BEGIN Procedure (argument);
  12093. END Test.
  12094. negative: calling procedure with pointer to record variable parameter with procedure argument
  12095. MODULE Test;
  12096. VAR argument: PROCEDURE;
  12097. PROCEDURE Procedure (VAR value: POINTER TO RECORD END); END Procedure;
  12098. BEGIN Procedure (argument);
  12099. END Test.
  12100. negative: calling procedure with procedure variable parameter with boolean argument
  12101. MODULE Test;
  12102. VAR argument: BOOLEAN;
  12103. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12104. BEGIN Procedure (argument);
  12105. END Test.
  12106. negative: calling procedure with procedure variable parameter with character argument
  12107. MODULE Test;
  12108. VAR argument: CHAR;
  12109. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12110. BEGIN Procedure (argument);
  12111. END Test.
  12112. negative: calling procedure with procedure variable parameter with short integer argument
  12113. MODULE Test;
  12114. VAR argument: SHORTINT;
  12115. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12116. BEGIN Procedure (argument);
  12117. END Test.
  12118. negative: calling procedure with procedure variable parameter with integer argument
  12119. MODULE Test;
  12120. VAR argument: INTEGER;
  12121. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12122. BEGIN Procedure (argument);
  12123. END Test.
  12124. negative: calling procedure with procedure variable parameter with long integer argument
  12125. MODULE Test;
  12126. VAR argument: LONGINT;
  12127. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12128. BEGIN Procedure (argument);
  12129. END Test.
  12130. negative: calling procedure with procedure variable parameter with huge integer argument
  12131. MODULE Test;
  12132. VAR argument: HUGEINT;
  12133. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12134. BEGIN Procedure (argument);
  12135. END Test.
  12136. negative: calling procedure with procedure variable parameter with real argument
  12137. MODULE Test;
  12138. VAR argument: REAL;
  12139. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12140. BEGIN Procedure (argument);
  12141. END Test.
  12142. negative: calling procedure with procedure variable parameter with long real argument
  12143. MODULE Test;
  12144. VAR argument: LONGREAL;
  12145. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12146. BEGIN Procedure (argument);
  12147. END Test.
  12148. negative: calling procedure with procedure variable parameter with set argument
  12149. MODULE Test;
  12150. VAR argument: SET;
  12151. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12152. BEGIN Procedure (argument);
  12153. END Test.
  12154. negative: calling procedure with procedure variable parameter with array argument
  12155. MODULE Test;
  12156. VAR argument: ARRAY 10 OF CHAR;
  12157. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12158. BEGIN Procedure (argument);
  12159. END Test.
  12160. negative: calling procedure with procedure variable parameter with record argument
  12161. MODULE Test;
  12162. VAR argument: RECORD END;
  12163. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12164. BEGIN Procedure (argument);
  12165. END Test.
  12166. negative: calling procedure with procedure variable parameter with object argument
  12167. MODULE Test;
  12168. VAR argument: OBJECT END;
  12169. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12170. BEGIN Procedure (argument);
  12171. END Test.
  12172. negative: calling procedure with procedure variable parameter with base object argument
  12173. MODULE Test;
  12174. VAR argument: OBJECT;
  12175. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12176. BEGIN Procedure (argument);
  12177. END Test.
  12178. negative: calling procedure with procedure variable parameter with pointer to array argument
  12179. MODULE Test;
  12180. VAR argument: POINTER TO ARRAY 10 OF CHAR;
  12181. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12182. BEGIN Procedure (argument);
  12183. END Test.
  12184. negative: calling procedure with procedure variable parameter with pointer to record argument
  12185. MODULE Test;
  12186. VAR argument: POINTER TO RECORD END;
  12187. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12188. BEGIN Procedure (argument);
  12189. END Test.
  12190. positive: calling procedure with procedure variable parameter with procedure argument
  12191. MODULE Test;
  12192. VAR argument: PROCEDURE;
  12193. PROCEDURE Procedure (VAR value: PROCEDURE); END Procedure;
  12194. BEGIN Procedure (argument);
  12195. END Test.
  12196. negative: calling procedure returning boolean
  12197. MODULE Test;
  12198. PROCEDURE Procedure (): BOOLEAN; END Procedure;
  12199. BEGIN Procedure
  12200. END Test.
  12201. negative: calling procedure returning character
  12202. MODULE Test;
  12203. PROCEDURE Procedure (): CHAR; END Procedure;
  12204. BEGIN Procedure
  12205. END Test.
  12206. negative: calling procedure returning integer
  12207. MODULE Test;
  12208. PROCEDURE Procedure (): INTEGER; END Procedure;
  12209. BEGIN Procedure
  12210. END Test.
  12211. negative: calling procedure returning real
  12212. MODULE Test;
  12213. PROCEDURE Procedure (): REAL; END Procedure;
  12214. BEGIN Procedure
  12215. END Test.
  12216. negative: calling procedure returning set
  12217. MODULE Test;
  12218. PROCEDURE Procedure (): SET; END Procedure;
  12219. BEGIN Procedure
  12220. END Test.
  12221. negative: calling procedure returning array
  12222. MODULE Test;
  12223. PROCEDURE Procedure (): ARRAY 10 OF CHAR; END Procedure;
  12224. BEGIN Procedure
  12225. END Test.
  12226. negative: calling procedure returning record
  12227. MODULE Test;
  12228. PROCEDURE Procedure (): RECORD END; END Procedure;
  12229. BEGIN Procedure
  12230. END Test.
  12231. negative: calling procedure returning object
  12232. MODULE Test;
  12233. PROCEDURE Procedure (): OBJECT END; END Procedure;
  12234. BEGIN Procedure
  12235. END Test.
  12236. negative: calling procedure returning base object
  12237. MODULE Test;
  12238. PROCEDURE Procedure (): OBJECT; END Procedure;
  12239. BEGIN Procedure
  12240. END Test.
  12241. negative: calling procedure returning pointer to array
  12242. MODULE Test;
  12243. PROCEDURE Procedure (): POINTER TO ARRAY 10 OF CHAR; END Procedure;
  12244. BEGIN Procedure
  12245. END Test.
  12246. negative: calling procedure returning pointer to record
  12247. MODULE Test;
  12248. PROCEDURE Procedure (): POINTER TO ARRAY 10 OF RECORD END; END Procedure;
  12249. BEGIN Procedure
  12250. END Test.
  12251. negative: calling procedure returning procedure
  12252. MODULE Test;
  12253. PROCEDURE Procedure (): PROCEDURE; END Procedure;
  12254. BEGIN Procedure
  12255. END Test.
  12256. # initializers
  12257. negative: initializer within module
  12258. MODULE Test;
  12259. PROCEDURE &Initializer; END Initializer;
  12260. END Test.
  12261. negative: initializer within procedure
  12262. MODULE Test;
  12263. PROCEDURE Procedure;
  12264. PROCEDURE &Initializer; END Initializer;
  12265. END Procedure;
  12266. END Test.
  12267. negative: initializer within nested procedure
  12268. MODULE Test;
  12269. PROCEDURE Procedure;
  12270. PROCEDURE Procedure;
  12271. PROCEDURE &Initializer; END Initializer;
  12272. END Procedure;
  12273. END Procedure;
  12274. END Test.
  12275. positive: initializer within object
  12276. MODULE Test;
  12277. TYPE Object = OBJECT
  12278. PROCEDURE &Initializer; END Initializer;
  12279. END Object;
  12280. END Test.
  12281. positive: initializer within object in procedure
  12282. MODULE Test;
  12283. PROCEDURE Procedure;
  12284. TYPE Object = OBJECT
  12285. PROCEDURE &Initializer; END Initializer;
  12286. END Object;
  12287. END Procedure;
  12288. END Test.
  12289. negative: initializer within procedure in object
  12290. MODULE Test;
  12291. TYPE Object = OBJECT
  12292. PROCEDURE Procedure;
  12293. PROCEDURE &Initializer; END Initializer;
  12294. END Procedure;
  12295. END Object;
  12296. END Test.
  12297. negative: initializer within nested procedure in object
  12298. MODULE Test;
  12299. TYPE Object = OBJECT
  12300. PROCEDURE Procedure;
  12301. PROCEDURE Procedure;
  12302. PROCEDURE &Initializer; END Initializer;
  12303. END Procedure;
  12304. END Procedure;
  12305. END Object;
  12306. END Test.
  12307. negative: two initializers in object
  12308. MODULE Test;
  12309. TYPE Object = OBJECT
  12310. PROCEDURE &Initializer1; END Initializer1;
  12311. PROCEDURE &Initializer2; END Initializer2;
  12312. END Object;
  12313. END Test.
  12314. negative: two initializers in object with same name
  12315. MODULE Test;
  12316. TYPE Object = OBJECT
  12317. PROCEDURE &Initializer; END Initializer;
  12318. PROCEDURE &Initializer; END Initializer;
  12319. END Object;
  12320. END Test.
  12321. positive: initializer without return type
  12322. MODULE Test;
  12323. TYPE Object = OBJECT
  12324. PROCEDURE &Initializer; END Initializer;
  12325. END Object;
  12326. END Test.
  12327. negative: initializer with return type
  12328. MODULE Test;
  12329. TYPE Object = OBJECT
  12330. PROCEDURE &Initializer (): Object; END Initializer;
  12331. END Object;
  12332. END Test.
  12333. positive: initializer with parameter
  12334. MODULE Test;
  12335. TYPE Object = OBJECT
  12336. PROCEDURE &Initializer (object: Object); END Initializer;
  12337. END Object;
  12338. END Test.
  12339. positive: initializer with parameters
  12340. MODULE Test;
  12341. TYPE Object = OBJECT
  12342. PROCEDURE &Initializer (a, b: Object); END Initializer;
  12343. END Object;
  12344. END Test.
  12345. # statement blocks
  12346. negative: invalid block modifier notag
  12347. MODULE Test;
  12348. BEGIN {NOTAG};
  12349. END Test.
  12350. negative: invalid block modifier delegate
  12351. MODULE Test;
  12352. BEGIN {DELEGATE};
  12353. END Test.
  12354. negative: repeated exclusive block modifier
  12355. MODULE Test;
  12356. BEGIN {EXCLUSIVE, EXCLUSIVE};
  12357. END Test.
  12358. negative: repeated active block modifier
  12359. MODULE Test;
  12360. TYPE Object = OBJECT
  12361. BEGIN {ACTIVE,ACTIVE}
  12362. END Object;
  12363. END Test.
  12364. positive: exclusive module body
  12365. MODULE Test;
  12366. BEGIN {EXCLUSIVE}
  12367. END Test.
  12368. positive: nested exclusive module body
  12369. MODULE Test;
  12370. BEGIN BEGIN {EXCLUSIVE} END
  12371. END Test.
  12372. negative: exclusive block in exclusive module body
  12373. MODULE Test;
  12374. BEGIN {EXCLUSIVE} BEGIN {EXCLUSIVE} END
  12375. END Test.
  12376. negative: exclusive block in active module body
  12377. MODULE Test;
  12378. BEGIN {ACTIVE} BEGIN {EXCLUSIVE} END
  12379. END Test.
  12380. positive: exclusive object body
  12381. MODULE Test;
  12382. TYPE Object = OBJECT
  12383. BEGIN {EXCLUSIVE}
  12384. END Object;
  12385. END Test.
  12386. positive: nested exclusive object body
  12387. MODULE Test;
  12388. TYPE Object = OBJECT
  12389. BEGIN BEGIN {EXCLUSIVE} END
  12390. END Object;
  12391. END Test.
  12392. negative: exclusive block in exclusive object body
  12393. MODULE Test;
  12394. TYPE Object = OBJECT
  12395. BEGIN {EXCLUSIVE} BEGIN {EXCLUSIVE} END
  12396. END Object;
  12397. END Test.
  12398. positive: exclusive block in active object body
  12399. MODULE Test;
  12400. TYPE Object = OBJECT
  12401. BEGIN {ACTIVE} BEGIN {EXCLUSIVE} END
  12402. END Object;
  12403. END Test.
  12404. positive: exclusive procedure body within module
  12405. MODULE Test;
  12406. PROCEDURE Procedure;
  12407. BEGIN {EXCLUSIVE}
  12408. END Procedure;
  12409. END Test.
  12410. positive: nested exclusive procedure body within module
  12411. MODULE Test;
  12412. PROCEDURE Procedure;
  12413. BEGIN BEGIN {EXCLUSIVE} END
  12414. END Procedure;
  12415. END Test.
  12416. negative: exclusive block in exclusive procedure body within module
  12417. MODULE Test;
  12418. PROCEDURE Procedure;
  12419. BEGIN {EXCLUSIVE} BEGIN {EXCLUSIVE} END
  12420. END Procedure;
  12421. END Test.
  12422. negative: exclusive block in active procedure body within module
  12423. MODULE Test;
  12424. PROCEDURE Procedure;
  12425. BEGIN {ACTIVE} BEGIN {EXCLUSIVE} END
  12426. END Procedure;
  12427. END Test.
  12428. positive: exclusive procedure body within object
  12429. MODULE Test;
  12430. TYPE Object = OBJECT
  12431. PROCEDURE Procedure;
  12432. BEGIN {EXCLUSIVE}
  12433. END Procedure;
  12434. END Object;
  12435. END Test.
  12436. positive: exclusive nested procedure body within object
  12437. MODULE Test;
  12438. TYPE Object = OBJECT
  12439. PROCEDURE Procedure;
  12440. BEGIN BEGIN {EXCLUSIVE} END
  12441. END Procedure;
  12442. END Object;
  12443. END Test.
  12444. negative: exclusive block in exclusive procedure body within object
  12445. MODULE Test;
  12446. TYPE Object = OBJECT
  12447. PROCEDURE Procedure;
  12448. BEGIN {EXCLUSIVE} BEGIN {EXCLUSIVE} END
  12449. END Procedure;
  12450. END Object;
  12451. END Test.
  12452. negative: exclusive block in active procedure body within object
  12453. MODULE Test;
  12454. TYPE Object = OBJECT
  12455. PROCEDURE Procedure;
  12456. BEGIN {ACTIVE} BEGIN {EXCLUSIVE} END
  12457. END Procedure;
  12458. END Object;
  12459. END Test.
  12460. negative: active module body
  12461. MODULE Test;
  12462. BEGIN {ACTIVE}
  12463. END Test.
  12464. negative: nested active module body
  12465. MODULE Test;
  12466. BEGIN BEGIN {ACTIVE} END
  12467. END Test.
  12468. negative: active block in active module body
  12469. MODULE Test;
  12470. BEGIN {ACTIVE} BEGIN {ACTIVE} END
  12471. END Test.
  12472. negative: active block in exclusive module body
  12473. MODULE Test;
  12474. BEGIN {EXCLUSIVE} BEGIN {ACTIVE} END
  12475. END Test.
  12476. positive: active object body
  12477. MODULE Test;
  12478. TYPE Object = OBJECT
  12479. BEGIN {ACTIVE}
  12480. END Object;
  12481. END Test.
  12482. negative: nested active object body
  12483. MODULE Test;
  12484. TYPE Object = OBJECT
  12485. BEGIN BEGIN {ACTIVE} END
  12486. END Object;
  12487. END Test.
  12488. negative: active block in active object body
  12489. MODULE Test;
  12490. TYPE Object = OBJECT
  12491. BEGIN {ACTIVE} BEGIN {ACTIVE} END
  12492. END Object;
  12493. END Test.
  12494. negative: active block in exclusive object body
  12495. MODULE Test;
  12496. TYPE Object = OBJECT
  12497. BEGIN {EXCLUSIVE} BEGIN {ACTIVE} END
  12498. END Object;
  12499. END Test.
  12500. negative: active procedure body within module
  12501. MODULE Test;
  12502. PROCEDURE Procedure;
  12503. BEGIN {ACTIVE}
  12504. END Procedure;
  12505. END Test.
  12506. negative: nested active procedure body within module
  12507. MODULE Test;
  12508. PROCEDURE Procedure;
  12509. BEGIN BEGIN {ACTIVE} END
  12510. END Procedure;
  12511. END Test.
  12512. negative: active block in active procedure body within module
  12513. MODULE Test;
  12514. PROCEDURE Procedure;
  12515. BEGIN {ACTIVE} BEGIN {ACTIVE} END
  12516. END Procedure;
  12517. END Test.
  12518. negative: active block in exclusive procedure body within module
  12519. MODULE Test;
  12520. PROCEDURE Procedure;
  12521. BEGIN {EXCLUSIVE} BEGIN {ACTIVE} END
  12522. END Procedure;
  12523. END Test.
  12524. negative: active procedure body within object
  12525. MODULE Test;
  12526. TYPE Object = OBJECT
  12527. PROCEDURE Procedure;
  12528. BEGIN {ACTIVE}
  12529. END Procedure;
  12530. END Object;
  12531. END Test.
  12532. negative: active nested procedure body within object
  12533. MODULE Test;
  12534. TYPE Object = OBJECT
  12535. PROCEDURE Procedure;
  12536. BEGIN BEGIN {ACTIVE} END
  12537. END Procedure;
  12538. END Object;
  12539. END Test.
  12540. negative: active block in active procedure body within object
  12541. MODULE Test;
  12542. TYPE Object = OBJECT
  12543. PROCEDURE Procedure;
  12544. BEGIN {ACTIVE} BEGIN {ACTIVE} END
  12545. END Procedure;
  12546. END Object;
  12547. END Test.
  12548. negative: active block in exclusive procedure body within object
  12549. MODULE Test;
  12550. TYPE Object = OBJECT
  12551. PROCEDURE Procedure;
  12552. BEGIN {EXCLUSIVE} BEGIN {ACTIVE} END
  12553. END Procedure;
  12554. END Object;
  12555. END Test.
  12556. negative: exclusive and active module body
  12557. MODULE Test;
  12558. BEGIN {EXCLUSIVE, ACTIVE}
  12559. END Test.
  12560. negative: nested exclusive and active module body
  12561. MODULE Test;
  12562. BEGIN BEGIN {EXCLUSIVE, ACTIVE} END
  12563. END Test.
  12564. negative: exclusive and active block in exclusive and active module body
  12565. MODULE Test;
  12566. BEGIN {EXCLUSIVE, ACTIVE} BEGIN {EXCLUSIVE, ACTIVE} END
  12567. END Test.
  12568. positive: exclusive and active object body
  12569. MODULE Test;
  12570. TYPE Object = OBJECT
  12571. BEGIN {EXCLUSIVE, ACTIVE}
  12572. END Object;
  12573. END Test.
  12574. negative: nested exclusive and active object body
  12575. MODULE Test;
  12576. TYPE Object = OBJECT
  12577. BEGIN BEGIN {EXCLUSIVE, ACTIVE} END
  12578. END Object;
  12579. END Test.
  12580. negative: exclusive and active block in exclusive and active object body
  12581. MODULE Test;
  12582. TYPE Object = OBJECT
  12583. BEGIN {EXCLUSIVE, ACTIVE} BEGIN {EXCLUSIVE, ACTIVE} END
  12584. END Object;
  12585. END Test.
  12586. negative: exclusive and active procedure body within module
  12587. MODULE Test;
  12588. PROCEDURE Procedure;
  12589. BEGIN {EXCLUSIVE, ACTIVE}
  12590. END Procedure;
  12591. END Test.
  12592. negative: nested exclusive and active procedure body within module
  12593. MODULE Test;
  12594. PROCEDURE Procedure;
  12595. BEGIN BEGIN {EXCLUSIVE, ACTIVE} END
  12596. END Procedure;
  12597. END Test.
  12598. negative: exclusive and active block in exclusive and active procedure body within module
  12599. MODULE Test;
  12600. PROCEDURE Procedure;
  12601. BEGIN {EXCLUSIVE, ACTIVE} BEGIN {EXCLUSIVE, ACTIVE} END
  12602. END Procedure;
  12603. END Test.
  12604. negative: exclusive and active procedure body within object
  12605. MODULE Test;
  12606. TYPE Object = OBJECT
  12607. PROCEDURE Procedure;
  12608. BEGIN {EXCLUSIVE, ACTIVE}
  12609. END Procedure;
  12610. END Object;
  12611. END Test.
  12612. negative: exclusive and active nested procedure body within object
  12613. MODULE Test;
  12614. TYPE Object = OBJECT
  12615. PROCEDURE Procedure;
  12616. BEGIN BEGIN {EXCLUSIVE, ACTIVE} END
  12617. END Procedure;
  12618. END Object;
  12619. END Test.
  12620. negative: exclusive and active block in exclusive and active procedure body within object
  12621. MODULE Test;
  12622. TYPE Object = OBJECT
  12623. PROCEDURE Procedure;
  12624. BEGIN {EXCLUSIVE, ACTIVE} BEGIN {EXCLUSIVE, ACTIVE} END
  12625. END Procedure;
  12626. END Object;
  12627. END Test.
  12628. # while statement
  12629. positive: while statement with constant true condition
  12630. MODULE Test;
  12631. BEGIN WHILE TRUE DO END;
  12632. END Test.
  12633. positive: while statement with constant false condition
  12634. MODULE Test;
  12635. BEGIN WHILE FALSE DO END;
  12636. END Test.
  12637. negative: while statement with constant condition of type character
  12638. MODULE Test;
  12639. BEGIN WHILE 'a' DO END;
  12640. END Test.
  12641. negative: while statement with constant condition of type integer
  12642. MODULE Test;
  12643. BEGIN WHILE 5 DO END;
  12644. END Test.
  12645. negative: while statement with constant condition of type real
  12646. MODULE Test;
  12647. BEGIN WHILE 4.5 DO END;
  12648. END Test.
  12649. negative: while statement with constant condition of type set
  12650. MODULE Test;
  12651. BEGIN WHILE {5} DO END;
  12652. END Test.
  12653. negative: while statement with constant condition of type string
  12654. MODULE Test;
  12655. BEGIN WHILE "condition" DO END;
  12656. END Test.
  12657. negative: while statement with constant condition of type nil pointer
  12658. MODULE Test;
  12659. BEGIN WHILE NIL DO END;
  12660. END Test.
  12661. positive: while statement with condition of type boolean
  12662. MODULE Test;
  12663. VAR condition: BOOLEAN;
  12664. BEGIN WHILE condition DO END;
  12665. END Test.
  12666. negative: while statement with condition of type character
  12667. MODULE Test;
  12668. VAR condition: CHAR;
  12669. BEGIN WHILE condition DO END;
  12670. END Test.
  12671. negative: while statement with condition of type short integer
  12672. MODULE Test;
  12673. VAR condition: SHORTINT;
  12674. BEGIN WHILE condition DO END;
  12675. END Test.
  12676. negative: while statement with condition of type integer
  12677. MODULE Test;
  12678. VAR condition: INTEGER;
  12679. BEGIN WHILE condition DO END;
  12680. END Test.
  12681. negative: while statement with condition of type long integer
  12682. MODULE Test;
  12683. VAR condition: LONGINT;
  12684. BEGIN WHILE condition DO END;
  12685. END Test.
  12686. negative: while statement with condition of type huge integer
  12687. MODULE Test;
  12688. VAR condition: HUGEINT;
  12689. BEGIN WHILE condition DO END;
  12690. END Test.
  12691. negative: while statement with condition of type real
  12692. MODULE Test;
  12693. VAR condition: REAL;
  12694. BEGIN WHILE condition DO END;
  12695. END Test.
  12696. negative: while statement with condition of type long real
  12697. MODULE Test;
  12698. VAR condition: LONGREAL;
  12699. BEGIN WHILE condition DO END;
  12700. END Test.
  12701. negative: while statement with condition of type set
  12702. MODULE Test;
  12703. VAR condition: SET;
  12704. BEGIN WHILE condition DO END;
  12705. END Test.
  12706. negative: while statement with condition of type array
  12707. MODULE Test;
  12708. VAR condition: ARRAY 10 OF CHAR;
  12709. BEGIN WHILE condition DO END;
  12710. END Test.
  12711. negative: while statement with condition of type record
  12712. MODULE Test;
  12713. VAR condition: RECORD END;
  12714. BEGIN WHILE condition DO END;
  12715. END Test.
  12716. negative: while statement with condition of type object
  12717. MODULE Test;
  12718. VAR condition: OBJECT;
  12719. BEGIN WHILE condition DO END;
  12720. END Test.
  12721. negative: while statement with condition of type pointer
  12722. MODULE Test;
  12723. VAR condition: POINTER TO RECORD END;
  12724. BEGIN WHILE condition DO END;
  12725. END Test.
  12726. negative: while statement with condition of type procedure
  12727. MODULE Test;
  12728. VAR condition: PROCEDURE;
  12729. BEGIN WHILE condition DO END;
  12730. END Test.
  12731. negative: while statement with import as condition
  12732. MODULE Test;
  12733. IMPORT condition := Dummy;
  12734. BEGIN WHILE condition DO END;
  12735. END Test.
  12736. negative: while statement with type as condition
  12737. MODULE Test;
  12738. TYPE condition = BOOLEAN;
  12739. BEGIN WHILE condition DO END;
  12740. END Test.
  12741. # repeat statement
  12742. positive: repeat statement with constant true condition
  12743. MODULE Test;
  12744. BEGIN REPEAT UNTIL TRUE;
  12745. END Test.
  12746. positive: repeat statement with constant false condition
  12747. MODULE Test;
  12748. BEGIN REPEAT UNTIL FALSE;
  12749. END Test.
  12750. negative: repeat statement with constant condition of type character
  12751. MODULE Test;
  12752. BEGIN REPEAT UNTIL 'a';
  12753. END Test.
  12754. negative: repeat statement with constant condition of type integer
  12755. MODULE Test;
  12756. BEGIN REPEAT UNTIL 5;
  12757. END Test.
  12758. negative: repeat statement with constant condition of type real
  12759. MODULE Test;
  12760. BEGIN REPEAT UNTIL 4.5;
  12761. END Test.
  12762. negative: repeat statement with constant condition of type set
  12763. MODULE Test;
  12764. BEGIN REPEAT UNTIL {5};
  12765. END Test.
  12766. negative: repeat statement with constant condition of type string
  12767. MODULE Test;
  12768. BEGIN REPEAT UNTIL "condition";
  12769. END Test.
  12770. negative: repeat statement with constant condition of type nil pointer
  12771. MODULE Test;
  12772. BEGIN REPEAT UNTIL NIL;
  12773. END Test.
  12774. positive: repeat statement with condition of type boolean
  12775. MODULE Test;
  12776. VAR condition: BOOLEAN;
  12777. BEGIN REPEAT UNTIL condition;
  12778. END Test.
  12779. negative: repeat statement with condition of type character
  12780. MODULE Test;
  12781. VAR condition: CHAR;
  12782. BEGIN REPEAT UNTIL condition;
  12783. END Test.
  12784. negative: repeat statement with condition of type short integer
  12785. MODULE Test;
  12786. VAR condition: SHORTINT;
  12787. BEGIN REPEAT UNTIL condition;
  12788. END Test.
  12789. negative: repeat statement with condition of type integer
  12790. MODULE Test;
  12791. VAR condition: INTEGER;
  12792. BEGIN REPEAT UNTIL condition;
  12793. END Test.
  12794. negative: repeat statement with condition of type long integer
  12795. MODULE Test;
  12796. VAR condition: LONGINT;
  12797. BEGIN REPEAT UNTIL condition;
  12798. END Test.
  12799. negative: repeat statement with condition of type huge integer
  12800. MODULE Test;
  12801. VAR condition: HUGEINT;
  12802. BEGIN REPEAT UNTIL condition;
  12803. END Test.
  12804. negative: repeat statement with condition of type real
  12805. MODULE Test;
  12806. VAR condition: REAL;
  12807. BEGIN REPEAT UNTIL condition;
  12808. END Test.
  12809. negative: repeat statement with condition of type long real
  12810. MODULE Test;
  12811. VAR condition: LONGREAL;
  12812. BEGIN REPEAT UNTIL condition;
  12813. END Test.
  12814. negative: repeat statement with condition of type set
  12815. MODULE Test;
  12816. VAR condition: SET;
  12817. BEGIN REPEAT UNTIL condition;
  12818. END Test.
  12819. negative: repeat statement with condition of type array
  12820. MODULE Test;
  12821. VAR condition: ARRAY 10 OF CHAR;
  12822. BEGIN REPEAT UNTIL condition;
  12823. END Test.
  12824. negative: repeat statement with condition of type record
  12825. MODULE Test;
  12826. VAR condition: RECORD END;
  12827. BEGIN REPEAT UNTIL condition;
  12828. END Test.
  12829. negative: repeat statement with condition of type object
  12830. MODULE Test;
  12831. VAR condition: OBJECT;
  12832. BEGIN REPEAT UNTIL condition;
  12833. END Test.
  12834. negative: repeat statement with condition of type pointer
  12835. MODULE Test;
  12836. VAR condition: POINTER TO RECORD END;
  12837. BEGIN REPEAT UNTIL condition;
  12838. END Test.
  12839. negative: repeat statement with condition of type procedure
  12840. MODULE Test;
  12841. VAR condition: PROCEDURE;
  12842. BEGIN REPEAT UNTIL condition;
  12843. END Test.
  12844. negative: repeat statement with import as condition
  12845. MODULE Test;
  12846. IMPORT condition := Dummy;
  12847. BEGIN REPEAT UNTIL condition;
  12848. END Test.
  12849. negative: repeat statement with type as condition
  12850. MODULE Test;
  12851. TYPE condition = BOOLEAN;
  12852. BEGIN REPEAT UNTIL condition;
  12853. END Test.
  12854. # await statement
  12855. positive: await statement in non-exclusive block
  12856. MODULE Test;
  12857. VAR condition: BOOLEAN;
  12858. BEGIN AWAIT (condition);
  12859. END Test.
  12860. positive: await statement in nested non-exclusive block
  12861. MODULE Test;
  12862. VAR condition: BOOLEAN;
  12863. BEGIN BEGIN AWAIT (condition) END;
  12864. END Test.
  12865. positive: await statement in exclusive block
  12866. MODULE Test;
  12867. VAR condition: BOOLEAN;
  12868. BEGIN {EXCLUSIVE} AWAIT (condition);
  12869. END Test.
  12870. positive: await statement in nested exclusive block
  12871. MODULE Test;
  12872. VAR condition: BOOLEAN;
  12873. BEGIN BEGIN {EXCLUSIVE} AWAIT (condition) END;
  12874. END Test.
  12875. positive: await statement within nested exclusive block
  12876. MODULE Test;
  12877. VAR condition: BOOLEAN;
  12878. BEGIN {EXCLUSIVE} BEGIN AWAIT (condition) END;
  12879. END Test.
  12880. negative: await statement with constant true condition
  12881. MODULE Test;
  12882. BEGIN {EXCLUSIVE} AWAIT (TRUE);
  12883. END Test.
  12884. negative: await statement with constant false condition
  12885. MODULE Test;
  12886. BEGIN {EXCLUSIVE} AWAIT (FALSE);
  12887. END Test.
  12888. negative: await statement with constant condition of type character
  12889. MODULE Test;
  12890. BEGIN {EXCLUSIVE} AWAIT ('a');
  12891. END Test.
  12892. negative: await statement with constant condition of type integer
  12893. MODULE Test;
  12894. BEGIN {EXCLUSIVE} AWAIT (5);
  12895. END Test.
  12896. negative: await statement with constant condition of type real
  12897. MODULE Test;
  12898. BEGIN {EXCLUSIVE} AWAIT (4.5);
  12899. END Test.
  12900. negative: await statement with constant condition of type set
  12901. MODULE Test;
  12902. BEGIN {EXCLUSIVE} AWAIT ({5});
  12903. END Test.
  12904. negative: await statement with constant condition of type string
  12905. MODULE Test;
  12906. BEGIN {EXCLUSIVE} AWAIT ("condition");
  12907. END Test.
  12908. negative: await statement with constant condition of type nil pointer
  12909. MODULE Test;
  12910. BEGIN {EXCLUSIVE} AWAIT (NIL);
  12911. END Test.
  12912. positive: await statement with condition of type boolean
  12913. MODULE Test;
  12914. VAR condition: BOOLEAN;
  12915. BEGIN {EXCLUSIVE} AWAIT (condition);
  12916. END Test.
  12917. negative: await statement with condition of type character
  12918. MODULE Test;
  12919. VAR condition: CHAR;
  12920. BEGIN {EXCLUSIVE} AWAIT (condition);
  12921. END Test.
  12922. negative: await statement with condition of type short integer
  12923. MODULE Test;
  12924. VAR condition: SHORTINT;
  12925. BEGIN {EXCLUSIVE} AWAIT (condition);
  12926. END Test.
  12927. negative: await statement with condition of type integer
  12928. MODULE Test;
  12929. VAR condition: INTEGER;
  12930. BEGIN {EXCLUSIVE} AWAIT (condition);
  12931. END Test.
  12932. negative: await statement with condition of type long integer
  12933. MODULE Test;
  12934. VAR condition: LONGINT;
  12935. BEGIN {EXCLUSIVE} AWAIT (condition);
  12936. END Test.
  12937. negative: await statement with condition of type huge integer
  12938. MODULE Test;
  12939. VAR condition: HUGEINT;
  12940. BEGIN {EXCLUSIVE} AWAIT (condition);
  12941. END Test.
  12942. negative: await statement with condition of type real
  12943. MODULE Test;
  12944. VAR condition: REAL;
  12945. BEGIN {EXCLUSIVE} AWAIT (condition);
  12946. END Test.
  12947. negative: await statement with condition of type long real
  12948. MODULE Test;
  12949. VAR condition: LONGREAL;
  12950. BEGIN {EXCLUSIVE} AWAIT (condition);
  12951. END Test.
  12952. negative: await statement with condition of type set
  12953. MODULE Test;
  12954. VAR condition: SET;
  12955. BEGIN {EXCLUSIVE} AWAIT (condition);
  12956. END Test.
  12957. negative: await statement with condition of type array
  12958. MODULE Test;
  12959. VAR condition: ARRAY 10 OF CHAR;
  12960. BEGIN {EXCLUSIVE} AWAIT (condition);
  12961. END Test.
  12962. negative: await statement with condition of type record
  12963. MODULE Test;
  12964. VAR condition: RECORD END;
  12965. BEGIN {EXCLUSIVE} AWAIT (condition);
  12966. END Test.
  12967. negative: await statement with condition of type object
  12968. MODULE Test;
  12969. VAR condition: OBJECT;
  12970. BEGIN {EXCLUSIVE} AWAIT (condition);
  12971. END Test.
  12972. negative: await statement with condition of type pointer
  12973. MODULE Test;
  12974. VAR condition: POINTER TO RECORD END;
  12975. BEGIN {EXCLUSIVE} AWAIT (condition);
  12976. END Test.
  12977. negative: await statement with condition of type procedure
  12978. MODULE Test;
  12979. VAR condition: PROCEDURE;
  12980. BEGIN {EXCLUSIVE} AWAIT (condition);
  12981. END Test.
  12982. negative: await statement with import as condition
  12983. MODULE Test;
  12984. IMPORT condition := Dummy;
  12985. BEGIN {EXCLUSIVE} AWAIT (condition);
  12986. END Test.
  12987. negative: await statement with type as condition
  12988. MODULE Test;
  12989. TYPE condition = BOOLEAN;
  12990. BEGIN {EXCLUSIVE} AWAIT (condition);
  12991. END Test.
  12992. # assignment statement
  12993. positive: constant boolean to variable boolean assignment
  12994. MODULE Test;
  12995. VAR result: BOOLEAN;
  12996. BEGIN result := TRUE;
  12997. END Test.
  12998. negative: constant boolean to temporary boolean assignment
  12999. MODULE Test;
  13000. VAR result: PROCEDURE (): BOOLEAN;
  13001. BEGIN result () := TRUE;
  13002. END Test.
  13003. negative: constant character to variable boolean assignment
  13004. MODULE Test;
  13005. VAR result: BOOLEAN;
  13006. BEGIN result := 'f';
  13007. END Test.
  13008. negative: constant short integer to variable boolean assignment
  13009. MODULE Test;
  13010. VAR result: BOOLEAN;
  13011. BEGIN result := 10H;
  13012. END Test.
  13013. negative: constant integer to variable boolean assignment
  13014. MODULE Test;
  13015. VAR result: BOOLEAN;
  13016. BEGIN result := 1000H;
  13017. END Test.
  13018. negative: constant long integer to variable boolean assignment
  13019. MODULE Test;
  13020. VAR result: BOOLEAN;
  13021. BEGIN result := 100000H;
  13022. END Test.
  13023. negative: constant huge integer to variable boolean assignment
  13024. MODULE Test;
  13025. VAR result: BOOLEAN;
  13026. BEGIN result := 10000000000H;
  13027. END Test.
  13028. negative: constant real to variable boolean assignment
  13029. MODULE Test;
  13030. VAR result: BOOLEAN;
  13031. BEGIN result := 5.4;
  13032. END Test.
  13033. negative: constant long real to variable boolean assignment
  13034. MODULE Test;
  13035. VAR result: BOOLEAN;
  13036. BEGIN result := 5.4D100;
  13037. END Test.
  13038. negative: constant set to variable boolean assignment
  13039. MODULE Test;
  13040. VAR result: BOOLEAN;
  13041. BEGIN result := {5};
  13042. END Test.
  13043. negative: string to variable boolean assignment
  13044. MODULE Test;
  13045. VAR result: BOOLEAN;
  13046. BEGIN result := "string";
  13047. END Test.
  13048. negative: nil pointer to variable boolean assignment
  13049. MODULE Test;
  13050. VAR result: BOOLEAN;
  13051. BEGIN result := NIL;
  13052. END Test.
  13053. negative: procedure to variable boolean assignment
  13054. MODULE Test;
  13055. VAR result: BOOLEAN;
  13056. PROCEDURE Procedure; END Procedure;
  13057. BEGIN result := Procedure;
  13058. END Test.
  13059. negative: constant boolean to variable character assignment
  13060. MODULE Test;
  13061. VAR result: CHAR;
  13062. BEGIN result := TRUE;
  13063. END Test.
  13064. positive: constant character to variable character assignment
  13065. MODULE Test;
  13066. VAR result: CHAR;
  13067. BEGIN result := 'f';
  13068. END Test.
  13069. negative: constant character to temporary character assignment
  13070. MODULE Test;
  13071. VAR result: PROCEDURE (): CHAR;
  13072. BEGIN result () := 'u';
  13073. END Test.
  13074. negative: constant short integer to variable character assignment
  13075. MODULE Test;
  13076. VAR result: CHAR;
  13077. BEGIN result := 10H;
  13078. END Test.
  13079. negative: constant integer to variable character assignment
  13080. MODULE Test;
  13081. VAR result: CHAR;
  13082. BEGIN result := 1000H;
  13083. END Test.
  13084. negative: constant long integer to variable character assignment
  13085. MODULE Test;
  13086. VAR result: CHAR;
  13087. BEGIN result := 100000H;
  13088. END Test.
  13089. negative: constant huge integer to variable character assignment
  13090. MODULE Test;
  13091. VAR result: CHAR;
  13092. BEGIN result := 10000000000H;
  13093. END Test.
  13094. negative: constant real to variable character assignment
  13095. MODULE Test;
  13096. VAR result: CHAR;
  13097. BEGIN result := 5.4;
  13098. END Test.
  13099. negative: constant long real to variable character assignment
  13100. MODULE Test;
  13101. VAR result: CHAR;
  13102. BEGIN result := 5.4D100;
  13103. END Test.
  13104. negative: constant set to variable character assignment
  13105. MODULE Test;
  13106. VAR result: CHAR;
  13107. BEGIN result := {5};
  13108. END Test.
  13109. negative: string to variable character assignment
  13110. MODULE Test;
  13111. VAR result: CHAR;
  13112. BEGIN result := "string";
  13113. END Test.
  13114. negative: nil pointer to variable character assignment
  13115. MODULE Test;
  13116. VAR result: CHAR;
  13117. BEGIN result := NIL;
  13118. END Test.
  13119. negative: procedure to variable character assignment
  13120. MODULE Test;
  13121. VAR result: CHAR;
  13122. PROCEDURE Procedure; END Procedure;
  13123. BEGIN result := Procedure;
  13124. END Test.
  13125. negative: constant boolean to variable short integer assignment
  13126. MODULE Test;
  13127. VAR result: SHORTINT;
  13128. BEGIN result := TRUE;
  13129. END Test.
  13130. negative: constant character to variable short integer assignment
  13131. MODULE Test;
  13132. VAR result: SHORTINT;
  13133. BEGIN result := 'f';
  13134. END Test.
  13135. positive: constant short integer to variable short integer assignment
  13136. MODULE Test;
  13137. VAR result: SHORTINT;
  13138. BEGIN result := 10H;
  13139. END Test.
  13140. negative: constant short integer to temporary short integer assignment
  13141. MODULE Test;
  13142. VAR result: PROCEDURE (): SHORTINT;
  13143. BEGIN result () := 10H;
  13144. END Test.
  13145. negative: constant integer to variable short integer assignment
  13146. MODULE Test;
  13147. VAR result: SHORTINT;
  13148. BEGIN result := 1000H;
  13149. END Test.
  13150. negative: constant long integer to variable short integer assignment
  13151. MODULE Test;
  13152. VAR result: SHORTINT;
  13153. BEGIN result := 100000H;
  13154. END Test.
  13155. negative: constant huge integer to variable short integer assignment
  13156. MODULE Test;
  13157. VAR result: SHORTINT;
  13158. BEGIN result := 10000000000H;
  13159. END Test.
  13160. negative: constant real to variable short integer assignment
  13161. MODULE Test;
  13162. VAR result: SHORTINT;
  13163. BEGIN result := 5.4;
  13164. END Test.
  13165. negative: constant long real to variable short integer assignment
  13166. MODULE Test;
  13167. VAR result: SHORTINT;
  13168. BEGIN result := 5.4D100;
  13169. END Test.
  13170. negative: constant set to variable short integer assignment
  13171. MODULE Test;
  13172. VAR result: SHORTINT;
  13173. BEGIN result := {5};
  13174. END Test.
  13175. negative: string to variable short integer assignment
  13176. MODULE Test;
  13177. VAR result: SHORTINT;
  13178. BEGIN result := "string";
  13179. END Test.
  13180. negative: nil pointer to variable short integer assignment
  13181. MODULE Test;
  13182. VAR result: SHORTINT;
  13183. BEGIN result := NIL;
  13184. END Test.
  13185. negative: procedure to variable short integer assignment
  13186. MODULE Test;
  13187. VAR result: SHORTINT;
  13188. PROCEDURE Procedure; END Procedure;
  13189. BEGIN result := Procedure;
  13190. END Test.
  13191. negative: constant boolean to variable integer assignment
  13192. MODULE Test;
  13193. VAR result: INTEGER;
  13194. BEGIN result := TRUE;
  13195. END Test.
  13196. negative: constant character to variable integer assignment
  13197. MODULE Test;
  13198. VAR result: INTEGER;
  13199. BEGIN result := 'f';
  13200. END Test.
  13201. positive: constant short integer to variable integer assignment
  13202. MODULE Test;
  13203. VAR result: INTEGER;
  13204. BEGIN result := 10H;
  13205. END Test.
  13206. negative: constant short integer to temporary integer assignment
  13207. MODULE Test;
  13208. VAR result: PROCEDURE (): INTEGER;
  13209. BEGIN result () := 10H;
  13210. END Test.
  13211. positive: constant integer to variable integer assignment
  13212. MODULE Test;
  13213. VAR result: INTEGER;
  13214. BEGIN result := 1000H;
  13215. END Test.
  13216. negative: constant integer to temporary integer assignment
  13217. MODULE Test;
  13218. VAR result: PROCEDURE (): INTEGER;
  13219. BEGIN result () := 1000H;
  13220. END Test.
  13221. negative: constant long integer to variable integer assignment
  13222. MODULE Test;
  13223. VAR result: INTEGER;
  13224. BEGIN result := 100000H;
  13225. END Test.
  13226. negative: constant huge integer to variable integer assignment
  13227. MODULE Test;
  13228. VAR result: INTEGER;
  13229. BEGIN result := 10000000000H;
  13230. END Test.
  13231. negative: constant real to variable integer assignment
  13232. MODULE Test;
  13233. VAR result: INTEGER;
  13234. BEGIN result := 5.4;
  13235. END Test.
  13236. negative: constant long real to variable integer assignment
  13237. MODULE Test;
  13238. VAR result: INTEGER;
  13239. BEGIN result := 5.4D100;
  13240. END Test.
  13241. negative: constant set to variable integer assignment
  13242. MODULE Test;
  13243. VAR result: INTEGER;
  13244. BEGIN result := {5};
  13245. END Test.
  13246. negative: string to variable integer assignment
  13247. MODULE Test;
  13248. VAR result: INTEGER;
  13249. BEGIN result := "string";
  13250. END Test.
  13251. negative: nil pointer to variable integer assignment
  13252. MODULE Test;
  13253. VAR result: INTEGER;
  13254. BEGIN result := NIL;
  13255. END Test.
  13256. negative: procedure to variable integer assignment
  13257. MODULE Test;
  13258. VAR result: INTEGER;
  13259. PROCEDURE Procedure; END Procedure;
  13260. BEGIN result := Procedure;
  13261. END Test.
  13262. negative: constant boolean to variable long integer assignment
  13263. MODULE Test;
  13264. VAR result: LONGINT;
  13265. BEGIN result := TRUE;
  13266. END Test.
  13267. negative: constant character to variable long integer assignment
  13268. MODULE Test;
  13269. VAR result: LONGINT;
  13270. BEGIN result := 'f';
  13271. END Test.
  13272. positive: constant short integer to variable long integer assignment
  13273. MODULE Test;
  13274. VAR result: LONGINT;
  13275. BEGIN result := 10H;
  13276. END Test.
  13277. negative: constant short integer to temporary long integer assignment
  13278. MODULE Test;
  13279. VAR result: PROCEDURE (): LONGINT;
  13280. BEGIN result () := 10H;
  13281. END Test.
  13282. positive: constant integer to variable long integer assignment
  13283. MODULE Test;
  13284. VAR result: LONGINT;
  13285. BEGIN result := 1000H;
  13286. END Test.
  13287. negative: constant integer to temporary long integer assignment
  13288. MODULE Test;
  13289. VAR result: PROCEDURE (): LONGINT;
  13290. BEGIN result () := 1000H;
  13291. END Test.
  13292. positive: constant long integer to variable long integer assignment
  13293. MODULE Test;
  13294. VAR result: LONGINT;
  13295. BEGIN result := 100000H;
  13296. END Test.
  13297. negative: constant long integer to temporary long integer assignment
  13298. MODULE Test;
  13299. VAR result: PROCEDURE (): LONGINT;
  13300. BEGIN result () := 100000H;
  13301. END Test.
  13302. negative: constant huge integer to variable long integer assignment
  13303. MODULE Test;
  13304. VAR result: LONGINT;
  13305. BEGIN result := 10000000000H;
  13306. END Test.
  13307. negative: constant real to variable long integer assignment
  13308. MODULE Test;
  13309. VAR result: LONGINT;
  13310. BEGIN result := 5.4;
  13311. END Test.
  13312. negative: constant long real to variable long integer assignment
  13313. MODULE Test;
  13314. VAR result: LONGINT;
  13315. BEGIN result := 5.4D100;
  13316. END Test.
  13317. negative: constant set to variable long integer assignment
  13318. MODULE Test;
  13319. VAR result: LONGINT;
  13320. BEGIN result := {5};
  13321. END Test.
  13322. negative: string to variable long integer assignment
  13323. MODULE Test;
  13324. VAR result: LONGINT;
  13325. BEGIN result := "string";
  13326. END Test.
  13327. negative: nil pointer to variable long integer assignment
  13328. MODULE Test;
  13329. VAR result: LONGINT;
  13330. BEGIN result := NIL;
  13331. END Test.
  13332. negative: procedure to variable long integer assignment
  13333. MODULE Test;
  13334. VAR result: LONGINT;
  13335. PROCEDURE Procedure; END Procedure;
  13336. BEGIN result := Procedure;
  13337. END Test.
  13338. negative: constant boolean to variable huge integer assignment
  13339. MODULE Test;
  13340. VAR result: HUGEINT;
  13341. BEGIN result := TRUE;
  13342. END Test.
  13343. negative: constant character to variable huge integer assignment
  13344. MODULE Test;
  13345. VAR result: HUGEINT;
  13346. BEGIN result := 'f';
  13347. END Test.
  13348. positive: constant short integer to variable huge integer assignment
  13349. MODULE Test;
  13350. VAR result: HUGEINT;
  13351. BEGIN result := 10H;
  13352. END Test.
  13353. negative: constant short integer to temporary huge integer assignment
  13354. MODULE Test;
  13355. VAR result: PROCEDURE (): HUGEINT;
  13356. BEGIN result () := 10H;
  13357. END Test.
  13358. positive: constant integer to variable huge integer assignment
  13359. MODULE Test;
  13360. VAR result: HUGEINT;
  13361. BEGIN result := 1000H;
  13362. END Test.
  13363. negative: constant integer to temporary huge integer assignment
  13364. MODULE Test;
  13365. VAR result: PROCEDURE (): HUGEINT;
  13366. BEGIN result () := 1000H;
  13367. END Test.
  13368. positive: constant long integer to variable huge integer assignment
  13369. MODULE Test;
  13370. VAR result: HUGEINT;
  13371. BEGIN result := 100000H;
  13372. END Test.
  13373. negative: constant long integer to temporary huge integer assignment
  13374. MODULE Test;
  13375. VAR result: PROCEDURE (): HUGEINT;
  13376. BEGIN result () := 100000H;
  13377. END Test.
  13378. positive: constant huge integer to variable huge integer assignment
  13379. MODULE Test;
  13380. VAR result: HUGEINT;
  13381. BEGIN result := 10000000000H;
  13382. END Test.
  13383. negative: constant huge integer to temporary huge integer assignment
  13384. MODULE Test;
  13385. VAR result: PROCEDURE (): HUGEINT;
  13386. BEGIN result () := 10000000000H;
  13387. END Test.
  13388. negative: constant real to variable huge integer assignment
  13389. MODULE Test;
  13390. VAR result: HUGEINT;
  13391. BEGIN result := 5.4;
  13392. END Test.
  13393. negative: constant long real to variable huge integer assignment
  13394. MODULE Test;
  13395. VAR result: HUGEINT;
  13396. BEGIN result := 5.4D100;
  13397. END Test.
  13398. negative: constant set to variable huge integer assignment
  13399. MODULE Test;
  13400. VAR result: HUGEINT;
  13401. BEGIN result := {5};
  13402. END Test.
  13403. negative: string to variable huge integer assignment
  13404. MODULE Test;
  13405. VAR result: HUGEINT;
  13406. BEGIN result := "string";
  13407. END Test.
  13408. negative: nil pointer to variable huge integer assignment
  13409. MODULE Test;
  13410. VAR result: HUGEINT;
  13411. BEGIN result := NIL;
  13412. END Test.
  13413. negative: procedure to variable huge integer assignment
  13414. MODULE Test;
  13415. VAR result: HUGEINT;
  13416. PROCEDURE Procedure; END Procedure;
  13417. BEGIN result := Procedure;
  13418. END Test.
  13419. negative: constant boolean to variable real assignment
  13420. MODULE Test;
  13421. VAR result: REAL;
  13422. BEGIN result := TRUE;
  13423. END Test.
  13424. negative: constant character to variable real assignment
  13425. MODULE Test;
  13426. VAR result: REAL;
  13427. BEGIN result := 'f';
  13428. END Test.
  13429. positive: constant short integer to variable real assignment
  13430. MODULE Test;
  13431. VAR result: REAL;
  13432. BEGIN result := 10H;
  13433. END Test.
  13434. negative: constant short integer to temporary real assignment
  13435. MODULE Test;
  13436. VAR result: PROCEDURE (): REAL;
  13437. BEGIN result () := 10H;
  13438. END Test.
  13439. positive: constant integer to variable real assignment
  13440. MODULE Test;
  13441. VAR result: REAL;
  13442. BEGIN result := 1000H;
  13443. END Test.
  13444. negative: constant integer to temporary real assignment
  13445. MODULE Test;
  13446. VAR result: PROCEDURE (): REAL;
  13447. BEGIN result () := 1000H;
  13448. END Test.
  13449. positive: constant long integer to variable real assignment
  13450. MODULE Test;
  13451. VAR result: REAL;
  13452. BEGIN result := 100000H;
  13453. END Test.
  13454. negative: constant long integer to temporary real assignment
  13455. MODULE Test;
  13456. VAR result: PROCEDURE (): REAL;
  13457. BEGIN result () := 100000H;
  13458. END Test.
  13459. positive: constant huge integer to variable real assignment
  13460. MODULE Test;
  13461. VAR result: REAL;
  13462. BEGIN result := 10000000000H;
  13463. END Test.
  13464. negative: constant huge integer to temporary real assignment
  13465. MODULE Test;
  13466. VAR result: PROCEDURE (): REAL;
  13467. BEGIN result () := 10000000000H;
  13468. END Test.
  13469. positive: constant real to variable real assignment
  13470. MODULE Test;
  13471. VAR result: REAL;
  13472. BEGIN result := 5.4;
  13473. END Test.
  13474. negative: constant real to temporary real assignment
  13475. MODULE Test;
  13476. VAR result: PROCEDURE (): REAL;
  13477. BEGIN result () := 5.4;
  13478. END Test.
  13479. negative: constant long real to variable real assignment
  13480. MODULE Test;
  13481. VAR result: REAL;
  13482. BEGIN result := 5.4D100;
  13483. END Test.
  13484. negative: constant set to variable real assignment
  13485. MODULE Test;
  13486. VAR result: REAL;
  13487. BEGIN result := {5};
  13488. END Test.
  13489. negative: string to variable real assignment
  13490. MODULE Test;
  13491. VAR result: REAL;
  13492. BEGIN result := "string";
  13493. END Test.
  13494. negative: nil pointer to variable real assignment
  13495. MODULE Test;
  13496. VAR result: REAL;
  13497. BEGIN result := NIL;
  13498. END Test.
  13499. negative: procedure to variable real assignment
  13500. MODULE Test;
  13501. VAR result: REAL;
  13502. PROCEDURE Procedure; END Procedure;
  13503. BEGIN result := Procedure;
  13504. END Test.
  13505. negative: constant boolean to variable long real assignment
  13506. MODULE Test;
  13507. VAR result: LONGREAL;
  13508. BEGIN result := TRUE;
  13509. END Test.
  13510. negative: constant character to variable long real assignment
  13511. MODULE Test;
  13512. VAR result: LONGREAL;
  13513. BEGIN result := 'f';
  13514. END Test.
  13515. positive: constant short integer to variable long real assignment
  13516. MODULE Test;
  13517. VAR result: LONGREAL;
  13518. BEGIN result := 10H;
  13519. END Test.
  13520. negative: constant short integer to temporary long real assignment
  13521. MODULE Test;
  13522. VAR result: PROCEDURE (): LONGREAL;
  13523. BEGIN result () := 10H;
  13524. END Test.
  13525. positive: constant integer to variable long real assignment
  13526. MODULE Test;
  13527. VAR result: LONGREAL;
  13528. BEGIN result := 1000H;
  13529. END Test.
  13530. negative: constant integer to temporary long real assignment
  13531. MODULE Test;
  13532. VAR result: PROCEDURE (): LONGREAL;
  13533. BEGIN result () := 1000H;
  13534. END Test.
  13535. positive: constant long integer to variable long real assignment
  13536. MODULE Test;
  13537. VAR result: LONGREAL;
  13538. BEGIN result := 100000H;
  13539. END Test.
  13540. negative: constant long integer to temporary long real assignment
  13541. MODULE Test;
  13542. VAR result: PROCEDURE (): LONGREAL;
  13543. BEGIN result () := 100000H;
  13544. END Test.
  13545. positive: constant huge integer to variable long real assignment
  13546. MODULE Test;
  13547. VAR result: LONGREAL;
  13548. BEGIN result := 10000000000H;
  13549. END Test.
  13550. negative: constant huge integer to temporary long real assignment
  13551. MODULE Test;
  13552. VAR result: PROCEDURE (): LONGREAL;
  13553. BEGIN result () := 10000000000H;
  13554. END Test.
  13555. positive: constant real to variable long real assignment
  13556. MODULE Test;
  13557. VAR result: LONGREAL;
  13558. BEGIN result := 5.4;
  13559. END Test.
  13560. negative: constant real to temporary long real assignment
  13561. MODULE Test;
  13562. VAR result: PROCEDURE (): LONGREAL;
  13563. BEGIN result () := 5.4;
  13564. END Test.
  13565. positive: constant long real to variable long real assignment
  13566. MODULE Test;
  13567. VAR result: LONGREAL;
  13568. BEGIN result := 5.4D100;
  13569. END Test.
  13570. negative: constant long real to temporary long real assignment
  13571. MODULE Test;
  13572. VAR result: PROCEDURE (): LONGREAL;
  13573. BEGIN result () := 5.4D100;
  13574. END Test.
  13575. negative: constant set to variable long real assignment
  13576. MODULE Test;
  13577. VAR result: LONGREAL;
  13578. BEGIN result := {5};
  13579. END Test.
  13580. negative: string to variable long real assignment
  13581. MODULE Test;
  13582. VAR result: LONGREAL;
  13583. BEGIN result := "string";
  13584. END Test.
  13585. negative: nil pointer to variable long real assignment
  13586. MODULE Test;
  13587. VAR result: LONGREAL;
  13588. BEGIN result := NIL;
  13589. END Test.
  13590. negative: procedure to variable long real assignment
  13591. MODULE Test;
  13592. VAR result: LONGREAL;
  13593. PROCEDURE Procedure; END Procedure;
  13594. BEGIN result := Procedure;
  13595. END Test.
  13596. negative: constant boolean to variable set assignment
  13597. MODULE Test;
  13598. VAR result: SET;
  13599. BEGIN result := TRUE;
  13600. END Test.
  13601. negative: constant character to variable set assignment
  13602. MODULE Test;
  13603. VAR result: SET;
  13604. BEGIN result := 'f';
  13605. END Test.
  13606. negative: constant short integer to variable set assignment
  13607. MODULE Test;
  13608. VAR result: SET;
  13609. BEGIN result := 10H;
  13610. END Test.
  13611. negative: constant integer to variable set assignment
  13612. MODULE Test;
  13613. VAR result: SET;
  13614. BEGIN result := 1000H;
  13615. END Test.
  13616. negative: constant long integer to variable set assignment
  13617. MODULE Test;
  13618. VAR result: SET;
  13619. BEGIN result := 100000H;
  13620. END Test.
  13621. negative: constant huge integer to variable set assignment
  13622. MODULE Test;
  13623. VAR result: SET;
  13624. BEGIN result := 10000000000H;
  13625. END Test.
  13626. negative: constant real to variable set assignment
  13627. MODULE Test;
  13628. VAR result: SET;
  13629. BEGIN result := 5.4;
  13630. END Test.
  13631. negative: constant long real to variable set assignment
  13632. MODULE Test;
  13633. VAR result: SET;
  13634. BEGIN result := 5.4D100;
  13635. END Test.
  13636. positive: constant set to variable set assignment
  13637. MODULE Test;
  13638. VAR result: SET;
  13639. BEGIN result := {5};
  13640. END Test.
  13641. negative: constant set to temporary set assignment
  13642. MODULE Test;
  13643. VAR result: PROCEDURE (): SET;
  13644. BEGIN result () := {5};
  13645. END Test.
  13646. negative: string to variable set assignment
  13647. MODULE Test;
  13648. VAR result: SET;
  13649. BEGIN result := "string";
  13650. END Test.
  13651. negative: nil pointer to variable set assignment
  13652. MODULE Test;
  13653. VAR result: SET;
  13654. BEGIN result := NIL;
  13655. END Test.
  13656. negative: procedure to variable set assignment
  13657. MODULE Test;
  13658. VAR result: SET;
  13659. PROCEDURE Procedure; END Procedure;
  13660. BEGIN result := Procedure;
  13661. END Test.
  13662. negative: constant boolean to variable array assignment
  13663. MODULE Test;
  13664. VAR result: ARRAY 10 OF CHAR;
  13665. BEGIN result := TRUE;
  13666. END Test.
  13667. #temporarily removed
  13668. #negative: constant character to variable array assignment
  13669. #
  13670. # MODULE Test;
  13671. # VAR result: ARRAY 10 OF CHAR;
  13672. # BEGIN result := 'f';
  13673. # END Test.
  13674. negative: constant short integer to variable array assignment
  13675. MODULE Test;
  13676. VAR result: ARRAY 10 OF CHAR;
  13677. BEGIN result := 10H;
  13678. END Test.
  13679. negative: constant integer to variable array assignment
  13680. MODULE Test;
  13681. VAR result: ARRAY 10 OF CHAR;
  13682. BEGIN result := 1000H;
  13683. END Test.
  13684. negative: constant long integer to variable array assignment
  13685. MODULE Test;
  13686. VAR result: ARRAY 10 OF CHAR;
  13687. BEGIN result := 100000H;
  13688. END Test.
  13689. negative: constant huge integer to variable array assignment
  13690. MODULE Test;
  13691. VAR result: ARRAY 10 OF CHAR;
  13692. BEGIN result := 10000000000H;
  13693. END Test.
  13694. negative: constant real to variable array assignment
  13695. MODULE Test;
  13696. VAR result: ARRAY 10 OF CHAR;
  13697. BEGIN result := 5.4;
  13698. END Test.
  13699. negative: constant long real to variable array assignment
  13700. MODULE Test;
  13701. VAR result: ARRAY 10 OF CHAR;
  13702. BEGIN result := 5.4D100;
  13703. END Test.
  13704. negative: constant set to variable array assignment
  13705. MODULE Test;
  13706. VAR result: ARRAY 10 OF CHAR;
  13707. BEGIN result := {5};
  13708. END Test.
  13709. negative: string to variable array of boolean assignment
  13710. MODULE Test;
  13711. VAR result: ARRAY 10 OF BOOLEAN;
  13712. BEGIN result := "string";
  13713. END Test.
  13714. positive: string to longer variable array of character assignment
  13715. MODULE Test;
  13716. VAR result: ARRAY 10 OF CHAR;
  13717. BEGIN result := "string";
  13718. END Test.
  13719. negative: string to longer temporary array of character assignment
  13720. MODULE Test;
  13721. VAR result: PROCEDURE (): ARRAY 10 OF CHAR;
  13722. BEGIN result () := "string";
  13723. END Test.
  13724. positive: string to variable array of character of equal size assignment
  13725. MODULE Test;
  13726. VAR result: ARRAY 7 OF CHAR;
  13727. BEGIN result := "string";
  13728. END Test.
  13729. negative: string to temporary array of equal size assignment
  13730. MODULE Test;
  13731. VAR result: PROCEDURE (): ARRAY 7 OF CHAR;
  13732. BEGIN result () := "string";
  13733. END Test.
  13734. negative: string to shorter variable array of character assignment
  13735. MODULE Test;
  13736. VAR result: ARRAY 6 OF CHAR;
  13737. BEGIN result := "string";
  13738. END Test.
  13739. negative: string to variable array of short integer assignment
  13740. MODULE Test;
  13741. VAR result: ARRAY 10 OF SHORTINT;
  13742. BEGIN result := "string";
  13743. END Test.
  13744. negative: string to variable array of integer assignment
  13745. MODULE Test;
  13746. VAR result: ARRAY 10 OF INTEGER;
  13747. BEGIN result := "string";
  13748. END Test.
  13749. negative: string to variable array of long integer assignment
  13750. MODULE Test;
  13751. VAR result: ARRAY 10 OF LONGINT;
  13752. BEGIN result := "string";
  13753. END Test.
  13754. negative: string to variable array of huge integer assignment
  13755. MODULE Test;
  13756. VAR result: ARRAY 10 OF HUGEINT;
  13757. BEGIN result := "string";
  13758. END Test.
  13759. negative: string to variable array of real assignment
  13760. MODULE Test;
  13761. VAR result: ARRAY 10 OF REAL;
  13762. BEGIN result := "string";
  13763. END Test.
  13764. negative: string to variable array of long real assignment
  13765. MODULE Test;
  13766. VAR result: ARRAY 10 OF LONGREAL;
  13767. BEGIN result := "string";
  13768. END Test.
  13769. negative: string to variable array of set assignment
  13770. MODULE Test;
  13771. VAR result: ARRAY 10 OF SET;
  13772. BEGIN result := "string";
  13773. END Test.
  13774. negative: string to variable array of array assignment
  13775. MODULE Test;
  13776. VAR result: ARRAY 10 OF ARRAY 10 OF CHAR;
  13777. BEGIN result := "string";
  13778. END Test.
  13779. negative: string to variable array of record assignment
  13780. MODULE Test;
  13781. VAR result: ARRAY 10 OF RECORD END;
  13782. BEGIN result := "string";
  13783. END Test.
  13784. negative: string to variable array of object assignment
  13785. MODULE Test;
  13786. VAR result: ARRAY 10 OF OBJECT END;
  13787. BEGIN result := "string";
  13788. END Test.
  13789. negative: string to variable array of pointer assignment
  13790. MODULE Test;
  13791. VAR result: ARRAY 10 OF POINTER TO RECORD END;
  13792. BEGIN result := "string";
  13793. END Test.
  13794. negative: string to variable array of procedure assignment
  13795. MODULE Test;
  13796. VAR result: ARRAY 10 OF PROCEDURE;
  13797. BEGIN result := "string";
  13798. END Test.
  13799. negative: nil pointer to variable array assignment
  13800. MODULE Test;
  13801. VAR result: ARRAY 10 OF CHAR;
  13802. BEGIN result := NIL;
  13803. END Test.
  13804. negative: procedure to variable array assignment
  13805. MODULE Test;
  13806. VAR result: ARRAY 10 OF PROCEDURE;
  13807. PROCEDURE Procedure; END Procedure;
  13808. BEGIN result := Procedure;
  13809. END Test.
  13810. negative: constant boolean to record assignment
  13811. MODULE Test;
  13812. VAR result: RECORD END;
  13813. BEGIN result := TRUE;
  13814. END Test.
  13815. negative: constant character to record assignment
  13816. MODULE Test;
  13817. VAR result: RECORD END;
  13818. BEGIN result := 'f';
  13819. END Test.
  13820. negative: constant short integer to record assignment
  13821. MODULE Test;
  13822. VAR result: RECORD END;
  13823. BEGIN result := 10H;
  13824. END Test.
  13825. negative: constant integer to record assignment
  13826. MODULE Test;
  13827. VAR result: RECORD END;
  13828. BEGIN result := 1000H;
  13829. END Test.
  13830. negative: constant long integer to record assignment
  13831. MODULE Test;
  13832. VAR result: RECORD END;
  13833. BEGIN result := 100000H;
  13834. END Test.
  13835. negative: constant huge integer to record assignment
  13836. MODULE Test;
  13837. VAR result: RECORD END;
  13838. BEGIN result := 10000000000H;
  13839. END Test.
  13840. negative: constant real to record assignment
  13841. MODULE Test;
  13842. VAR result: RECORD END;
  13843. BEGIN result := 5.4;
  13844. END Test.
  13845. negative: constant long real to record assignment
  13846. MODULE Test;
  13847. VAR result: RECORD END;
  13848. BEGIN result := 5.4D100;
  13849. END Test.
  13850. negative: constant set to record assignment
  13851. MODULE Test;
  13852. VAR result: RECORD END;
  13853. BEGIN result := {5};
  13854. END Test.
  13855. negative: string to record assignment
  13856. MODULE Test;
  13857. VAR result: RECORD END;
  13858. BEGIN result := "string";
  13859. END Test.
  13860. negative: nil pointer to record assignment
  13861. MODULE Test;
  13862. VAR result: RECORD END;
  13863. BEGIN result := NIL;
  13864. END Test.
  13865. negative: procedure to record assignment
  13866. MODULE Test;
  13867. VAR result: RECORD END;
  13868. PROCEDURE Procedure; END Procedure;
  13869. BEGIN result := Procedure;
  13870. END Test.
  13871. negative: constant boolean to object assignment
  13872. MODULE Test;
  13873. VAR result: OBJECT END;
  13874. BEGIN result := TRUE;
  13875. END Test.
  13876. negative: constant character to object assignment
  13877. MODULE Test;
  13878. VAR result: OBJECT END;
  13879. BEGIN result := 'f';
  13880. END Test.
  13881. negative: constant short integer to object assignment
  13882. MODULE Test;
  13883. VAR result: OBJECT END;
  13884. BEGIN result := 10H;
  13885. END Test.
  13886. negative: constant integer to object assignment
  13887. MODULE Test;
  13888. VAR result: OBJECT END;
  13889. BEGIN result := 1000H;
  13890. END Test.
  13891. negative: constant long integer to object assignment
  13892. MODULE Test;
  13893. VAR result: OBJECT END;
  13894. BEGIN result := 100000H;
  13895. END Test.
  13896. negative: constant huge integer to object assignment
  13897. MODULE Test;
  13898. VAR result: OBJECT END;
  13899. BEGIN result := 10000000000H;
  13900. END Test.
  13901. negative: constant real to object assignment
  13902. MODULE Test;
  13903. VAR result: OBJECT END;
  13904. BEGIN result := 5.4;
  13905. END Test.
  13906. negative: constant long real to object assignment
  13907. MODULE Test;
  13908. VAR result: OBJECT END;
  13909. BEGIN result := 5.4D100;
  13910. END Test.
  13911. negative: constant set to object assignment
  13912. MODULE Test;
  13913. VAR result: OBJECT END;
  13914. BEGIN result := {5};
  13915. END Test.
  13916. negative: string to object assignment
  13917. MODULE Test;
  13918. VAR result: OBJECT END;
  13919. BEGIN result := "string";
  13920. END Test.
  13921. positive: nil pointer to object assignment
  13922. MODULE Test;
  13923. VAR result: OBJECT END;
  13924. BEGIN result := NIL;
  13925. END Test.
  13926. negative: nil pointer to temporary object assignment
  13927. MODULE Test;
  13928. VAR result: PROCEDURE (): OBJECT END;
  13929. BEGIN result () := NIL;
  13930. END Test.
  13931. negative: procedure to object assignment
  13932. MODULE Test;
  13933. VAR result: OBJECT END;
  13934. PROCEDURE Procedure; END Procedure;
  13935. BEGIN result := Procedure;
  13936. END Test.
  13937. negative: constant boolean to pointer assignment
  13938. MODULE Test;
  13939. VAR result: POINTER TO RECORD END;
  13940. BEGIN result := TRUE;
  13941. END Test.
  13942. negative: constant character to pointer assignment
  13943. MODULE Test;
  13944. VAR result: POINTER TO RECORD END;
  13945. BEGIN result := 'f';
  13946. END Test.
  13947. negative: constant short integer to pointer assignment
  13948. MODULE Test;
  13949. VAR result: POINTER TO RECORD END;
  13950. BEGIN result := 10H;
  13951. END Test.
  13952. negative: constant integer to pointer assignment
  13953. MODULE Test;
  13954. VAR result: POINTER TO RECORD END;
  13955. BEGIN result := 1000H;
  13956. END Test.
  13957. negative: constant long integer to pointer assignment
  13958. MODULE Test;
  13959. VAR result: POINTER TO RECORD END;
  13960. BEGIN result := 100000H;
  13961. END Test.
  13962. negative: constant huge integer to pointer assignment
  13963. MODULE Test;
  13964. VAR result: POINTER TO RECORD END;
  13965. BEGIN result := 10000000000H;
  13966. END Test.
  13967. negative: constant real to pointer assignment
  13968. MODULE Test;
  13969. VAR result: POINTER TO RECORD END;
  13970. BEGIN result := 5.4;
  13971. END Test.
  13972. negative: constant long real to pointer assignment
  13973. MODULE Test;
  13974. VAR result: POINTER TO RECORD END;
  13975. BEGIN result := 5.4D100;
  13976. END Test.
  13977. negative: constant set to pointer assignment
  13978. MODULE Test;
  13979. VAR result: POINTER TO RECORD END;
  13980. BEGIN result := {5};
  13981. END Test.
  13982. negative: string to pointer assignment
  13983. MODULE Test;
  13984. VAR result: POINTER TO RECORD END;
  13985. BEGIN result := "string";
  13986. END Test.
  13987. positive: nil pointer to pointer assignment
  13988. MODULE Test;
  13989. VAR result: POINTER TO RECORD END;
  13990. BEGIN result := NIL;
  13991. END Test.
  13992. negative: nil pointer to temporary pointer assignment
  13993. MODULE Test;
  13994. VAR result: PROCEDURE (): POINTER TO RECORD END;
  13995. BEGIN result () := NIL;
  13996. END Test.
  13997. negative: procedure to pointer assignment
  13998. MODULE Test;
  13999. VAR result: POINTER TO RECORD END;
  14000. PROCEDURE Procedure; END Procedure;
  14001. BEGIN result := Procedure;
  14002. END Test.
  14003. negative: constant boolean to procedure assignment
  14004. MODULE Test;
  14005. VAR result: PROCEDURE;
  14006. BEGIN result := TRUE;
  14007. END Test.
  14008. negative: constant character to procedure assignment
  14009. MODULE Test;
  14010. VAR result: PROCEDURE;
  14011. BEGIN result := 'f';
  14012. END Test.
  14013. negative: constant short integer to procedure assignment
  14014. MODULE Test;
  14015. VAR result: PROCEDURE;
  14016. BEGIN result := 10H;
  14017. END Test.
  14018. negative: constant integer to procedure assignment
  14019. MODULE Test;
  14020. VAR result: PROCEDURE;
  14021. BEGIN result := 1000H;
  14022. END Test.
  14023. negative: constant long integer to procedure assignment
  14024. MODULE Test;
  14025. VAR result: PROCEDURE;
  14026. BEGIN result := 100000H;
  14027. END Test.
  14028. negative: constant huge integer to procedure assignment
  14029. MODULE Test;
  14030. VAR result: PROCEDURE;
  14031. BEGIN result := 10000000000H;
  14032. END Test.
  14033. negative: constant real to procedure assignment
  14034. MODULE Test;
  14035. VAR result: PROCEDURE;
  14036. BEGIN result := 5.4;
  14037. END Test.
  14038. negative: constant long real to procedure assignment
  14039. MODULE Test;
  14040. VAR result: PROCEDURE;
  14041. BEGIN result := 5.4D100;
  14042. END Test.
  14043. negative: constant set to procedure assignment
  14044. MODULE Test;
  14045. VAR result: PROCEDURE;
  14046. BEGIN result := {5};
  14047. END Test.
  14048. negative: string to procedure assignment
  14049. MODULE Test;
  14050. VAR result: PROCEDURE;
  14051. BEGIN result := "string";
  14052. END Test.
  14053. positive: nil pointer to procedure assignment
  14054. MODULE Test;
  14055. VAR result: PROCEDURE;
  14056. BEGIN result := NIL;
  14057. END Test.
  14058. negative: nil pointer to temporary procedure assignment
  14059. MODULE Test;
  14060. VAR result: PROCEDURE (): PROCEDURE;
  14061. BEGIN result () := NIL;
  14062. END Test.
  14063. positive: procedure with one equal parameter to procedure assignment
  14064. MODULE Test;
  14065. VAR result: PROCEDURE (a: INTEGER);
  14066. PROCEDURE Procedure (b: INTEGER); END Procedure;
  14067. BEGIN result := Procedure;
  14068. END Test.
  14069. negative: procedure with one compatible parameter to procedure assignment
  14070. MODULE Test;
  14071. VAR result: PROCEDURE (a: INTEGER);
  14072. PROCEDURE Procedure (b: LONGINT); END Procedure;
  14073. BEGIN result := Procedure;
  14074. END Test.
  14075. negative: procedure with one incompatible parameter to procedure assignment
  14076. MODULE Test;
  14077. VAR result: PROCEDURE (a: SET);
  14078. PROCEDURE Procedure (b: LONGINT); END Procedure;
  14079. BEGIN result := Procedure;
  14080. END Test.
  14081. negative: procedure with one equal variable parameter to procedure assignment
  14082. MODULE Test;
  14083. VAR result: PROCEDURE (VAR a: INTEGER);
  14084. PROCEDURE Procedure (b: INTEGER); END Procedure;
  14085. BEGIN result := Procedure;
  14086. END Test.
  14087. negative: procedure with one equal constant parameter to procedure assignment
  14088. MODULE Test;
  14089. VAR result: PROCEDURE (CONST a: INTEGER);
  14090. PROCEDURE Procedure (b: INTEGER); END Procedure;
  14091. BEGIN result := Procedure;
  14092. END Test.
  14093. positive: procedure with two equal parameters to procedure assignment
  14094. MODULE Test;
  14095. VAR result: PROCEDURE (a, b: INTEGER);
  14096. PROCEDURE Procedure (c, d: INTEGER); END Procedure;
  14097. BEGIN result := Procedure;
  14098. END Test.
  14099. negative: procedure with two compatible parameters to procedure assignment
  14100. MODULE Test;
  14101. VAR result: PROCEDURE (a, b: INTEGER);
  14102. PROCEDURE Procedure (c, d: LONGINT); END Procedure;
  14103. BEGIN result := Procedure;
  14104. END Test.
  14105. negative: procedure with two incompatible parameters to procedure assignment
  14106. MODULE Test;
  14107. VAR result: PROCEDURE (a, b: SET);
  14108. PROCEDURE Procedure (c, d: LONGINT); END Procedure;
  14109. BEGIN result := Procedure;
  14110. END Test.
  14111. negative: procedure with two equal variable parameters to procedure assignment
  14112. MODULE Test;
  14113. VAR result: PROCEDURE (VAR a, b: INTEGER);
  14114. PROCEDURE Procedure (c, d: INTEGER); END Procedure;
  14115. BEGIN result := Procedure;
  14116. END Test.
  14117. negative: procedure with two equal constant parameters to procedure assignment
  14118. MODULE Test;
  14119. VAR result: PROCEDURE (CONST a, b: INTEGER);
  14120. PROCEDURE Procedure (c, d: INTEGER); END Procedure;
  14121. BEGIN result := Procedure;
  14122. END Test.
  14123. positive: procedure with several equal parameters to procedure assignment
  14124. MODULE Test;
  14125. VAR result: PROCEDURE (CONST a: SET; VAR i: INTEGER; o: OBJECT);
  14126. PROCEDURE Procedure (CONST a: SET; VAR i: INTEGER; o: OBJECT); END Procedure;
  14127. BEGIN result := Procedure;
  14128. END Test.
  14129. positive: procedure with equal return type to procedure assignment
  14130. MODULE Test;
  14131. VAR result: PROCEDURE (): INTEGER;
  14132. PROCEDURE Procedure (): INTEGER; BEGIN RETURN 0 END Procedure;
  14133. BEGIN result := Procedure;
  14134. END Test.
  14135. negative: procedure with compatible return type to procedure assignment
  14136. MODULE Test;
  14137. VAR result: PROCEDURE (): LONGINT;
  14138. PROCEDURE Procedure (): INTEGER; BEGIN RETURN 0 END Procedure;
  14139. BEGIN result := Procedure;
  14140. END Test.
  14141. negative: procedure with incompatible return type to procedure assignment
  14142. MODULE Test;
  14143. VAR result: PROCEDURE (): SET;
  14144. PROCEDURE Procedure (): INTEGER; BEGIN RETURN 0 END Procedure;
  14145. BEGIN result := Procedure;
  14146. END Test.
  14147. positive: procedure with several equal parameters and equal return type to procedure assignment
  14148. MODULE Test;
  14149. TYPE Record = RECORD END;
  14150. VAR result: PROCEDURE (CONST a: SET; VAR i: INTEGER; o: OBJECT): POINTER TO Record;
  14151. PROCEDURE Procedure (CONST a: SET; VAR i: INTEGER; o: OBJECT): POINTER TO Record; END Procedure;
  14152. BEGIN result := Procedure;
  14153. END Test.
  14154. positive: dummy module for import assignments
  14155. MODULE Dummy; END Dummy.
  14156. negative: constant boolean to import assignment
  14157. MODULE Test;
  14158. IMPORT result := Dummy;
  14159. BEGIN result := TRUE;
  14160. END Test.
  14161. negative: constant character to import assignment
  14162. MODULE Test;
  14163. IMPORT result := Dummy;
  14164. BEGIN result := 'f';
  14165. END Test.
  14166. negative: constant short integer to import assignment
  14167. MODULE Test;
  14168. IMPORT result := Dummy;
  14169. BEGIN result := 10H;
  14170. END Test.
  14171. negative: constant integer to import assignment
  14172. MODULE Test;
  14173. IMPORT result := Dummy;
  14174. BEGIN result := 1000H;
  14175. END Test.
  14176. negative: constant long integer to import assignment
  14177. MODULE Test;
  14178. IMPORT result := Dummy;
  14179. BEGIN result := 100000H;
  14180. END Test.
  14181. negative: constant huge integer to import assignment
  14182. MODULE Test;
  14183. IMPORT result := Dummy;
  14184. BEGIN result := 10000000000H;
  14185. END Test.
  14186. negative: constant real to import assignment
  14187. MODULE Test;
  14188. IMPORT result := Dummy;
  14189. BEGIN result := 5.4;
  14190. END Test.
  14191. negative: constant long real to import assignment
  14192. MODULE Test;
  14193. IMPORT result := Dummy;
  14194. BEGIN result := 5.4D100;
  14195. END Test.
  14196. negative: constant set to import assignment
  14197. MODULE Test;
  14198. IMPORT result := Dummy;
  14199. BEGIN result := {5};
  14200. END Test.
  14201. negative: string to import assignment
  14202. MODULE Test;
  14203. IMPORT result := Dummy;
  14204. BEGIN result := "string";
  14205. END Test.
  14206. negative: nil pointer to import assignment
  14207. MODULE Test;
  14208. IMPORT result := Dummy;
  14209. BEGIN result := NIL;
  14210. END Test.
  14211. negative: procedure to import assignment
  14212. MODULE Test;
  14213. IMPORT result := Dummy;
  14214. PROCEDURE Procedure; END Procedure;
  14215. BEGIN result := Procedure;
  14216. END Test.
  14217. positive: nil pointer to references assignment
  14218. MODULE Test;
  14219. VAR o: OBJECT END; ob: OBJECT; ptr: POINTER TO RECORD END; p: PROCEDURE;
  14220. BEGIN o := NIL; ob := NIL; ptr := NIL; p := NIL;
  14221. END Test.
  14222. positive: indirect nil pointer to references assignment
  14223. MODULE Test;
  14224. CONST Nil = NIL;
  14225. VAR o: OBJECT END; ob: OBJECT; ptr: POINTER TO RECORD END; p: PROCEDURE;
  14226. BEGIN o := Nil; ob := Nil; ptr := Nil; p := Nil;
  14227. END Test.
  14228. positive: variable boolean to variable boolean assignment
  14229. MODULE Test;
  14230. VAR variable, result: BOOLEAN;
  14231. BEGIN result := variable;
  14232. END Test.
  14233. negative: variable boolean to temporary boolean assignment
  14234. MODULE Test;
  14235. VAR variable: BOOLEAN; result: PROCEDURE (): BOOLEAN;
  14236. BEGIN result () := variable;
  14237. END Test.
  14238. negative: variable character to variable boolean assignment
  14239. MODULE Test;
  14240. VAR variable: CHAR; result: BOOLEAN;
  14241. BEGIN result := variable;
  14242. END Test.
  14243. negative: variable short integer to variable boolean assignment
  14244. MODULE Test;
  14245. VAR variable: SHORTINT; result: BOOLEAN;
  14246. BEGIN result := variable;
  14247. END Test.
  14248. negative: variable integer to variable boolean assignment
  14249. MODULE Test;
  14250. VAR variable: INTEGER; result: BOOLEAN;
  14251. BEGIN result := variable;
  14252. END Test.
  14253. negative: variable long integer to variable boolean assignment
  14254. MODULE Test;
  14255. VAR variable: LONGINT; result: BOOLEAN;
  14256. BEGIN result := variable;
  14257. END Test.
  14258. negative: variable huge integer to variable boolean assignment
  14259. MODULE Test;
  14260. VAR variable: HUGEINT; result: BOOLEAN;
  14261. BEGIN result := variable;
  14262. END Test.
  14263. negative: variable real to variable boolean assignment
  14264. MODULE Test;
  14265. VAR variable: REAL; result: BOOLEAN;
  14266. BEGIN result := variable;
  14267. END Test.
  14268. negative: variable long real to variable boolean assignment
  14269. MODULE Test;
  14270. VAR variable: LONGREAL; result: BOOLEAN;
  14271. BEGIN result := variable;
  14272. END Test.
  14273. negative: variable set to variable boolean assignment
  14274. MODULE Test;
  14275. VAR variable: SET; result: BOOLEAN;
  14276. BEGIN result := variable;
  14277. END Test.
  14278. negative: array to variable boolean assignment
  14279. MODULE Test;
  14280. VAR variable: ARRAY 10 OF CHAR; result: BOOLEAN;
  14281. BEGIN result := variable;
  14282. END Test.
  14283. negative: record to variable boolean assignment
  14284. MODULE Test;
  14285. VAR variable: RECORD END; result: BOOLEAN;
  14286. BEGIN result := variable;
  14287. END Test.
  14288. negative: object to variable boolean assignment
  14289. MODULE Test;
  14290. VAR variable: OBJECT; result: BOOLEAN;
  14291. BEGIN result := variable;
  14292. END Test.
  14293. negative: pointer to variable boolean assignment
  14294. MODULE Test;
  14295. VAR variable: POINTER TO RECORD END; result: BOOLEAN;
  14296. BEGIN result := variable;
  14297. END Test.
  14298. negative: variable procedure to variable boolean assignment
  14299. MODULE Test;
  14300. VAR variable: PROCEDURE; result: BOOLEAN;
  14301. BEGIN result := variable;
  14302. END Test.
  14303. negative: import to variable boolean assignment
  14304. MODULE Test;
  14305. IMPORT variable := Dummy; VAR result: BOOLEAN;
  14306. BEGIN result := variable;
  14307. END Test.
  14308. negative: type to variable boolean assignment
  14309. MODULE Test;
  14310. TYPE Type = BOOLEAN; VAR result: Type;
  14311. BEGIN result := Type;
  14312. END Test.
  14313. negative: variable boolean to variable character assignment
  14314. MODULE Test;
  14315. VAR variable: BOOLEAN; result: CHAR;
  14316. BEGIN result := variable;
  14317. END Test.
  14318. positive: variable character to variable character assignment
  14319. MODULE Test;
  14320. VAR variable, result: CHAR;
  14321. BEGIN result := variable;
  14322. END Test.
  14323. negative: variable character to temporary character assignment
  14324. MODULE Test;
  14325. VAR variable: CHAR; result: PROCEDURE (): CHAR;
  14326. BEGIN result () := variable;
  14327. END Test.
  14328. negative: variable short integer to variable character assignment
  14329. MODULE Test;
  14330. VAR variable: SHORTINT; result: CHAR;
  14331. BEGIN result := variable;
  14332. END Test.
  14333. negative: variable integer to variable character assignment
  14334. MODULE Test;
  14335. VAR variable: INTEGER; result: CHAR;
  14336. BEGIN result := variable;
  14337. END Test.
  14338. negative: variable long integer to variable character assignment
  14339. MODULE Test;
  14340. VAR variable: LONGINT; result: CHAR;
  14341. BEGIN result := variable;
  14342. END Test.
  14343. negative: variable huge integer to variable character assignment
  14344. MODULE Test;
  14345. VAR variable: HUGEINT; result: CHAR;
  14346. BEGIN result := variable;
  14347. END Test.
  14348. negative: variable real to variable character assignment
  14349. MODULE Test;
  14350. VAR variable: REAL; result: CHAR;
  14351. BEGIN result := variable;
  14352. END Test.
  14353. negative: variable long real to variable character assignment
  14354. MODULE Test;
  14355. VAR variable: LONGREAL; result: CHAR;
  14356. BEGIN result := variable;
  14357. END Test.
  14358. negative: variable set to variable character assignment
  14359. MODULE Test;
  14360. VAR variable: SET; result: CHAR;
  14361. BEGIN result := variable;
  14362. END Test.
  14363. negative: array to variable character assignment
  14364. MODULE Test;
  14365. VAR variable: ARRAY 10 OF CHAR; result: CHAR;
  14366. BEGIN result := variable;
  14367. END Test.
  14368. negative: record to variable character assignment
  14369. MODULE Test;
  14370. VAR variable: RECORD END; result: CHAR;
  14371. BEGIN result := variable;
  14372. END Test.
  14373. negative: object to variable character assignment
  14374. MODULE Test;
  14375. VAR variable: OBJECT; result: CHAR;
  14376. BEGIN result := variable;
  14377. END Test.
  14378. negative: pointer to variable character assignment
  14379. MODULE Test;
  14380. VAR variable: POINTER TO RECORD END; result: CHAR;
  14381. BEGIN result := variable;
  14382. END Test.
  14383. negative: variable procedure to variable character assignment
  14384. MODULE Test;
  14385. VAR variable: PROCEDURE; result: CHAR;
  14386. BEGIN result := variable;
  14387. END Test.
  14388. negative: import to variable character assignment
  14389. MODULE Test;
  14390. IMPORT variable := Dummy; VAR result: CHAR;
  14391. BEGIN result := variable;
  14392. END Test.
  14393. negative: type to variable character assignment
  14394. MODULE Test;
  14395. TYPE Type = CHAR; VAR result: Type;
  14396. BEGIN result := Type;
  14397. END Test.
  14398. negative: variable boolean to variable short integer assignment
  14399. MODULE Test;
  14400. VAR variable: BOOLEAN; result: SHORTINT;
  14401. BEGIN result := variable;
  14402. END Test.
  14403. negative: variable character to variable short integer assignment
  14404. MODULE Test;
  14405. VAR variable: CHAR; result: SHORTINT;
  14406. BEGIN result := variable;
  14407. END Test.
  14408. positive: variable short integer to variable short integer assignment
  14409. MODULE Test;
  14410. VAR variable, result: SHORTINT;
  14411. BEGIN result := variable;
  14412. END Test.
  14413. negative: variable short integer to temporary short integer assignment
  14414. MODULE Test;
  14415. VAR variable: SHORTINT; result: PROCEDURE (): SHORTINT;
  14416. BEGIN result () := variable;
  14417. END Test.
  14418. negative: variable integer to variable short integer assignment
  14419. MODULE Test;
  14420. VAR variable: INTEGER; result: SHORTINT;
  14421. BEGIN result := variable;
  14422. END Test.
  14423. negative: variable long integer to variable short integer assignment
  14424. MODULE Test;
  14425. VAR variable: LONGINT; result: SHORTINT;
  14426. BEGIN result := variable;
  14427. END Test.
  14428. negative: variable huge integer to variable short integer assignment
  14429. MODULE Test;
  14430. VAR variable: HUGEINT; result: SHORTINT;
  14431. BEGIN result := variable;
  14432. END Test.
  14433. negative: variable real to variable short integer assignment
  14434. MODULE Test;
  14435. VAR variable: REAL; result: SHORTINT;
  14436. BEGIN result := variable;
  14437. END Test.
  14438. negative: variable long real to variable short integer assignment
  14439. MODULE Test;
  14440. VAR variable: LONGREAL; result: SHORTINT;
  14441. BEGIN result := variable;
  14442. END Test.
  14443. negative: variable set to variable short integer assignment
  14444. MODULE Test;
  14445. VAR variable: SET; result: SHORTINT;
  14446. BEGIN result := variable;
  14447. END Test.
  14448. negative: array to variable short integer assignment
  14449. MODULE Test;
  14450. VAR variable: ARRAY 10 OF CHAR; result: SHORTINT;
  14451. BEGIN result := variable;
  14452. END Test.
  14453. negative: record to variable short integer assignment
  14454. MODULE Test;
  14455. VAR variable: RECORD END; result: SHORTINT;
  14456. BEGIN result := variable;
  14457. END Test.
  14458. negative: object to variable short integer assignment
  14459. MODULE Test;
  14460. VAR variable: OBJECT; result: SHORTINT;
  14461. BEGIN result := variable;
  14462. END Test.
  14463. negative: pointer to variable short integer assignment
  14464. MODULE Test;
  14465. VAR variable: POINTER TO RECORD END; result: SHORTINT;
  14466. BEGIN result := variable;
  14467. END Test.
  14468. negative: variable procedure to variable short integer assignment
  14469. MODULE Test;
  14470. VAR variable: PROCEDURE; result: SHORTINT;
  14471. BEGIN result := variable;
  14472. END Test.
  14473. negative: import to variable short integer assignment
  14474. MODULE Test;
  14475. IMPORT variable := Dummy; VAR result: SHORTINT;
  14476. BEGIN result := variable;
  14477. END Test.
  14478. negative: type to variable short integer assignment
  14479. MODULE Test;
  14480. TYPE Type = SHORTINT; VAR result: Type;
  14481. BEGIN result := Type;
  14482. END Test.
  14483. negative: variable boolean to variable integer assignment
  14484. MODULE Test;
  14485. VAR variable: BOOLEAN; result: INTEGER;
  14486. BEGIN result := variable;
  14487. END Test.
  14488. negative: variable character to variable integer assignment
  14489. MODULE Test;
  14490. VAR variable: CHAR; result: INTEGER;
  14491. BEGIN result := variable;
  14492. END Test.
  14493. positive: variable short integer to variable integer assignment
  14494. MODULE Test;
  14495. VAR variable: SHORTINT; result: INTEGER;
  14496. BEGIN result := variable;
  14497. END Test.
  14498. negative: variable short integer to temporary integer assignment
  14499. MODULE Test;
  14500. VAR variable: SHORTINT; result: PROCEDURE (): INTEGER;
  14501. BEGIN result () := variable;
  14502. END Test.
  14503. positive: variable integer to variable integer assignment
  14504. MODULE Test;
  14505. VAR variable, result: INTEGER;
  14506. BEGIN result := variable;
  14507. END Test.
  14508. negative: variable integer to temporary integer assignment
  14509. MODULE Test;
  14510. VAR variable: INTEGER; result: PROCEDURE (): INTEGER;
  14511. BEGIN result () := variable;
  14512. END Test.
  14513. negative: variable long integer to variable integer assignment
  14514. MODULE Test;
  14515. VAR variable: LONGINT; result: INTEGER;
  14516. BEGIN result := variable;
  14517. END Test.
  14518. negative: variable huge integer to variable integer assignment
  14519. MODULE Test;
  14520. VAR variable: HUGEINT; result: INTEGER;
  14521. BEGIN result := variable;
  14522. END Test.
  14523. negative: variable real to variable integer assignment
  14524. MODULE Test;
  14525. VAR variable: REAL; result: INTEGER;
  14526. BEGIN result := variable;
  14527. END Test.
  14528. negative: variable long real to variable integer assignment
  14529. MODULE Test;
  14530. VAR variable: LONGREAL; result: INTEGER;
  14531. BEGIN result := variable;
  14532. END Test.
  14533. negative: variable set to variable integer assignment
  14534. MODULE Test;
  14535. VAR variable: SET; result: INTEGER;
  14536. BEGIN result := variable;
  14537. END Test.
  14538. negative: array to variable integer assignment
  14539. MODULE Test;
  14540. VAR variable: ARRAY 10 OF CHAR; result: INTEGER;
  14541. BEGIN result := variable;
  14542. END Test.
  14543. negative: record to variable integer assignment
  14544. MODULE Test;
  14545. VAR variable: RECORD END; result: INTEGER;
  14546. BEGIN result := variable;
  14547. END Test.
  14548. negative: object to variable integer assignment
  14549. MODULE Test;
  14550. VAR variable: OBJECT; result: INTEGER;
  14551. BEGIN result := variable;
  14552. END Test.
  14553. negative: pointer to variable integer assignment
  14554. MODULE Test;
  14555. VAR variable: POINTER TO RECORD END; result: INTEGER;
  14556. BEGIN result := variable;
  14557. END Test.
  14558. negative: variable eto variable integer assignment
  14559. MODULE Test;
  14560. VAR variable: PROCEDURE; result: INTEGER;
  14561. BEGIN result := variable;
  14562. END Test.
  14563. negative: import to variable integer assignment
  14564. MODULE Test;
  14565. IMPORT variable := Dummy; VAR result: INTEGER;
  14566. BEGIN result := variable;
  14567. END Test.
  14568. negative: type to variable integer assignment
  14569. MODULE Test;
  14570. TYPE Type = INTEGER; VAR result: Type;
  14571. BEGIN result := Type;
  14572. END Test.
  14573. negative: variable boolean to variable long integer assignment
  14574. MODULE Test;
  14575. VAR variable: BOOLEAN; result: LONGINT;
  14576. BEGIN result := variable;
  14577. END Test.
  14578. negative: variable character to variable long integer assignment
  14579. MODULE Test;
  14580. VAR variable: CHAR; result: LONGINT;
  14581. BEGIN result := variable;
  14582. END Test.
  14583. positive: variable short integer to variable long integer assignment
  14584. MODULE Test;
  14585. VAR variable: SHORTINT; result: LONGINT;
  14586. BEGIN result := variable;
  14587. END Test.
  14588. negative: variable short integer to temporary long integer assignment
  14589. MODULE Test;
  14590. VAR variable: SHORTINT; result: PROCEDURE (): LONGINT;
  14591. BEGIN result () := variable;
  14592. END Test.
  14593. positive: variable integer to variable long integer assignment
  14594. MODULE Test;
  14595. VAR variable: INTEGER; result: LONGINT;
  14596. BEGIN result := variable;
  14597. END Test.
  14598. negative: variable integer to temporary long integer assignment
  14599. MODULE Test;
  14600. VAR variable: INTEGER; result: PROCEDURE (): LONGINT;
  14601. BEGIN result () := variable;
  14602. END Test.
  14603. positive: variable long integer to variable long integer assignment
  14604. MODULE Test;
  14605. VAR variable, result: LONGINT;
  14606. BEGIN result := variable;
  14607. END Test.
  14608. negative: variable long integer to temporary long integer assignment
  14609. MODULE Test;
  14610. VAR variable: LONGINT; result: PROCEDURE (): LONGINT;
  14611. BEGIN result () := variable;
  14612. END Test.
  14613. negative: variable huge integer to variable long integer assignment
  14614. MODULE Test;
  14615. VAR variable: HUGEINT; result: LONGINT;
  14616. BEGIN result := variable;
  14617. END Test.
  14618. negative: variable real to variable long integer assignment
  14619. MODULE Test;
  14620. VAR variable: REAL; result: LONGINT;
  14621. BEGIN result := variable;
  14622. END Test.
  14623. negative: variable long real to variable long integer assignment
  14624. MODULE Test;
  14625. VAR variable: LONGREAL; result: LONGINT;
  14626. BEGIN result := variable;
  14627. END Test.
  14628. negative: variable set to variable long integer assignment
  14629. MODULE Test;
  14630. VAR variable: SET; result: LONGINT;
  14631. BEGIN result := variable;
  14632. END Test.
  14633. negative: array to variable long integer assignment
  14634. MODULE Test;
  14635. VAR variable: ARRAY 10 OF CHAR; result: LONGINT;
  14636. BEGIN result := variable;
  14637. END Test.
  14638. negative: record to variable long integer assignment
  14639. MODULE Test;
  14640. VAR variable: RECORD END; result: LONGINT;
  14641. BEGIN result := variable;
  14642. END Test.
  14643. negative: object to variable long integer assignment
  14644. MODULE Test;
  14645. VAR variable: OBJECT; result: LONGINT;
  14646. BEGIN result := variable;
  14647. END Test.
  14648. negative: pointer to variable long integer assignment
  14649. MODULE Test;
  14650. VAR variable: POINTER TO RECORD END; result: LONGINT;
  14651. BEGIN result := variable;
  14652. END Test.
  14653. negative: variable procedure to variable long integer assignment
  14654. MODULE Test;
  14655. VAR variable: PROCEDURE; result: LONGINT;
  14656. BEGIN result := variable;
  14657. END Test.
  14658. negative: import to variable long integer assignment
  14659. MODULE Test;
  14660. IMPORT variable := Dummy; VAR result: LONGINT;
  14661. BEGIN result := variable;
  14662. END Test.
  14663. negative: type to variable long integer assignment
  14664. MODULE Test;
  14665. TYPE Type = LONGINT; VAR result: Type;
  14666. BEGIN result := Type;
  14667. END Test.
  14668. negative: variable boolean to variable huge integer assignment
  14669. MODULE Test;
  14670. VAR variable: BOOLEAN; result: HUGEINT;
  14671. BEGIN result := variable;
  14672. END Test.
  14673. negative: variable character to variable huge integer assignment
  14674. MODULE Test;
  14675. VAR variable: CHAR; result: HUGEINT;
  14676. BEGIN result := variable;
  14677. END Test.
  14678. positive: variable short integer to variable huge integer assignment
  14679. MODULE Test;
  14680. VAR variable: SHORTINT; result: HUGEINT;
  14681. BEGIN result := variable;
  14682. END Test.
  14683. negative: variable short integer to temporary huge integer assignment
  14684. MODULE Test;
  14685. VAR variable: SHORTINT; result: PROCEDURE (): HUGEINT;
  14686. BEGIN result () := variable;
  14687. END Test.
  14688. positive: variable integer to variable huge integer assignment
  14689. MODULE Test;
  14690. VAR variable: INTEGER; result: HUGEINT;
  14691. BEGIN result := variable;
  14692. END Test.
  14693. negative: variable integer to temporary huge integer assignment
  14694. MODULE Test;
  14695. VAR variable: INTEGER; result: PROCEDURE (): HUGEINT;
  14696. BEGIN result () := variable;
  14697. END Test.
  14698. positive: variable long integer to variable huge integer assignment
  14699. MODULE Test;
  14700. VAR variable: LONGINT; result: HUGEINT;
  14701. BEGIN result := variable;
  14702. END Test.
  14703. negative: variable long integer to temporary huge integer assignment
  14704. MODULE Test;
  14705. VAR variable: LONGINT; result: PROCEDURE (): HUGEINT;
  14706. BEGIN result () := variable;
  14707. END Test.
  14708. positive: variable huge integer to variable huge integer assignment
  14709. MODULE Test;
  14710. VAR variable, result: HUGEINT;
  14711. BEGIN result := variable;
  14712. END Test.
  14713. negative: variable huge integer to temporary huge integer assignment
  14714. MODULE Test;
  14715. VAR variable: HUGEINT; result: PROCEDURE (): HUGEINT;
  14716. BEGIN result () := variable;
  14717. END Test.
  14718. negative: variable real to variable huge integer assignment
  14719. MODULE Test;
  14720. VAR variable: REAL; result: HUGEINT;
  14721. BEGIN result := variable;
  14722. END Test.
  14723. negative: variable long real to variable huge integer assignment
  14724. MODULE Test;
  14725. VAR variable: LONGREAL; result: HUGEINT;
  14726. BEGIN result := variable;
  14727. END Test.
  14728. negative: variable set to variable huge integer assignment
  14729. MODULE Test;
  14730. VAR variable: SET; result: HUGEINT;
  14731. BEGIN result := variable;
  14732. END Test.
  14733. negative: array to variable huge integer assignment
  14734. MODULE Test;
  14735. VAR variable: ARRAY 10 OF CHAR; result: HUGEINT;
  14736. BEGIN result := variable;
  14737. END Test.
  14738. negative: record to variable huge integer assignment
  14739. MODULE Test;
  14740. VAR variable: RECORD END; result: HUGEINT;
  14741. BEGIN result := variable;
  14742. END Test.
  14743. negative: object to variable huge integer assignment
  14744. MODULE Test;
  14745. VAR variable: OBJECT; result: HUGEINT;
  14746. BEGIN result := variable;
  14747. END Test.
  14748. negative: pointer to variable huge integer assignment
  14749. MODULE Test;
  14750. VAR variable: POINTER TO RECORD END; result: HUGEINT;
  14751. BEGIN result := variable;
  14752. END Test.
  14753. negative: variable procedure to variable huge integer assignment
  14754. MODULE Test;
  14755. VAR variable: PROCEDURE; result: HUGEINT;
  14756. BEGIN result := variable;
  14757. END Test.
  14758. negative: import to variable huge integer assignment
  14759. MODULE Test;
  14760. IMPORT variable := Dummy; VAR result: HUGEINT;
  14761. BEGIN result := variable;
  14762. END Test.
  14763. negative: type to variable huge integer assignment
  14764. MODULE Test;
  14765. TYPE Type = HUGEINT; VAR result: Type;
  14766. BEGIN result := Type;
  14767. END Test.
  14768. negative: variable boolean to variable real assignment
  14769. MODULE Test;
  14770. VAR variable: BOOLEAN; result: REAL;
  14771. BEGIN result := variable;
  14772. END Test.
  14773. negative: variable character to variable real assignment
  14774. MODULE Test;
  14775. VAR variable: CHAR; result: REAL;
  14776. BEGIN result := variable;
  14777. END Test.
  14778. positive: variable short integer to variable real assignment
  14779. MODULE Test;
  14780. VAR variable: SHORTINT; result: REAL;
  14781. BEGIN result := variable;
  14782. END Test.
  14783. negative: variable short integer to temporary real assignment
  14784. MODULE Test;
  14785. VAR variable: SHORTINT; result: PROCEDURE (): REAL;
  14786. BEGIN result () := variable;
  14787. END Test.
  14788. positive: variable integer to variable real assignment
  14789. MODULE Test;
  14790. VAR variable: INTEGER; result: REAL;
  14791. BEGIN result := variable;
  14792. END Test.
  14793. negative: variable integer to temporary real assignment
  14794. MODULE Test;
  14795. VAR variable: INTEGER; result: PROCEDURE (): REAL;
  14796. BEGIN result () := variable;
  14797. END Test.
  14798. positive: variable long integer to variable real assignment
  14799. MODULE Test;
  14800. VAR variable: LONGINT; result: REAL;
  14801. BEGIN result := variable;
  14802. END Test.
  14803. negative: variable long integer to temporary real assignment
  14804. MODULE Test;
  14805. VAR variable: LONGINT; result: PROCEDURE (): REAL;
  14806. BEGIN result () := variable;
  14807. END Test.
  14808. positive: variable huge integer to variable real assignment
  14809. MODULE Test;
  14810. VAR variable: HUGEINT; result: REAL;
  14811. BEGIN result := variable;
  14812. END Test.
  14813. negative: variable huge integer to temporary real assignment
  14814. MODULE Test;
  14815. VAR variable: HUGEINT; result: PROCEDURE (): REAL;
  14816. BEGIN result () := variable;
  14817. END Test.
  14818. positive: variable real to variable real assignment
  14819. MODULE Test;
  14820. VAR variable, result: REAL;
  14821. BEGIN result := variable;
  14822. END Test.
  14823. negative: variable real to temporary real assignment
  14824. MODULE Test;
  14825. VAR variable: REAL; result: PROCEDURE (): REAL;
  14826. BEGIN result () := variable;
  14827. END Test.
  14828. negative: variable long real to variable real assignment
  14829. MODULE Test;
  14830. VAR variable: LONGREAL; result: REAL;
  14831. BEGIN result := variable;
  14832. END Test.
  14833. negative: variable set to variable real assignment
  14834. MODULE Test;
  14835. VAR variable: SET; result: REAL;
  14836. BEGIN result := variable;
  14837. END Test.
  14838. negative: array to variable real assignment
  14839. MODULE Test;
  14840. VAR variable: ARRAY 10 OF CHAR; result: REAL;
  14841. BEGIN result := variable;
  14842. END Test.
  14843. negative: record to variable real assignment
  14844. MODULE Test;
  14845. VAR variable: RECORD END; result: REAL;
  14846. BEGIN result := variable;
  14847. END Test.
  14848. negative: object to variable real assignment
  14849. MODULE Test;
  14850. VAR variable: OBJECT; result: REAL;
  14851. BEGIN result := variable;
  14852. END Test.
  14853. negative: pointer to variable real assignment
  14854. MODULE Test;
  14855. VAR variable: POINTER TO RECORD END; result: REAL;
  14856. BEGIN result := variable;
  14857. END Test.
  14858. negative: variable procedure to variable real assignment
  14859. MODULE Test;
  14860. VAR variable: PROCEDURE; result: REAL;
  14861. BEGIN result := variable;
  14862. END Test.
  14863. negative: import to variable real assignment
  14864. MODULE Test;
  14865. IMPORT variable := Dummy; VAR result: REAL;
  14866. BEGIN result := variable;
  14867. END Test.
  14868. negative: type to variable real assignment
  14869. MODULE Test;
  14870. TYPE Type = REAL; VAR result: Type;
  14871. BEGIN result := Type;
  14872. END Test.
  14873. negative: variable boolean to variable long real assignment
  14874. MODULE Test;
  14875. VAR variable: BOOLEAN; result: LONGREAL;
  14876. BEGIN result := variable;
  14877. END Test.
  14878. negative: variable character to variable long real assignment
  14879. MODULE Test;
  14880. VAR variable: CHAR; result: LONGREAL;
  14881. BEGIN result := variable;
  14882. END Test.
  14883. positive: variable short integer to variable long real assignment
  14884. MODULE Test;
  14885. VAR variable: SHORTINT; result: LONGREAL;
  14886. BEGIN result := variable;
  14887. END Test.
  14888. negative: variable short integer to temporary long real assignment
  14889. MODULE Test;
  14890. VAR variable: SHORTINT; result: PROCEDURE (): LONGREAL;
  14891. BEGIN result () := variable;
  14892. END Test.
  14893. positive: variable integer to variable long real assignment
  14894. MODULE Test;
  14895. VAR variable: INTEGER; result: LONGREAL;
  14896. BEGIN result := variable;
  14897. END Test.
  14898. negative: variable integer to temporary long real assignment
  14899. MODULE Test;
  14900. VAR variable: INTEGER; result: PROCEDURE (): LONGREAL;
  14901. BEGIN result () := variable;
  14902. END Test.
  14903. positive: variable long integer to variable long real assignment
  14904. MODULE Test;
  14905. VAR variable: LONGINT; result: LONGREAL;
  14906. BEGIN result := variable;
  14907. END Test.
  14908. negative: variable long integer to temporary long real assignment
  14909. MODULE Test;
  14910. VAR variable: LONGINT; result: PROCEDURE (): LONGREAL;
  14911. BEGIN result () := variable;
  14912. END Test.
  14913. positive: variable huge integer to variable long real assignment
  14914. MODULE Test;
  14915. VAR variable: HUGEINT; result: LONGREAL;
  14916. BEGIN result := variable;
  14917. END Test.
  14918. negative: variable huge integer to temporary long real assignment
  14919. MODULE Test;
  14920. VAR variable: HUGEINT; result: PROCEDURE (): LONGREAL;
  14921. BEGIN result () := variable;
  14922. END Test.
  14923. positive: variable real to variable long real assignment
  14924. MODULE Test;
  14925. VAR variable: REAL; result: LONGREAL;
  14926. BEGIN result := variable;
  14927. END Test.
  14928. negative: variable real to temporary long real assignment
  14929. MODULE Test;
  14930. VAR variable: REAL; result: PROCEDURE (): LONGREAL;
  14931. BEGIN result () := variable;
  14932. END Test.
  14933. positive: variable long real to variable long real assignment
  14934. MODULE Test;
  14935. VAR variable, result: LONGREAL;
  14936. BEGIN result := variable;
  14937. END Test.
  14938. negative: variable long real to temporary long real assignment
  14939. MODULE Test;
  14940. VAR variable: REAL; result: PROCEDURE (): LONGREAL;
  14941. BEGIN result () := variable;
  14942. END Test.
  14943. negative: variable set to variable long real assignment
  14944. MODULE Test;
  14945. VAR variable: SET; result: LONGREAL;
  14946. BEGIN result := variable;
  14947. END Test.
  14948. negative: array to variable long real assignment
  14949. MODULE Test;
  14950. VAR variable: ARRAY 10 OF CHAR; result: LONGREAL;
  14951. BEGIN result := variable;
  14952. END Test.
  14953. negative: record to variable long real assignment
  14954. MODULE Test;
  14955. VAR variable: RECORD END; result: LONGREAL;
  14956. BEGIN result := variable;
  14957. END Test.
  14958. negative: object to variable long real assignment
  14959. MODULE Test;
  14960. VAR variable: OBJECT; result: LONGREAL;
  14961. BEGIN result := variable;
  14962. END Test.
  14963. negative: pointer to variable long real assignment
  14964. MODULE Test;
  14965. VAR variable: POINTER TO RECORD END; result: LONGREAL;
  14966. BEGIN result := variable;
  14967. END Test.
  14968. negative: variable procedure to variable long real assignment
  14969. MODULE Test;
  14970. VAR variable: PROCEDURE; result: LONGREAL;
  14971. BEGIN result := variable;
  14972. END Test.
  14973. negative: import to variable long real assignment
  14974. MODULE Test;
  14975. IMPORT variable := Dummy; VAR result: LONGREAL;
  14976. BEGIN result := variable;
  14977. END Test.
  14978. negative: type to variable long real assignment
  14979. MODULE Test;
  14980. TYPE Type = LONGREAL; VAR result: Type;
  14981. BEGIN result := Type;
  14982. END Test.
  14983. negative: variable boolean to variable set assignment
  14984. MODULE Test;
  14985. VAR variable: BOOLEAN; result: SET;
  14986. BEGIN result := variable;
  14987. END Test.
  14988. negative: variable character to variable set assignment
  14989. MODULE Test;
  14990. VAR variable: CHAR; result: SET;
  14991. BEGIN result := variable;
  14992. END Test.
  14993. negative: variable short integer to variable set assignment
  14994. MODULE Test;
  14995. VAR variable: SHORTINT; result: SET;
  14996. BEGIN result := variable;
  14997. END Test.
  14998. negative: variable integer to variable set assignment
  14999. MODULE Test;
  15000. VAR variable: INTEGER; result: SET;
  15001. BEGIN result := variable;
  15002. END Test.
  15003. negative: variable long integer to variable set assignment
  15004. MODULE Test;
  15005. VAR variable: LONGINT; result: SET;
  15006. BEGIN result := variable;
  15007. END Test.
  15008. negative: variable huge integer to variable set assignment
  15009. MODULE Test;
  15010. VAR variable: HUGEINT; result: SET;
  15011. BEGIN result := variable;
  15012. END Test.
  15013. negative: variable real to variable set assignment
  15014. MODULE Test;
  15015. VAR variable: REAL; result: SET;
  15016. BEGIN result := variable;
  15017. END Test.
  15018. negative: variable long real to variable set assignment
  15019. MODULE Test;
  15020. VAR variable: LONGREAL; result: SET;
  15021. BEGIN result := variable;
  15022. END Test.
  15023. positive: variable set to variable set assignment
  15024. MODULE Test;
  15025. VAR variable, result: SET;
  15026. BEGIN result := variable;
  15027. END Test.
  15028. negative: variable set to temporary set assignment
  15029. MODULE Test;
  15030. VAR variable: SET; result: PROCEDURE (): SET;
  15031. BEGIN result () := variable;
  15032. END Test.
  15033. negative: array to variable set assignment
  15034. MODULE Test;
  15035. VAR variable: ARRAY 10 OF CHAR; result: SET;
  15036. BEGIN result := variable;
  15037. END Test.
  15038. negative: record to variable set assignment
  15039. MODULE Test;
  15040. VAR variable: RECORD END; result: SET;
  15041. BEGIN result := variable;
  15042. END Test.
  15043. negative: object to variable set assignment
  15044. MODULE Test;
  15045. VAR variable: OBJECT; result: SET;
  15046. BEGIN result := variable;
  15047. END Test.
  15048. negative: pointer to variable set assignment
  15049. MODULE Test;
  15050. VAR variable: POINTER TO RECORD END; result: SET;
  15051. BEGIN result := variable;
  15052. END Test.
  15053. negative: variable procedure to variable set assignment
  15054. MODULE Test;
  15055. VAR variable: PROCEDURE; result: SET;
  15056. BEGIN result := variable;
  15057. END Test.
  15058. negative: import to variable set assignment
  15059. MODULE Test;
  15060. IMPORT variable := Dummy; VAR result: SET;
  15061. BEGIN result := variable;
  15062. END Test.
  15063. negative: type to variable set assignment
  15064. MODULE Test;
  15065. TYPE Type = SET; VAR result: Type;
  15066. BEGIN result := Type;
  15067. END Test.
  15068. negative: variable boolean to array assignment
  15069. MODULE Test;
  15070. VAR variable: BOOLEAN; result: ARRAY 10 OF CHAR;
  15071. BEGIN result := variable;
  15072. END Test.
  15073. negative: variable character to array assignment
  15074. MODULE Test;
  15075. VAR variable: CHAR; result: ARRAY 10 OF CHAR;
  15076. BEGIN result := variable;
  15077. END Test.
  15078. negative: variable short integer to array assignment
  15079. MODULE Test;
  15080. VAR variable: SHORTINT; result: ARRAY 10 OF CHAR;
  15081. BEGIN result := variable;
  15082. END Test.
  15083. negative: variable integer to array assignment
  15084. MODULE Test;
  15085. VAR variable: INTEGER; result: ARRAY 10 OF CHAR;
  15086. BEGIN result := variable;
  15087. END Test.
  15088. negative: variable long integer to array assignment
  15089. MODULE Test;
  15090. VAR variable: LONGINT; result: ARRAY 10 OF CHAR;
  15091. BEGIN result := variable;
  15092. END Test.
  15093. negative: variable huge integer to array assignment
  15094. MODULE Test;
  15095. VAR variable: HUGEINT; result: ARRAY 10 OF CHAR;
  15096. BEGIN result := variable;
  15097. END Test.
  15098. negative: variable real to array assignment
  15099. MODULE Test;
  15100. VAR variable: REAL; result: ARRAY 10 OF CHAR;
  15101. BEGIN result := variable;
  15102. END Test.
  15103. negative: variable long real to array assignment
  15104. MODULE Test;
  15105. VAR variable: LONGREAL; result: ARRAY 10 OF CHAR;
  15106. BEGIN result := variable;
  15107. END Test.
  15108. negative: variable set to array assignment
  15109. MODULE Test;
  15110. VAR variable: SET; result: ARRAY 10 OF CHAR;
  15111. BEGIN result := variable;
  15112. END Test.
  15113. positive: array of boolean to array of boolean assignment
  15114. MODULE Test;
  15115. VAR variable, result: ARRAY 10 OF BOOLEAN;
  15116. BEGIN result := variable;
  15117. END Test.
  15118. negative: array of boolean to temporary array of boolean assignment
  15119. MODULE Test;
  15120. VAR variable: ARRAY 10 OF BOOLEAN; result: PROCEDURE (): ARRAY 10 OF BOOLEAN;
  15121. BEGIN result () := variable;
  15122. END Test.
  15123. negative: array of boolean to longer array of boolean assignment
  15124. MODULE Test;
  15125. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 20 OF BOOLEAN;
  15126. BEGIN result := variable;
  15127. END Test.
  15128. negative: array of boolean to shorter array of boolean assignment
  15129. MODULE Test;
  15130. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 5 OF BOOLEAN;
  15131. BEGIN result := variable;
  15132. END Test.
  15133. negative: array of boolean to open array of boolean assignment
  15134. MODULE Test;
  15135. PROCEDURE Procedure (VAR result: ARRAY OF BOOLEAN);
  15136. VAR variable: ARRAY 10 OF BOOLEAN;
  15137. BEGIN result := variable;
  15138. END Procedure;
  15139. END Test.
  15140. negative: open array of boolean to array of boolean assignment
  15141. MODULE Test;
  15142. PROCEDURE Procedure (VAR variable: ARRAY OF BOOLEAN);
  15143. VAR result: ARRAY 10 OF BOOLEAN;
  15144. BEGIN result := variable;
  15145. END Procedure;
  15146. END Test.
  15147. negative: array of boolean to dereferenced open array of boolean assignment
  15148. MODULE Test;
  15149. VAR variable: ARRAY 10 OF BOOLEAN; result: POINTER TO ARRAY OF BOOLEAN;
  15150. BEGIN result^ := variable;
  15151. END Test.
  15152. negative: array of character to array of boolean assignment
  15153. MODULE Test;
  15154. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF BOOLEAN;
  15155. BEGIN result := variable;
  15156. END Test.
  15157. negative: array of short integer to array of boolean assignment
  15158. MODULE Test;
  15159. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF BOOLEAN;
  15160. BEGIN result := variable;
  15161. END Test.
  15162. negative: array of integer to array of boolean assignment
  15163. MODULE Test;
  15164. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF BOOLEAN;
  15165. BEGIN result := variable;
  15166. END Test.
  15167. negative: array of long integer to array of boolean assignment
  15168. MODULE Test;
  15169. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF BOOLEAN;
  15170. BEGIN result := variable;
  15171. END Test.
  15172. negative: array of huge integer to array of boolean assignment
  15173. MODULE Test;
  15174. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF BOOLEAN;
  15175. BEGIN result := variable;
  15176. END Test.
  15177. negative: array of real to array of boolean assignment
  15178. MODULE Test;
  15179. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF BOOLEAN;
  15180. BEGIN result := variable;
  15181. END Test.
  15182. negative: array of long real to array of boolean assignment
  15183. MODULE Test;
  15184. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF BOOLEAN;
  15185. BEGIN result := variable;
  15186. END Test.
  15187. negative: array of set to array of boolean assignment
  15188. MODULE Test;
  15189. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF BOOLEAN;
  15190. BEGIN result := variable;
  15191. END Test.
  15192. negative: array of array to array of boolean assignment
  15193. MODULE Test;
  15194. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF BOOLEAN;
  15195. BEGIN result := variable;
  15196. END Test.
  15197. negative: array of record to array of boolean assignment
  15198. MODULE Test;
  15199. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF BOOLEAN;
  15200. BEGIN result := variable;
  15201. END Test.
  15202. negative: array of object to array of boolean assignment
  15203. MODULE Test;
  15204. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF BOOLEAN;
  15205. BEGIN result := variable;
  15206. END Test.
  15207. negative: array of pointer to array of boolean assignment
  15208. MODULE Test;
  15209. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF BOOLEAN;
  15210. BEGIN result := variable;
  15211. END Test.
  15212. negative: array of procedure to array of boolean assignment
  15213. MODULE Test;
  15214. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF BOOLEAN;
  15215. BEGIN result := variable;
  15216. END Test.
  15217. negative: array of boolean to array of character assignment
  15218. MODULE Test;
  15219. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF CHAR;
  15220. BEGIN result := variable;
  15221. END Test.
  15222. positive: array of character to array of character assignment
  15223. MODULE Test;
  15224. VAR variable, result: ARRAY 10 OF CHAR;
  15225. BEGIN result := variable;
  15226. END Test.
  15227. negative: array of character to temporary array of character assignment
  15228. MODULE Test;
  15229. VAR variable: ARRAY 10 OF CHAR; result: PROCEDURE (): ARRAY 10 OF CHAR;
  15230. BEGIN result () := variable;
  15231. END Test.
  15232. negative: array of character to longer array of character assignment
  15233. MODULE Test;
  15234. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 20 OF CHAR;
  15235. BEGIN result := variable;
  15236. END Test.
  15237. negative: array of character to shorter array of character assignment
  15238. MODULE Test;
  15239. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 5 OF CHAR;
  15240. BEGIN result := variable;
  15241. END Test.
  15242. negative: array of character to open array of character assignment
  15243. MODULE Test;
  15244. PROCEDURE Procedure (VAR result: ARRAY OF CHAR);
  15245. VAR variable: ARRAY 10 OF CHAR;
  15246. BEGIN result := variable;
  15247. END Procedure;
  15248. END Test.
  15249. positive: string to open array of character assignment
  15250. MODULE Test;
  15251. PROCEDURE Procedure (VAR result: ARRAY OF CHAR);
  15252. BEGIN result := "string";
  15253. END Procedure;
  15254. END Test.
  15255. negative: open array of character to array of character assignment
  15256. MODULE Test;
  15257. PROCEDURE Procedure (VAR variable: ARRAY OF CHAR);
  15258. VAR result: ARRAY 10 OF CHAR;
  15259. BEGIN result := variable;
  15260. END Procedure;
  15261. END Test.
  15262. negative: array of character to dereferenced open array of character assignment
  15263. MODULE Test;
  15264. VAR variable: ARRAY 10 OF CHAR; result: POINTER TO ARRAY OF CHAR;
  15265. BEGIN result^ := variable;
  15266. END Test.
  15267. positive: string to dereferenced open array of character assignment
  15268. MODULE Test;
  15269. VAR result: POINTER TO ARRAY OF CHAR;
  15270. BEGIN result^ := "string";
  15271. END Test.
  15272. negative: array of short integer to array of character assignment
  15273. MODULE Test;
  15274. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF CHAR;
  15275. BEGIN result := variable;
  15276. END Test.
  15277. negative: array of integer to array of character assignment
  15278. MODULE Test;
  15279. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF CHAR;
  15280. BEGIN result := variable;
  15281. END Test.
  15282. negative: array of long integer to array of character assignment
  15283. MODULE Test;
  15284. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF CHAR;
  15285. BEGIN result := variable;
  15286. END Test.
  15287. negative: array of huge integer to array of character assignment
  15288. MODULE Test;
  15289. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF CHAR;
  15290. BEGIN result := variable;
  15291. END Test.
  15292. negative: array of real to array of character assignment
  15293. MODULE Test;
  15294. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF CHAR;
  15295. BEGIN result := variable;
  15296. END Test.
  15297. negative: array of long real to array of character assignment
  15298. MODULE Test;
  15299. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF CHAR;
  15300. BEGIN result := variable;
  15301. END Test.
  15302. negative: array of set to array of character assignment
  15303. MODULE Test;
  15304. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF CHAR;
  15305. BEGIN result := variable;
  15306. END Test.
  15307. negative: array of array to array of character assignment
  15308. MODULE Test;
  15309. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF CHAR;
  15310. BEGIN result := variable;
  15311. END Test.
  15312. negative: array of record to array of character assignment
  15313. MODULE Test;
  15314. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF CHAR;
  15315. BEGIN result := variable;
  15316. END Test.
  15317. negative: array of object to array of character assignment
  15318. MODULE Test;
  15319. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF CHAR;
  15320. BEGIN result := variable;
  15321. END Test.
  15322. negative: array of pointer to array of character assignment
  15323. MODULE Test;
  15324. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF CHAR;
  15325. BEGIN result := variable;
  15326. END Test.
  15327. negative: array of procedure to array of character assignment
  15328. MODULE Test;
  15329. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF CHAR;
  15330. BEGIN result := variable;
  15331. END Test.
  15332. negative: array of boolean to array of short integer assignment
  15333. MODULE Test;
  15334. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF SHORTINT;
  15335. BEGIN result := variable;
  15336. END Test.
  15337. negative: array of character to array of short integer assignment
  15338. MODULE Test;
  15339. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF SHORTINT;
  15340. BEGIN result := variable;
  15341. END Test.
  15342. positive: array of short integer to array of short integer assignment
  15343. MODULE Test;
  15344. VAR variable, result: ARRAY 10 OF SHORTINT;
  15345. BEGIN result := variable;
  15346. END Test.
  15347. negative: array of short integer to temporary array of short integer assignment
  15348. MODULE Test;
  15349. VAR variable: ARRAY 10 OF SHORTINT; result: PROCEDURE (): ARRAY 10 OF SHORTINT;
  15350. BEGIN result () := variable;
  15351. END Test.
  15352. negative: array of short integer to longer array of short integer assignment
  15353. MODULE Test;
  15354. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 20 OF SHORTINT;
  15355. BEGIN result := variable;
  15356. END Test.
  15357. negative: array of short integer to shorter array of short integer assignment
  15358. MODULE Test;
  15359. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 5 OF SHORTINT;
  15360. BEGIN result := variable;
  15361. END Test.
  15362. negative: array of short integer to open array of short integer assignment
  15363. MODULE Test;
  15364. PROCEDURE Procedure (VAR result: ARRAY OF SHORTINT);
  15365. VAR variable: ARRAY 10 OF SHORTINT;
  15366. BEGIN result := variable;
  15367. END Procedure;
  15368. END Test.
  15369. negative: open array of short integer to array of short integer assignment
  15370. MODULE Test;
  15371. PROCEDURE Procedure (VAR variable: ARRAY OF SHORTINT);
  15372. VAR result: ARRAY 10 OF SHORTINT;
  15373. BEGIN result := variable;
  15374. END Procedure;
  15375. END Test.
  15376. negative: array of short integer to dereferenced open array of short integer assignment
  15377. MODULE Test;
  15378. VAR variable: ARRAY 10 OF SHORTINT; result: POINTER TO ARRAY OF SHORTINT;
  15379. BEGIN result^ := variable;
  15380. END Test.
  15381. negative: array of integer to array of short integer assignment
  15382. MODULE Test;
  15383. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF SHORTINT;
  15384. BEGIN result := variable;
  15385. END Test.
  15386. negative: array of long integer to array of short integer assignment
  15387. MODULE Test;
  15388. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF SHORTINT;
  15389. BEGIN result := variable;
  15390. END Test.
  15391. negative: array of huge integer to array of short integer assignment
  15392. MODULE Test;
  15393. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF SHORTINT;
  15394. BEGIN result := variable;
  15395. END Test.
  15396. negative: array of real to array of short integer assignment
  15397. MODULE Test;
  15398. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF SHORTINT;
  15399. BEGIN result := variable;
  15400. END Test.
  15401. negative: array of long real to array of short integer assignment
  15402. MODULE Test;
  15403. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF SHORTINT;
  15404. BEGIN result := variable;
  15405. END Test.
  15406. negative: array of set to array of short integer assignment
  15407. MODULE Test;
  15408. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF SHORTINT;
  15409. BEGIN result := variable;
  15410. END Test.
  15411. negative: array of array to array of short integer assignment
  15412. MODULE Test;
  15413. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF SHORTINT;
  15414. BEGIN result := variable;
  15415. END Test.
  15416. negative: array of record to array of short integer assignment
  15417. MODULE Test;
  15418. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF SHORTINT;
  15419. BEGIN result := variable;
  15420. END Test.
  15421. negative: array of object to array of short integer assignment
  15422. MODULE Test;
  15423. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF SHORTINT;
  15424. BEGIN result := variable;
  15425. END Test.
  15426. negative: array of pointer to array of short integer assignment
  15427. MODULE Test;
  15428. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF SHORTINT;
  15429. BEGIN result := variable;
  15430. END Test.
  15431. negative: array of procedure to array of short integer assignment
  15432. MODULE Test;
  15433. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF SHORTINT;
  15434. BEGIN result := variable;
  15435. END Test.
  15436. negative: array of boolean to array of integer assignment
  15437. MODULE Test;
  15438. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF INTEGER;
  15439. BEGIN result := variable;
  15440. END Test.
  15441. negative: array of character to array of integer assignment
  15442. MODULE Test;
  15443. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF INTEGER;
  15444. BEGIN result := variable;
  15445. END Test.
  15446. negative: array of short integer to array of integer assignment
  15447. MODULE Test;
  15448. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF INTEGER;
  15449. BEGIN result := variable;
  15450. END Test.
  15451. positive: array of integer to array of integer assignment
  15452. MODULE Test;
  15453. VAR variable, result: ARRAY 10 OF INTEGER;
  15454. BEGIN result := variable;
  15455. END Test.
  15456. negative: array of integer to temporary array of integer assignment
  15457. MODULE Test;
  15458. VAR variable: ARRAY 10 OF INTEGER; result: PROCEDURE (): ARRAY 10 OF INTEGER;
  15459. BEGIN result () := variable;
  15460. END Test.
  15461. negative: array of integer to longer array of integer assignment
  15462. MODULE Test;
  15463. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 20 OF INTEGER;
  15464. BEGIN result := variable;
  15465. END Test.
  15466. negative: array of integer to shorter array of integer assignment
  15467. MODULE Test;
  15468. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 5 OF INTEGER;
  15469. BEGIN result := variable;
  15470. END Test.
  15471. negative: array of integer to open array of integer assignment
  15472. MODULE Test;
  15473. PROCEDURE Procedure (VAR result: ARRAY OF INTEGER);
  15474. VAR variable: ARRAY 10 OF INTEGER;
  15475. BEGIN result := variable;
  15476. END Procedure;
  15477. END Test.
  15478. negative: open array of integer to array of integer assignment
  15479. MODULE Test;
  15480. PROCEDURE Procedure (VAR variable: ARRAY OF INTEGER);
  15481. VAR result: ARRAY 10 OF INTEGER;
  15482. BEGIN result := variable;
  15483. END Procedure;
  15484. END Test.
  15485. negative: array of integer to dereferenced open array of integer assignment
  15486. MODULE Test;
  15487. VAR variable: ARRAY 10 OF INTEGER; result: POINTER TO ARRAY OF INTEGER;
  15488. BEGIN result^ := variable;
  15489. END Test.
  15490. negative: array of long integer to array of integer assignment
  15491. MODULE Test;
  15492. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF INTEGER;
  15493. BEGIN result := variable;
  15494. END Test.
  15495. negative: array of huge integer to array of integer assignment
  15496. MODULE Test;
  15497. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF INTEGER;
  15498. BEGIN result := variable;
  15499. END Test.
  15500. negative: array of real to array of integer assignment
  15501. MODULE Test;
  15502. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF INTEGER;
  15503. BEGIN result := variable;
  15504. END Test.
  15505. negative: array of long real to array of integer assignment
  15506. MODULE Test;
  15507. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF INTEGER;
  15508. BEGIN result := variable;
  15509. END Test.
  15510. negative: array of set to array of integer assignment
  15511. MODULE Test;
  15512. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF INTEGER;
  15513. BEGIN result := variable;
  15514. END Test.
  15515. negative: array of array to array of integer assignment
  15516. MODULE Test;
  15517. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF INTEGER;
  15518. BEGIN result := variable;
  15519. END Test.
  15520. negative: array of record to array of integer assignment
  15521. MODULE Test;
  15522. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF INTEGER;
  15523. BEGIN result := variable;
  15524. END Test.
  15525. negative: array of object to array of integer assignment
  15526. MODULE Test;
  15527. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF INTEGER;
  15528. BEGIN result := variable;
  15529. END Test.
  15530. negative: array of pointer to array of integer assignment
  15531. MODULE Test;
  15532. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF INTEGER;
  15533. BEGIN result := variable;
  15534. END Test.
  15535. negative: array of procedure to array of integer assignment
  15536. MODULE Test;
  15537. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF INTEGER;
  15538. BEGIN result := variable;
  15539. END Test.
  15540. negative: array of boolean to array of long integer assignment
  15541. MODULE Test;
  15542. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF LONGINT;
  15543. BEGIN result := variable;
  15544. END Test.
  15545. negative: array of character to array of long integer assignment
  15546. MODULE Test;
  15547. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF LONGINT;
  15548. BEGIN result := variable;
  15549. END Test.
  15550. negative: array of short integer to array of long integer assignment
  15551. MODULE Test;
  15552. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF LONGINT;
  15553. BEGIN result := variable;
  15554. END Test.
  15555. negative: array of integer to array of long integer assignment
  15556. MODULE Test;
  15557. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF LONGINT;
  15558. BEGIN result := variable;
  15559. END Test.
  15560. positive: array of long integer to array of long integer assignment
  15561. MODULE Test;
  15562. VAR variable, result: ARRAY 10 OF LONGINT;
  15563. BEGIN result := variable;
  15564. END Test.
  15565. negative: array of long integer to temporary array of long integer assignment
  15566. MODULE Test;
  15567. VAR variable: ARRAY 10 OF LONGINT; result: PROCEDURE (): ARRAY 10 OF LONGINT;
  15568. BEGIN result () := variable;
  15569. END Test.
  15570. negative: array of long integer to longer array of long integer assignment
  15571. MODULE Test;
  15572. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 20 OF LONGINT;
  15573. BEGIN result := variable;
  15574. END Test.
  15575. negative: array of long integer to shorter array of long integer assignment
  15576. MODULE Test;
  15577. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 5 OF LONGINT;
  15578. BEGIN result := variable;
  15579. END Test.
  15580. negative: array of long integer to open array of long integer assignment
  15581. MODULE Test;
  15582. PROCEDURE Procedure (VAR result: ARRAY OF LONGINT);
  15583. VAR variable: ARRAY 10 OF LONGINT;
  15584. BEGIN result := variable;
  15585. END Procedure;
  15586. END Test.
  15587. negative: open array of long integer to array of long integer assignment
  15588. MODULE Test;
  15589. PROCEDURE Procedure (VAR variable: ARRAY OF LONGINT);
  15590. VAR result: ARRAY 10 OF LONGINT;
  15591. BEGIN result := variable;
  15592. END Procedure;
  15593. END Test.
  15594. negative: array of long integer to dereferenced open array of long integer assignment
  15595. MODULE Test;
  15596. VAR variable: ARRAY 10 OF LONGINT; result: POINTER TO ARRAY OF LONGINT;
  15597. BEGIN result^ := variable;
  15598. END Test.
  15599. negative: array of huge integer to array of long integer assignment
  15600. MODULE Test;
  15601. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF LONGINT;
  15602. BEGIN result := variable;
  15603. END Test.
  15604. negative: array of real to array of long integer assignment
  15605. MODULE Test;
  15606. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF LONGINT;
  15607. BEGIN result := variable;
  15608. END Test.
  15609. negative: array of long real to array of long integer assignment
  15610. MODULE Test;
  15611. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF LONGINT;
  15612. BEGIN result := variable;
  15613. END Test.
  15614. negative: array of set to array of long integer assignment
  15615. MODULE Test;
  15616. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF LONGINT;
  15617. BEGIN result := variable;
  15618. END Test.
  15619. negative: array of array to array of long integer assignment
  15620. MODULE Test;
  15621. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF LONGINT;
  15622. BEGIN result := variable;
  15623. END Test.
  15624. negative: array of record to array of long integer assignment
  15625. MODULE Test;
  15626. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF LONGINT;
  15627. BEGIN result := variable;
  15628. END Test.
  15629. negative: array of object to array of long integer assignment
  15630. MODULE Test;
  15631. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF LONGINT;
  15632. BEGIN result := variable;
  15633. END Test.
  15634. negative: array of pointer to array of long integer assignment
  15635. MODULE Test;
  15636. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF LONGINT;
  15637. BEGIN result := variable;
  15638. END Test.
  15639. negative: array of procedure to array of long integer assignment
  15640. MODULE Test;
  15641. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF LONGINT;
  15642. BEGIN result := variable;
  15643. END Test.
  15644. negative: array of boolean to array of huge integer assignment
  15645. MODULE Test;
  15646. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF HUGEINT;
  15647. BEGIN result := variable;
  15648. END Test.
  15649. negative: array of character to array of huge integer assignment
  15650. MODULE Test;
  15651. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF HUGEINT;
  15652. BEGIN result := variable;
  15653. END Test.
  15654. negative: array of short integer to array of huge integer assignment
  15655. MODULE Test;
  15656. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF HUGEINT;
  15657. BEGIN result := variable;
  15658. END Test.
  15659. negative: array of integer to array of huge integer assignment
  15660. MODULE Test;
  15661. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF HUGEINT;
  15662. BEGIN result := variable;
  15663. END Test.
  15664. negative: array of long integer to array of huge integer assignment
  15665. MODULE Test;
  15666. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF HUGEINT;
  15667. BEGIN result := variable;
  15668. END Test.
  15669. positive: array of huge integer to array of huge integer assignment
  15670. MODULE Test;
  15671. VAR variable, result: ARRAY 10 OF HUGEINT;
  15672. BEGIN result := variable;
  15673. END Test.
  15674. negative: array of huge integer to temporary array of huge integer assignment
  15675. MODULE Test;
  15676. VAR variable: ARRAY 10 OF HUGEINT; result: PROCEDURE (): ARRAY 10 OF HUGEINT;
  15677. BEGIN result () := variable;
  15678. END Test.
  15679. negative: array of huge integer to longer array of huge integer assignment
  15680. MODULE Test;
  15681. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 20 OF HUGEINT;
  15682. BEGIN result := variable;
  15683. END Test.
  15684. negative: array of huge integer to shorter array of huge integer assignment
  15685. MODULE Test;
  15686. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 5 OF HUGEINT;
  15687. BEGIN result := variable;
  15688. END Test.
  15689. negative: array of huge integer to open array of huge integer assignment
  15690. MODULE Test;
  15691. PROCEDURE Procedure (VAR result: ARRAY OF HUGEINT);
  15692. VAR variable: ARRAY 10 OF HUGEINT;
  15693. BEGIN result := variable;
  15694. END Procedure;
  15695. END Test.
  15696. negative: open array of huge integer to array of huge integer assignment
  15697. MODULE Test;
  15698. PROCEDURE Procedure (VAR variable: ARRAY OF HUGEINT);
  15699. VAR result: ARRAY 10 OF HUGEINT;
  15700. BEGIN result := variable;
  15701. END Procedure;
  15702. END Test.
  15703. negative: array of huge integer to dereferenced open array of huge integer assignment
  15704. MODULE Test;
  15705. VAR variable: ARRAY 10 OF HUGEINT; result: POINTER TO ARRAY OF HUGEINT;
  15706. BEGIN result^ := variable;
  15707. END Test.
  15708. negative: array of real to array of huge integer assignment
  15709. MODULE Test;
  15710. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF HUGEINT;
  15711. BEGIN result := variable;
  15712. END Test.
  15713. negative: array of long real to array of huge integer assignment
  15714. MODULE Test;
  15715. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF HUGEINT;
  15716. BEGIN result := variable;
  15717. END Test.
  15718. negative: array of set to array of huge integer assignment
  15719. MODULE Test;
  15720. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF HUGEINT;
  15721. BEGIN result := variable;
  15722. END Test.
  15723. negative: array of array to array of huge integer assignment
  15724. MODULE Test;
  15725. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF HUGEINT;
  15726. BEGIN result := variable;
  15727. END Test.
  15728. negative: array of record to array of huge integer assignment
  15729. MODULE Test;
  15730. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF HUGEINT;
  15731. BEGIN result := variable;
  15732. END Test.
  15733. negative: array of object to array of huge integer assignment
  15734. MODULE Test;
  15735. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF HUGEINT;
  15736. BEGIN result := variable;
  15737. END Test.
  15738. negative: array of pointer to array of huge integer assignment
  15739. MODULE Test;
  15740. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF HUGEINT;
  15741. BEGIN result := variable;
  15742. END Test.
  15743. negative: array of procedure to array of huge integer assignment
  15744. MODULE Test;
  15745. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF HUGEINT;
  15746. BEGIN result := variable;
  15747. END Test.
  15748. negative: array of boolean to array of real assignment
  15749. MODULE Test;
  15750. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF REAL;
  15751. BEGIN result := variable;
  15752. END Test.
  15753. negative: array of character to array of real assignment
  15754. MODULE Test;
  15755. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF REAL;
  15756. BEGIN result := variable;
  15757. END Test.
  15758. negative: array of short integer to array of real assignment
  15759. MODULE Test;
  15760. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF REAL;
  15761. BEGIN result := variable;
  15762. END Test.
  15763. negative: array of integer to array of real assignment
  15764. MODULE Test;
  15765. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF REAL;
  15766. BEGIN result := variable;
  15767. END Test.
  15768. negative: array of long integer to array of real assignment
  15769. MODULE Test;
  15770. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF REAL;
  15771. BEGIN result := variable;
  15772. END Test.
  15773. negative: array of huge integer to array of real assignment
  15774. MODULE Test;
  15775. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF REAL;
  15776. BEGIN result := variable;
  15777. END Test.
  15778. positive: array of real to array of real assignment
  15779. MODULE Test;
  15780. VAR variable, result: ARRAY 10 OF REAL;
  15781. BEGIN result := variable;
  15782. END Test.
  15783. negative: array of real to temporary array of real assignment
  15784. MODULE Test;
  15785. VAR variable: ARRAY 10 OF SHORTINT; result: PROCEDURE (): ARRAY 10 OF SHORTINT;
  15786. BEGIN result () := variable;
  15787. END Test.
  15788. negative: array of real to longer array of real assignment
  15789. MODULE Test;
  15790. VAR variable: ARRAY 10 OF REAL; result: ARRAY 20 OF REAL;
  15791. BEGIN result := variable;
  15792. END Test.
  15793. negative: array of real to shorter array of real assignment
  15794. MODULE Test;
  15795. VAR variable: ARRAY 10 OF REAL; result: ARRAY 5 OF REAL;
  15796. BEGIN result := variable;
  15797. END Test.
  15798. negative: array of real to open array of real assignment
  15799. MODULE Test;
  15800. PROCEDURE Procedure (VAR result: ARRAY OF REAL);
  15801. VAR variable: ARRAY 10 OF REAL;
  15802. BEGIN result := variable;
  15803. END Procedure;
  15804. END Test.
  15805. negative: open array of real to array of real assignment
  15806. MODULE Test;
  15807. PROCEDURE Procedure (VAR variable: ARRAY OF REAL);
  15808. VAR result: ARRAY 10 OF REAL;
  15809. BEGIN result := variable;
  15810. END Procedure;
  15811. END Test.
  15812. negative: array of real to dereferenced open array of real assignment
  15813. MODULE Test;
  15814. VAR variable: ARRAY 10 OF REAL; result: POINTER TO ARRAY OF REAL;
  15815. BEGIN result^ := variable;
  15816. END Test.
  15817. negative: array of long real to array of real assignment
  15818. MODULE Test;
  15819. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF REAL;
  15820. BEGIN result := variable;
  15821. END Test.
  15822. negative: array of set to array of real assignment
  15823. MODULE Test;
  15824. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF REAL;
  15825. BEGIN result := variable;
  15826. END Test.
  15827. negative: array of array to array of real assignment
  15828. MODULE Test;
  15829. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF REAL;
  15830. BEGIN result := variable;
  15831. END Test.
  15832. negative: array of record to array of real assignment
  15833. MODULE Test;
  15834. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF REAL;
  15835. BEGIN result := variable;
  15836. END Test.
  15837. negative: array of object to array of real assignment
  15838. MODULE Test;
  15839. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF REAL;
  15840. BEGIN result := variable;
  15841. END Test.
  15842. negative: array of pointer to array of real assignment
  15843. MODULE Test;
  15844. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF REAL;
  15845. BEGIN result := variable;
  15846. END Test.
  15847. negative: array of procedure to array of real assignment
  15848. MODULE Test;
  15849. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF REAL;
  15850. BEGIN result := variable;
  15851. END Test.
  15852. negative: array of boolean to array of long real assignment
  15853. MODULE Test;
  15854. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF LONGREAL;
  15855. BEGIN result := variable;
  15856. END Test.
  15857. negative: array of character to array of long real assignment
  15858. MODULE Test;
  15859. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF LONGREAL;
  15860. BEGIN result := variable;
  15861. END Test.
  15862. negative: array of short integer to array of long real assignment
  15863. MODULE Test;
  15864. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF LONGREAL;
  15865. BEGIN result := variable;
  15866. END Test.
  15867. negative: array of integer to array of long real assignment
  15868. MODULE Test;
  15869. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF LONGREAL;
  15870. BEGIN result := variable;
  15871. END Test.
  15872. negative: array of long integer to array of long real assignment
  15873. MODULE Test;
  15874. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF LONGREAL;
  15875. BEGIN result := variable;
  15876. END Test.
  15877. negative: array of huge integer to array of long real assignment
  15878. MODULE Test;
  15879. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF LONGREAL;
  15880. BEGIN result := variable;
  15881. END Test.
  15882. negative: array of real to array of long real assignment
  15883. MODULE Test;
  15884. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF LONGREAL;
  15885. BEGIN result := variable;
  15886. END Test.
  15887. positive: array of long real to array of long real assignment
  15888. MODULE Test;
  15889. VAR variable, result: ARRAY 10 OF LONGREAL;
  15890. BEGIN result := variable;
  15891. END Test.
  15892. negative: array of long real to temporary array of long real assignment
  15893. MODULE Test;
  15894. VAR variable: ARRAY 10 OF LONGREAL; result: PROCEDURE (): ARRAY 10 OF LONGREAL;
  15895. BEGIN result () := variable;
  15896. END Test.
  15897. negative: array of long real to longer array of long real assignment
  15898. MODULE Test;
  15899. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 20 OF LONGREAL;
  15900. BEGIN result := variable;
  15901. END Test.
  15902. negative: array of long real to shorter array of long real assignment
  15903. MODULE Test;
  15904. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 5 OF LONGREAL;
  15905. BEGIN result := variable;
  15906. END Test.
  15907. negative: array of long real to open array of long real assignment
  15908. MODULE Test;
  15909. PROCEDURE Procedure (VAR result: ARRAY OF LONGREAL);
  15910. VAR variable: ARRAY 10 OF LONGREAL;
  15911. BEGIN result := variable;
  15912. END Procedure;
  15913. END Test.
  15914. negative: open array of long real to array of long real assignment
  15915. MODULE Test;
  15916. PROCEDURE Procedure (VAR variable: ARRAY OF LONGREAL);
  15917. VAR result: ARRAY 10 OF LONGREAL;
  15918. BEGIN result := variable;
  15919. END Procedure;
  15920. END Test.
  15921. negative: array of long real to dereferenced open array of long real assignment
  15922. MODULE Test;
  15923. VAR variable: ARRAY 10 OF LONGREAL; result: POINTER TO ARRAY OF LONGREAL;
  15924. BEGIN result^ := variable;
  15925. END Test.
  15926. negative: array of set to array of long real assignment
  15927. MODULE Test;
  15928. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF LONGREAL;
  15929. BEGIN result := variable;
  15930. END Test.
  15931. negative: array of array to array of long real assignment
  15932. MODULE Test;
  15933. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF LONGREAL;
  15934. BEGIN result := variable;
  15935. END Test.
  15936. negative: array of record to array of long real assignment
  15937. MODULE Test;
  15938. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF LONGREAL;
  15939. BEGIN result := variable;
  15940. END Test.
  15941. negative: array of object to array of long real assignment
  15942. MODULE Test;
  15943. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF LONGREAL;
  15944. BEGIN result := variable;
  15945. END Test.
  15946. negative: array of pointer to array of long real assignment
  15947. MODULE Test;
  15948. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF LONGREAL;
  15949. BEGIN result := variable;
  15950. END Test.
  15951. negative: array of procedure to array of long real assignment
  15952. MODULE Test;
  15953. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF LONGREAL;
  15954. BEGIN result := variable;
  15955. END Test.
  15956. negative: array of boolean to array of set assignment
  15957. MODULE Test;
  15958. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF SET;
  15959. BEGIN result := variable;
  15960. END Test.
  15961. negative: array of character to array of set assignment
  15962. MODULE Test;
  15963. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF SET;
  15964. BEGIN result := variable;
  15965. END Test.
  15966. negative: array of short integer to array of set assignment
  15967. MODULE Test;
  15968. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF SET;
  15969. BEGIN result := variable;
  15970. END Test.
  15971. negative: array of integer to array of set assignment
  15972. MODULE Test;
  15973. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF SET;
  15974. BEGIN result := variable;
  15975. END Test.
  15976. negative: array of long integer to array of set assignment
  15977. MODULE Test;
  15978. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF SET;
  15979. BEGIN result := variable;
  15980. END Test.
  15981. negative: array of huge integer to array of set assignment
  15982. MODULE Test;
  15983. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF SET;
  15984. BEGIN result := variable;
  15985. END Test.
  15986. negative: array of real to array of set assignment
  15987. MODULE Test;
  15988. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF SET;
  15989. BEGIN result := variable;
  15990. END Test.
  15991. negative: array of long real to array of set assignment
  15992. MODULE Test;
  15993. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF SET;
  15994. BEGIN result := variable;
  15995. END Test.
  15996. positive: array of set to array of set assignment
  15997. MODULE Test;
  15998. VAR variable, result: ARRAY 10 OF SET;
  15999. BEGIN result := variable;
  16000. END Test.
  16001. negative: array of set to longer array of set assignment
  16002. MODULE Test;
  16003. VAR variable: ARRAY 10 OF SET; result: ARRAY 20 OF SET;
  16004. BEGIN result := variable;
  16005. END Test.
  16006. negative: array of set to shorter array of set assignment
  16007. MODULE Test;
  16008. VAR variable: ARRAY 10 OF SET; result: ARRAY 5 OF SET;
  16009. BEGIN result := variable;
  16010. END Test.
  16011. negative: array of set to open array of set assignment
  16012. MODULE Test;
  16013. PROCEDURE Procedure (VAR result: ARRAY OF SET);
  16014. VAR variable: ARRAY 10 OF SET;
  16015. BEGIN result := variable;
  16016. END Procedure;
  16017. END Test.
  16018. negative: open array of set to array of set assignment
  16019. MODULE Test;
  16020. PROCEDURE Procedure (VAR variable: ARRAY OF SET);
  16021. VAR result: ARRAY 10 OF SET;
  16022. BEGIN result := variable;
  16023. END Procedure;
  16024. END Test.
  16025. negative: array of set to dereferenced open array of set assignment
  16026. MODULE Test;
  16027. VAR variable: ARRAY 10 OF SET; result: POINTER TO ARRAY OF SET;
  16028. BEGIN result^ := variable;
  16029. END Test.
  16030. negative: array of array to array of set assignment
  16031. MODULE Test;
  16032. VAR variable: ARRAY 10 OF ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF SET;
  16033. BEGIN result := variable;
  16034. END Test.
  16035. negative: array of record to array of set assignment
  16036. MODULE Test;
  16037. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF SET;
  16038. BEGIN result := variable;
  16039. END Test.
  16040. negative: array of object to array of set assignment
  16041. MODULE Test;
  16042. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF SET;
  16043. BEGIN result := variable;
  16044. END Test.
  16045. negative: array of pointer to array of set assignment
  16046. MODULE Test;
  16047. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF SET;
  16048. BEGIN result := variable;
  16049. END Test.
  16050. negative: array of procedure to array of set assignment
  16051. MODULE Test;
  16052. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF SET;
  16053. BEGIN result := variable;
  16054. END Test.
  16055. negative: array of boolean to array of array assignment
  16056. MODULE Test;
  16057. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF ARRAY 10 OF SET;
  16058. BEGIN result := variable;
  16059. END Test.
  16060. negative: array of character to array of array assignment
  16061. MODULE Test;
  16062. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF ARRAY 10 OF SET;
  16063. BEGIN result := variable;
  16064. END Test.
  16065. negative: array of short integer to array of array assignment
  16066. MODULE Test;
  16067. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF ARRAY 10 OF SET;
  16068. BEGIN result := variable;
  16069. END Test.
  16070. negative: array of integer to array of array assignment
  16071. MODULE Test;
  16072. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF ARRAY 10 OF SET;
  16073. BEGIN result := variable;
  16074. END Test.
  16075. negative: array of long integer to array of array assignment
  16076. MODULE Test;
  16077. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF ARRAY 10 OF SET;
  16078. BEGIN result := variable;
  16079. END Test.
  16080. negative: array of huge integer to array of array assignment
  16081. MODULE Test;
  16082. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF ARRAY 10 OF SET;
  16083. BEGIN result := variable;
  16084. END Test.
  16085. negative: array of real to array of array assignment
  16086. MODULE Test;
  16087. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF ARRAY 10 OF SET;
  16088. BEGIN result := variable;
  16089. END Test.
  16090. negative: array of long real to array of array assignment
  16091. MODULE Test;
  16092. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF ARRAY 10 OF SET;
  16093. BEGIN result := variable;
  16094. END Test.
  16095. negative: array of set of array assignment
  16096. MODULE Test;
  16097. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF ARRAY 10 OF SET;
  16098. BEGIN result := variable;
  16099. END Test.
  16100. positive: array of array to array of array assignment
  16101. MODULE Test;
  16102. VAR variable, result: ARRAY 10 OF ARRAY 10 OF SET;
  16103. BEGIN result := variable;
  16104. END Test.
  16105. negative: array of array to temporary array of array assignment
  16106. MODULE Test;
  16107. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: PROCEDURE (): ARRAY 10 OF ARRAY 10 OF SET;
  16108. BEGIN result () := variable;
  16109. END Test.
  16110. negative: array of array to longer array of array assignment
  16111. MODULE Test;
  16112. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 20 OF ARRAY 10 OF SET;
  16113. BEGIN result := variable;
  16114. END Test.
  16115. negative: array of array to shorter array of array assignment
  16116. MODULE Test;
  16117. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 5 OF ARRAY 10 OF SET;
  16118. BEGIN result := variable;
  16119. END Test.
  16120. negative: array of array to open array of array assignment
  16121. MODULE Test;
  16122. PROCEDURE Procedure (VAR result: ARRAY OF ARRAY 10 OF SET);
  16123. VAR variable: ARRAY 10 OF ARRAY 10 OF SET;
  16124. BEGIN result := variable;
  16125. END Procedure;
  16126. END Test.
  16127. negative: open array of array to array of array assignment
  16128. MODULE Test;
  16129. PROCEDURE Procedure (VAR variable: ARRAY OF ARRAY 10 OF SET);
  16130. VAR result: ARRAY 10 OF ARRAY 10 OF SET;
  16131. BEGIN result := variable;
  16132. END Procedure;
  16133. END Test.
  16134. negative: array of array to dereferenced open array of array assignment
  16135. MODULE Test;
  16136. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: POINTER TO ARRAY OF ARRAY 10 OF SET;
  16137. BEGIN result^ := variable;
  16138. END Test.
  16139. negative: array of record to array of array assignment
  16140. MODULE Test;
  16141. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF ARRAY 10 OF SET;
  16142. BEGIN result := variable;
  16143. END Test.
  16144. negative: array of object to array of array assignment
  16145. MODULE Test;
  16146. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF ARRAY 10 OF SET;
  16147. BEGIN result := variable;
  16148. END Test.
  16149. negative: array of pointer to array of array assignment
  16150. MODULE Test;
  16151. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF ARRAY 10 OF SET;
  16152. BEGIN result := variable;
  16153. END Test.
  16154. negative: array of procedure to array of array assignment
  16155. MODULE Test;
  16156. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF ARRAY 10 OF SET;
  16157. BEGIN result := variable;
  16158. END Test.
  16159. negative: array of boolean to array of record assignment
  16160. MODULE Test;
  16161. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF RECORD END;
  16162. BEGIN result := variable;
  16163. END Test.
  16164. negative: array of character to array of record assignment
  16165. MODULE Test;
  16166. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF RECORD END;
  16167. BEGIN result := variable;
  16168. END Test.
  16169. negative: array of short integer to array of record assignment
  16170. MODULE Test;
  16171. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF RECORD END;
  16172. BEGIN result := variable;
  16173. END Test.
  16174. negative: array of integer to array of record assignment
  16175. MODULE Test;
  16176. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF RECORD END;
  16177. BEGIN result := variable;
  16178. END Test.
  16179. negative: array of long integer to array of record assignment
  16180. MODULE Test;
  16181. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF RECORD END;
  16182. BEGIN result := variable;
  16183. END Test.
  16184. negative: array of huge integer to array of record assignment
  16185. MODULE Test;
  16186. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF RECORD END;
  16187. BEGIN result := variable;
  16188. END Test.
  16189. negative: array of real to array of record assignment
  16190. MODULE Test;
  16191. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF RECORD END;
  16192. BEGIN result := variable;
  16193. END Test.
  16194. negative: array of long real to array of record assignment
  16195. MODULE Test;
  16196. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF RECORD END;
  16197. BEGIN result := variable;
  16198. END Test.
  16199. negative: array of set to array of record assignment
  16200. MODULE Test;
  16201. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF RECORD END;
  16202. BEGIN result := variable;
  16203. END Test.
  16204. negative: array of array to array of record assignment
  16205. MODULE Test;
  16206. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF RECORD END;
  16207. BEGIN result := variable;
  16208. END Test.
  16209. positive: array of record to array of record assignment
  16210. MODULE Test;
  16211. VAR variable, result: ARRAY 10 OF RECORD END;
  16212. BEGIN result := variable;
  16213. END Test.
  16214. negative: array of record to temporary array of record assignment
  16215. MODULE Test;
  16216. TYPE Record = RECORD END;
  16217. VAR variable: ARRAY 10 OF Record; result: PROCEDURE (): ARRAY 10 OF Record;
  16218. BEGIN result () := variable;
  16219. END Test.
  16220. negative: array of record to longer array of record assignment
  16221. MODULE Test;
  16222. TYPE Record = RECORD END;
  16223. VAR variable: ARRAY 10 OF Record; result: ARRAY 20 OF Record;
  16224. BEGIN result := variable;
  16225. END Test.
  16226. negative: array of record to shorter array of record assignment
  16227. MODULE Test;
  16228. TYPE Record = RECORD END;
  16229. VAR variable: ARRAY 10 OF Record; result: ARRAY 5 OF Record;
  16230. BEGIN result := variable;
  16231. END Test.
  16232. negative: array of record to open array of record assignment
  16233. MODULE Test;
  16234. TYPE Record = RECORD END;
  16235. PROCEDURE Procedure (VAR result: ARRAY OF Record);
  16236. VAR variable: ARRAY 10 OF Record;
  16237. BEGIN result := variable;
  16238. END Procedure;
  16239. END Test.
  16240. negative: open array of record to array of record assignment
  16241. MODULE Test;
  16242. TYPE Record = RECORD END;
  16243. PROCEDURE Procedure (VAR variable: ARRAY OF Record);
  16244. VAR result: ARRAY 10 OF Record;
  16245. BEGIN result := variable;
  16246. END Procedure;
  16247. END Test.
  16248. negative: array of record to dereferenced open array of record assignment
  16249. MODULE Test;
  16250. TYPE Record = RECORD END;
  16251. VAR variable: ARRAY 10 OF Record; result: POINTER TO ARRAY OF Record;
  16252. BEGIN result^ := variable;
  16253. END Test.
  16254. negative: array of object to array of record assignment
  16255. MODULE Test;
  16256. VAR variable: ARRAY 10 OF OBJECT; result: ARRAY 10 OF RECORD END;
  16257. BEGIN result := variable;
  16258. END Test.
  16259. negative: array of pointer to array of record assignment
  16260. MODULE Test;
  16261. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF RECORD END;
  16262. BEGIN result := variable;
  16263. END Test.
  16264. negative: array of procedure to array of record assignment
  16265. MODULE Test;
  16266. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF RECORD END;
  16267. BEGIN result := variable;
  16268. END Test.
  16269. negative: array of boolean to array of object assignment
  16270. MODULE Test;
  16271. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF OBJECT END;
  16272. BEGIN result := variable;
  16273. END Test.
  16274. negative: array of character to array of object assignment
  16275. MODULE Test;
  16276. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF OBJECT END;
  16277. BEGIN result := variable;
  16278. END Test.
  16279. negative: array of short integer to array of object assignment
  16280. MODULE Test;
  16281. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF OBJECT END;
  16282. BEGIN result := variable;
  16283. END Test.
  16284. negative: array of integer to array of object assignment
  16285. MODULE Test;
  16286. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF OBJECT END;
  16287. BEGIN result := variable;
  16288. END Test.
  16289. negative: array of long integer to array of object assignment
  16290. MODULE Test;
  16291. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF OBJECT END;
  16292. BEGIN result := variable;
  16293. END Test.
  16294. negative: array of huge integer to array of object assignment
  16295. MODULE Test;
  16296. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF OBJECT END;
  16297. BEGIN result := variable;
  16298. END Test.
  16299. negative: array of real to array of object assignment
  16300. MODULE Test;
  16301. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF OBJECT END;
  16302. BEGIN result := variable;
  16303. END Test.
  16304. negative: array of long real to array of object assignment
  16305. MODULE Test;
  16306. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF OBJECT END;
  16307. BEGIN result := variable;
  16308. END Test.
  16309. negative: array of set to array of object assignment
  16310. MODULE Test;
  16311. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF OBJECT END;
  16312. BEGIN result := variable;
  16313. END Test.
  16314. negative: array of array to array of object assignment
  16315. MODULE Test;
  16316. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF OBJECT END;
  16317. BEGIN result := variable;
  16318. END Test.
  16319. negative: array of record to array of object assignment
  16320. MODULE Test;
  16321. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF OBJECT END;
  16322. BEGIN result := variable;
  16323. END Test.
  16324. positive: array of object to array of object assignment
  16325. MODULE Test;
  16326. VAR variable, result: ARRAY 10 OF OBJECT END;
  16327. BEGIN result := variable;
  16328. END Test.
  16329. negative: array of object to temporary array of object assignment
  16330. MODULE Test;
  16331. TYPE Object = OBJECT END Object;
  16332. VAR variable: ARRAY 10 OF Object; result: PROCEDURE (): ARRAY 10 OF Object;
  16333. BEGIN result () := variable;
  16334. END Test.
  16335. negative: array of object to longer array of object assignment
  16336. MODULE Test;
  16337. TYPE Object = OBJECT END Object;
  16338. VAR variable: ARRAY 10 OF Object; result: ARRAY 20 OF Object;
  16339. BEGIN result := variable;
  16340. END Test.
  16341. negative: array of object to shorter array of object assignment
  16342. MODULE Test;
  16343. TYPE Object = OBJECT END Object;
  16344. VAR variable: ARRAY 10 OF Object; result: ARRAY 5 OF Object;
  16345. BEGIN result := variable;
  16346. END Test.
  16347. negative: array of object to open array of object assignment
  16348. MODULE Test;
  16349. TYPE Object = OBJECT END Object;
  16350. PROCEDURE Procedure (VAR result: ARRAY OF Object);
  16351. VAR variable: ARRAY 10 OF Object;
  16352. BEGIN result := variable;
  16353. END Procedure;
  16354. END Test.
  16355. negative: open array of object to array of object assignment
  16356. MODULE Test;
  16357. TYPE Object = OBJECT END Object;
  16358. PROCEDURE Procedure (VAR variable: ARRAY OF Object);
  16359. VAR result: ARRAY 10 OF Object;
  16360. BEGIN result := variable;
  16361. END Procedure;
  16362. END Test.
  16363. negative: array of object to dereferenced open array of object assignment
  16364. MODULE Test;
  16365. TYPE Object = OBJECT END Object;
  16366. VAR variable: ARRAY 10 OF Object; result: POINTER TO ARRAY OF Object;
  16367. BEGIN result^ := variable;
  16368. END Test.
  16369. negative: array of pointer to array of object assignment
  16370. MODULE Test;
  16371. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF OBJECT END;
  16372. BEGIN result := variable;
  16373. END Test.
  16374. negative: array of procedure to array of object assignment
  16375. MODULE Test;
  16376. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF OBJECT END;
  16377. BEGIN result := variable;
  16378. END Test.
  16379. negative: array of boolean to array of pointer assignment
  16380. MODULE Test;
  16381. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF POINTER TO RECORD END;
  16382. BEGIN result := variable;
  16383. END Test.
  16384. negative: array of character to array of pointer assignment
  16385. MODULE Test;
  16386. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF POINTER TO RECORD END;
  16387. BEGIN result := variable;
  16388. END Test.
  16389. negative: array of short integer to array of pointer assignment
  16390. MODULE Test;
  16391. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF POINTER TO RECORD END;
  16392. BEGIN result := variable;
  16393. END Test.
  16394. negative: array of integer to array of pointer assignment
  16395. MODULE Test;
  16396. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF POINTER TO RECORD END;
  16397. BEGIN result := variable;
  16398. END Test.
  16399. negative: array of long integer to array of pointer assignment
  16400. MODULE Test;
  16401. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF POINTER TO RECORD END;
  16402. BEGIN result := variable;
  16403. END Test.
  16404. negative: array of huge integer to array of pointer assignment
  16405. MODULE Test;
  16406. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF POINTER TO RECORD END;
  16407. BEGIN result := variable;
  16408. END Test.
  16409. negative: array of real to array of pointer assignment
  16410. MODULE Test;
  16411. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF POINTER TO RECORD END;
  16412. BEGIN result := variable;
  16413. END Test.
  16414. negative: array of long real to array of pointer assignment
  16415. MODULE Test;
  16416. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF POINTER TO RECORD END;
  16417. BEGIN result := variable;
  16418. END Test.
  16419. negative: array of set to array of pointer assignment
  16420. MODULE Test;
  16421. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF POINTER TO RECORD END;
  16422. BEGIN result := variable;
  16423. END Test.
  16424. negative: array of array to array of pointer assignment
  16425. MODULE Test;
  16426. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF POINTER TO RECORD END;
  16427. BEGIN result := variable;
  16428. END Test.
  16429. negative: array of record to array of pointer assignment
  16430. MODULE Test;
  16431. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF POINTER TO RECORD END;
  16432. BEGIN result := variable;
  16433. END Test.
  16434. negative: array of object to array of pointer assignment
  16435. MODULE Test;
  16436. VAR variable: ARRAY 10 OF OBJECT END; result: ARRAY 10 OF POINTER TO RECORD END;
  16437. BEGIN result := variable;
  16438. END Test.
  16439. positive: array of pointer to array of pointer assignment
  16440. MODULE Test;
  16441. VAR variable, result: ARRAY 10 OF POINTER TO RECORD END;
  16442. BEGIN result := variable;
  16443. END Test.
  16444. negative: array of pointer to temporary array of pointer assignment
  16445. MODULE Test;
  16446. TYPE Record = RECORD END;
  16447. VAR variable: ARRAY 10 OF POINTER TO Record; result: PROCEDURE (): ARRAY 10 OF POINTER TO Record;
  16448. BEGIN result () := variable;
  16449. END Test.
  16450. negative: array of pointer to longer array of pointer assignment
  16451. MODULE Test;
  16452. TYPE Pointer = POINTER TO RECORD END;
  16453. VAR variable: ARRAY 10 OF Pointer; result: ARRAY 20 OF Pointer;
  16454. BEGIN result := variable;
  16455. END Test.
  16456. negative: array of pointer to shorter array of pointer assignment
  16457. MODULE Test;
  16458. TYPE Pointer = POINTER TO RECORD END;
  16459. VAR variable: ARRAY 10 OF Pointer; result: ARRAY 5 OF Pointer;
  16460. BEGIN result := variable;
  16461. END Test.
  16462. negative: array of pointer to open array of pointer assignment
  16463. MODULE Test;
  16464. TYPE Pointer = POINTER TO RECORD END;
  16465. PROCEDURE Procedure (VAR result: ARRAY OF Pointer);
  16466. VAR variable: ARRAY 10 OF Pointer;
  16467. BEGIN result := variable;
  16468. END Procedure;
  16469. END Test.
  16470. negative: open array of pointer to array of pointer assignment
  16471. MODULE Test;
  16472. TYPE Pointer = POINTER TO RECORD END;
  16473. PROCEDURE Procedure (VAR variable: ARRAY OF Pointer);
  16474. VAR result: ARRAY 10 OF Pointer;
  16475. BEGIN result := variable;
  16476. END Procedure;
  16477. END Test.
  16478. negative: array of pointer to dereferenced open array of pointer assignment
  16479. MODULE Test;
  16480. TYPE Pointer = POINTER TO RECORD END;
  16481. VAR variable: ARRAY 10 OF Pointer; result: POINTER TO ARRAY OF Pointer;
  16482. BEGIN result^ := variable;
  16483. END Test.
  16484. negative: array of procedure to array of pointer assignment
  16485. MODULE Test;
  16486. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 10 OF POINTER TO RECORD END;
  16487. BEGIN result := variable;
  16488. END Test.
  16489. negative: array of boolean to array of procedure assignment
  16490. MODULE Test;
  16491. VAR variable: ARRAY 10 OF BOOLEAN; result: ARRAY 10 OF PROCEDURE;
  16492. BEGIN result := variable;
  16493. END Test.
  16494. negative: array of character to array of procedure assignment
  16495. MODULE Test;
  16496. VAR variable: ARRAY 10 OF CHAR; result: ARRAY 10 OF PROCEDURE;
  16497. BEGIN result := variable;
  16498. END Test.
  16499. negative: array of short integer to array of procedure assignment
  16500. MODULE Test;
  16501. VAR variable: ARRAY 10 OF SHORTINT; result: ARRAY 10 OF PROCEDURE;
  16502. BEGIN result := variable;
  16503. END Test.
  16504. negative: array of integer to array of procedure assignment
  16505. MODULE Test;
  16506. VAR variable: ARRAY 10 OF INTEGER; result: ARRAY 10 OF PROCEDURE;
  16507. BEGIN result := variable;
  16508. END Test.
  16509. negative: array of long integer to array of procedure assignment
  16510. MODULE Test;
  16511. VAR variable: ARRAY 10 OF LONGINT; result: ARRAY 10 OF PROCEDURE;
  16512. BEGIN result := variable;
  16513. END Test.
  16514. negative: array of huge integer to array of procedure assignment
  16515. MODULE Test;
  16516. VAR variable: ARRAY 10 OF HUGEINT; result: ARRAY 10 OF PROCEDURE;
  16517. BEGIN result := variable;
  16518. END Test.
  16519. negative: array of real to array of procedure assignment
  16520. MODULE Test;
  16521. VAR variable: ARRAY 10 OF REAL; result: ARRAY 10 OF PROCEDURE;
  16522. BEGIN result := variable;
  16523. END Test.
  16524. negative: array of long real to array of procedure assignment
  16525. MODULE Test;
  16526. VAR variable: ARRAY 10 OF LONGREAL; result: ARRAY 10 OF PROCEDURE;
  16527. BEGIN result := variable;
  16528. END Test.
  16529. negative: array of set to array of procedure assignment
  16530. MODULE Test;
  16531. VAR variable: ARRAY 10 OF SET; result: ARRAY 10 OF PROCEDURE;
  16532. BEGIN result := variable;
  16533. END Test.
  16534. negative: array of array to array of procedure assignment
  16535. MODULE Test;
  16536. VAR variable: ARRAY 10 OF ARRAY 10 OF SET; result: ARRAY 10 OF PROCEDURE;
  16537. BEGIN result := variable;
  16538. END Test.
  16539. negative: array of record to array of procedure assignment
  16540. MODULE Test;
  16541. VAR variable: ARRAY 10 OF RECORD END; result: ARRAY 10 OF PROCEDURE;
  16542. BEGIN result := variable;
  16543. END Test.
  16544. negative: array of object to array of procedure assignment
  16545. MODULE Test;
  16546. VAR variable: ARRAY 10 OF OBJECT END; result: ARRAY 10 OF PROCEDURE;
  16547. BEGIN result := variable;
  16548. END Test.
  16549. negative: array of pointer to array of procedure assignment
  16550. MODULE Test;
  16551. VAR variable: ARRAY 10 OF POINTER TO RECORD END; result: ARRAY 10 OF PROCEDURE;
  16552. BEGIN result := variable;
  16553. END Test.
  16554. positive: array of procedure to array of procedure assignment
  16555. MODULE Test;
  16556. VAR variable, result: ARRAY 10 OF PROCEDURE;
  16557. BEGIN result := variable;
  16558. END Test.
  16559. negative: array of procedure to temporary array of procedure assignment
  16560. MODULE Test;
  16561. VAR variable: ARRAY 10 OF PROCEDURE; result: PROCEDURE (): ARRAY 10 OF PROCEDURE;
  16562. BEGIN result () := variable;
  16563. END Test.
  16564. negative: array of procedure to longer array of procedure assignment
  16565. MODULE Test;
  16566. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 20 OF PROCEDURE;
  16567. BEGIN result := variable;
  16568. END Test.
  16569. negative: array of procedure to shorter array of procedure assignment
  16570. MODULE Test;
  16571. VAR variable: ARRAY 10 OF PROCEDURE; result: ARRAY 5 OF PROCEDURE;
  16572. BEGIN result := variable;
  16573. END Test.
  16574. negative: array of procedure to open array of procedure assignment
  16575. MODULE Test;
  16576. PROCEDURE Procedure (VAR result: ARRAY OF PROCEDURE);
  16577. VAR variable: ARRAY 10 OF PROCEDURE;
  16578. BEGIN result := variable;
  16579. END Procedure;
  16580. END Test.
  16581. negative: open array of procedure to array of procedure assignment
  16582. MODULE Test;
  16583. PROCEDURE Procedure (VAR variable: ARRAY OF PROCEDURE);
  16584. VAR result: ARRAY 10 OF PROCEDURE;
  16585. BEGIN result := variable;
  16586. END Procedure;
  16587. END Test.
  16588. negative: array of procedure to dereferenced open array of procedure assignment
  16589. MODULE Test;
  16590. VAR variable: ARRAY 10 OF PROCEDURE; result: POINTER TO ARRAY OF PROCEDURE;
  16591. BEGIN result^ := variable;
  16592. END Test.
  16593. negative: record to array assignment
  16594. MODULE Test;
  16595. VAR variable: RECORD END; result: ARRAY 10 OF CHAR;
  16596. BEGIN result := variable;
  16597. END Test.
  16598. negative: object to array assignment
  16599. MODULE Test;
  16600. VAR variable: OBJECT; result: ARRAY 10 OF CHAR;
  16601. BEGIN result := variable;
  16602. END Test.
  16603. negative: pointer to array assignment
  16604. MODULE Test;
  16605. VAR variable: POINTER TO RECORD END; result: ARRAY 10 OF CHAR;
  16606. BEGIN result := variable;
  16607. END Test.
  16608. negative: variable procedure to array assignment
  16609. MODULE Test;
  16610. VAR variable: PROCEDURE; result: ARRAY 10 OF CHAR;
  16611. BEGIN result := variable;
  16612. END Test.
  16613. negative: import to array assignment
  16614. MODULE Test;
  16615. IMPORT variable := Dummy; VAR result: ARRAY 10 OF CHAR;
  16616. BEGIN result := variable;
  16617. END Test.
  16618. negative: type to variable array assignment
  16619. MODULE Test;
  16620. TYPE Type = ARRAY 10 OF CHAR; VAR result: Type;
  16621. BEGIN result := Type;
  16622. END Test.
  16623. negative: variable boolean to record assignment
  16624. MODULE Test;
  16625. VAR variable: BOOLEAN; result: RECORD END;
  16626. BEGIN result := variable;
  16627. END Test.
  16628. negative: variable character to record assignment
  16629. MODULE Test;
  16630. VAR variable: CHAR; result: RECORD END;
  16631. BEGIN result := variable;
  16632. END Test.
  16633. negative: variable short integer to record assignment
  16634. MODULE Test;
  16635. VAR variable: SHORTINT; result: RECORD END;
  16636. BEGIN result := variable;
  16637. END Test.
  16638. negative: variable integer to record assignment
  16639. MODULE Test;
  16640. VAR variable: INTEGER; result: RECORD END;
  16641. BEGIN result := variable;
  16642. END Test.
  16643. negative: variable long integer to record assignment
  16644. MODULE Test;
  16645. VAR variable: LONGINT; result: RECORD END;
  16646. BEGIN result := variable;
  16647. END Test.
  16648. negative: variable huge integer to record assignment
  16649. MODULE Test;
  16650. VAR variable: HUGEINT; result: RECORD END;
  16651. BEGIN result := variable;
  16652. END Test.
  16653. negative: variable real to record assignment
  16654. MODULE Test;
  16655. VAR variable: REAL; result: RECORD END;
  16656. BEGIN result := variable;
  16657. END Test.
  16658. negative: variable long real to record assignment
  16659. MODULE Test;
  16660. VAR variable: LONGREAL; result: RECORD END;
  16661. BEGIN result := variable;
  16662. END Test.
  16663. negative: variable set to record assignment
  16664. MODULE Test;
  16665. VAR variable: LONGREAL; result: RECORD END;
  16666. BEGIN result := variable;
  16667. END Test.
  16668. negative: array to record assignment
  16669. MODULE Test;
  16670. VAR variable: ARRAY 10 OF CHAR; result: RECORD END;
  16671. BEGIN result := variable;
  16672. END Test.
  16673. positive: record to same record assignment
  16674. MODULE Test;
  16675. VAR variable, result: RECORD END;
  16676. BEGIN result := variable;
  16677. END Test.
  16678. negative: record to same temporary record assignment
  16679. MODULE Test;
  16680. TYPE Record = RECORD END;
  16681. VAR variable: Record; result: PROCEDURE (): Record;
  16682. BEGIN result () := variable;
  16683. END Test.
  16684. negative: record to different record assignment
  16685. MODULE Test;
  16686. VAR variable: RECORD END; result: RECORD END;
  16687. BEGIN result := variable;
  16688. END Test.
  16689. positive: extended record to base record assignment
  16690. MODULE Test;
  16691. TYPE Record = RECORD END;
  16692. VAR variable: RECORD (Record) END; result: Record;
  16693. BEGIN result := variable;
  16694. END Test.
  16695. negative: base record to extended record assignment
  16696. MODULE Test;
  16697. TYPE Record = RECORD END;
  16698. VAR variable: Record; result: RECORD (Record) END;
  16699. BEGIN result := variable;
  16700. END Test.
  16701. positive: record parameter to same record assignment
  16702. MODULE Test;
  16703. PROCEDURE Procedure (parameter, result: RECORD END);
  16704. BEGIN result := parameter;
  16705. END Procedure;
  16706. END Test.
  16707. negative: record parameter to different record assignment
  16708. MODULE Test;
  16709. PROCEDURE Procedure (parameter: RECORD END; result: RECORD END);
  16710. BEGIN result := parameter;
  16711. END Procedure;
  16712. END Test.
  16713. positive: extended record parameter to base record assignment
  16714. MODULE Test;
  16715. TYPE Record = RECORD END;
  16716. PROCEDURE Procedure (parameter: RECORD (Record) END; result: Record);
  16717. BEGIN result := parameter;
  16718. END Procedure;
  16719. END Test.
  16720. negative: base record parameter to extended record assignment
  16721. MODULE Test;
  16722. TYPE Record = RECORD END;
  16723. PROCEDURE Procedure (parameter: Record; result: RECORD (Record) END);
  16724. BEGIN result := parameter;
  16725. END Procedure;
  16726. END Test.
  16727. negative: object to record assignment
  16728. MODULE Test;
  16729. VAR variable: OBJECT; result: RECORD END;
  16730. BEGIN result := variable;
  16731. END Test.
  16732. negative: pointer to record assignment
  16733. MODULE Test;
  16734. TYPE Record = RECORD END;
  16735. VAR variable: POINTER TO Record; result: Record;
  16736. BEGIN result := variable;
  16737. END Test.
  16738. negative: variable procedure to record assignment
  16739. MODULE Test;
  16740. VAR variable: PROCEDURE; result: RECORD END;
  16741. BEGIN result := variable;
  16742. END Test.
  16743. negative: import to record assignment
  16744. MODULE Test;
  16745. IMPORT variable := Dummy; VAR result: RECORD END;
  16746. BEGIN result := variable;
  16747. END Test.
  16748. negative: type to variable record assignment
  16749. MODULE Test;
  16750. TYPE Type = RECORD END; VAR result: Type;
  16751. BEGIN result := Type;
  16752. END Test.
  16753. negative: variable boolean to object assignment
  16754. MODULE Test;
  16755. VAR variable: BOOLEAN; result: OBJECT END;
  16756. BEGIN result := variable;
  16757. END Test.
  16758. negative: variable character to object assignment
  16759. MODULE Test;
  16760. VAR variable: CHAR; result: OBJECT END;
  16761. BEGIN result := variable;
  16762. END Test.
  16763. negative: variable short integer to object assignment
  16764. MODULE Test;
  16765. VAR variable: SHORTINT; result: OBJECT END;
  16766. BEGIN result := variable;
  16767. END Test.
  16768. negative: variable integer to object assignment
  16769. MODULE Test;
  16770. VAR variable: INTEGER; result: OBJECT END;
  16771. BEGIN result := variable;
  16772. END Test.
  16773. negative: variable long integer to object assignment
  16774. MODULE Test;
  16775. VAR variable: LONGINT; result: OBJECT END;
  16776. BEGIN result := variable;
  16777. END Test.
  16778. negative: variable huge integer to object assignment
  16779. MODULE Test;
  16780. VAR variable: HUGEINT; result: OBJECT END;
  16781. BEGIN result := variable;
  16782. END Test.
  16783. negative: variable real to object assignment
  16784. MODULE Test;
  16785. VAR variable: REAL; result: OBJECT END;
  16786. BEGIN result := variable;
  16787. END Test.
  16788. negative: variable long real to object assignment
  16789. MODULE Test;
  16790. VAR variable: LONGREAL; result: OBJECT END;
  16791. BEGIN result := variable;
  16792. END Test.
  16793. negative: variable set to object assignment
  16794. MODULE Test;
  16795. VAR variable: LONGREAL; result: OBJECT END;
  16796. BEGIN result := variable;
  16797. END Test.
  16798. negative: array to object assignment
  16799. MODULE Test;
  16800. VAR variable: ARRAY 10 OF CHAR; result: OBJECT END;
  16801. BEGIN result := variable;
  16802. END Test.
  16803. negative: record to object assignment
  16804. MODULE Test;
  16805. VAR variable: RECORD END; result: OBJECT END;
  16806. BEGIN result := variable;
  16807. END Test.
  16808. positive: object to same object assignment
  16809. MODULE Test;
  16810. VAR variable, result: OBJECT END;
  16811. BEGIN result := variable;
  16812. END Test.
  16813. negative: obbject to same temporary object assignment
  16814. MODULE Test;
  16815. TYPE Object = OBJECT END Object;
  16816. VAR variable: Object; result: PROCEDURE (): Object;
  16817. BEGIN result () := variable;
  16818. END Test.
  16819. negative: object to different object assignment
  16820. MODULE Test;
  16821. VAR variable: OBJECT END; result: OBJECT END;
  16822. BEGIN result := variable;
  16823. END Test.
  16824. positive: extended object to base object assignment
  16825. MODULE Test;
  16826. TYPE Object = OBJECT END Object;
  16827. VAR variable: OBJECT (Object) END; result: Object;
  16828. BEGIN result := variable;
  16829. END Test.
  16830. negative: base object to extended object assignment
  16831. MODULE Test;
  16832. TYPE Object = OBJECT END Object;
  16833. VAR variable: Object; result: OBJECT (Object) END;
  16834. BEGIN result := variable;
  16835. END Test.
  16836. positive: object to basic object assignment
  16837. MODULE Test;
  16838. VAR variable: OBJECT END; result: OBJECT;
  16839. BEGIN result := variable;
  16840. END Test.
  16841. negative: basic object to object assignment
  16842. MODULE Test;
  16843. VAR variable: OBJECT; result: OBJECT END;
  16844. BEGIN result := variable;
  16845. END Test.
  16846. negative: pointer to object assignment
  16847. MODULE Test;
  16848. VAR variable: POINTER TO RECORD END; result: OBJECT END;
  16849. BEGIN result := variable;
  16850. END Test.
  16851. negative: variable procedure to object assignment
  16852. MODULE Test;
  16853. VAR variable: PROCEDURE; result: OBJECT END;
  16854. BEGIN result := variable;
  16855. END Test.
  16856. negative: import to object assignment
  16857. MODULE Test;
  16858. IMPORT variable := Dummy; VAR result: OBJECT END;
  16859. BEGIN result := variable;
  16860. END Test.
  16861. negative: variable boolean to pointer assignment
  16862. MODULE Test;
  16863. VAR variable: BOOLEAN; result: POINTER TO RECORD END;
  16864. BEGIN result := variable;
  16865. END Test.
  16866. negative: variable character to pointer assignment
  16867. MODULE Test;
  16868. VAR variable: CHAR; result: POINTER TO RECORD END;
  16869. BEGIN result := variable;
  16870. END Test.
  16871. negative: variable short integer to pointer assignment
  16872. MODULE Test;
  16873. VAR variable: SHORTINT; result: POINTER TO RECORD END;
  16874. BEGIN result := variable;
  16875. END Test.
  16876. negative: variable integer to pointer assignment
  16877. MODULE Test;
  16878. VAR variable: INTEGER; result: POINTER TO RECORD END;
  16879. BEGIN result := variable;
  16880. END Test.
  16881. negative: variable long integer to pointer assignment
  16882. MODULE Test;
  16883. VAR variable: LONGINT; result: POINTER TO RECORD END;
  16884. BEGIN result := variable;
  16885. END Test.
  16886. negative: variable huge integer to pointer assignment
  16887. MODULE Test;
  16888. VAR variable: HUGEINT; result: POINTER TO RECORD END;
  16889. BEGIN result := variable;
  16890. END Test.
  16891. negative: variable real to pointer assignment
  16892. MODULE Test;
  16893. VAR variable: REAL; result: POINTER TO RECORD END;
  16894. BEGIN result := variable;
  16895. END Test.
  16896. negative: variable long real to pointer assignment
  16897. MODULE Test;
  16898. VAR variable: LONGREAL; result: POINTER TO RECORD END;
  16899. BEGIN result := variable;
  16900. END Test.
  16901. negative: variable set to pointer assignment
  16902. MODULE Test;
  16903. VAR variable: LONGREAL; result: POINTER TO RECORD END;
  16904. BEGIN result := variable;
  16905. END Test.
  16906. negative: array to pointer assignment
  16907. MODULE Test;
  16908. VAR variable: ARRAY 10 OF CHAR; result: POINTER TO RECORD END;
  16909. BEGIN result := variable;
  16910. END Test.
  16911. negative: record to pointer assignment
  16912. MODULE Test;
  16913. VAR variable: RECORD END; result: POINTER TO RECORD END;
  16914. BEGIN result := variable;
  16915. END Test.
  16916. negative: object to pointer assignment
  16917. MODULE Test;
  16918. VAR variable: OBJECT END; result: POINTER TO RECORD END;
  16919. BEGIN result := variable;
  16920. END Test.
  16921. positive: pointer to same pointer assignment
  16922. MODULE Test;
  16923. VAR variable, result: POINTER TO RECORD END;
  16924. BEGIN result := variable;
  16925. END Test.
  16926. negative: pointer to same temporary pointer assignment
  16927. MODULE Test;
  16928. TYPE Pointer = POINTER TO RECORD END;
  16929. VAR variable: Pointer; result: PROCEDURE (): Pointer;
  16930. BEGIN result () := variable;
  16931. END Test.
  16932. positive: pointer to array of same pointer to same pointer assignment
  16933. MODULE Test;
  16934. TYPE Pointer = POINTER TO ARRAY 10 OF Pointer;
  16935. VAR variable, result: Pointer;
  16936. BEGIN result := variable;
  16937. END Test.
  16938. positive: pointers to array of same pointer to same pointer assignment
  16939. MODULE Test;
  16940. TYPE A = POINTER TO ARRAY 10 OF B;
  16941. TYPE B = POINTER TO ARRAY 10 OF C;
  16942. TYPE C = POINTER TO ARRAY 10 OF D;
  16943. TYPE D = POINTER TO ARRAY 10 OF A;
  16944. VAR variable: A; result: B;
  16945. BEGIN result := variable;
  16946. END Test.
  16947. positive: pointer to open array of same pointer to same pointer assignment
  16948. MODULE Test;
  16949. TYPE Pointer = POINTER TO ARRAY OF Pointer;
  16950. VAR variable, result: Pointer;
  16951. BEGIN result := variable;
  16952. END Test.
  16953. positive: pointers to open array of same pointer to same pointer assignment
  16954. MODULE Test;
  16955. TYPE A = POINTER TO ARRAY 10 OF B;
  16956. TYPE B = POINTER TO ARRAY 10 OF C;
  16957. TYPE C = POINTER TO ARRAY 10 OF D;
  16958. TYPE D = POINTER TO ARRAY 10 OF A;
  16959. VAR variable: A; result: B;
  16960. BEGIN result := variable;
  16961. END Test.
  16962. positive: pointer to different pointer assignment
  16963. MODULE Test;
  16964. TYPE Record = RECORD END;
  16965. VAR variable: POINTER TO Record; result: POINTER TO Record;
  16966. BEGIN result := variable;
  16967. END Test.
  16968. positive: extended pointer to base pointer assignment
  16969. MODULE Test;
  16970. TYPE Record = RECORD END;
  16971. VAR variable: POINTER TO RECORD (Record) END; result: POINTER TO Record;
  16972. BEGIN result := variable;
  16973. END Test.
  16974. negative: base pointer to extended pointer assignment
  16975. MODULE Test;
  16976. TYPE Record = RECORD END;
  16977. VAR variable: POINTER TO Record; result: POINTER TO RECORD (Record) END;
  16978. BEGIN result := variable;
  16979. END Test.
  16980. negative: pointer to array to pointer to record assignment
  16981. MODULE Test;
  16982. VAR variable: POINTER TO ARRAY 10 OF CHAR; result: POINTER TO RECORD END;
  16983. BEGIN result := variable;
  16984. END Test.
  16985. negative: pointer to record to pointer to array assignment
  16986. MODULE Test;
  16987. VAR variable: POINTER TO RECORD END; result: POINTER TO ARRAY 10 OF CHAR;
  16988. BEGIN result := variable;
  16989. END Test.
  16990. positive: pointer to array to pointer to array assignment
  16991. MODULE Test;
  16992. VAR variable, result: POINTER TO ARRAY 10 OF CHAR;
  16993. BEGIN result := variable;
  16994. END Test.
  16995. negative: pointer to array to temporary pointer to array assignment
  16996. MODULE Test;
  16997. TYPE Pointer = POINTER TO ARRAY 10 OF CHAR;
  16998. VAR variable: Pointer; result: PROCEDURE (): Pointer;
  16999. BEGIN result () := variable;
  17000. END Test.
  17001. negative: pointer to array to pointer to longer array assignment
  17002. MODULE Test;
  17003. VAR variable: POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 20 OF CHAR;
  17004. BEGIN result := variable;
  17005. END Test.
  17006. negative: pointer to array to pointer to shorter array assignment
  17007. MODULE Test;
  17008. VAR variable: POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 5 OF CHAR;
  17009. BEGIN result := variable;
  17010. END Test.
  17011. negative: variable procedure to pointer assignment
  17012. MODULE Test;
  17013. VAR variable: PROCEDURE; result: POINTER TO RECORD END;
  17014. BEGIN result := variable;
  17015. END Test.
  17016. negative: import to pointer assignment
  17017. MODULE Test;
  17018. IMPORT variable := Dummy; VAR result: POINTER TO RECORD END;
  17019. BEGIN result := variable;
  17020. END Test.
  17021. negative: type to variable pointer assignment
  17022. MODULE Test;
  17023. TYPE Type = POINTER TO RECORD END; VAR result: Type;
  17024. BEGIN result := Type;
  17025. END Test.
  17026. negative: variable boolean to procedure assignment
  17027. MODULE Test;
  17028. VAR variable: BOOLEAN; result: PROCEDURE;
  17029. BEGIN result := variable;
  17030. END Test.
  17031. negative: variable character to procedure assignment
  17032. MODULE Test;
  17033. VAR variable: CHAR; result: PROCEDURE;
  17034. BEGIN result := variable;
  17035. END Test.
  17036. negative: variable short integer to procedure assignment
  17037. MODULE Test;
  17038. VAR variable: SHORTINT; result: PROCEDURE;
  17039. BEGIN result := variable;
  17040. END Test.
  17041. negative: variable integer to procedure assignment
  17042. MODULE Test;
  17043. VAR variable: INTEGER; result: PROCEDURE;
  17044. BEGIN result := variable;
  17045. END Test.
  17046. negative: variable long integer to procedure assignment
  17047. MODULE Test;
  17048. VAR variable: LONGINT; result: PROCEDURE;
  17049. BEGIN result := variable;
  17050. END Test.
  17051. negative: variable huge integer to procedure assignment
  17052. MODULE Test;
  17053. VAR variable: HUGEINT; result: PROCEDURE;
  17054. BEGIN result := variable;
  17055. END Test.
  17056. negative: variable real to procedure assignment
  17057. MODULE Test;
  17058. VAR variable: REAL; result: PROCEDURE;
  17059. BEGIN result := variable;
  17060. END Test.
  17061. negative: variable long real to procedure assignment
  17062. MODULE Test;
  17063. VAR variable: LONGREAL; result: PROCEDURE;
  17064. BEGIN result := variable;
  17065. END Test.
  17066. negative: variable set to procedure assignment
  17067. MODULE Test;
  17068. VAR variable: LONGREAL; result: PROCEDURE;
  17069. BEGIN result := variable;
  17070. END Test.
  17071. negative: array to procedure assignment
  17072. MODULE Test;
  17073. VAR variable: ARRAY 10 OF CHAR; result: PROCEDURE;
  17074. BEGIN result := variable;
  17075. END Test.
  17076. negative: record to procedure assignment
  17077. MODULE Test;
  17078. VAR variable: RECORD END; result: PROCEDURE;
  17079. BEGIN result := variable;
  17080. END Test.
  17081. negative: object to procedure assignment
  17082. MODULE Test;
  17083. VAR variable: OBJECT END; result: PROCEDURE;
  17084. BEGIN result := variable;
  17085. END Test.
  17086. negative: pointer to procedure assignment
  17087. MODULE Test;
  17088. VAR variable: POINTER TO RECORD END; result: PROCEDURE;
  17089. BEGIN result := variable;
  17090. END Test.
  17091. positive: variable procedure to variable procedure assignment
  17092. MODULE Test;
  17093. VAR variable, result: PROCEDURE;
  17094. BEGIN result := variable;
  17095. END Test.
  17096. negative: variable procedure to temporary procedure assignment
  17097. MODULE Test;
  17098. VAR variable: PROCEDURE; result: PROCEDURE (): PROCEDURE;
  17099. BEGIN result () := variable;
  17100. END Test.
  17101. positive: procedure to variable procedure assignment
  17102. MODULE Test;
  17103. VAR result: PROCEDURE;
  17104. PROCEDURE variable; END variable;
  17105. BEGIN result := variable;
  17106. END Test.
  17107. negative: variable procedure to procedure assignment
  17108. MODULE Test;
  17109. VAR variable: PROCEDURE;
  17110. PROCEDURE result; END result;
  17111. BEGIN result := variable;
  17112. END Test.
  17113. negative: procedure to procedure assignment
  17114. MODULE Test;
  17115. PROCEDURE variable; END variable;
  17116. PROCEDURE result; END result;
  17117. BEGIN result := variable;
  17118. END Test.
  17119. positive: variable procedure to variable procedure with same parameter assignment
  17120. MODULE Test;
  17121. VAR variable: PROCEDURE (integer: INTEGER); result: PROCEDURE (integer: INTEGER);
  17122. BEGIN result := variable;
  17123. END Test.
  17124. positive: procedure to variable procedure with same parameter assignment
  17125. MODULE Test;
  17126. VAR result: PROCEDURE (integer: INTEGER);
  17127. PROCEDURE variable (integer: INTEGER); END variable;
  17128. BEGIN result := variable;
  17129. END Test.
  17130. negative: variable procedure to variable procedure with compatible parameter assignment
  17131. MODULE Test;
  17132. VAR variable: PROCEDURE (object: OBJECT END); result: PROCEDURE (object: OBJECT);
  17133. BEGIN result := variable;
  17134. END Test.
  17135. negative: procedure to variable procedure with compatible parameter assignment
  17136. MODULE Test;
  17137. VAR result: PROCEDURE (object: OBJECT);
  17138. PROCEDURE variable (object: OBJECT END); END variable;
  17139. BEGIN result := variable;
  17140. END Test.
  17141. negative: variable procedure to variable procedure with incompatible parameter assignment
  17142. MODULE Test;
  17143. VAR variable: PROCEDURE (object: OBJECT END); result: PROCEDURE (object: OBJECT END);
  17144. BEGIN result := variable;
  17145. END Test.
  17146. negative: procedure to variable procedure with incompatible parameter assignment
  17147. MODULE Test;
  17148. VAR result: PROCEDURE (object: OBJECT END);
  17149. PROCEDURE variable (object: OBJECT END); END variable;
  17150. BEGIN result := variable;
  17151. END Test.
  17152. positive: variable procedure to variable procedure with same return type assignment
  17153. MODULE Test;
  17154. VAR variable: PROCEDURE (): INTEGER; result: PROCEDURE (): INTEGER;
  17155. BEGIN result := variable;
  17156. END Test.
  17157. positive: procedure to variable procedure with same return type assignment
  17158. MODULE Test;
  17159. VAR result: PROCEDURE (): INTEGER;
  17160. PROCEDURE variable (): INTEGER; END variable;
  17161. BEGIN result := variable;
  17162. END Test.
  17163. negative: variable procedure to variable procedure with compatible return type assignment
  17164. MODULE Test;
  17165. VAR variable: PROCEDURE (): OBJECT END; result: PROCEDURE (): OBJECT;
  17166. BEGIN result := variable;
  17167. END Test.
  17168. negative: procedure to variable procedure with compatible return type assignment
  17169. MODULE Test;
  17170. VAR result: PROCEDURE (): OBJECT;
  17171. PROCEDURE variable (): OBJECT END; END variable;
  17172. BEGIN result := variable;
  17173. END Test.
  17174. negative: variable procedure to variable procedure with incompatible return type assignment
  17175. MODULE Test;
  17176. VAR variable: PROCEDURE (): OBJECT END; result: PROCEDURE (): OBJECT END;
  17177. BEGIN result := variable;
  17178. END Test.
  17179. negative: procedure to variable procedure with incompatible return type assignment
  17180. MODULE Test;
  17181. VAR result: PROCEDURE (): OBJECT END;
  17182. PROCEDURE variable (): OBJECT END; END variable;
  17183. BEGIN result := variable;
  17184. END Test.
  17185. positive: variable procedure to variable procedure with parameter of same procedure type assignment
  17186. MODULE Test;
  17187. TYPE Procedure = PROCEDURE (procedure: Procedure);
  17188. VAR variable: Procedure; result: Procedure;
  17189. BEGIN result := variable;
  17190. END Test.
  17191. positive: procedure to variable procedure with parameter of same procedure type assignment
  17192. MODULE Test;
  17193. TYPE Procedure = PROCEDURE (procedure: Procedure);
  17194. VAR result: Procedure;
  17195. PROCEDURE variable (procedure: Procedure); END variable;
  17196. BEGIN result := variable;
  17197. END Test.
  17198. positive: variable procedure to variable procedure with parameter of same procedure types assignment
  17199. MODULE Test;
  17200. TYPE A = PROCEDURE (b: B);
  17201. TYPE B = PROCEDURE (c: C);
  17202. TYPE C = PROCEDURE (d: D);
  17203. TYPE D = PROCEDURE (a: A);
  17204. VAR variable: A; result: B;
  17205. BEGIN result := variable;
  17206. END Test.
  17207. positive: procedure to variable procedure with parameter of same procedure types assignment
  17208. MODULE Test;
  17209. TYPE A = PROCEDURE (b: B);
  17210. TYPE B = PROCEDURE (c: C);
  17211. TYPE C = PROCEDURE (d: D);
  17212. TYPE D = PROCEDURE (a: A);
  17213. VAR result: A;
  17214. PROCEDURE variable (procedure: A); END variable;
  17215. BEGIN result := variable;
  17216. END Test.
  17217. positive: variable procedure to variable procedure with return of same procedure type assignment
  17218. MODULE Test;
  17219. TYPE Procedure = PROCEDURE (): Procedure;
  17220. VAR variable: Procedure; result: Procedure;
  17221. BEGIN result := variable;
  17222. END Test.
  17223. positive: procedure to variable procedure with return of same procedure type assignment
  17224. MODULE Test;
  17225. TYPE Procedure = PROCEDURE (): Procedure;
  17226. VAR result: Procedure;
  17227. PROCEDURE variable (): Procedure; END variable;
  17228. BEGIN result := variable;
  17229. END Test.
  17230. positive: variable procedure to variable procedure with return of same procedure types assignment
  17231. MODULE Test;
  17232. TYPE A = PROCEDURE (): B;
  17233. TYPE B = PROCEDURE (): C;
  17234. TYPE C = PROCEDURE (): D;
  17235. TYPE D = PROCEDURE (): A;
  17236. VAR variable: A; result: B;
  17237. BEGIN result := variable;
  17238. END Test.
  17239. positive: procedure to variable procedure with return of same procedure types assignment
  17240. MODULE Test;
  17241. TYPE A = PROCEDURE (): B;
  17242. TYPE B = PROCEDURE (): C;
  17243. TYPE C = PROCEDURE (): D;
  17244. TYPE D = PROCEDURE (): A;
  17245. VAR result: A;
  17246. PROCEDURE variable (): A; END variable;
  17247. BEGIN result := variable;
  17248. END Test.
  17249. positive: global procedure to global variable procedure assignment
  17250. MODULE Test;
  17251. VAR result: PROCEDURE;
  17252. PROCEDURE variable; END variable;
  17253. BEGIN result := variable;
  17254. END Test.
  17255. negative: nested procedure to global variable procedure assignment
  17256. MODULE Test;
  17257. VAR result: PROCEDURE;
  17258. PROCEDURE Procedure;
  17259. PROCEDURE variable; END variable;
  17260. BEGIN result := variable;
  17261. END Procedure;
  17262. END Test.
  17263. positive: global procedure to nested variable procedure assignment
  17264. MODULE Test;
  17265. PROCEDURE variable; END variable;
  17266. PROCEDURE Procedure;
  17267. VAR result: PROCEDURE;
  17268. BEGIN result := variable;
  17269. END Procedure;
  17270. END Test.
  17271. negative: nested procedure to nested variable procedure assignment
  17272. MODULE Test;
  17273. PROCEDURE Procedure;
  17274. VAR result: PROCEDURE;
  17275. PROCEDURE variable; END variable;
  17276. BEGIN result := variable;
  17277. END Procedure;
  17278. END Test.
  17279. negative: procedure in object to global variable procedure assignment
  17280. MODULE Test;
  17281. VAR result: PROCEDURE;
  17282. VAR object: OBJECT PROCEDURE variable; END variable; END;
  17283. BEGIN result := object.variable;
  17284. END Test.
  17285. negative: nested procedure in object to global variable procedure assignment
  17286. MODULE Test;
  17287. VAR object: OBJECT VAR result: PROCEDURE; PROCEDURE Procedure; PROCEDURE variable; END variable; BEGIN result := variable; END Procedure; END;
  17288. END Test.
  17289. negative: procedure in object to nested variable procedure assignment
  17290. MODULE Test;
  17291. VAR result: PROCEDURE;
  17292. VAR object: OBJECT PROCEDURE variable; END variable; END;
  17293. BEGIN result := object.variable;
  17294. END Test.
  17295. negative: nested procedure in object to nested variable procedure assignment
  17296. MODULE Test;
  17297. VAR object: OBJECT VAR result: PROCEDURE; PROCEDURE Procedure; PROCEDURE variable; END variable; BEGIN result := variable; END Procedure; END;
  17298. END Test.
  17299. negative: import to procedure assignment
  17300. MODULE Test;
  17301. IMPORT variable := Dummy; VAR result: PROCEDURE;
  17302. BEGIN result := variable;
  17303. END Test.
  17304. negative: type to variable procedure assignment
  17305. MODULE Test;
  17306. TYPE Type = PROCEDURE; VAR result: Type;
  17307. BEGIN result := Type;
  17308. END Test.
  17309. negative: variable boolean to import assignment
  17310. MODULE Test;
  17311. IMPORT result := Dummy;
  17312. VAR variable: BOOLEAN;
  17313. BEGIN result := variable;
  17314. END Test.
  17315. negative: variable character to import assignment
  17316. MODULE Test;
  17317. IMPORT result := Dummy;
  17318. VAR variable: CHAR;
  17319. BEGIN result := variable;
  17320. END Test.
  17321. negative: variable short integer to import assignment
  17322. MODULE Test;
  17323. IMPORT result := Dummy;
  17324. VAR variable: SHORTINT;
  17325. BEGIN result := variable;
  17326. END Test.
  17327. negative: variable integer to import assignment
  17328. MODULE Test;
  17329. IMPORT result := Dummy;
  17330. VAR variable: INTEGER;
  17331. BEGIN result := variable;
  17332. END Test.
  17333. negative: variable long integer to import assignment
  17334. MODULE Test;
  17335. IMPORT result := Dummy;
  17336. VAR variable: LONGINT;
  17337. BEGIN result := variable;
  17338. END Test.
  17339. negative: variable huge integer to import assignment
  17340. MODULE Test;
  17341. IMPORT result := Dummy;
  17342. VAR variable: HUGEINT;
  17343. BEGIN result := variable;
  17344. END Test.
  17345. negative: variable real to import assignment
  17346. MODULE Test;
  17347. IMPORT result := Dummy;
  17348. VAR variable: REAL;
  17349. BEGIN result := variable;
  17350. END Test.
  17351. negative: variable long real to import assignment
  17352. MODULE Test;
  17353. IMPORT result := Dummy;
  17354. VAR variable: LONGREAL;
  17355. BEGIN result := variable;
  17356. END Test.
  17357. negative: variable set to import assignment
  17358. MODULE Test;
  17359. IMPORT result := Dummy;
  17360. VAR variable: LONGREAL;
  17361. BEGIN result := variable;
  17362. END Test.
  17363. negative: array to import assignment
  17364. MODULE Test;
  17365. IMPORT result := Dummy;
  17366. VAR variable: ARRAY 10 OF CHAR;
  17367. BEGIN result := variable;
  17368. END Test.
  17369. negative: record to import assignment
  17370. MODULE Test;
  17371. IMPORT result := Dummy;
  17372. VAR variable: RECORD END;
  17373. BEGIN result := variable;
  17374. END Test.
  17375. negative: object to import assignment
  17376. MODULE Test;
  17377. IMPORT result := Dummy;
  17378. VAR variable: OBJECT END;
  17379. BEGIN result := variable;
  17380. END Test.
  17381. negative: pointer to import assignment
  17382. MODULE Test;
  17383. IMPORT result := Dummy;
  17384. VAR variable: POINTER TO RECORD END;
  17385. BEGIN result := variable;
  17386. END Test.
  17387. negative: variable procedure to import assignment
  17388. MODULE Test;
  17389. IMPORT result := Dummy;
  17390. VAR variable: PROCEDURE;
  17391. BEGIN result := variable;
  17392. END Test.
  17393. negative: import to import assignment
  17394. MODULE Test;
  17395. IMPORT variable := Dummy, result := Dummy;
  17396. BEGIN result := variable;
  17397. END Test.
  17398. negative: type to import assignment
  17399. MODULE Test;
  17400. IMPORT result := Dummy; TYPE Type = BOOLEAN;
  17401. BEGIN result := Type;
  17402. END Test.
  17403. negative: variable boolean to type assignment
  17404. MODULE Test;
  17405. TYPE result = BOOLEAN; VAR variable: result;
  17406. BEGIN result := variable;
  17407. END Test.
  17408. negative: variable character to type assignment
  17409. MODULE Test;
  17410. TYPE result = CHAR; VAR variable: result;
  17411. BEGIN result := variable;
  17412. END Test.
  17413. negative: variable short integer to type assignment
  17414. MODULE Test;
  17415. TYPE result = SHORTINT; VAR variable: result;
  17416. BEGIN result := variable;
  17417. END Test.
  17418. negative: variable integer to type assignment
  17419. MODULE Test;
  17420. TYPE result = INTEGER; VAR variable: result;
  17421. BEGIN result := variable;
  17422. END Test.
  17423. negative: variable long integer to type assignment
  17424. MODULE Test;
  17425. TYPE result = LONGINT; VAR variable: result;
  17426. BEGIN result := variable;
  17427. END Test.
  17428. negative: variable huge integer to type assignment
  17429. MODULE Test;
  17430. TYPE result = HUGEINT; VAR variable: result;
  17431. BEGIN result := variable;
  17432. END Test.
  17433. negative: variable real to type assignment
  17434. MODULE Test;
  17435. TYPE result = REAL; VAR variable: result;
  17436. BEGIN result := variable;
  17437. END Test.
  17438. negative: variable long real to type assignment
  17439. MODULE Test;
  17440. TYPE result = LONGREAL; VAR variable: result;
  17441. BEGIN result := variable;
  17442. END Test.
  17443. negative: variable set to type assignment
  17444. MODULE Test;
  17445. TYPE result = SET; VAR variable: result;
  17446. BEGIN result := variable;
  17447. END Test.
  17448. negative: array to type assignment
  17449. MODULE Test;
  17450. TYPE result = ARRAY 10 OF CHAR; VAR variable: result;
  17451. BEGIN result := variable;
  17452. END Test.
  17453. negative: record to type assignment
  17454. MODULE Test;
  17455. TYPE result = RECORD END; VAR variable: result;
  17456. BEGIN result := variable;
  17457. END Test.
  17458. negative: object to type assignment
  17459. MODULE Test;
  17460. TYPE result = OBJECT END result; VAR variable: result;
  17461. BEGIN result := variable;
  17462. END Test.
  17463. negative: pointer to type assignment
  17464. MODULE Test;
  17465. TYPE result = POINTER TO RECORD END; VAR variable: result;
  17466. BEGIN result := variable;
  17467. END Test.
  17468. negative: variable procedure to type assignment
  17469. MODULE Test;
  17470. TYPE result = PROCEDURE; VAR variable: result;
  17471. BEGIN result := variable;
  17472. END Test.
  17473. negative: import to type assignment
  17474. MODULE Test;
  17475. IMPORT variable := Dummy; TYPE result = BOOLEAN;
  17476. BEGIN result := variable;
  17477. END Test.
  17478. # variable booleans
  17479. negative: arithmetic negation on variable boolean
  17480. MODULE Test;
  17481. VAR boolean, result: BOOLEAN;
  17482. BEGIN result := -boolean;
  17483. END Test.
  17484. positive: logical negation on variable boolean
  17485. MODULE Test;
  17486. VAR boolean, result: BOOLEAN;
  17487. BEGIN result := ~boolean;
  17488. END Test.
  17489. positive: multiple logical negations on variable boolean
  17490. MODULE Test;
  17491. VAR boolean, result: BOOLEAN;
  17492. BEGIN result := ~~~~boolean;
  17493. END Test.
  17494. negative: dereferencing variable boolean
  17495. MODULE Test;
  17496. VAR boolean, result: BOOLEAN;
  17497. BEGIN result := boolean^;
  17498. END Test.
  17499. negative: addition on variable booleans
  17500. MODULE Test;
  17501. VAR boolean, result: BOOLEAN;
  17502. BEGIN result := boolean + boolean;
  17503. END Test.
  17504. negative: subtraction on variable booleans
  17505. MODULE Test;
  17506. VAR boolean, result: BOOLEAN;
  17507. BEGIN result := boolean - boolean
  17508. END Test.
  17509. negative: multiplication on variable booleans
  17510. MODULE Test;
  17511. VAR boolean, result: BOOLEAN;
  17512. BEGIN result := boolean * boolean
  17513. END Test.
  17514. negative: integer division on variable booleans
  17515. MODULE Test;
  17516. VAR boolean: BOOLEAN; result: INTEGER;
  17517. BEGIN result := boolean DIV boolean
  17518. END Test.
  17519. negative: real division on variable booleans
  17520. MODULE Test;
  17521. VAR boolean: BOOLEAN; result: REAL;
  17522. BEGIN result := boolean / boolean
  17523. END Test.
  17524. negative: modulo on variable booleans
  17525. MODULE Test;
  17526. VAR boolean: BOOLEAN; result: INTEGER;
  17527. BEGIN result := boolean MOD boolean
  17528. END Test.
  17529. positive: equal relation on variable booleans
  17530. MODULE Test;
  17531. VAR boolean, result: BOOLEAN;
  17532. BEGIN result := boolean = boolean
  17533. END Test.
  17534. positive: unequal relation on variable booleans
  17535. MODULE Test;
  17536. VAR boolean, result: BOOLEAN;
  17537. BEGIN result := boolean # boolean
  17538. END Test.
  17539. negative: less relation on variable booleans
  17540. MODULE Test;
  17541. VAR boolean, result: BOOLEAN;
  17542. BEGIN result := boolean < boolean
  17543. END Test.
  17544. negative: less or equal relation on variable booleans
  17545. MODULE Test;
  17546. VAR boolean, result: BOOLEAN;
  17547. BEGIN result := boolean <= boolean
  17548. END Test.
  17549. negative: greater relation on variable booleans
  17550. MODULE Test;
  17551. VAR boolean, result: BOOLEAN;
  17552. BEGIN result := boolean > boolean
  17553. END Test.
  17554. negative: greater or equal relation on variable booleans
  17555. MODULE Test;
  17556. VAR boolean, result: BOOLEAN;
  17557. BEGIN result := boolean >= boolean
  17558. END Test.
  17559. negative: set membership on variable booleans
  17560. MODULE Test;
  17561. VAR boolean, result: BOOLEAN;
  17562. BEGIN result := boolean IN boolean
  17563. END Test.
  17564. negative: type test on variable booleans
  17565. MODULE Test;
  17566. VAR boolean, result: BOOLEAN;
  17567. BEGIN result := boolean IS boolean
  17568. END Test.
  17569. negative: type test on variable boolean
  17570. MODULE Test;
  17571. VAR boolean, result: BOOLEAN;
  17572. BEGIN result := boolean IS BOOLEAN
  17573. END Test.
  17574. negative: type test on boolean type
  17575. MODULE Test;
  17576. TYPE Type = BOOLEAN;
  17577. VAR boolean: Type; result: BOOLEAN;
  17578. BEGIN result := boolean IS Type
  17579. END Test.
  17580. negative: type guard on variable booleans
  17581. MODULE Test;
  17582. VAR boolean, result: BOOLEAN;
  17583. BEGIN result := boolean(boolean)
  17584. END Test.
  17585. negative: type guard on variable boolean
  17586. MODULE Test;
  17587. VAR boolean, result: BOOLEAN;
  17588. BEGIN result := boolean(BOOLEAN)
  17589. END Test.
  17590. negative: type guard on boolean type
  17591. MODULE Test;
  17592. TYPE Type = BOOLEAN;
  17593. VAR boolean, result: Type;
  17594. BEGIN result := boolean(Type)
  17595. END Test.
  17596. positive: logical and on variable booleans
  17597. MODULE Test;
  17598. VAR boolean, result: BOOLEAN;
  17599. BEGIN result := boolean & boolean
  17600. END Test.
  17601. positive: logical or on variable booleans
  17602. MODULE Test;
  17603. VAR boolean, result: BOOLEAN;
  17604. BEGIN result := boolean OR boolean
  17605. END Test.
  17606. negative: ordinal value of variable boolean
  17607. MODULE Test;
  17608. VAR boolean: BOOLEAN; result: INTEGER;
  17609. BEGIN result := ORD (boolean)
  17610. END Test.
  17611. negative: character value of variable boolean
  17612. MODULE Test;
  17613. VAR boolean: BOOLEAN; result: CHAR;
  17614. BEGIN result := CHR (boolean)
  17615. END Test.
  17616. negative: absolute value of variable boolean
  17617. MODULE Test;
  17618. VAR boolean, result: BOOLEAN;
  17619. BEGIN result := ABS (boolean)
  17620. END Test.
  17621. negative: odd test on variable boolean
  17622. MODULE Test;
  17623. VAR boolean, result: BOOLEAN;
  17624. BEGIN result := ODD (boolean)
  17625. END Test.
  17626. negative: capital letter of variable boolean
  17627. MODULE Test;
  17628. VAR boolean: BOOLEAN; result: CHAR;
  17629. BEGIN result := CAP (boolean)
  17630. END Test.
  17631. negative: arithmetic shift of variable booleans
  17632. MODULE Test;
  17633. VAR boolean, result: BOOLEAN;
  17634. BEGIN result := ASH (boolean, boolean)
  17635. END Test.
  17636. negative: short on variable boolean
  17637. MODULE Test;
  17638. VAR boolean, result: BOOLEAN;
  17639. BEGIN result := SHORT (boolean)
  17640. END Test.
  17641. negative: long on variable boolean
  17642. MODULE Test;
  17643. VAR boolean, result: BOOLEAN;
  17644. BEGIN result := LONG (boolean)
  17645. END Test.
  17646. negative: entier on variable boolean
  17647. MODULE Test;
  17648. VAR boolean, result: BOOLEAN;
  17649. BEGIN result := ENTIER (boolean)
  17650. END Test.
  17651. negative: unary length of variable boolean
  17652. MODULE Test;
  17653. VAR boolean: BOOLEAN; result: LONGINT;
  17654. BEGIN result := LEN (boolean)
  17655. END Test.
  17656. negative: binary length of variable boolean
  17657. MODULE Test;
  17658. VAR boolean: BOOLEAN; result: LONGINT;
  17659. BEGIN result := LEN (boolean, 0)
  17660. END Test.
  17661. negative: indexing variable boolean
  17662. MODULE Test;
  17663. VAR boolean: BOOLEAN; result: CHAR;
  17664. BEGIN result := boolean[0]
  17665. END Test.
  17666. negative: variable boolean as index
  17667. MODULE Test;
  17668. VAR array: ARRAY 10 OF CHAR; result: CHAR; boolean: BOOLEAN;
  17669. BEGIN result := array[boolean]
  17670. END Test.
  17671. negative: member selection on variable boolean
  17672. MODULE Test;
  17673. VAR boolean, result: BOOLEAN;
  17674. BEGIN result := boolean.member
  17675. END Test.
  17676. negative: calling variable boolean
  17677. MODULE Test;
  17678. VAR boolean: BOOLEAN;
  17679. BEGIN boolean
  17680. END Test.
  17681. # variable characters
  17682. negative: arithmetic negation on variable character
  17683. MODULE Test;
  17684. VAR character, result: CHAR;
  17685. BEGIN result := -character;
  17686. END Test.
  17687. negative: logical negation on variable character
  17688. MODULE Test;
  17689. VAR character: CHAR; result: BOOLEAN;
  17690. BEGIN result := ~character;
  17691. END Test.
  17692. negative: dereferencing variable character
  17693. MODULE Test;
  17694. VAR character, result: CHAR;
  17695. BEGIN result := character^;
  17696. END Test.
  17697. negative: addition on variable characters
  17698. MODULE Test;
  17699. VAR character, result: CHAR;
  17700. BEGIN result := character + character;
  17701. END Test.
  17702. negative: subtraction on variable characters
  17703. MODULE Test;
  17704. VAR character, result: CHAR;
  17705. BEGIN result := character - character
  17706. END Test.
  17707. negative: multiplication on variable characters
  17708. MODULE Test;
  17709. VAR character, result: CHAR;
  17710. BEGIN result := character * character
  17711. END Test.
  17712. negative: integer division on variable characters
  17713. MODULE Test;
  17714. VAR character: CHAR; result: INTEGER;
  17715. BEGIN result := character DIV character
  17716. END Test.
  17717. negative: real division on variable characters
  17718. MODULE Test;
  17719. VAR character: CHAR; result: REAL;
  17720. BEGIN result := character / character
  17721. END Test.
  17722. negative: modulo on variable characters
  17723. MODULE Test;
  17724. VAR character: CHAR; result: INTEGER;
  17725. BEGIN result := character MOD character
  17726. END Test.
  17727. positive: equal relation on variable characters
  17728. MODULE Test;
  17729. VAR character: CHAR; result: BOOLEAN;
  17730. BEGIN result := character = character
  17731. END Test.
  17732. positive: unequal relation on variable characters
  17733. MODULE Test;
  17734. VAR character: CHAR; result: BOOLEAN;
  17735. BEGIN result := character # character
  17736. END Test.
  17737. positive: less relation on variable characters
  17738. MODULE Test;
  17739. VAR character: CHAR; result: BOOLEAN;
  17740. BEGIN result := character < character
  17741. END Test.
  17742. positive: less or equal relation on variable characters
  17743. MODULE Test;
  17744. VAR character: CHAR; result: BOOLEAN;
  17745. BEGIN result := character <= character
  17746. END Test.
  17747. positive: greater relation on variable characters
  17748. MODULE Test;
  17749. VAR character: CHAR; result: BOOLEAN;
  17750. BEGIN result := character > character
  17751. END Test.
  17752. positive: greater or equal relation on variable characters
  17753. MODULE Test;
  17754. VAR character: CHAR; result: BOOLEAN;
  17755. BEGIN result := character >= character
  17756. END Test.
  17757. negative: set membership on variable characters
  17758. MODULE Test;
  17759. VAR character: CHAR; result: BOOLEAN;
  17760. BEGIN result := character IN character
  17761. END Test.
  17762. negative: type test on variable characters
  17763. MODULE Test;
  17764. VAR character: CHAR; result: BOOLEAN;
  17765. BEGIN result := character IS character
  17766. END Test.
  17767. negative: type test on variable character
  17768. MODULE Test;
  17769. VAR character: CHAR; result: BOOLEAN;
  17770. BEGIN result := character IS CHAR
  17771. END Test.
  17772. negative: type test on character type
  17773. MODULE Test;
  17774. TYPE Type = CHAR;
  17775. VAR character: Type; result: BOOLEAN;
  17776. BEGIN result := character IS Type
  17777. END Test.
  17778. negative: type guard on variable characters
  17779. MODULE Test;
  17780. VAR character, result: CHAR;
  17781. BEGIN result := character(character)
  17782. END Test.
  17783. negative: type guard on variable character
  17784. MODULE Test;
  17785. VAR character, result: CHAR;
  17786. BEGIN result := character(CHAR)
  17787. END Test.
  17788. negative: type guard on character type
  17789. MODULE Test;
  17790. TYPE Type = CHAR;
  17791. VAR character, result: Type;
  17792. BEGIN result := character(Type)
  17793. END Test.
  17794. negative: logical and on variable characters
  17795. MODULE Test;
  17796. VAR character: CHAR; result: BOOLEAN;
  17797. BEGIN result := character & character
  17798. END Test.
  17799. negative: logical or on variable characters
  17800. MODULE Test;
  17801. VAR character: CHAR; result: BOOLEAN;
  17802. BEGIN result := character OR character
  17803. END Test.
  17804. positive: ordinal value of variable character
  17805. MODULE Test;
  17806. VAR character: CHAR; result: INTEGER;
  17807. BEGIN result := ORD (character)
  17808. END Test.
  17809. negative: character value of variable character
  17810. MODULE Test;
  17811. VAR character, result: CHAR;
  17812. BEGIN result := CHR (character)
  17813. END Test.
  17814. negative: absolute value of variable character
  17815. MODULE Test;
  17816. VAR character, result: CHAR;
  17817. BEGIN result := ABS (character)
  17818. END Test.
  17819. negative: odd test on variable character
  17820. MODULE Test;
  17821. VAR character: CHAR; result: BOOLEAN;
  17822. BEGIN result := ODD (character)
  17823. END Test.
  17824. positive: capital letter of variable character
  17825. MODULE Test;
  17826. VAR character, result: CHAR;
  17827. BEGIN result := CAP (character)
  17828. END Test.
  17829. negative: arithmetic shift of variable characters
  17830. MODULE Test;
  17831. VAR character, result: CHAR;
  17832. BEGIN result := ASH (character, character)
  17833. END Test.
  17834. negative: short on variable character
  17835. MODULE Test;
  17836. VAR character, result: CHAR;
  17837. BEGIN result := SHORT (character)
  17838. END Test.
  17839. negative: long on variable character
  17840. MODULE Test;
  17841. VAR character, result: CHAR;
  17842. BEGIN result := LONG (character)
  17843. END Test.
  17844. negative: entier on variable character
  17845. MODULE Test;
  17846. VAR character, result: CHAR;
  17847. BEGIN result := ENTIER (character)
  17848. END Test.
  17849. negative: unary length of variable character
  17850. MODULE Test;
  17851. VAR character: CHAR; result: LONGINT;
  17852. BEGIN result := LEN (character)
  17853. END Test.
  17854. negative: binary length of variable character
  17855. MODULE Test;
  17856. VAR character: CHAR; result: LONGINT;
  17857. BEGIN result := LEN (character, 0)
  17858. END Test.
  17859. negative: indexing variable character
  17860. MODULE Test;
  17861. VAR character, result: CHAR;
  17862. BEGIN result := character[0]
  17863. END Test.
  17864. negative: variable character as index
  17865. MODULE Test;
  17866. VAR array: ARRAY 10 OF CHAR; result, character: CHAR;
  17867. BEGIN result := array[character]
  17868. END Test.
  17869. negative: member selection on variable character
  17870. MODULE Test;
  17871. VAR character, result: CHAR;
  17872. BEGIN result := character.member
  17873. END Test.
  17874. negative: calling variable character
  17875. MODULE Test;
  17876. VAR character: CHAR;
  17877. BEGIN character
  17878. END Test.
  17879. # variable integers
  17880. positive: arithmetic negation on variable integer
  17881. MODULE Test;
  17882. VAR integer, result: INTEGER;
  17883. BEGIN result := -integer;
  17884. END Test.
  17885. positive: multiple arithmetic negations on variable integer
  17886. MODULE Test;
  17887. VAR integer, result: INTEGER;
  17888. BEGIN result := -(-(-integer));
  17889. END Test.
  17890. negative: logical negation on variable integer
  17891. MODULE Test;
  17892. VAR integer: INTEGER; result: BOOLEAN;
  17893. BEGIN result := ~integer;
  17894. END Test.
  17895. negative: dereferencing variable integer
  17896. MODULE Test;
  17897. VAR integer, result: INTEGER;
  17898. BEGIN result := integer^;
  17899. END Test.
  17900. positive: addition on variable integers
  17901. MODULE Test;
  17902. VAR integer, result: INTEGER;
  17903. BEGIN result := integer + integer;
  17904. END Test.
  17905. positive: subtraction on variable integers
  17906. MODULE Test;
  17907. VAR integer, result: INTEGER;
  17908. BEGIN result := integer - integer
  17909. END Test.
  17910. positive: multiplication on variable integers
  17911. MODULE Test;
  17912. VAR integer, result: INTEGER;
  17913. BEGIN result := integer * integer
  17914. END Test.
  17915. positive: integer division on variable integers
  17916. MODULE Test;
  17917. VAR integer, result: INTEGER;
  17918. BEGIN result := integer DIV integer
  17919. END Test.
  17920. positive: real division on variable integers
  17921. MODULE Test;
  17922. VAR integer: INTEGER; result: REAL;
  17923. BEGIN result := integer / integer
  17924. END Test.
  17925. positive: modulo on variable integers
  17926. MODULE Test;
  17927. VAR integer, result: INTEGER;
  17928. BEGIN result := integer MOD integer
  17929. END Test.
  17930. positive: equal relation on variable integers
  17931. MODULE Test;
  17932. VAR integer: INTEGER; result: BOOLEAN;
  17933. BEGIN result := integer = integer
  17934. END Test.
  17935. positive: unequal relation on variable integers
  17936. MODULE Test;
  17937. VAR integer: INTEGER; result: BOOLEAN;
  17938. BEGIN result := integer # integer
  17939. END Test.
  17940. positive: less relation on variable integers
  17941. MODULE Test;
  17942. VAR integer: INTEGER; result: BOOLEAN;
  17943. BEGIN result := integer < integer
  17944. END Test.
  17945. positive: less or equal relation on variable integers
  17946. MODULE Test;
  17947. VAR integer: INTEGER; result: BOOLEAN;
  17948. BEGIN result := integer <= integer
  17949. END Test.
  17950. positive: greater relation on variable integers
  17951. MODULE Test;
  17952. VAR integer: INTEGER; result: BOOLEAN;
  17953. BEGIN result := integer > integer
  17954. END Test.
  17955. positive: greater or equal relation on variable integers
  17956. MODULE Test;
  17957. VAR integer: INTEGER; result: BOOLEAN;
  17958. BEGIN result := integer >= integer
  17959. END Test.
  17960. negative: set membership on variable integers
  17961. MODULE Test;
  17962. VAR integer: INTEGER; result: BOOLEAN;
  17963. BEGIN result := integer IN integer
  17964. END Test.
  17965. negative: type test on variable integers
  17966. MODULE Test;
  17967. VAR integer: INTEGER; result: BOOLEAN;
  17968. BEGIN result := integer IS integer
  17969. END Test.
  17970. negative: type test on variable integer
  17971. MODULE Test;
  17972. VAR integer: INTEGER; result: BOOLEAN;
  17973. BEGIN result := integer IS INTEGER
  17974. END Test.
  17975. negative: type test on integer type
  17976. MODULE Test;
  17977. TYPE Type = INTEGER;
  17978. VAR integer: Type; result: BOOLEAN;
  17979. BEGIN result := integer IS Type
  17980. END Test.
  17981. negative: type guard on variable integers
  17982. MODULE Test;
  17983. VAR integer, result: INTEGER;
  17984. BEGIN result := integer(integer)
  17985. END Test.
  17986. negative: type guard on variable integer
  17987. MODULE Test;
  17988. VAR integer, result: INTEGER;
  17989. BEGIN result := integer(INTEGER)
  17990. END Test.
  17991. negative: type guard on integer type
  17992. MODULE Test;
  17993. TYPE Type = INTEGER;
  17994. VAR integer, result: Type;
  17995. BEGIN result := integer(Type)
  17996. END Test.
  17997. negative: logical and on variable integers
  17998. MODULE Test;
  17999. VAR integer: INTEGER; result: BOOLEAN;
  18000. BEGIN result := integer & integer
  18001. END Test.
  18002. negative: logical or on variable integers
  18003. MODULE Test;
  18004. VAR integer: INTEGER; result: BOOLEAN;
  18005. BEGIN result := integer OR integer
  18006. END Test.
  18007. negative: ordinal value of variable integer
  18008. MODULE Test;
  18009. VAR integer, result: INTEGER;
  18010. BEGIN result := ORD (integer)
  18011. END Test.
  18012. positive: character value of variable integer
  18013. MODULE Test;
  18014. VAR integer: INTEGER; result: CHAR;
  18015. BEGIN result := CHR (integer)
  18016. END Test.
  18017. positive: absolute value of variable integer
  18018. MODULE Test;
  18019. VAR integer, result: INTEGER;
  18020. BEGIN result := ABS (integer)
  18021. END Test.
  18022. positive: odd test on variable integer
  18023. MODULE Test;
  18024. VAR integer: INTEGER; result: BOOLEAN;
  18025. BEGIN result := ODD (integer)
  18026. END Test.
  18027. negative: capital letter of variable integer
  18028. MODULE Test;
  18029. VAR integer: INTEGER; result: CHAR;
  18030. BEGIN result := CAP (integer)
  18031. END Test.
  18032. positive: arithmetic shift of variable integers
  18033. MODULE Test;
  18034. VAR integer: INTEGER; result: LONGINT;
  18035. BEGIN result := ASH (integer, integer)
  18036. END Test.
  18037. negative: short on variable short integer
  18038. MODULE Test;
  18039. VAR shortint, result: SHORTINT;
  18040. BEGIN result := SHORT (shortint)
  18041. END Test.
  18042. positive: short on variable integer
  18043. MODULE Test;
  18044. VAR integer, result: INTEGER;
  18045. BEGIN result := SHORT (integer)
  18046. END Test.
  18047. positive: short on variable long integer
  18048. MODULE Test;
  18049. VAR longint, result: LONGINT;
  18050. BEGIN result := SHORT (longint)
  18051. END Test.
  18052. positive: short on variable huge integer
  18053. MODULE Test;
  18054. VAR hugeint, result: HUGEINT;
  18055. BEGIN result := SHORT (hugeint)
  18056. END Test.
  18057. positive: long on variable short integer
  18058. MODULE Test;
  18059. VAR shortint, result: SHORTINT;
  18060. BEGIN result := SHORT (LONG (shortint))
  18061. END Test.
  18062. positive: long on variable integer
  18063. MODULE Test;
  18064. VAR integer, result: INTEGER;
  18065. BEGIN result := SHORT (LONG (integer))
  18066. END Test.
  18067. positive: long on variable long integer
  18068. MODULE Test;
  18069. VAR longint, result: LONGINT;
  18070. BEGIN result := SHORT (LONG (longint))
  18071. END Test.
  18072. negative: long on variable huge integer
  18073. MODULE Test;
  18074. VAR hugeint, result: HUGEINT;
  18075. BEGIN result := SHORT (LONG (hugeint))
  18076. END Test.
  18077. negative: entier on variable integer
  18078. MODULE Test;
  18079. VAR integer, result: LONGINT;
  18080. BEGIN result := ENTIER (integer)
  18081. END Test.
  18082. negative: unary length of variable integer
  18083. MODULE Test;
  18084. VAR integer: INTEGER; result: LONGINT;
  18085. BEGIN result := LEN (integer)
  18086. END Test.
  18087. negative: binary length of variable integer
  18088. MODULE Test;
  18089. VAR integer: INTEGER; result: LONGINT;
  18090. BEGIN result := LEN (integer, 0)
  18091. END Test.
  18092. negative: indexing variable integer
  18093. MODULE Test;
  18094. VAR integer: INTEGER; result: CHAR;
  18095. BEGIN result := integer[0]
  18096. END Test.
  18097. positive: variable integer as index
  18098. MODULE Test;
  18099. VAR array: ARRAY 10 OF CHAR; result: CHAR; integer: INTEGER;
  18100. BEGIN result := array[integer]
  18101. END Test.
  18102. positive: variable integer as index in two-dimensional array
  18103. MODULE Test;
  18104. VAR array: ARRAY 5, 10 OF CHAR; result: CHAR; integer: INTEGER;
  18105. BEGIN result := array[integer, integer]
  18106. END Test.
  18107. positive: variable integer as index in two-dimensional open array
  18108. MODULE Test;
  18109. PROCEDURE Procedure (CONST array: ARRAY OF ARRAY OF CHAR);
  18110. VAR result: CHAR; integer: INTEGER;
  18111. BEGIN result := array[integer, integer]; result := array[integer][integer]
  18112. END Procedure;
  18113. END Test.
  18114. negative: member selection on variable integer
  18115. MODULE Test;
  18116. VAR integer, result: INTEGER;
  18117. BEGIN result := integer.member
  18118. END Test.
  18119. negative: calling variable integer
  18120. MODULE Test;
  18121. VAR integer: INTEGER;
  18122. BEGIN integer
  18123. END Test.
  18124. # variable reals
  18125. positive: arithmetic negation on variable real
  18126. MODULE Test;
  18127. VAR real, result: REAL;
  18128. BEGIN result := -real;
  18129. END Test.
  18130. positive: multiple arithmetic negations on variable real
  18131. MODULE Test;
  18132. VAR real, result: REAL;
  18133. BEGIN result := -(-(-real));
  18134. END Test.
  18135. negative: logical negation on variable real
  18136. MODULE Test;
  18137. VAR real: REAL; result: BOOLEAN;
  18138. BEGIN result := ~real;
  18139. END Test.
  18140. negative: dereferencing variable real
  18141. MODULE Test;
  18142. VAR real, result: REAL;
  18143. BEGIN result := real^;
  18144. END Test.
  18145. positive: addition on variable reals
  18146. MODULE Test;
  18147. VAR real, result: REAL;
  18148. BEGIN result := real + real;
  18149. END Test.
  18150. positive: subtraction on variable reals
  18151. MODULE Test;
  18152. VAR real, result: REAL;
  18153. BEGIN result := real - real
  18154. END Test.
  18155. positive: multiplication on variable reals
  18156. MODULE Test;
  18157. VAR real, result: REAL;
  18158. BEGIN result := real * real
  18159. END Test.
  18160. negative: integer division on variable reals
  18161. MODULE Test;
  18162. VAR real: REAL; result: INTEGER;
  18163. BEGIN result := real DIV real
  18164. END Test.
  18165. positive: real division on variable reals
  18166. MODULE Test;
  18167. VAR real, result: REAL;
  18168. BEGIN result := real / real
  18169. END Test.
  18170. negative: modulo on variable reals
  18171. MODULE Test;
  18172. VAR real: REAL; result: INTEGER;
  18173. BEGIN result := real MOD real
  18174. END Test.
  18175. positive: equal relation on variable reals
  18176. MODULE Test;
  18177. VAR real: REAL; result: BOOLEAN;
  18178. BEGIN result := real = real
  18179. END Test.
  18180. positive: unequal relation on variable reals
  18181. MODULE Test;
  18182. VAR real: REAL; result: BOOLEAN;
  18183. BEGIN result := real # real
  18184. END Test.
  18185. positive: less relation on variable reals
  18186. MODULE Test;
  18187. VAR real: REAL; result: BOOLEAN;
  18188. BEGIN result := real < real
  18189. END Test.
  18190. positive: less or equal relation on variable reals
  18191. MODULE Test;
  18192. VAR real: REAL; result: BOOLEAN;
  18193. BEGIN result := real <= real
  18194. END Test.
  18195. positive: greater relation on variable reals
  18196. MODULE Test;
  18197. VAR real: REAL; result: BOOLEAN;
  18198. BEGIN result := real > real
  18199. END Test.
  18200. positive: greater or equal relation on variable reals
  18201. MODULE Test;
  18202. VAR real: REAL; result: BOOLEAN;
  18203. BEGIN result := real >= real
  18204. END Test.
  18205. negative: set membership on variable reals
  18206. MODULE Test;
  18207. VAR real: REAL; result: BOOLEAN;
  18208. BEGIN result := real IN real
  18209. END Test.
  18210. negative: type test on variable reals
  18211. MODULE Test;
  18212. VAR real: REAL; result: BOOLEAN;
  18213. BEGIN result := real IS real
  18214. END Test.
  18215. negative: type test on variable real
  18216. MODULE Test;
  18217. VAR real: REAL; result: BOOLEAN;
  18218. BEGIN result := real IS REAL
  18219. END Test.
  18220. negative: type test on real type
  18221. MODULE Test;
  18222. TYPE Type = REAL;
  18223. VAR real: Type; result: BOOLEAN;
  18224. BEGIN result := real IS Type
  18225. END Test.
  18226. negative: type guard on variable reals
  18227. MODULE Test;
  18228. VAR real, result: REAL;
  18229. BEGIN result := real(real)
  18230. END Test.
  18231. negative: type guard on variable real
  18232. MODULE Test;
  18233. VAR real, result: REAL;
  18234. BEGIN result := real(REAL)
  18235. END Test.
  18236. negative: type guard on real type
  18237. MODULE Test;
  18238. TYPE Type = REAL;
  18239. VAR real: Type; result: BOOLEAN;
  18240. BEGIN result := real(Type)
  18241. END Test.
  18242. negative: logical and on variable reals
  18243. MODULE Test;
  18244. VAR real: REAL; result: BOOLEAN;
  18245. BEGIN result := real & real
  18246. END Test.
  18247. negative: logical or on variable reals
  18248. MODULE Test;
  18249. VAR real: REAL; result: BOOLEAN;
  18250. BEGIN result := real OR real
  18251. END Test.
  18252. negative: ordinal value of variable real
  18253. MODULE Test;
  18254. VAR real: REAL; result: INTEGER;
  18255. BEGIN result := ORD (real)
  18256. END Test.
  18257. negative: character value of variable real
  18258. MODULE Test;
  18259. VAR real: REAL; result: CHAR;
  18260. BEGIN result := CHR (real)
  18261. END Test.
  18262. positive: absolute value of variable real
  18263. MODULE Test;
  18264. VAR real, result: REAL;
  18265. BEGIN result := ABS (real)
  18266. END Test.
  18267. negative: odd test on variable real
  18268. MODULE Test;
  18269. VAR real: REAL; result: BOOLEAN;
  18270. BEGIN result := ODD (real)
  18271. END Test.
  18272. negative: capital letter of variable real
  18273. MODULE Test;
  18274. VAR real: REAL; result: CHAR;
  18275. BEGIN result := CAP (real)
  18276. END Test.
  18277. negative: arithmetic shift of variable reals
  18278. MODULE Test;
  18279. VAR real, result: REAL;
  18280. BEGIN result := ASH (real, real)
  18281. END Test.
  18282. negative: short on variable real
  18283. MODULE Test;
  18284. VAR real, result: REAL;
  18285. BEGIN result := SHORT (real)
  18286. END Test.
  18287. positive: short on variable long real
  18288. MODULE Test;
  18289. VAR longreal, result: LONGREAL;
  18290. BEGIN result := SHORT (longreal)
  18291. END Test.
  18292. positive: long on variable real
  18293. MODULE Test;
  18294. VAR real, result: REAL;
  18295. BEGIN result := SHORT (LONG (real))
  18296. END Test.
  18297. negative: long on variable long real
  18298. MODULE Test;
  18299. VAR longreal, result: LONGREAL;
  18300. BEGIN result := SHORT (LONG (longreal))
  18301. END Test.
  18302. positive: entier on variable real
  18303. MODULE Test;
  18304. VAR real, result: REAL;
  18305. BEGIN result := ENTIER (real)
  18306. END Test.
  18307. positive: entier on variable long real
  18308. MODULE Test;
  18309. VAR longreal, result: LONGREAL;
  18310. BEGIN result := ENTIER (longreal)
  18311. END Test.
  18312. negative: unary length of variable real
  18313. MODULE Test;
  18314. VAR real: REAL; result: LONGINT;
  18315. BEGIN result := LEN (real)
  18316. END Test.
  18317. negative: binary length of variable real
  18318. MODULE Test;
  18319. VAR real: REAL; result: LONGINT;
  18320. BEGIN result := LEN (real, 0)
  18321. END Test.
  18322. negative: indexing variable real
  18323. MODULE Test;
  18324. VAR real: REAL; result: CHAR;
  18325. BEGIN result := real[0]
  18326. END Test.
  18327. negative: variable real as index
  18328. MODULE Test;
  18329. VAR array: ARRAY 10 OF CHAR; result: CHAR; real: REAL;
  18330. BEGIN result := array[real]
  18331. END Test.
  18332. negative: member selection on variable real
  18333. MODULE Test;
  18334. VAR real, result: REAL;
  18335. BEGIN result := real.member
  18336. END Test.
  18337. negative: calling variable real
  18338. MODULE Test;
  18339. VAR real: REAL;
  18340. BEGIN real
  18341. END Test.
  18342. # variable set
  18343. negative: variable boolean as set element
  18344. MODULE Test;
  18345. VAR boolean: BOOLEAN; result: SET;
  18346. BEGIN result := {boolean};
  18347. END Test.
  18348. negative: variable character as set element
  18349. MODULE Test;
  18350. VAR character: CHAR; result: SET;
  18351. BEGIN result := {character};
  18352. END Test.
  18353. positive: variable integer variable as set element
  18354. MODULE Test;
  18355. VAR integer: INTEGER; result: SET;
  18356. BEGIN result := {integer};
  18357. END Test.
  18358. negative: variable real as set element
  18359. MODULE Test;
  18360. VAR real: REAL; result: SET;
  18361. BEGIN result := {real};
  18362. END Test.
  18363. negative: variable set as set element
  18364. MODULE Test;
  18365. VAR set, result: SET;
  18366. BEGIN result := {set};
  18367. END Test.
  18368. positive: several equal variable set elements
  18369. MODULE Test;
  18370. VAR integer: INTEGER; result: SET;
  18371. BEGIN result := {integer, integer, integer};
  18372. END Test.
  18373. positive: several different variable set elements
  18374. MODULE Test;
  18375. VAR integer: INTEGER; result: SET;
  18376. BEGIN result := {integer, integer, integer};
  18377. END Test.
  18378. positive: variable set element range
  18379. MODULE Test;
  18380. VAR integer: INTEGER; result: SET;
  18381. BEGIN result := {integer..integer};
  18382. END Test.
  18383. positive: variable set element range with single element
  18384. MODULE Test;
  18385. VAR integer: INTEGER; result: SET;
  18386. BEGIN result := {integer..integer};
  18387. END Test.
  18388. positive: empty variable set element range
  18389. MODULE Test;
  18390. VAR integer: INTEGER; result: SET;
  18391. BEGIN result := {integer..integer};
  18392. END Test.
  18393. positive: complement on variable set
  18394. MODULE Test;
  18395. VAR set, result: SET;
  18396. BEGIN result := -set;
  18397. END Test.
  18398. positive: multiple complements on variable set
  18399. MODULE Test;
  18400. VAR set, result: SET;
  18401. BEGIN result := -(-(-set));
  18402. END Test.
  18403. negative: logical negation on variable set
  18404. MODULE Test;
  18405. VAR set: SET; result: BOOLEAN;
  18406. BEGIN result := ~set;
  18407. END Test.
  18408. negative: dereferencing variable set
  18409. MODULE Test;
  18410. VAR set, result: SET;
  18411. BEGIN result := set^;
  18412. END Test.
  18413. positive: union on variable sets
  18414. MODULE Test;
  18415. VAR set, result: SET;
  18416. BEGIN result := set + set;
  18417. END Test.
  18418. positive: difference on variable sets
  18419. MODULE Test;
  18420. VAR set, result: SET;
  18421. BEGIN result := set - set
  18422. END Test.
  18423. positive: intersection on variable sets
  18424. MODULE Test;
  18425. VAR set, result: SET;
  18426. BEGIN result := set * set
  18427. END Test.
  18428. negative: integer division on variable sets
  18429. MODULE Test;
  18430. VAR set: SET; result: INTEGER;
  18431. BEGIN result := set DIV set
  18432. END Test.
  18433. positive: symmetric difference on variable sets
  18434. MODULE Test;
  18435. VAR set, result: SET;
  18436. BEGIN result := set / set
  18437. END Test.
  18438. negative: modulo on variable sets
  18439. MODULE Test;
  18440. VAR set: SET; result: INTEGER;
  18441. BEGIN result := set MOD set
  18442. END Test.
  18443. positive: equal relation on variable sets
  18444. MODULE Test;
  18445. VAR set: SET; result: BOOLEAN;
  18446. BEGIN result := set = set
  18447. END Test.
  18448. positive: unequal relation on variable sets
  18449. MODULE Test;
  18450. VAR set: SET; result: BOOLEAN;
  18451. BEGIN result := set # set
  18452. END Test.
  18453. positive: less relation on variable sets
  18454. MODULE Test;
  18455. VAR set: SET; result: BOOLEAN;
  18456. BEGIN result := set < set
  18457. END Test.
  18458. positive: less or equal relation on variable sets
  18459. MODULE Test;
  18460. VAR set: SET; result: BOOLEAN;
  18461. BEGIN result := set <= set
  18462. END Test.
  18463. positive: greater relation on variable sets
  18464. MODULE Test;
  18465. VAR set: SET; result: BOOLEAN;
  18466. BEGIN result := set > set
  18467. END Test.
  18468. positive: greater or equal relation on variable sets
  18469. MODULE Test;
  18470. VAR set: SET; result: BOOLEAN;
  18471. BEGIN result := set >= set
  18472. END Test.
  18473. negative: set membership on variable sets
  18474. MODULE Test;
  18475. VAR set: SET; result: BOOLEAN;
  18476. BEGIN result := set IN set
  18477. END Test.
  18478. positive: set membership on integer and variable set
  18479. MODULE Test;
  18480. VAR integer: INTEGER; set: SET; result: BOOLEAN;
  18481. BEGIN result := integer IN set
  18482. END Test.
  18483. negative: type test on variable sets
  18484. MODULE Test;
  18485. VAR set: SET; result: BOOLEAN;
  18486. BEGIN result := set IS set
  18487. END Test.
  18488. negative: type test on variable set
  18489. MODULE Test;
  18490. VAR set: SET; result: BOOLEAN;
  18491. BEGIN result := set IS SET
  18492. END Test.
  18493. negative: type test on set type
  18494. MODULE Test;
  18495. TYPE Type = SET;
  18496. VAR set: Type; result: BOOLEAN;
  18497. BEGIN result := set IS Type
  18498. END Test.
  18499. negative: type guard on variable sets
  18500. MODULE Test;
  18501. VAR set, result: SET;
  18502. BEGIN result := set(set)
  18503. END Test.
  18504. negative: type guard on variable set
  18505. MODULE Test;
  18506. VAR set, result: SET;
  18507. BEGIN result := set(SET)
  18508. END Test.
  18509. negative: type guard on set type
  18510. MODULE Test;
  18511. TYPE Type = SET;
  18512. VAR set, result: Type;
  18513. BEGIN result := set(Type)
  18514. END Test.
  18515. negative: logical and on variable sets
  18516. MODULE Test;
  18517. VAR set: SET; result: BOOLEAN;
  18518. BEGIN result := set & set
  18519. END Test.
  18520. negative: logical or on variable sets
  18521. MODULE Test;
  18522. VAR set: SET; result: BOOLEAN;
  18523. BEGIN result := set OR set
  18524. END Test.
  18525. negative: ordinal value of variable set
  18526. MODULE Test;
  18527. VAR set: SET; result: INTEGER;
  18528. BEGIN result := ORD (set)
  18529. END Test.
  18530. negative: character value of variable set
  18531. MODULE Test;
  18532. VAR set: SET; result: CHAR;
  18533. BEGIN result := CHR (set)
  18534. END Test.
  18535. negative: absolute value of variable set
  18536. MODULE Test;
  18537. VAR set, result: SET;
  18538. BEGIN result := ABS (set)
  18539. END Test.
  18540. negative: odd test on variable set
  18541. MODULE Test;
  18542. VAR set: SET; result: BOOLEAN;
  18543. BEGIN result := ODD (set)
  18544. END Test.
  18545. negative: capital letter of variable set
  18546. MODULE Test;
  18547. VAR set: SET; result: CHAR;
  18548. BEGIN result := CAP (set)
  18549. END Test.
  18550. negative: arithmetic shift of variable sets
  18551. MODULE Test;
  18552. VAR set, result: SET;
  18553. BEGIN result := ASH (set, set)
  18554. END Test.
  18555. negative: short on variable set
  18556. MODULE Test;
  18557. VAR set, result: SET;
  18558. BEGIN result := SHORT (set)
  18559. END Test.
  18560. negative: long on variable set
  18561. MODULE Test;
  18562. VAR set, result: SET;
  18563. BEGIN result := LONG (set)
  18564. END Test.
  18565. negative: entier on variable set
  18566. MODULE Test;
  18567. VAR set, result: SET;
  18568. BEGIN result := ENTIER (set)
  18569. END Test.
  18570. negative: unary length of variable set
  18571. MODULE Test;
  18572. VAR set: SET; result: LONGINT;
  18573. BEGIN result := LEN (set)
  18574. END Test.
  18575. negative: binary length of variable set
  18576. MODULE Test;
  18577. VAR set: SET; result: LONGINT;
  18578. BEGIN result := LEN (set, 0)
  18579. END Test.
  18580. negative: indexing variable set
  18581. MODULE Test;
  18582. VAR set: SET; result: CHAR;
  18583. BEGIN result := set[0]
  18584. END Test.
  18585. negative: variable set as index
  18586. MODULE Test;
  18587. VAR array: ARRAY 10 OF CHAR; result: CHAR; set: SET;
  18588. BEGIN result := array[set]
  18589. END Test.
  18590. negative: member selection on variable set
  18591. MODULE Test;
  18592. VAR set, result: SET;
  18593. BEGIN result := set.member
  18594. END Test.
  18595. negative: calling variable set
  18596. MODULE Test;
  18597. VAR set: SET;
  18598. BEGIN set
  18599. END Test.
  18600. # variable arrays
  18601. negative: arithmetic negation on variable array
  18602. MODULE Test;
  18603. VAR array, result: ARRAY 10 OF SET;
  18604. BEGIN result := -array;
  18605. END Test.
  18606. negative: logical negation on variable array
  18607. MODULE Test;
  18608. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18609. BEGIN result := ~array;
  18610. END Test.
  18611. negative: dereferencing variable array
  18612. MODULE Test;
  18613. VAR array, result: ARRAY 10 OF SET;
  18614. BEGIN result := array^;
  18615. END Test.
  18616. negative: addition on variable arrays
  18617. MODULE Test;
  18618. VAR array, result: ARRAY 10 OF SET;
  18619. BEGIN result := array + array;
  18620. END Test.
  18621. negative: subtraction on variable arrays
  18622. MODULE Test;
  18623. VAR array, result: ARRAY 10 OF SET;
  18624. BEGIN result := array - array
  18625. END Test.
  18626. negative: multiplication on variable arrays
  18627. MODULE Test;
  18628. VAR array, result: ARRAY 10 OF SET;
  18629. BEGIN result := array * array
  18630. END Test.
  18631. negative: integer division on variable arrays
  18632. MODULE Test;
  18633. VAR array: ARRAY 10 OF SET; result: INTEGER;
  18634. BEGIN result := array DIV array
  18635. END Test.
  18636. negative: real division on variable arrays
  18637. MODULE Test;
  18638. VAR array: ARRAY 10 OF SET; result: REAL;
  18639. BEGIN result := array / array
  18640. END Test.
  18641. negative: modulo on variable arrays
  18642. MODULE Test;
  18643. VAR array: ARRAY 10 OF SET; result: INTEGER;
  18644. BEGIN result := array MOD array
  18645. END Test.
  18646. negative: equal relation on variable arrays
  18647. MODULE Test;
  18648. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18649. BEGIN result := array = array
  18650. END Test.
  18651. positive: equal relation on variable arrays of character
  18652. MODULE Test;
  18653. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18654. BEGIN result := array = array
  18655. END Test.
  18656. positive: equal relation on variable array of character and string
  18657. MODULE Test;
  18658. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18659. BEGIN result := array = "string"
  18660. END Test.
  18661. negative: unequal relation on variable arrays
  18662. MODULE Test;
  18663. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18664. BEGIN result := array # array
  18665. END Test.
  18666. positive: unequal relation on variable arrays of character
  18667. MODULE Test;
  18668. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18669. BEGIN result := array # array
  18670. END Test.
  18671. positive: unequal relation on variable array of character and string
  18672. MODULE Test;
  18673. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18674. BEGIN result := array # "string"
  18675. END Test.
  18676. negative: less relation on variable arrays
  18677. MODULE Test;
  18678. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18679. BEGIN result := array < array
  18680. END Test.
  18681. positive: less relation on variable arrays of character
  18682. MODULE Test;
  18683. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18684. BEGIN result := array < array
  18685. END Test.
  18686. positive: less relation on variable array of character and string
  18687. MODULE Test;
  18688. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18689. BEGIN result := array < "string"
  18690. END Test.
  18691. negative: less or equal relation on variable arrays
  18692. MODULE Test;
  18693. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18694. BEGIN result := array <= array
  18695. END Test.
  18696. positive: less or equal relation on variable arrays of character
  18697. MODULE Test;
  18698. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18699. BEGIN result := array <= array
  18700. END Test.
  18701. positive: less or equal relation on variable array of character and string
  18702. MODULE Test;
  18703. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18704. BEGIN result := array <= "string"
  18705. END Test.
  18706. negative: greater relation on variable arrays
  18707. MODULE Test;
  18708. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18709. BEGIN result := array > array
  18710. END Test.
  18711. positive: greater relation on variable arrays of character
  18712. MODULE Test;
  18713. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18714. BEGIN result := array > array
  18715. END Test.
  18716. positive: greater relation on variable array of character and string
  18717. MODULE Test;
  18718. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18719. BEGIN result := array > "string"
  18720. END Test.
  18721. negative: greater or equal relation on variable arrays
  18722. MODULE Test;
  18723. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18724. BEGIN result := array >= array
  18725. END Test.
  18726. positive: greater or equal relation on variable arrays of character
  18727. MODULE Test;
  18728. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18729. BEGIN result := array >= array
  18730. END Test.
  18731. positive: greater or equal relation on variable array of character and string
  18732. MODULE Test;
  18733. VAR array: ARRAY 10 OF CHAR; result: BOOLEAN;
  18734. BEGIN result := array >= "string"
  18735. END Test.
  18736. negative: set membership on variable arrays
  18737. MODULE Test;
  18738. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18739. BEGIN result := array IN array
  18740. END Test.
  18741. negative: type test on variable arrays
  18742. MODULE Test;
  18743. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18744. BEGIN result := array IS array
  18745. END Test.
  18746. negative: type test on variable array
  18747. MODULE Test;
  18748. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18749. BEGIN result := array IS ARRAY 10 OF SET
  18750. END Test.
  18751. negative: type test on array type
  18752. MODULE Test;
  18753. TYPE Type = ARRAY 10 OF SET;
  18754. VAR array: Type; result: BOOLEAN;
  18755. BEGIN result := array IS Type
  18756. END Test.
  18757. negative: type guard on variable arrays
  18758. MODULE Test;
  18759. VAR array, result: ARRAY 10 OF SET;
  18760. BEGIN result := array(array)
  18761. END Test.
  18762. negative: type guard on variable array
  18763. MODULE Test;
  18764. VAR array, result: ARRAY 10 OF SET;
  18765. BEGIN result := array(ARRAY 10 OF SET)
  18766. END Test.
  18767. negative: type guard on array type
  18768. MODULE Test;
  18769. TYPE Type = ARRAY 10 OF SET;
  18770. VAR array, result: Type;
  18771. BEGIN result := array(Type)
  18772. END Test.
  18773. negative: logical and on variable arrays
  18774. MODULE Test;
  18775. VAR array, result: ARRAY 10 OF SET;
  18776. BEGIN result := array & array
  18777. END Test.
  18778. negative: logical or on variable arrays
  18779. MODULE Test;
  18780. VAR array, result: ARRAY 10 OF SET;
  18781. BEGIN result := array OR array
  18782. END Test.
  18783. negative: ordinal value of variable array
  18784. MODULE Test;
  18785. VAR array: ARRAY 10 OF SET; result: INTEGER;
  18786. BEGIN result := ORD (array)
  18787. END Test.
  18788. negative: character value of variable array
  18789. MODULE Test;
  18790. VAR array: ARRAY 10 OF SET; result: CHAR;
  18791. BEGIN result := CHR (array)
  18792. END Test.
  18793. negative: absolute value of variable array
  18794. MODULE Test;
  18795. VAR array, result: ARRAY 10 OF SET;
  18796. BEGIN result := ABS (array)
  18797. END Test.
  18798. negative: odd test on variable array
  18799. MODULE Test;
  18800. VAR array: ARRAY 10 OF SET; result: BOOLEAN;
  18801. BEGIN result := ODD (array)
  18802. END Test.
  18803. negative: capital letter of variable array
  18804. MODULE Test;
  18805. VAR array: ARRAY 10 OF SET; result: CHAR;
  18806. BEGIN result := CAP (array)
  18807. END Test.
  18808. negative: arithmetic shift of variable arrays
  18809. MODULE Test;
  18810. VAR array, result: ARRAY 10 OF SET;
  18811. BEGIN result := ASH (array, array)
  18812. END Test.
  18813. negative: short on variable array
  18814. MODULE Test;
  18815. VAR array, result: ARRAY 10 OF SET;
  18816. BEGIN result := SHORT (array)
  18817. END Test.
  18818. negative: long on variable array
  18819. MODULE Test;
  18820. VAR array, result: ARRAY 10 OF SET;
  18821. BEGIN result := LONG (array)
  18822. END Test.
  18823. negative: entier on variable array
  18824. MODULE Test;
  18825. VAR array, result: ARRAY 10 OF SET;
  18826. BEGIN result := ENTIER (array)
  18827. END Test.
  18828. positive: unary length of variable array
  18829. MODULE Test;
  18830. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18831. BEGIN result := LEN (array); ASSERT (LEN (array) = 10);
  18832. END Test.
  18833. positive: unary length of variable array as short integer
  18834. MODULE Test;
  18835. VAR array: ARRAY 10 OF CHAR; result: SHORTINT;
  18836. BEGIN result := LEN (array);
  18837. END Test.
  18838. positive: unary length of variable array as integer
  18839. MODULE Test;
  18840. VAR array: ARRAY 10 OF CHAR; result: INTEGER;
  18841. BEGIN result := LEN (array);
  18842. END Test.
  18843. positive: unary length of variable array as long integer
  18844. MODULE Test;
  18845. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18846. BEGIN result := LEN (array);
  18847. END Test.
  18848. positive: unary length of variable array as huge integer
  18849. MODULE Test;
  18850. VAR array: ARRAY 10 OF CHAR; result: HUGEINT;
  18851. BEGIN result := LEN (array);
  18852. END Test.
  18853. positive: unary length of variable open array
  18854. MODULE Test;
  18855. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18856. VAR result: LONGINT;
  18857. BEGIN result := LEN (array)
  18858. END Procedure
  18859. END Test.
  18860. negative: unary length of variable open array as short integer
  18861. MODULE Test;
  18862. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18863. VAR result: SHORTINT;
  18864. BEGIN result := LEN (array)
  18865. END Procedure
  18866. END Test.
  18867. negative: unary length of variable open array as integer
  18868. MODULE Test;
  18869. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18870. VAR result: INTEGER;
  18871. BEGIN result := LEN (array)
  18872. END Procedure
  18873. END Test.
  18874. positive: unary length of variable open array as long integer
  18875. MODULE Test;
  18876. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18877. VAR result: LONGINT;
  18878. BEGIN result := LEN (array)
  18879. END Procedure
  18880. END Test.
  18881. positive: unary length of variable open array as huge integer
  18882. MODULE Test;
  18883. PROCEDURE Procedure (array: ARRAY OF CHAR);
  18884. VAR result: HUGEINT;
  18885. BEGIN result := LEN (array)
  18886. END Procedure
  18887. END Test.
  18888. positive: unary length of two-dimensional variable array
  18889. MODULE Test;
  18890. CONST Length = LEN (array);
  18891. VAR array: ARRAY 10, 20 OF CHAR; result: LONGINT;
  18892. BEGIN result := LEN (array); ASSERT (Length = 10);
  18893. END Test.
  18894. positive: unary length of two-dimensional variable open array
  18895. MODULE Test;
  18896. PROCEDURE Procedure (array: ARRAY OF ARRAY OF CHAR);
  18897. VAR result: LONGINT;
  18898. BEGIN result := LEN (array);
  18899. END Procedure;
  18900. END Test.
  18901. negative: unary length of array as its size
  18902. MODULE Test;
  18903. VAR a: ARRAY LEN (a) OF CHAR;
  18904. END Test.
  18905. negative: indirect unary length of array as its size
  18906. MODULE Test;
  18907. CONST Length = LEN (a)
  18908. VAR a: ARRAY Length OF CHAR;
  18909. END Test.
  18910. positive: unary length of array as size of another array
  18911. MODULE Test;
  18912. VAR a: ARRAY 10 OF CHAR; b: ARRAY LEN (a) OF CHAR;
  18913. BEGIN a := b;
  18914. END Test.
  18915. positive: indirect unary array as size of another array
  18916. MODULE Test;
  18917. CONST Length = LEN (a)
  18918. VAR a: ARRAY 10 OF CHAR; b: ARRAY Length OF CHAR;
  18919. BEGIN a := b;
  18920. END Test.
  18921. positive: binary length of variable array
  18922. MODULE Test;
  18923. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18924. BEGIN result := LEN (array); ASSERT (LEN (array, 0) = 10); ASSERT (LEN (array, 0) = LEN (array));
  18925. END Test.
  18926. positive: constant binary length of variable array as short integer
  18927. MODULE Test;
  18928. VAR array: ARRAY 10 OF CHAR; result: SHORTINT;
  18929. BEGIN result := LEN (array, 0);
  18930. END Test.
  18931. positive: constant binary length of variable array as integer
  18932. MODULE Test;
  18933. VAR array: ARRAY 10 OF CHAR; result: INTEGER;
  18934. BEGIN result := LEN (array, 0);
  18935. END Test.
  18936. positive: constant binary length of variable array as long integer
  18937. MODULE Test;
  18938. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18939. BEGIN result := LEN (array, 0);
  18940. END Test.
  18941. positive: constant binary length of variable array as huge integer
  18942. MODULE Test;
  18943. VAR array: ARRAY 10 OF CHAR; result: HUGEINT;
  18944. BEGIN result := LEN (array, 0);
  18945. END Test.
  18946. negative: binary length of variable array with negative dimension index
  18947. MODULE Test;
  18948. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18949. BEGIN result := LEN (array, -1);
  18950. END Test.
  18951. negative: binary length of variable array with invalid dimension index
  18952. MODULE Test;
  18953. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18954. BEGIN result := LEN (array, 1);
  18955. END Test.
  18956. positive: binary length of variable array with variable dimension index
  18957. MODULE Test;
  18958. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: INTEGER;
  18959. BEGIN result := LEN (array, dimension);
  18960. END Test.
  18961. negative: binary length of variable array with boolean as dimension index
  18962. MODULE Test;
  18963. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: BOOLEAN;
  18964. BEGIN result := LEN (array, dimension);
  18965. END Test.
  18966. negative: binary length of variable array with character as dimension index
  18967. MODULE Test;
  18968. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: CHAR;
  18969. BEGIN result := LEN (array, dimension);
  18970. END Test.
  18971. positive: binary length of variable array with integer as dimension index
  18972. MODULE Test;
  18973. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: INTEGER;
  18974. BEGIN result := LEN (array, dimension);
  18975. END Test.
  18976. negative: binary length of variable array with real as dimension index
  18977. MODULE Test;
  18978. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: REAL;
  18979. BEGIN result := LEN (array, dimension);
  18980. END Test.
  18981. negative: binary length of variable array with set as dimension index
  18982. MODULE Test;
  18983. VAR array: ARRAY 10 OF CHAR; result: LONGINT; dimension: SET;
  18984. BEGIN result := LEN (array, dimension);
  18985. END Test.
  18986. negative: binary length of variable array with constant string as dimension index
  18987. MODULE Test;
  18988. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18989. BEGIN result := LEN (array, "index");
  18990. END Test.
  18991. negative: binary length of variable array with nil pointer as dimension index
  18992. MODULE Test;
  18993. VAR array: ARRAY 10 OF CHAR; result: LONGINT;
  18994. BEGIN result := LEN (array, NIL);
  18995. END Test.
  18996. positive: binary length of two-dimensional variable array
  18997. MODULE Test;
  18998. CONST Length0 = LEN (array, 0); Length1 = LEN (array, 1)
  18999. VAR array: ARRAY 10, 20 OF CHAR; result: LONGINT;
  19000. BEGIN result := LEN (array, 0); ASSERT (Length0 = 10); ASSERT (Length1 = 20);
  19001. END Test.
  19002. positive: binary length of two-dimensional variable open array
  19003. MODULE Test;
  19004. PROCEDURE Procedure (array: ARRAY OF ARRAY OF CHAR);
  19005. VAR result: LONGINT;
  19006. BEGIN result := LEN (array, 0); result := LEN (array, 1);
  19007. END Procedure;
  19008. END Test.
  19009. negative: binary length of array as its size
  19010. MODULE Test;
  19011. VAR array: ARRAY LEN (array, 0), LEN (array, 1) OF CHAR;
  19012. END Test.
  19013. negative: indirect binary length of array as its size
  19014. MODULE Test;
  19015. CONST Length0 = LEN (array, 0); Length1 = LEN (array, 1)
  19016. VAR array: ARRAY Length0, Length1 OF CHAR;
  19017. END Test.
  19018. positive: binary length of array as size of another array
  19019. MODULE Test;
  19020. VAR a: ARRAY 10, 20 OF CHAR; b: ARRAY LEN (a, 0), LEN (a, 1) OF CHAR;
  19021. BEGIN a := b;
  19022. END Test.
  19023. positive: indirect binary array as size of another array
  19024. MODULE Test;
  19025. CONST Length0 = LEN (a, 0); Length1 = LEN (a, 1)
  19026. VAR a: ARRAY 10, 20 OF CHAR; b: ARRAY Length0, Length1 OF CHAR;
  19027. BEGIN a := b;
  19028. END Test.
  19029. positive: array length constants
  19030. MODULE Test;
  19031. CONST
  19032. ls1=LEN(s1,0);
  19033. ls20=LEN(s2,0);
  19034. ls21=LEN(s2,1);
  19035. lp1=LEN(p1);
  19036. lp20=LEN(p2,0);
  19037. lp21=LEN(p2,1);
  19038. lp31=LEN(p3,1);
  19039. lp32=LEN(p3,2);
  19040. VAR
  19041. s1: ARRAY 2 OF CHAR;
  19042. s2: ARRAY 2 OF ARRAY 12 OF CHAR;
  19043. p1: POINTER TO ARRAY 2 OF CHAR;
  19044. p2: POINTER TO ARRAY 2 OF ARRAY 12 OF CHAR;
  19045. p3: POINTER TO ARRAY OF ARRAY 2 OF ARRAY 12 OF CHAR;
  19046. BEGIN
  19047. ASSERT(ls1=2);
  19048. ASSERT(ls20=2);
  19049. ASSERT(ls21=12);
  19050. ASSERT(lp1=2);
  19051. ASSERT(lp20=2);
  19052. ASSERT(lp21=12);
  19053. ASSERT(lp31=2);
  19054. ASSERT(lp32=12);
  19055. END Test.
  19056. positive: binary length of variable open array
  19057. MODULE Test;
  19058. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19059. VAR result: LONGINT;
  19060. BEGIN result := LEN (array, 0);
  19061. END Procedure;
  19062. END Test.
  19063. negative: binary length of variable open array as short integer
  19064. MODULE Test;
  19065. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19066. VAR result: SHORTINT;
  19067. BEGIN result := LEN (array, 0);
  19068. END Procedure;
  19069. END Test.
  19070. negative: binary length of variable open array as integer
  19071. MODULE Test;
  19072. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19073. VAR result: INTEGER;
  19074. BEGIN result := LEN (array, 0);
  19075. END Procedure;
  19076. END Test.
  19077. positive: binary length of variable open array as long integer
  19078. MODULE Test;
  19079. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19080. VAR result: LONGINT;
  19081. BEGIN result := LEN (array);
  19082. END Procedure;
  19083. END Test.
  19084. positive: binary length of variable open array as huge integer
  19085. MODULE Test;
  19086. PROCEDURE Procedure (array: ARRAY OF CHAR);
  19087. VAR result: HUGEINT;
  19088. BEGIN result := LEN (array);
  19089. END Procedure;
  19090. END Test.
  19091. positive: indexing variable boolean array
  19092. MODULE Test;
  19093. VAR array: ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  19094. BEGIN result := array[0]
  19095. END Test.
  19096. positive: indexing temporary boolean array
  19097. MODULE Test;
  19098. VAR array: PROCEDURE (): ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  19099. BEGIN result := array()[0]
  19100. END Test.
  19101. negative: changing indexed temporary boolean array
  19102. MODULE Test;
  19103. VAR array: PROCEDURE (): ARRAY 10 OF BOOLEAN;
  19104. BEGIN array()[0] := TRUE;
  19105. END Test.
  19106. positive: indexing variable character array
  19107. MODULE Test;
  19108. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  19109. BEGIN result := array[0]
  19110. END Test.
  19111. positive: indexing temporary character array
  19112. MODULE Test;
  19113. VAR array: PROCEDURE (): ARRAY 10 OF CHAR; result: CHAR;
  19114. BEGIN result := array()[0]
  19115. END Test.
  19116. negative: changing indexed temporary character array
  19117. MODULE Test;
  19118. VAR array: PROCEDURE (): ARRAY 10 OF CHAR;
  19119. BEGIN array()[0] := '0';
  19120. END Test.
  19121. positive: indexing variable integer array
  19122. MODULE Test;
  19123. VAR array: ARRAY 10 OF INTEGER; result: INTEGER;
  19124. BEGIN result := array[0]
  19125. END Test.
  19126. positive: indexing temporary integer array
  19127. MODULE Test;
  19128. VAR array: PROCEDURE (): ARRAY 10 OF INTEGER; result: INTEGER;
  19129. BEGIN result := array()[0]
  19130. END Test.
  19131. negative: changing indexed temporary integer array
  19132. MODULE Test;
  19133. VAR array: PROCEDURE (): ARRAY 10 OF INTEGER;
  19134. BEGIN array()[0] := 5;
  19135. END Test.
  19136. positive: indexing variable real array
  19137. MODULE Test;
  19138. VAR array: ARRAY 10 OF REAL; result: REAL;
  19139. BEGIN result := array[0]
  19140. END Test.
  19141. positive: indexing temporary real array
  19142. MODULE Test;
  19143. VAR array: PROCEDURE (): ARRAY 10 OF REAL; result: REAL;
  19144. BEGIN result := array()[0]
  19145. END Test.
  19146. negative: changing indexed temporary real array
  19147. MODULE Test;
  19148. VAR array: PROCEDURE (): ARRAY 10 OF REAL;
  19149. BEGIN array()[0] := 5.0;
  19150. END Test.
  19151. positive: indexing variable set array
  19152. MODULE Test;
  19153. VAR array: ARRAY 10 OF SET; result: SET;
  19154. BEGIN result := array[0]
  19155. END Test.
  19156. positive: indexing temporary set array
  19157. MODULE Test;
  19158. VAR array: PROCEDURE (): ARRAY 10 OF SET; result: SET;
  19159. BEGIN result := array()[0]
  19160. END Test.
  19161. negative: changing indexed temporary set array
  19162. MODULE Test;
  19163. VAR array: PROCEDURE (): ARRAY 10 OF SET;
  19164. BEGIN array()[0] := {5};
  19165. END Test.
  19166. positive: indexing variable array of array
  19167. MODULE Test;
  19168. VAR array: ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  19169. BEGIN result := array[0]
  19170. END Test.
  19171. positive: indexing temporary array of array
  19172. MODULE Test;
  19173. VAR array: PROCEDURE (): ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  19174. BEGIN result := array()[0]
  19175. END Test.
  19176. negative: changing indexed temporary array of array
  19177. MODULE Test;
  19178. VAR array: PROCEDURE (): ARRAY 10 OF ARRAY 10 OF CHAR; value: ARRAY 10 OF CHAR;
  19179. BEGIN array()[0] := value;
  19180. END Test.
  19181. positive: indexing variable record array
  19182. MODULE Test;
  19183. TYPE Record = RECORD END;
  19184. VAR array: ARRAY 10 OF Record; result: Record;
  19185. BEGIN result := array[0]
  19186. END Test.
  19187. positive: indexing temporary record array
  19188. MODULE Test;
  19189. TYPE Record = RECORD END;
  19190. VAR array: PROCEDURE (): ARRAY 10 OF Record; result: Record;
  19191. BEGIN result := array()[0]
  19192. END Test.
  19193. negative: changing indexed temporary record array
  19194. MODULE Test;
  19195. TYPE Record = RECORD END;
  19196. VAR array: PROCEDURE (): ARRAY 10 OF Record; value: Record;
  19197. BEGIN array()[0] := value;
  19198. END Test.
  19199. negative: changing member of indexed temporary record array
  19200. MODULE Test;
  19201. TYPE Record = RECORD i: INTEGER END;
  19202. VAR array: PROCEDURE (): ARRAY 10 OF Record;
  19203. BEGIN array()[0].i := 5;
  19204. END Test.
  19205. positive: indexing variable object array
  19206. MODULE Test;
  19207. TYPE Object = OBJECT END Object;
  19208. VAR array: ARRAY 10 OF Object; result: Object;
  19209. BEGIN result := array[0]
  19210. END Test.
  19211. positive: indexing temporary object array
  19212. MODULE Test;
  19213. TYPE Object = OBJECT END Object;
  19214. VAR array: PROCEDURE (): ARRAY 10 OF Object; result: Object;
  19215. BEGIN result := array()[0]
  19216. END Test.
  19217. negative: changing indexed temporary object array
  19218. MODULE Test;
  19219. TYPE Object = OBJECT END Object;
  19220. VAR array: PROCEDURE (): ARRAY 10 OF Object; value: Object;
  19221. BEGIN array()[0] := value;
  19222. END Test.
  19223. positive: changing member of indexed temporary object array
  19224. MODULE Test;
  19225. TYPE Object = OBJECT VAR i: INTEGER END Object;
  19226. VAR array: PROCEDURE (): ARRAY 10 OF Object;
  19227. BEGIN array()[0].i := 5;
  19228. END Test.
  19229. positive: indexing variable base object array
  19230. MODULE Test;
  19231. VAR array: ARRAY 10 OF OBJECT; result: OBJECT;
  19232. BEGIN result := array[0]
  19233. END Test.
  19234. positive: indexing temporary base object array
  19235. MODULE Test;
  19236. VAR array: PROCEDURE (): ARRAY 10 OF OBJECT; result: OBJECT;
  19237. BEGIN result := array()[0]
  19238. END Test.
  19239. negative: changing indexed temporary base object array
  19240. MODULE Test;
  19241. VAR array: PROCEDURE (): ARRAY 10 OF OBJECT; value: OBJECT;
  19242. BEGIN array()[0] := value;
  19243. END Test.
  19244. positive: indexing variable pointer to array array
  19245. MODULE Test;
  19246. VAR array: ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  19247. BEGIN result := array[0]
  19248. END Test.
  19249. positive: indexing temporary pointer to array array
  19250. MODULE Test;
  19251. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  19252. BEGIN result := array()[0]
  19253. END Test.
  19254. negative: changing indexed temporary pointer to array array
  19255. MODULE Test;
  19256. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; value: POINTER TO ARRAY 10 OF CHAR;
  19257. BEGIN array()[0] := value;
  19258. END Test.
  19259. positive: changing element of indexed temporary pointer to array array
  19260. MODULE Test;
  19261. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR;
  19262. BEGIN array()[0][0] := 'f';
  19263. END Test.
  19264. positive: indexing variable array of pointer to record
  19265. MODULE Test;
  19266. TYPE Record = RECORD END;
  19267. VAR array: ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  19268. BEGIN result := array[0]
  19269. END Test.
  19270. positive: indexing temporary array of pointer to record
  19271. MODULE Test;
  19272. TYPE Record = RECORD END;
  19273. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  19274. BEGIN result := array()[0]
  19275. END Test.
  19276. negative: changing indexed temporary array of pointer to record
  19277. MODULE Test;
  19278. TYPE Record = RECORD END;
  19279. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO Record; value: POINTER TO Record;
  19280. BEGIN array()[0] := value;
  19281. END Test.
  19282. positive: changing element of indexed temporary array of pointer to record
  19283. MODULE Test;
  19284. VAR array: PROCEDURE (): ARRAY 10 OF POINTER TO RECORD i: INTEGER END;
  19285. BEGIN array()[0].i := 5;
  19286. END Test.
  19287. positive: indexing variable procedure array
  19288. MODULE Test;
  19289. VAR array: ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  19290. BEGIN result := array[0]
  19291. END Test.
  19292. positive: indexing temporary procedure array
  19293. MODULE Test;
  19294. VAR array: PROCEDURE (): ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  19295. BEGIN result := array()[0]
  19296. END Test.
  19297. negative: changing indexed temporary procedure array
  19298. MODULE Test;
  19299. VAR array: PROCEDURE (): ARRAY 10 OF PROCEDURE; value: PROCEDURE;
  19300. BEGIN array()[0] := value;
  19301. END Test.
  19302. negative: variable array as index
  19303. MODULE Test;
  19304. VAR array: ARRAY 10 OF CHAR; result: CHAR;
  19305. BEGIN result := array[array]
  19306. END Test.
  19307. negative: member selection on variable array
  19308. MODULE Test;
  19309. VAR array, result: ARRAY 10 OF CHAR;
  19310. BEGIN result := array.member
  19311. END Test.
  19312. negative: calling variable array
  19313. MODULE Test;
  19314. VAR array: ARRAY 10 OF CHAR;
  19315. BEGIN array
  19316. END Test.
  19317. # variable records
  19318. negative: arithmetic negation on variable record
  19319. MODULE Test;
  19320. VAR record, result: RECORD END;
  19321. BEGIN result := -record;
  19322. END Test.
  19323. negative: logical negation on variable record
  19324. MODULE Test;
  19325. VAR record, result: RECORD END;
  19326. BEGIN result := ~record;
  19327. END Test.
  19328. negative: dereferencing variable record
  19329. MODULE Test;
  19330. VAR record, result: RECORD END;
  19331. BEGIN result := record^;
  19332. END Test.
  19333. negative: addition on variable records
  19334. MODULE Test;
  19335. VAR record, result: RECORD END;
  19336. BEGIN result := record + record;
  19337. END Test.
  19338. negative: subtraction on variable records
  19339. MODULE Test;
  19340. VAR record, result: RECORD END;
  19341. BEGIN result := record - record
  19342. END Test.
  19343. negative: multiplication on variable records
  19344. MODULE Test;
  19345. VAR record, result: RECORD END;
  19346. BEGIN result := record * record
  19347. END Test.
  19348. negative: integer division on variable records
  19349. MODULE Test;
  19350. VAR record: RECORD END; result: INTEGER;
  19351. BEGIN result := record DIV record
  19352. END Test.
  19353. negative: real division on variable records
  19354. MODULE Test;
  19355. VAR record: RECORD END; result: REAL;
  19356. BEGIN result := record / record
  19357. END Test.
  19358. negative: modulo on variable records
  19359. MODULE Test;
  19360. VAR record: RECORD END; result: INTEGER;
  19361. BEGIN result := record MOD record
  19362. END Test.
  19363. negative: equal relation on variable records
  19364. MODULE Test;
  19365. VAR record: RECORD END; result: BOOLEAN;
  19366. BEGIN result := record = record
  19367. END Test.
  19368. negative: unequal relation on variable records
  19369. MODULE Test;
  19370. VAR record: RECORD END; result: BOOLEAN;
  19371. BEGIN result := record # record
  19372. END Test.
  19373. negative: less relation on variable records
  19374. MODULE Test;
  19375. VAR record: RECORD END; result: BOOLEAN;
  19376. BEGIN result := record < record
  19377. END Test.
  19378. negative: less or equal relation on variable records
  19379. MODULE Test;
  19380. VAR record: RECORD END; result: BOOLEAN;
  19381. BEGIN result := record <= record
  19382. END Test.
  19383. negative: greater relation on variable records
  19384. MODULE Test;
  19385. VAR record: RECORD END; result: BOOLEAN;
  19386. BEGIN result := record > record
  19387. END Test.
  19388. negative: greater or equal relation on variable records
  19389. MODULE Test;
  19390. VAR record: RECORD END; result: BOOLEAN;
  19391. BEGIN result := record >= record
  19392. END Test.
  19393. negative: set membership on variable records
  19394. MODULE Test;
  19395. VAR record: RECORD END; result: BOOLEAN;
  19396. BEGIN result := record IN record
  19397. END Test.
  19398. negative: type test on variable records
  19399. MODULE Test;
  19400. VAR record: RECORD END; result: BOOLEAN;
  19401. BEGIN result := record IS record
  19402. END Test.
  19403. negative: type test on variable record
  19404. MODULE Test;
  19405. VAR record: RECORD END; result: BOOLEAN;
  19406. BEGIN result := record IS RECORD END
  19407. END Test.
  19408. positive: type test on same record type
  19409. MODULE Test;
  19410. TYPE Type = RECORD END;
  19411. VAR record: Type; result: BOOLEAN;
  19412. BEGIN result := record IS Type
  19413. END Test.
  19414. positive: type test on extending record type
  19415. MODULE Test;
  19416. TYPE Record = RECORD END; Type = RECORD (Record) END;
  19417. VAR record: Record; result: BOOLEAN;
  19418. BEGIN result := record IS Type
  19419. END Test.
  19420. negative: type test on extended record type
  19421. MODULE Test;
  19422. TYPE Record = RECORD END; Type = Record;
  19423. VAR record: RECORD (Record) END; result: BOOLEAN;
  19424. BEGIN result := record IS Type
  19425. END Test.
  19426. negative: type test on incompatible record type
  19427. MODULE Test;
  19428. TYPE Type = RECORD END;
  19429. VAR record: RECORD END; result: BOOLEAN;
  19430. BEGIN result := record IS Type
  19431. END Test.
  19432. negative: type guard on variable records
  19433. MODULE Test;
  19434. PROCEDURE Procedure (VAR record, result: RECORD END);
  19435. BEGIN result := record(record)
  19436. END Procedure;
  19437. END Test.
  19438. negative: type guard on variable record
  19439. MODULE Test;
  19440. PROCEDURE Procedure (VAR record, result: RECORD END);
  19441. BEGIN result := record(RECORD END)
  19442. END Procedure;
  19443. END Test.
  19444. positive: type guard on same record type
  19445. MODULE Test;
  19446. TYPE Type = RECORD END;
  19447. PROCEDURE Procedure (VAR record, result: Type);
  19448. BEGIN result := record(Type)
  19449. END Procedure;
  19450. END Test.
  19451. positive: type guard on extending record type
  19452. MODULE Test;
  19453. TYPE Record = RECORD END; Type = RECORD (Record) END;
  19454. PROCEDURE Procedure (VAR record: Record; result: Type);
  19455. BEGIN result := record(Type)
  19456. END Procedure;
  19457. END Test.
  19458. negative: type guard on static extending record type
  19459. MODULE Test;
  19460. TYPE Record = RECORD END; Type = RECORD (Record) END;
  19461. VAR record: Record; result: Type;
  19462. BEGIN result := record(Type)
  19463. END Test.
  19464. negative: type guard on extended record type
  19465. MODULE Test;
  19466. TYPE Record = RECORD END; Type = Record;
  19467. PROCEDURE Procedure (VAR record: RECORD (Record) END; result: Type);
  19468. BEGIN result := record(Type)
  19469. END Procedure;
  19470. END Test.
  19471. negative: type guard on incompatible record type
  19472. MODULE Test;
  19473. TYPE Type = RECORD END;
  19474. PROCEDURE Procedure (VAR record: RECORD END; result: Type);
  19475. BEGIN result := record(Type)
  19476. END Procedure;
  19477. END Test.
  19478. negative: logical and on variable records
  19479. MODULE Test;
  19480. VAR record, result: RECORD END;
  19481. BEGIN result := record & record
  19482. END Test.
  19483. negative: logical or on variable records
  19484. MODULE Test;
  19485. VAR record, result: RECORD END;
  19486. BEGIN result := record OR record
  19487. END Test.
  19488. negative: ordinal value of variable record
  19489. MODULE Test;
  19490. VAR record: RECORD END; result: INTEGER;
  19491. BEGIN result := ORD (record)
  19492. END Test.
  19493. negative: character value of variable record
  19494. MODULE Test;
  19495. VAR record: RECORD END; result: CHAR;
  19496. BEGIN result := CHR (record)
  19497. END Test.
  19498. negative: absolute value of variable record
  19499. MODULE Test;
  19500. VAR record, result: RECORD END;
  19501. BEGIN result := ABS (record)
  19502. END Test.
  19503. negative: odd test on variable record
  19504. MODULE Test;
  19505. VAR record: RECORD END; result: BOOLEAN;
  19506. BEGIN result := ODD (record)
  19507. END Test.
  19508. negative: capital letter of variable record
  19509. MODULE Test;
  19510. VAR record: RECORD END; result: CHAR;
  19511. BEGIN result := CAP (record)
  19512. END Test.
  19513. negative: arithmetic shift of variable records
  19514. MODULE Test;
  19515. VAR record, result: RECORD END;
  19516. BEGIN result := ASH (record, record)
  19517. END Test.
  19518. negative: short on variable record
  19519. MODULE Test;
  19520. VAR record, result: RECORD END;
  19521. BEGIN result := SHORT (record)
  19522. END Test.
  19523. negative: long on variable record
  19524. MODULE Test;
  19525. VAR record, result: RECORD END;
  19526. BEGIN result := LONG (record)
  19527. END Test.
  19528. negative: entier on variable record
  19529. MODULE Test;
  19530. VAR record, result: RECORD END;
  19531. BEGIN result := ENTIER (record)
  19532. END Test.
  19533. negative: unary length of variable record
  19534. MODULE Test;
  19535. VAR record: RECORD END; result: LONGINT;
  19536. BEGIN result := LEN (record)
  19537. END Test.
  19538. negative: binary length of variable record
  19539. MODULE Test;
  19540. VAR record: RECORD END; result: LONGINT;
  19541. BEGIN result := LEN (record, 0)
  19542. END Test.
  19543. negative: indexing variable record
  19544. MODULE Test;
  19545. VAR record: RECORD END; result: CHAR;
  19546. BEGIN result := record[0]
  19547. END Test.
  19548. negative: variable record as index
  19549. MODULE Test;
  19550. VAR array: ARRAY 10 OF CHAR; result: CHAR; record: RECORD END;
  19551. BEGIN result := array[record]
  19552. END Test.
  19553. positive: member selection on variable record
  19554. MODULE Test;
  19555. VAR record: RECORD member: SET END; result: SET;
  19556. BEGIN result := record.member
  19557. END Test.
  19558. positive: member modification on variable record
  19559. MODULE Test;
  19560. VAR record: RECORD member: SET END; value: SET;
  19561. BEGIN record.member := value
  19562. END Test.
  19563. positive: member selection on temporary record
  19564. MODULE Test;
  19565. VAR record: PROCEDURE (): RECORD member: SET END; result: SET;
  19566. BEGIN result := record ().member
  19567. END Test.
  19568. negative: member modification on temporary record
  19569. MODULE Test;
  19570. VAR record: PROCEDURE (): RECORD member: SET END; value: SET;
  19571. BEGIN record ().member := value
  19572. END Test.
  19573. negative: calling variable record
  19574. MODULE Test;
  19575. VAR record: RECORD END;
  19576. BEGIN record
  19577. END Test.
  19578. # variable objects
  19579. negative: arithmetic negation on variable object
  19580. MODULE Test;
  19581. VAR object, result: OBJECT END;
  19582. BEGIN result := -object;
  19583. END Test.
  19584. negative: logical negation on variable object
  19585. MODULE Test;
  19586. VAR object, result: OBJECT END;
  19587. BEGIN result := ~object;
  19588. END Test.
  19589. negative: dereferencing variable object
  19590. MODULE Test;
  19591. VAR object, result: OBJECT END;
  19592. BEGIN result := object^;
  19593. END Test.
  19594. negative: addition on variable objects
  19595. MODULE Test;
  19596. VAR object, result: OBJECT END;
  19597. BEGIN result := object + object;
  19598. END Test.
  19599. negative: subtraction on variable objects
  19600. MODULE Test;
  19601. VAR object, result: OBJECT END;
  19602. BEGIN result := object - object
  19603. END Test.
  19604. negative: multiplication on variable objects
  19605. MODULE Test;
  19606. VAR object, result: OBJECT END;
  19607. BEGIN result := object * object
  19608. END Test.
  19609. negative: integer division on variable objects
  19610. MODULE Test;
  19611. VAR object: OBJECT END; result: INTEGER;
  19612. BEGIN result := object DIV object
  19613. END Test.
  19614. negative: real division on variable objects
  19615. MODULE Test;
  19616. VAR object: OBJECT END; result: REAL;
  19617. BEGIN result := object / object
  19618. END Test.
  19619. negative: modulo on variable objects
  19620. MODULE Test;
  19621. VAR object: OBJECT END; result: INTEGER;
  19622. BEGIN result := object MOD object
  19623. END Test.
  19624. positive: equal relation on variable objects
  19625. MODULE Test;
  19626. VAR object: OBJECT END; result: BOOLEAN;
  19627. BEGIN result := object = object
  19628. END Test.
  19629. positive: equal relation on compatible variable objects
  19630. MODULE Test;
  19631. TYPE Object = OBJECT END Object;
  19632. VAR object1: Object; object2: OBJECT (Object) END; result: BOOLEAN;
  19633. BEGIN result := (object1 = object1) OR (object2 = object1)
  19634. END Test.
  19635. negative: equal relation on incompatible variable objects
  19636. MODULE Test;
  19637. VAR object1: OBJECT END; object2: OBJECT END; result: BOOLEAN;
  19638. BEGIN result := (object1 = object1) OR (object2 = object1)
  19639. END Test.
  19640. positive: unequal relation on variable objects
  19641. MODULE Test;
  19642. VAR object: OBJECT END; result: BOOLEAN;
  19643. BEGIN result := object # object
  19644. END Test.
  19645. positive: unequal relation on compatible variable objects
  19646. MODULE Test;
  19647. TYPE Object = OBJECT END Object;
  19648. VAR object1: Object; object2: OBJECT (Object) END; result: BOOLEAN;
  19649. BEGIN result := (object1 # object1) OR (object2 # object1)
  19650. END Test.
  19651. negative: unequal relation on incompatible variable objects
  19652. MODULE Test;
  19653. VAR object1: OBJECT END; object2: OBJECT END; result: BOOLEAN;
  19654. BEGIN result := (object1 # object1) OR (object2 # object1)
  19655. END Test.
  19656. negative: less relation on variable objects
  19657. MODULE Test;
  19658. VAR object: OBJECT END; result: BOOLEAN;
  19659. BEGIN result := object < object
  19660. END Test.
  19661. negative: less or equal relation on variable objects
  19662. MODULE Test;
  19663. VAR object: OBJECT END; result: BOOLEAN;
  19664. BEGIN result := object <= object
  19665. END Test.
  19666. negative: greater relation on variable objects
  19667. MODULE Test;
  19668. VAR object: OBJECT END; result: BOOLEAN;
  19669. BEGIN result := object > object
  19670. END Test.
  19671. negative: greater or equal relation on variable objects
  19672. MODULE Test;
  19673. VAR object: OBJECT END; result: BOOLEAN;
  19674. BEGIN result := object >= object
  19675. END Test.
  19676. negative: set membership on variable objects
  19677. MODULE Test;
  19678. VAR object: OBJECT END; result: BOOLEAN;
  19679. BEGIN result := object IN object
  19680. END Test.
  19681. negative: type test on variable objects
  19682. MODULE Test;
  19683. VAR object: OBJECT END; result: BOOLEAN;
  19684. BEGIN result := object IS object
  19685. END Test.
  19686. negative: type test on variable object
  19687. MODULE Test;
  19688. VAR object: OBJECT END; result: BOOLEAN;
  19689. BEGIN result := object IS OBJECT;
  19690. END Test.
  19691. positive: type test on same object type
  19692. MODULE Test;
  19693. TYPE Type = OBJECT END Type;
  19694. VAR object: Type; result: BOOLEAN;
  19695. BEGIN result := object IS Type
  19696. END Test.
  19697. positive: type test on extending object type
  19698. MODULE Test;
  19699. TYPE Object = OBJECT END Object; Type = OBJECT (Object) END Type;
  19700. VAR object: Object; result: BOOLEAN;
  19701. BEGIN result := object IS Type
  19702. END Test.
  19703. negative: type test on extended object type
  19704. MODULE Test;
  19705. TYPE Object = OBJECT END Object; Type = Object;
  19706. VAR object: OBJECT (Object) END; result: BOOLEAN;
  19707. BEGIN result := object IS Type
  19708. END Test.
  19709. negative: type test on incompatible object type
  19710. MODULE Test;
  19711. TYPE Type = OBJECT END Type;
  19712. VAR object: OBJECT END; result: BOOLEAN;
  19713. BEGIN result := object IS Type
  19714. END Test.
  19715. positive: type test on self and same object type
  19716. MODULE Test;
  19717. TYPE Object = OBJECT
  19718. VAR result: BOOLEAN;
  19719. BEGIN result := SELF IS Type
  19720. END Object;
  19721. TYPE Type = Object;
  19722. END Test.
  19723. positive: type test on self and extending object type
  19724. MODULE Test;
  19725. TYPE Object = OBJECT
  19726. VAR result: BOOLEAN;
  19727. BEGIN result := SELF IS Type
  19728. END Object;
  19729. TYPE Type = OBJECT (Object) END Type;
  19730. END Test.
  19731. negative: type test on self and extended object type
  19732. MODULE Test;
  19733. TYPE Object = OBJECT (Type)
  19734. VAR result: BOOLEAN;
  19735. BEGIN result := SELF IS Type
  19736. END Object;
  19737. TYPE Type = OBJECT END Type;
  19738. END Test.
  19739. negative: type guard on variable objects
  19740. MODULE Test;
  19741. VAR object, result: OBJECT END;
  19742. BEGIN result := object(object)
  19743. END Test.
  19744. negative: type guard on variable object
  19745. MODULE Test;
  19746. TYPE Type = OBJECT;
  19747. VAR object, result: OBJECT END;
  19748. BEGIN result := object(Type)
  19749. END Test.
  19750. positive: type guard on same object type
  19751. MODULE Test;
  19752. TYPE Type = OBJECT END Type;
  19753. VAR object, result: Type;
  19754. BEGIN result := object(Type)
  19755. END Test.
  19756. positive: type guard on extending object type
  19757. MODULE Test;
  19758. TYPE Object = OBJECT END Object; Type = OBJECT (Object) END Type;
  19759. VAR object: Object; result: Type;
  19760. BEGIN result := object(Type)
  19761. END Test.
  19762. negative: type guard on extended object type
  19763. MODULE Test;
  19764. TYPE Object = OBJECT END Object; Type = Object;
  19765. VAR object: OBJECT (Object) END; result: Type;
  19766. BEGIN result := object(Type)
  19767. END Test.
  19768. negative: type guard on incompatible object type
  19769. MODULE Test;
  19770. TYPE Type = OBJECT END Type;
  19771. VAR object: OBJECT END; result: Type;
  19772. BEGIN result := object(Type)
  19773. END Test.
  19774. positive: type guard on self and same object type
  19775. MODULE Test;
  19776. TYPE Object = OBJECT
  19777. VAR result: Type;
  19778. BEGIN result := SELF(Type)
  19779. END Object;
  19780. TYPE Type = Object;
  19781. END Test.
  19782. positive: type guard on self and extending object type
  19783. MODULE Test;
  19784. TYPE Object = OBJECT
  19785. VAR result: Type;
  19786. BEGIN result := SELF(Type)
  19787. END Object;
  19788. TYPE Type = OBJECT (Object) END Type;
  19789. END Test.
  19790. negative: type guard on self and extended object type
  19791. MODULE Test;
  19792. TYPE Object = OBJECT (Type)
  19793. VAR result: Type;
  19794. BEGIN result := SELF(Type)
  19795. END Object;
  19796. TYPE Type = OBJECT END Type;
  19797. END Test.
  19798. negative: logical and on variable objects
  19799. MODULE Test;
  19800. VAR object, result: OBJECT END;
  19801. BEGIN result := object & object
  19802. END Test.
  19803. negative: logical or on variable objects
  19804. MODULE Test;
  19805. VAR object, result: OBJECT END;
  19806. BEGIN result := object OR object
  19807. END Test.
  19808. negative: ordinal value of variable object
  19809. MODULE Test;
  19810. VAR object: OBJECT END; result: INTEGER;
  19811. BEGIN result := ORD (object)
  19812. END Test.
  19813. negative: character value of variable object
  19814. MODULE Test;
  19815. VAR object: OBJECT END; result: CHAR;
  19816. BEGIN result := CHR (object)
  19817. END Test.
  19818. negative: absolute value of variable object
  19819. MODULE Test;
  19820. VAR object, result: OBJECT END;
  19821. BEGIN result := ABS (object)
  19822. END Test.
  19823. negative: odd test on variable object
  19824. MODULE Test;
  19825. VAR object: OBJECT END; result: BOOLEAN;
  19826. BEGIN result := ODD (object)
  19827. END Test.
  19828. negative: capital letter of variable object
  19829. MODULE Test;
  19830. VAR object: OBJECT END; result: CHAR;
  19831. BEGIN result := CAP (object)
  19832. END Test.
  19833. negative: arithmetic shift of variable objects
  19834. MODULE Test;
  19835. VAR object, result: OBJECT END;
  19836. BEGIN result := ASH (object, object)
  19837. END Test.
  19838. negative: short on variable object
  19839. MODULE Test;
  19840. VAR object, result: OBJECT END;
  19841. BEGIN result := SHORT (object)
  19842. END Test.
  19843. negative: long on variable object
  19844. MODULE Test;
  19845. VAR object, result: OBJECT END;
  19846. BEGIN result := LONG (object)
  19847. END Test.
  19848. negative: entier on variable object
  19849. MODULE Test;
  19850. VAR object, result: OBJECT END;
  19851. BEGIN result := ENTIER (object)
  19852. END Test.
  19853. negative: unary length of variable object
  19854. MODULE Test;
  19855. VAR object: OBJECT END; result: LONGINT;
  19856. BEGIN result := LEN (object)
  19857. END Test.
  19858. negative: binary length of variable object
  19859. MODULE Test;
  19860. VAR object: OBJECT END; result: LONGINT;
  19861. BEGIN result := LEN (object, 0)
  19862. END Test.
  19863. negative: indexing variable object
  19864. MODULE Test;
  19865. VAR object: OBJECT END; result: CHAR;
  19866. BEGIN result := object[0]
  19867. END Test.
  19868. negative: variable object as index
  19869. MODULE Test;
  19870. VAR array: ARRAY 10 OF CHAR; result: CHAR; object: OBJECT END;
  19871. BEGIN result := array[object]
  19872. END Test.
  19873. positive: member selection on variable object
  19874. MODULE Test;
  19875. VAR object: OBJECT VAR member: SET END; result: SET;
  19876. BEGIN result := object.member
  19877. END Test.
  19878. positive: member modification on variable object
  19879. MODULE Test;
  19880. VAR object: OBJECT VAR member: SET END; value: SET;
  19881. BEGIN object.member := value
  19882. END Test.
  19883. positive: member selection on temporary object
  19884. MODULE Test;
  19885. VAR object: PROCEDURE (): OBJECT VAR member: SET END; result: SET;
  19886. BEGIN result := object ().member
  19887. END Test.
  19888. positive: member modification on temporary object
  19889. MODULE Test;
  19890. VAR record: PROCEDURE (): OBJECT VAR member: SET END; value: SET;
  19891. BEGIN record ().member := value
  19892. END Test.
  19893. negative: calling variable object
  19894. MODULE Test;
  19895. VAR object: OBJECT END;
  19896. BEGIN object
  19897. END Test.
  19898. # variable base objects
  19899. negative: arithmetic negation on variable base object
  19900. MODULE Test;
  19901. VAR object, result: OBJECT;
  19902. BEGIN result := -object;
  19903. END Test.
  19904. negative: logical negation on variable base object
  19905. MODULE Test;
  19906. VAR object, result: OBJECT;
  19907. BEGIN result := ~object;
  19908. END Test.
  19909. negative: dereferencing variable base object
  19910. MODULE Test;
  19911. VAR object, result: OBJECT;
  19912. BEGIN result := object^;
  19913. END Test.
  19914. negative: addition on variable base objects
  19915. MODULE Test;
  19916. VAR object, result: OBJECT;
  19917. BEGIN result := object + object;
  19918. END Test.
  19919. negative: subtraction on variable base objects
  19920. MODULE Test;
  19921. VAR object, result: OBJECT;
  19922. BEGIN result := object - object
  19923. END Test.
  19924. negative: multiplication on variable base objects
  19925. MODULE Test;
  19926. VAR object, result: OBJECT;
  19927. BEGIN result := object * object
  19928. END Test.
  19929. negative: integer division on variable base objects
  19930. MODULE Test;
  19931. VAR object: OBJECT; result: INTEGER;
  19932. BEGIN result := object DIV object
  19933. END Test.
  19934. negative: real division on variable base objects
  19935. MODULE Test;
  19936. VAR object: OBJECT; result: REAL;
  19937. BEGIN result := object / object
  19938. END Test.
  19939. negative: modulo on variable base objects
  19940. MODULE Test;
  19941. VAR object: OBJECT; result: INTEGER;
  19942. BEGIN result := object MOD object
  19943. END Test.
  19944. positive: equal relation on variable base objects
  19945. MODULE Test;
  19946. VAR object: OBJECT; result: BOOLEAN;
  19947. BEGIN result := object = object
  19948. END Test.
  19949. positive: equal relation on compatible variable base objects
  19950. MODULE Test;
  19951. VAR object1: OBJECT; object2: OBJECT END; result: BOOLEAN;
  19952. BEGIN result := (object1 = object1) OR (object2 = object1)
  19953. END Test.
  19954. positive: unequal relation on variable base objects
  19955. MODULE Test;
  19956. VAR object: OBJECT; result: BOOLEAN;
  19957. BEGIN result := object # object
  19958. END Test.
  19959. positive: unequal relation on compatible variable base objects
  19960. MODULE Test;
  19961. VAR object1: OBJECT; object2: OBJECT END; result: BOOLEAN;
  19962. BEGIN result := (object1 # object1) OR (object2 # object1)
  19963. END Test.
  19964. negative: less relation on variable base objects
  19965. MODULE Test;
  19966. VAR object: OBJECT; result: BOOLEAN;
  19967. BEGIN result := object < object
  19968. END Test.
  19969. negative: less or equal relation on variable base objects
  19970. MODULE Test;
  19971. VAR object: OBJECT; result: BOOLEAN;
  19972. BEGIN result := object <= object
  19973. END Test.
  19974. negative: greater relation on variable base objects
  19975. MODULE Test;
  19976. VAR object: OBJECT; result: BOOLEAN;
  19977. BEGIN result := object > object
  19978. END Test.
  19979. negative: greater or equal relation on variable base objects
  19980. MODULE Test;
  19981. VAR object: OBJECT; result: BOOLEAN;
  19982. BEGIN result := object >= object
  19983. END Test.
  19984. negative: set membership on variable base objects
  19985. MODULE Test;
  19986. VAR object: OBJECT; result: BOOLEAN;
  19987. BEGIN result := object IN object
  19988. END Test.
  19989. negative: type test on variable base objects
  19990. MODULE Test;
  19991. VAR object: OBJECT; result: BOOLEAN;
  19992. BEGIN result := object IS object
  19993. END Test.
  19994. negative: type test on variable base object
  19995. MODULE Test;
  19996. VAR object: OBJECT; result: BOOLEAN;
  19997. BEGIN result := object IS OBJECT;
  19998. END Test.
  19999. positive: type test on base object type
  20000. MODULE Test;
  20001. TYPE Type = OBJECT;
  20002. VAR object: Type; result: BOOLEAN;
  20003. BEGIN result := object IS Type
  20004. END Test.
  20005. positive: type test on extending base object type
  20006. MODULE Test;
  20007. TYPE Type = OBJECT END Type;
  20008. VAR object: OBJECT; result: BOOLEAN;
  20009. BEGIN result := object IS Type
  20010. END Test.
  20011. negative: type test on extended base object type
  20012. MODULE Test;
  20013. TYPE Type = OBJECT;
  20014. VAR object: OBJECT END; result: BOOLEAN;
  20015. BEGIN result := object IS Type
  20016. END Test.
  20017. negative: type guard on variable base objects
  20018. MODULE Test;
  20019. VAR object, result: OBJECT;
  20020. BEGIN result := object(object)
  20021. END Test.
  20022. negative: type guard on variable base object
  20023. MODULE Test;
  20024. VAR object, result: OBJECT;
  20025. BEGIN result := object(OBJECT);
  20026. END Test.
  20027. positive: type guard on base object type
  20028. MODULE Test;
  20029. TYPE Type = OBJECT;
  20030. VAR object, result: Type;
  20031. BEGIN result := object(Type)
  20032. END Test.
  20033. positive: type guard on extending base object type
  20034. MODULE Test;
  20035. TYPE Type = OBJECT END Type;
  20036. VAR object: OBJECT; result: Type;
  20037. BEGIN result := object(Type)
  20038. END Test.
  20039. negative: type guard on extended base object type
  20040. MODULE Test;
  20041. TYPE Type = OBJECT;
  20042. VAR object: OBJECT END; result: Type;
  20043. BEGIN result := object(Type)
  20044. END Test.
  20045. negative: logical and on variable base objects
  20046. MODULE Test;
  20047. VAR object, result: OBJECT;
  20048. BEGIN result := object & object
  20049. END Test.
  20050. negative: logical or on variable base objects
  20051. MODULE Test;
  20052. VAR object, result: OBJECT;
  20053. BEGIN result := object OR object
  20054. END Test.
  20055. negative: ordinal value of variable base object
  20056. MODULE Test;
  20057. VAR object: OBJECT; result: INTEGER;
  20058. BEGIN result := ORD (object)
  20059. END Test.
  20060. negative: character value of variable base object
  20061. MODULE Test;
  20062. VAR object: OBJECT; result: CHAR;
  20063. BEGIN result := CHR (object)
  20064. END Test.
  20065. negative: absolute value of variable base object
  20066. MODULE Test;
  20067. VAR object, result: OBJECT;
  20068. BEGIN result := ABS (object)
  20069. END Test.
  20070. negative: odd test on variable base object
  20071. MODULE Test;
  20072. VAR object: OBJECT; result: BOOLEAN;
  20073. BEGIN result := ODD (object)
  20074. END Test.
  20075. negative: capital letter of variable base object
  20076. MODULE Test;
  20077. VAR object: OBJECT; result: CHAR;
  20078. BEGIN result := CAP (object)
  20079. END Test.
  20080. negative: arithmetic shift of variable base objects
  20081. MODULE Test;
  20082. VAR object, result: OBJECT;
  20083. BEGIN result := ASH (object, object)
  20084. END Test.
  20085. negative: short on variable base object
  20086. MODULE Test;
  20087. VAR object, result: OBJECT;
  20088. BEGIN result := SHORT (object)
  20089. END Test.
  20090. negative: long on variable base object
  20091. MODULE Test;
  20092. VAR object, result: OBJECT;
  20093. BEGIN result := LONG (object)
  20094. END Test.
  20095. negative: entier on variable base object
  20096. MODULE Test;
  20097. VAR object, result: OBJECT;
  20098. BEGIN result := ENTIER (object)
  20099. END Test.
  20100. negative: unary length of variable base object
  20101. MODULE Test;
  20102. VAR object: OBJECT; result: LONGINT;
  20103. BEGIN result := LEN (object)
  20104. END Test.
  20105. negative: binary length of variable base object
  20106. MODULE Test;
  20107. VAR object: OBJECT; result: LONGINT;
  20108. BEGIN result := LEN (object, 0)
  20109. END Test.
  20110. negative: indexing variable base object
  20111. MODULE Test;
  20112. VAR object: OBJECT; result: CHAR;
  20113. BEGIN result := object[0]
  20114. END Test.
  20115. negative: variable base object as index
  20116. MODULE Test;
  20117. VAR array: ARRAY 10 OF CHAR; result: CHAR; object: OBJECT;
  20118. BEGIN result := array[object]
  20119. END Test.
  20120. negative: member selection on variable base object
  20121. MODULE Test;
  20122. VAR object, result: OBJECT;
  20123. BEGIN result := object.member
  20124. END Test.
  20125. negative: calling variable base object
  20126. MODULE Test;
  20127. VAR object: OBJECT;
  20128. BEGIN object
  20129. END Test.
  20130. # variable pointers to record
  20131. negative: arithmetic negation on variable pointer to record
  20132. MODULE Test;
  20133. VAR pointer, result: POINTER TO RECORD END;
  20134. BEGIN result := -pointer;
  20135. END Test.
  20136. negative: logical negation on variable pointer to record
  20137. MODULE Test;
  20138. VAR pointer, result: POINTER TO RECORD END;
  20139. BEGIN result := ~pointer;
  20140. END Test.
  20141. positive: dereferencing variable pointer to record
  20142. MODULE Test;
  20143. TYPE Record = RECORD END;
  20144. VAR pointer: POINTER TO Record; result: Record;
  20145. BEGIN result := pointer^;
  20146. END Test.
  20147. negative: addition on variable pointers to record
  20148. MODULE Test;
  20149. VAR pointer, result: POINTER TO RECORD END;
  20150. BEGIN result := pointer + pointer;
  20151. END Test.
  20152. negative: subtraction on variable pointers to record
  20153. MODULE Test;
  20154. VAR pointer, result: POINTER TO RECORD END;
  20155. BEGIN result := pointer - pointer
  20156. END Test.
  20157. negative: multiplication on variable pointers to record
  20158. MODULE Test;
  20159. VAR pointer, result: POINTER TO RECORD END;
  20160. BEGIN result := pointer * pointer
  20161. END Test.
  20162. negative: integer division on variable pointers to record
  20163. MODULE Test;
  20164. VAR pointer: POINTER TO RECORD END; result: INTEGER;
  20165. BEGIN result := pointer DIV pointer
  20166. END Test.
  20167. negative: real division on variable pointers to record
  20168. MODULE Test;
  20169. VAR pointer: POINTER TO RECORD END; result: REAL;
  20170. BEGIN result := pointer / pointer
  20171. END Test.
  20172. negative: modulo on variable pointers to record
  20173. MODULE Test;
  20174. VAR pointer: POINTER TO RECORD END; result: INTEGER;
  20175. BEGIN result := pointer MOD pointer
  20176. END Test.
  20177. positive: equal relation on variable pointers to record
  20178. MODULE Test;
  20179. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20180. BEGIN result := pointer = pointer
  20181. END Test.
  20182. positive: equal relation on compatible variable pointers to record
  20183. MODULE Test;
  20184. TYPE Record = RECORD END;
  20185. VAR pointer1: POINTER TO Record; pointer2: POINTER TO RECORD (Record) END; result: BOOLEAN;
  20186. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20187. END Test.
  20188. negative: equal relation on incompatible variable pointers to record
  20189. MODULE Test;
  20190. VAR pointer1: POINTER TO RECORD END; pointer2: POINTER TO RECORD END; result: BOOLEAN;
  20191. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20192. END Test.
  20193. negative: equal relation on incompatible variable pointers to record and array
  20194. MODULE Test;
  20195. VAR pointer1: POINTER TO RECORD END; pointer2: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20196. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20197. END Test.
  20198. positive: unequal relation on variable pointers to record
  20199. MODULE Test;
  20200. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20201. BEGIN result := pointer # pointer
  20202. END Test.
  20203. positive: unequal relation on compatible variable pointers to record
  20204. MODULE Test;
  20205. TYPE Record = RECORD END;
  20206. VAR pointer1: POINTER TO Record; pointer2: POINTER TO RECORD (Record) END; result: BOOLEAN;
  20207. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20208. END Test.
  20209. negative: unequal relation on incompatible variable pointers to record
  20210. MODULE Test;
  20211. VAR pointer1: POINTER TO RECORD END; pointer2: POINTER TO RECORD END; result: BOOLEAN;
  20212. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20213. END Test.
  20214. negative: unequal relation on incompatible variable pointers to record and array
  20215. MODULE Test;
  20216. VAR pointer1: POINTER TO RECORD END; pointer2: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20217. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20218. END Test.
  20219. negative: less relation on variable pointers to record
  20220. MODULE Test;
  20221. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20222. BEGIN result := pointer < pointer
  20223. END Test.
  20224. negative: less or equal relation on variable pointers to record
  20225. MODULE Test;
  20226. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20227. BEGIN result := pointer <= pointer
  20228. END Test.
  20229. negative: greater relation on variable pointers to record
  20230. MODULE Test;
  20231. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20232. BEGIN result := pointer > pointer
  20233. END Test.
  20234. negative: greater or equal relation on variable pointers to record
  20235. MODULE Test;
  20236. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20237. BEGIN result := pointer >= pointer
  20238. END Test.
  20239. negative: set membership on variable pointers to record
  20240. MODULE Test;
  20241. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20242. BEGIN result := pointer IN pointer
  20243. END Test.
  20244. negative: type test on variable pointers to record
  20245. MODULE Test;
  20246. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20247. BEGIN result := pointer IS pointer
  20248. END Test.
  20249. negative: type test on variable pointer to record
  20250. MODULE Test;
  20251. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20252. BEGIN result := pointer IS POINTER TO RECORD END
  20253. END Test.
  20254. positive: type test on same pointer to record type
  20255. MODULE Test;
  20256. TYPE Type = POINTER TO RECORD END;
  20257. VAR pointer: Type; result: BOOLEAN;
  20258. BEGIN result := pointer IS Type
  20259. END Test.
  20260. positive: type test on extending pointer to record type
  20261. MODULE Test;
  20262. TYPE Record = RECORD END; Type = POINTER TO RECORD (Record) END;
  20263. VAR pointer: POINTER TO Record; result: BOOLEAN;
  20264. BEGIN result := pointer IS Type
  20265. END Test.
  20266. negative: type test on extended pointer to record type
  20267. MODULE Test;
  20268. TYPE Record = RECORD END; Type = POINTER TO Record;
  20269. VAR pointer: POINTER TO RECORD (Record) END; result: BOOLEAN;
  20270. BEGIN result := pointer IS Type
  20271. END Test.
  20272. negative: type test on incompatible pointer to record type
  20273. MODULE Test;
  20274. TYPE Type = POINTER TO RECORD END;
  20275. VAR record: POINTER TO RECORD END; result: BOOLEAN;
  20276. BEGIN result := record IS Type
  20277. END Test.
  20278. negative: type guard on variable pointers to record
  20279. MODULE Test;
  20280. VAR pointer, result: POINTER TO RECORD END;
  20281. BEGIN result := pointer(pointer)
  20282. END Test.
  20283. negative: type guard on variable pointer to record
  20284. MODULE Test;
  20285. VAR pointer, result: POINTER TO RECORD END;
  20286. BEGIN result := pointer(POINTER TO RECORD END)
  20287. END Test.
  20288. positive: type guard on same pointer to record type
  20289. MODULE Test;
  20290. TYPE Type = POINTER TO RECORD END;
  20291. VAR pointer, result: Type;
  20292. BEGIN result := pointer(Type)
  20293. END Test.
  20294. positive: type guard on extending pointer to record type
  20295. MODULE Test;
  20296. TYPE Record = RECORD END; Type = POINTER TO RECORD (Record) END;
  20297. VAR pointer: POINTER TO Record; result: Type;
  20298. BEGIN result := pointer(Type)
  20299. END Test.
  20300. negative: type guard on extended pointer to record type
  20301. MODULE Test;
  20302. TYPE Record = RECORD END; Type = POINTER TO Record;
  20303. VAR pointer: POINTER TO RECORD (Record) END; result: Type;
  20304. BEGIN result := pointer(Type)
  20305. END Test.
  20306. negative: type guard on incompatible pointer to record type
  20307. MODULE Test;
  20308. TYPE Type = POINTER TO RECORD END;
  20309. VAR record: POINTER TO RECORD END; result: Type;
  20310. BEGIN result := record(Type)
  20311. END Test.
  20312. negative: logical and on variable pointers to record
  20313. MODULE Test;
  20314. VAR pointer, result: POINTER TO RECORD END;
  20315. BEGIN result := pointer & pointer
  20316. END Test.
  20317. negative: logical or on variable pointers to record
  20318. MODULE Test;
  20319. VAR pointer, result: POINTER TO RECORD END;
  20320. BEGIN result := pointer OR pointer
  20321. END Test.
  20322. negative: ordinal value of variable pointer to record
  20323. MODULE Test;
  20324. VAR pointer: POINTER TO RECORD END; result: INTEGER;
  20325. BEGIN result := ORD (pointer)
  20326. END Test.
  20327. negative: character value of variable pointer to record
  20328. MODULE Test;
  20329. VAR pointer: POINTER TO RECORD END; result: CHAR;
  20330. BEGIN result := CHR (pointer)
  20331. END Test.
  20332. negative: absolute value of variable pointer to record
  20333. MODULE Test;
  20334. VAR pointer, result: POINTER TO RECORD END;
  20335. BEGIN result := ABS (pointer)
  20336. END Test.
  20337. negative: odd test on variable pointer to record
  20338. MODULE Test;
  20339. VAR pointer: POINTER TO RECORD END; result: BOOLEAN;
  20340. BEGIN result := ODD (pointer)
  20341. END Test.
  20342. negative: capital letter of variable pointer to record
  20343. MODULE Test;
  20344. VAR pointer: POINTER TO RECORD END; result: CHAR;
  20345. BEGIN result := CAP (pointer)
  20346. END Test.
  20347. negative: arithmetic shift of variable pointers to record
  20348. MODULE Test;
  20349. VAR pointer, result: POINTER TO RECORD END;
  20350. BEGIN result := ASH (pointer, pointer)
  20351. END Test.
  20352. negative: short on variable pointer to record
  20353. MODULE Test;
  20354. VAR pointer, result: POINTER TO RECORD END;
  20355. BEGIN result := SHORT (pointer)
  20356. END Test.
  20357. negative: long on variable pointer to record
  20358. MODULE Test;
  20359. VAR pointer, result: POINTER TO RECORD END;
  20360. BEGIN result := LONG (pointer)
  20361. END Test.
  20362. negative: entier on variable pointer to record
  20363. MODULE Test;
  20364. VAR pointer, result: POINTER TO RECORD END;
  20365. BEGIN result := ENTIER (pointer)
  20366. END Test.
  20367. negative: unary length of variable pointer to record
  20368. MODULE Test;
  20369. VAR pointer: POINTER TO RECORD END; result: LONGINT;
  20370. BEGIN result := LEN (pointer)
  20371. END Test.
  20372. negative: binary length of variable pointer to record
  20373. MODULE Test;
  20374. VAR pointer: POINTER TO RECORD END; result: LONGINT;
  20375. BEGIN result := LEN (pointer, 0)
  20376. END Test.
  20377. negative: indexing variable pointer to record
  20378. MODULE Test;
  20379. VAR pointer: POINTER TO RECORD END; result: CHAR;
  20380. BEGIN result := pointer[0]
  20381. END Test.
  20382. negative: variable pointer to record as index
  20383. MODULE Test;
  20384. VAR array: ARRAY 10 OF CHAR; result: CHAR; pointer: POINTER TO RECORD END;
  20385. BEGIN result := array[pointer]
  20386. END Test.
  20387. positive: member selection on variable pointer to record
  20388. MODULE Test;
  20389. VAR pointer: POINTER TO RECORD member: SET END; result: SET;
  20390. BEGIN result := pointer.member
  20391. END Test.
  20392. positive: member modification on variable pointer to record
  20393. MODULE Test;
  20394. VAR pointer: POINTER TO RECORD member: SET END; value: SET;
  20395. BEGIN pointer.member := value
  20396. END Test.
  20397. positive: member selection on temporary pointer to record
  20398. MODULE Test;
  20399. VAR pointer: PROCEDURE (): POINTER TO RECORD member: SET END; result: SET;
  20400. BEGIN result := pointer ().member
  20401. END Test.
  20402. positive: member modification on temporary pointer to record
  20403. MODULE Test;
  20404. VAR pointer: PROCEDURE (): POINTER TO RECORD member: SET END; value: SET;
  20405. BEGIN pointer ().member := value
  20406. END Test.
  20407. positive: member selection on dereferenced variable pointer to record
  20408. MODULE Test;
  20409. VAR pointer: POINTER TO RECORD member: SET END; result: SET;
  20410. BEGIN result := pointer^.member
  20411. END Test.
  20412. positive: member modification on dereferenced variable pointer to record
  20413. MODULE Test;
  20414. VAR pointer: POINTER TO RECORD member: SET END; value: SET;
  20415. BEGIN pointer^.member := value
  20416. END Test.
  20417. positive: member selection on dereferenced temporary pointer to record
  20418. MODULE Test;
  20419. VAR pointer: PROCEDURE (): POINTER TO RECORD member: SET END; result: SET;
  20420. BEGIN result := pointer ()^.member
  20421. END Test.
  20422. positive: member modification on dereferenced temporary pointer to record
  20423. MODULE Test;
  20424. VAR pointer: PROCEDURE (): POINTER TO RECORD member: SET END; value: SET;
  20425. BEGIN pointer ()^.member := value
  20426. END Test.
  20427. negative: calling variable pointer to record
  20428. MODULE Test;
  20429. VAR pointer: POINTER TO RECORD END;
  20430. BEGIN pointer
  20431. END Test.
  20432. # variable pointers to array
  20433. negative: arithmetic negation on variable pointer to array
  20434. MODULE Test;
  20435. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20436. BEGIN result := -pointer;
  20437. END Test.
  20438. negative: logical negation on variable pointer to array
  20439. MODULE Test;
  20440. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20441. BEGIN result := ~pointer;
  20442. END Test.
  20443. positive: dereferencing variable pointer to array
  20444. MODULE Test;
  20445. TYPE Array = ARRAY 10 OF CHAR;
  20446. VAR pointer: POINTER TO Array; result: Array;
  20447. BEGIN result := pointer^;
  20448. END Test.
  20449. negative: addition on variable pointers to array
  20450. MODULE Test;
  20451. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20452. BEGIN result := pointer + pointer;
  20453. END Test.
  20454. negative: subtraction on variable pointers to array
  20455. MODULE Test;
  20456. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20457. BEGIN result := pointer - pointer
  20458. END Test.
  20459. negative: multiplication on variable pointers to array
  20460. MODULE Test;
  20461. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20462. BEGIN result := pointer * pointer
  20463. END Test.
  20464. negative: integer division on variable pointers to array
  20465. MODULE Test;
  20466. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: INTEGER;
  20467. BEGIN result := pointer DIV pointer
  20468. END Test.
  20469. negative: real division on variable pointers to array
  20470. MODULE Test;
  20471. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: REAL;
  20472. BEGIN result := pointer / pointer
  20473. END Test.
  20474. negative: modulo on variable pointers to array
  20475. MODULE Test;
  20476. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: INTEGER;
  20477. BEGIN result := pointer MOD pointer
  20478. END Test.
  20479. positive: equal relation on variable pointers to array
  20480. MODULE Test;
  20481. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20482. BEGIN result := pointer = pointer
  20483. END Test.
  20484. positive: equal relation on compatible variable pointers to array
  20485. MODULE Test;
  20486. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20487. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20488. END Test.
  20489. negative: equal relation on incompatible variable pointers to array
  20490. MODULE Test;
  20491. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: POINTER TO ARRAY 20 OF CHAR; result: BOOLEAN;
  20492. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20493. END Test.
  20494. negative: equal relation on incompatible variable pointers to array and record
  20495. MODULE Test;
  20496. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: RECORD END; result: BOOLEAN;
  20497. BEGIN result := (pointer1 = pointer2) OR (pointer2 = pointer1)
  20498. END Test.
  20499. positive: unequal relation on variable pointers to array
  20500. MODULE Test;
  20501. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20502. BEGIN result := pointer # pointer
  20503. END Test.
  20504. positive: unequal relation on compatible variable pointers to array
  20505. MODULE Test;
  20506. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20507. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20508. END Test.
  20509. negative: unequal relation on incompatible variable pointers to array
  20510. MODULE Test;
  20511. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: POINTER TO ARRAY 20 OF CHAR; result: BOOLEAN;
  20512. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20513. END Test.
  20514. negative: unequal relation on incompatible variable pointers to array and record
  20515. MODULE Test;
  20516. VAR pointer1: POINTER TO ARRAY 10 OF CHAR; pointer2: RECORD END; result: BOOLEAN;
  20517. BEGIN result := (pointer1 # pointer2) OR (pointer2 # pointer1)
  20518. END Test.
  20519. negative: less relation on variable pointers to array
  20520. MODULE Test;
  20521. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20522. BEGIN result := pointer < pointer
  20523. END Test.
  20524. negative: less or equal relation on variable pointers to array
  20525. MODULE Test;
  20526. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20527. BEGIN result := pointer <= pointer
  20528. END Test.
  20529. negative: greater relation on variable pointers to array
  20530. MODULE Test;
  20531. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20532. BEGIN result := pointer > pointer
  20533. END Test.
  20534. negative: greater or equal relation on variable pointers to array
  20535. MODULE Test;
  20536. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20537. BEGIN result := pointer >= pointer
  20538. END Test.
  20539. negative: set membership on variable pointers to array
  20540. MODULE Test;
  20541. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20542. BEGIN result := pointer IN pointer
  20543. END Test.
  20544. negative: type test on variable pointers to array
  20545. MODULE Test;
  20546. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20547. BEGIN result := pointer IS pointer
  20548. END Test.
  20549. negative: type test on variable pointer to array
  20550. MODULE Test;
  20551. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20552. BEGIN result := pointer IS POINTER TO ARRAY 10 OF CHAR
  20553. END Test.
  20554. negative: type test on pointer to array type
  20555. MODULE Test;
  20556. TYPE Type = POINTER TO ARRAY 10 OF CHAR;
  20557. VAR pointer: Type; result: BOOLEAN;
  20558. BEGIN result := pointer IS Type
  20559. END Test.
  20560. negative: type guard on variable pointers to array
  20561. MODULE Test;
  20562. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20563. BEGIN result := pointer(pointer)
  20564. END Test.
  20565. negative: type guard on variable pointer to array
  20566. MODULE Test;
  20567. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20568. BEGIN result := pointer(POINTER TO ARRAY 10 OF CHAR)
  20569. END Test.
  20570. negative: type guard on pointer to array type
  20571. MODULE Test;
  20572. TYPE Type = POINTER TO ARRAY 10 OF CHAR;
  20573. VAR pointer: Type; result: Type;
  20574. BEGIN result := pointer(Type)
  20575. END Test.
  20576. negative: logical and on variable pointers to array
  20577. MODULE Test;
  20578. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20579. BEGIN result := pointer & pointer
  20580. END Test.
  20581. negative: logical or on variable pointers to array
  20582. MODULE Test;
  20583. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20584. BEGIN result := pointer OR pointer
  20585. END Test.
  20586. negative: ordinal value of variable pointer to array
  20587. MODULE Test;
  20588. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: INTEGER;
  20589. BEGIN result := ORD (pointer)
  20590. END Test.
  20591. negative: character value of variable pointer to array
  20592. MODULE Test;
  20593. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20594. BEGIN result := CHR (pointer)
  20595. END Test.
  20596. negative: absolute value of variable pointer to array
  20597. MODULE Test;
  20598. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20599. BEGIN result := ABS (pointer)
  20600. END Test.
  20601. negative: odd test on variable pointer to array
  20602. MODULE Test;
  20603. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: BOOLEAN;
  20604. BEGIN result := ODD (pointer)
  20605. END Test.
  20606. negative: capital letter of variable pointer to array
  20607. MODULE Test;
  20608. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20609. BEGIN result := CAP (pointer)
  20610. END Test.
  20611. negative: arithmetic shift of variable pointers to array
  20612. MODULE Test;
  20613. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20614. BEGIN result := ASH (pointer, pointer)
  20615. END Test.
  20616. negative: short on variable pointer to array
  20617. MODULE Test;
  20618. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20619. BEGIN result := SHORT (pointer)
  20620. END Test.
  20621. negative: long on variable pointer to array
  20622. MODULE Test;
  20623. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20624. BEGIN result := LONG (pointer)
  20625. END Test.
  20626. negative: entier on variable pointer to array
  20627. MODULE Test;
  20628. VAR pointer, result: POINTER TO ARRAY 10 OF CHAR;
  20629. BEGIN result := ENTIER (pointer)
  20630. END Test.
  20631. positive: unary length of variable pointer to array
  20632. MODULE Test;
  20633. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: LONGINT;
  20634. BEGIN result := LEN (pointer)
  20635. END Test.
  20636. positive: binary length of variable pointer to array
  20637. MODULE Test;
  20638. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: LONGINT;
  20639. BEGIN result := LEN (pointer, 0)
  20640. END Test.
  20641. positive: indexing variable pointer to boolean array
  20642. MODULE Test;
  20643. VAR array: POINTER TO ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  20644. BEGIN result := array[0]
  20645. END Test.
  20646. positive: indexing temporary pointer to boolean array
  20647. MODULE Test;
  20648. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  20649. BEGIN result := array()[0]
  20650. END Test.
  20651. positive: changing indexed temporary pointer to boolean array
  20652. MODULE Test;
  20653. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF BOOLEAN;
  20654. BEGIN array()[0] := TRUE;
  20655. END Test.
  20656. positive: indexing dereferenced variable pointer to boolean array
  20657. MODULE Test;
  20658. VAR array: POINTER TO ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  20659. BEGIN result := array^[0]
  20660. END Test.
  20661. positive: indexing dereferenced temporary pointer to boolean array
  20662. MODULE Test;
  20663. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF BOOLEAN; result: BOOLEAN;
  20664. BEGIN result := array()^[0]
  20665. END Test.
  20666. positive: changing dereferenced indexed temporary pointer to boolean array
  20667. MODULE Test;
  20668. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF BOOLEAN;
  20669. BEGIN array()^[0] := TRUE;
  20670. END Test.
  20671. positive: indexing variable pointer to character array
  20672. MODULE Test;
  20673. VAR array: POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20674. BEGIN result := array[0]
  20675. END Test.
  20676. positive: indexing temporary pointer to character array
  20677. MODULE Test;
  20678. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20679. BEGIN result := array()[0]
  20680. END Test.
  20681. positive: changing indexed temporary pointer to character array
  20682. MODULE Test;
  20683. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR;
  20684. BEGIN array()[0] := '0';
  20685. END Test.
  20686. positive: indexing dereferenced variable pointer to character array
  20687. MODULE Test;
  20688. VAR array: POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20689. BEGIN result := array^[0]
  20690. END Test.
  20691. positive: indexing dereferenced temporary pointer to character array
  20692. MODULE Test;
  20693. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR; result: CHAR;
  20694. BEGIN result := array()^[0]
  20695. END Test.
  20696. positive: changing dereferenced indexed temporary pointer to character array
  20697. MODULE Test;
  20698. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR;
  20699. BEGIN array()^[0] := '0';
  20700. END Test.
  20701. positive: indexing variable pointer to integer array
  20702. MODULE Test;
  20703. VAR array: POINTER TO ARRAY 10 OF INTEGER; result: INTEGER;
  20704. BEGIN result := array[0]
  20705. END Test.
  20706. positive: indexing temporary pointer to integer array
  20707. MODULE Test;
  20708. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF INTEGER; result: INTEGER;
  20709. BEGIN result := array()[0]
  20710. END Test.
  20711. positive: changing indexed temporary pointer to integer array
  20712. MODULE Test;
  20713. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF INTEGER;
  20714. BEGIN array()[0] := 5;
  20715. END Test.
  20716. positive: indexing dereferenced variable pointer to integer array
  20717. MODULE Test;
  20718. VAR array: POINTER TO ARRAY 10 OF INTEGER; result: INTEGER;
  20719. BEGIN result := array^[0]
  20720. END Test.
  20721. positive: indexing dereferenced temporary pointer to integer array
  20722. MODULE Test;
  20723. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF INTEGER; result: INTEGER;
  20724. BEGIN result := array()^[0]
  20725. END Test.
  20726. positive: changing dereferenced indexed temporary pointer to integer array
  20727. MODULE Test;
  20728. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF INTEGER;
  20729. BEGIN array()^[0] := 5;
  20730. END Test.
  20731. positive: indexing variable pointer to real array
  20732. MODULE Test;
  20733. VAR array: POINTER TO ARRAY 10 OF REAL; result: REAL;
  20734. BEGIN result := array[0]
  20735. END Test.
  20736. positive: indexing temporary pointer to real array
  20737. MODULE Test;
  20738. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF REAL; result: REAL;
  20739. BEGIN result := array()[0]
  20740. END Test.
  20741. positive: changing indexed temporary pointer to real array
  20742. MODULE Test;
  20743. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF REAL;
  20744. BEGIN array()[0] := 5.0;
  20745. END Test.
  20746. positive: indexing dereferenced variable pointer to real array
  20747. MODULE Test;
  20748. VAR array: POINTER TO ARRAY 10 OF REAL; result: REAL;
  20749. BEGIN result := array^[0]
  20750. END Test.
  20751. positive: indexing dereferenced temporary pointer to real array
  20752. MODULE Test;
  20753. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF REAL; result: REAL;
  20754. BEGIN result := array()^[0]
  20755. END Test.
  20756. positive: changing dereferenced indexed temporary pointer to real array
  20757. MODULE Test;
  20758. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF REAL;
  20759. BEGIN array()^[0] := 5.0;
  20760. END Test.
  20761. positive: indexing variable pointer to set array
  20762. MODULE Test;
  20763. VAR array: POINTER TO ARRAY 10 OF SET; result: SET;
  20764. BEGIN result := array[0]
  20765. END Test.
  20766. positive: indexing temporary pointer to set array
  20767. MODULE Test;
  20768. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF SET; result: SET;
  20769. BEGIN result := array()[0]
  20770. END Test.
  20771. positive: changing indexed temporary pointer to set array
  20772. MODULE Test;
  20773. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF SET;
  20774. BEGIN array()[0] := {5};
  20775. END Test.
  20776. positive: indexing dereferenced variable pointer to set array
  20777. MODULE Test;
  20778. VAR array: POINTER TO ARRAY 10 OF SET; result: SET;
  20779. BEGIN result := array^[0]
  20780. END Test.
  20781. positive: indexing dereferenced temporary pointer to set array
  20782. MODULE Test;
  20783. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF SET; result: SET;
  20784. BEGIN result := array()^[0]
  20785. END Test.
  20786. positive: changing dereferenced indexed temporary pointer to set array
  20787. MODULE Test;
  20788. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF SET;
  20789. BEGIN array()^[0] := {5};
  20790. END Test.
  20791. positive: indexing variable pointer to array of array
  20792. MODULE Test;
  20793. VAR array: POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  20794. BEGIN result := array[0]
  20795. END Test.
  20796. positive: indexing temporary pointer to array of array
  20797. MODULE Test;
  20798. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  20799. BEGIN result := array()[0]
  20800. END Test.
  20801. positive: changing indexed temporary pointer to array of array
  20802. MODULE Test;
  20803. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; value: ARRAY 10 OF CHAR;
  20804. BEGIN array()[0] := value;
  20805. END Test.
  20806. positive: indexing dereferenced variable pointer to array of array
  20807. MODULE Test;
  20808. VAR array: POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  20809. BEGIN result := array^[0]
  20810. END Test.
  20811. positive: indexing dereferenced temporary pointer to array of array
  20812. MODULE Test;
  20813. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  20814. BEGIN result := array()^[0]
  20815. END Test.
  20816. positive: changing dereferenced indexed temporary pointer to array of array
  20817. MODULE Test;
  20818. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF ARRAY 10 OF CHAR; value: ARRAY 10 OF CHAR;
  20819. BEGIN array()^[0] := value;
  20820. END Test.
  20821. positive: indexing variable pointer to record array
  20822. MODULE Test;
  20823. TYPE Record = RECORD END;
  20824. VAR array: POINTER TO ARRAY 10 OF Record; result: Record;
  20825. BEGIN result := array[0]
  20826. END Test.
  20827. positive: indexing temporary pointer to record array
  20828. MODULE Test;
  20829. TYPE Record = RECORD END;
  20830. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record; result: Record;
  20831. BEGIN result := array()[0]
  20832. END Test.
  20833. positive: changing indexed temporary pointer to record array
  20834. MODULE Test;
  20835. TYPE Record = RECORD END;
  20836. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record; value: Record;
  20837. BEGIN array()[0] := value;
  20838. END Test.
  20839. positive: changing member of indexed temporary pointer to record array
  20840. MODULE Test;
  20841. TYPE Record = RECORD i: INTEGER END;
  20842. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record;
  20843. BEGIN array()[0].i := 5;
  20844. END Test.
  20845. positive: indexing dereferenced variable pointer to array of record
  20846. MODULE Test;
  20847. TYPE Record = RECORD END;
  20848. VAR array: POINTER TO ARRAY 10 OF Record; result: Record;
  20849. BEGIN result := array^[0]
  20850. END Test.
  20851. positive: indexing dereferenced temporary pointer to array of record
  20852. MODULE Test;
  20853. TYPE Record = RECORD END;
  20854. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record; result: Record;
  20855. BEGIN result := array()^[0]
  20856. END Test.
  20857. positive: changing dereferenced indexed temporary pointer to array of record
  20858. MODULE Test;
  20859. TYPE Record = RECORD END;
  20860. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record; value: Record;
  20861. BEGIN array()^[0] := value;
  20862. END Test.
  20863. positive: changing member of dereferenced indexed temporary pointer to array of record
  20864. MODULE Test;
  20865. TYPE Record = RECORD i: INTEGER END;
  20866. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Record;
  20867. BEGIN array()^[0].i := 5;
  20868. END Test.
  20869. positive: indexing variable pointer to object array
  20870. MODULE Test;
  20871. TYPE Object = OBJECT END Object;
  20872. VAR array: POINTER TO ARRAY 10 OF Object; result: Object;
  20873. BEGIN result := array[0]
  20874. END Test.
  20875. positive: indexing temporary pointer to object array
  20876. MODULE Test;
  20877. TYPE Object = OBJECT END Object;
  20878. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object; result: Object;
  20879. BEGIN result := array()[0]
  20880. END Test.
  20881. positive: changing indexed temporary pointer to object array
  20882. MODULE Test;
  20883. TYPE Object = OBJECT END Object;
  20884. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object; value: Object;
  20885. BEGIN array()[0] := value;
  20886. END Test.
  20887. positive: changing member of indexed temporary pointer to object array
  20888. MODULE Test;
  20889. TYPE Object = OBJECT VAR i: INTEGER END Object;
  20890. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object;
  20891. BEGIN array()[0].i := 5;
  20892. END Test.
  20893. positive: indexing dereferenced variable pointer to object array
  20894. MODULE Test;
  20895. TYPE Object = OBJECT END Object;
  20896. VAR array: POINTER TO ARRAY 10 OF Object; result: Object;
  20897. BEGIN result := array^[0]
  20898. END Test.
  20899. positive: indexing dereferenced temporary pointer to object array
  20900. MODULE Test;
  20901. TYPE Object = OBJECT END Object;
  20902. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object; result: Object;
  20903. BEGIN result := array()^[0]
  20904. END Test.
  20905. positive: changing dereferenced indexed temporary pointer to object array
  20906. MODULE Test;
  20907. TYPE Object = OBJECT END Object;
  20908. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object; value: Object;
  20909. BEGIN array()^[0] := value;
  20910. END Test.
  20911. positive: changing member of dereferenced indexed temporary pointer to object array
  20912. MODULE Test;
  20913. TYPE Object = OBJECT VAR i: INTEGER END Object;
  20914. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF Object;
  20915. BEGIN array()^[0].i := 5;
  20916. END Test.
  20917. positive: indexing variable pointer to base object array
  20918. MODULE Test;
  20919. VAR array: POINTER TO ARRAY 10 OF OBJECT; result: OBJECT;
  20920. BEGIN result := array[0]
  20921. END Test.
  20922. positive: indexing temporary pointer to base object array
  20923. MODULE Test;
  20924. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF OBJECT; result: OBJECT;
  20925. BEGIN result := array()[0]
  20926. END Test.
  20927. positive: changing indexed temporary pointer to base object array
  20928. MODULE Test;
  20929. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF OBJECT; value: OBJECT;
  20930. BEGIN array()[0] := value;
  20931. END Test.
  20932. positive: indexing dereferenced variable pointer to base object array
  20933. MODULE Test;
  20934. VAR array: POINTER TO ARRAY 10 OF OBJECT; result: OBJECT;
  20935. BEGIN result := array^[0]
  20936. END Test.
  20937. positive: indexing dereferenced temporary pointer to base object array
  20938. MODULE Test;
  20939. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF OBJECT; result: OBJECT;
  20940. BEGIN result := array()^[0]
  20941. END Test.
  20942. positive: changing dereferenced indexed temporary pointer to base object array
  20943. MODULE Test;
  20944. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF OBJECT; value: OBJECT;
  20945. BEGIN array()^[0] := value;
  20946. END Test.
  20947. positive: indexing variable pointer to pointer to array array
  20948. MODULE Test;
  20949. VAR array: POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  20950. BEGIN result := array[0]
  20951. END Test.
  20952. positive: indexing temporary pointer to pointer to array array
  20953. MODULE Test;
  20954. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  20955. BEGIN result := array()[0]
  20956. END Test.
  20957. positive: changing indexed temporary pointer to pointer to array array
  20958. MODULE Test;
  20959. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; value: POINTER TO ARRAY 10 OF CHAR;
  20960. BEGIN array()[0] := value;
  20961. END Test.
  20962. positive: changing element of indexed temporary pointer to pointer to array array
  20963. MODULE Test;
  20964. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR;
  20965. BEGIN array()[0][0] := 'f';
  20966. END Test.
  20967. positive: indexing dereferenced variable pointer to pointer to array array
  20968. MODULE Test;
  20969. VAR array: POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  20970. BEGIN result := array^[0]
  20971. END Test.
  20972. positive: indexing dereferenced temporary pointer to pointer to array array
  20973. MODULE Test;
  20974. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; result: POINTER TO ARRAY 10 OF CHAR;
  20975. BEGIN result := array()^[0]
  20976. END Test.
  20977. positive: changing dereferenced indexed temporary pointer to pointer to array array
  20978. MODULE Test;
  20979. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR; value: POINTER TO ARRAY 10 OF CHAR;
  20980. BEGIN array()^[0] := value;
  20981. END Test.
  20982. positive: changing element of dereferenced indexed temporary pointer to pointer to array array
  20983. MODULE Test;
  20984. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO ARRAY 10 OF CHAR;
  20985. BEGIN array()^[0][0] := 'f';
  20986. END Test.
  20987. positive: indexing variable pointer to pointer to record array
  20988. MODULE Test;
  20989. TYPE Record = RECORD END;
  20990. VAR array: POINTER TO ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  20991. BEGIN result := array[0]
  20992. END Test.
  20993. positive: indexing temporary pointer to pointer to record array
  20994. MODULE Test;
  20995. TYPE Record = RECORD END;
  20996. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  20997. BEGIN result := array()[0]
  20998. END Test.
  20999. positive: changing indexed temporary pointer to pointer to record array
  21000. MODULE Test;
  21001. TYPE Record = RECORD END;
  21002. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO Record; value: POINTER TO Record;
  21003. BEGIN array()[0] := value;
  21004. END Test.
  21005. positive: changing element of indexed temporary pointer to pointer to record array
  21006. MODULE Test;
  21007. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO RECORD i: INTEGER END;
  21008. BEGIN array()[0].i := 5;
  21009. END Test.
  21010. positive: indexing dereferenced variable pointer to record array
  21011. MODULE Test;
  21012. TYPE Record = RECORD END;
  21013. VAR array: POINTER TO ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  21014. BEGIN result := array^[0]
  21015. END Test.
  21016. positive: indexing dereferenced temporary pointer to pointer to record array
  21017. MODULE Test;
  21018. TYPE Record = RECORD END;
  21019. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO Record; result: POINTER TO Record;
  21020. BEGIN result := array()^[0]
  21021. END Test.
  21022. positive: changing dereferenced indexed temporary pointer to pointer to record array
  21023. MODULE Test;
  21024. TYPE Record = RECORD END;
  21025. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO Record; value: POINTER TO Record;
  21026. BEGIN array()^[0] := value;
  21027. END Test.
  21028. positive: changing element of dereferenced indexed temporary pointer to pointer to record array
  21029. MODULE Test;
  21030. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF POINTER TO RECORD i: INTEGER END;
  21031. BEGIN array()^[0].i := 5;
  21032. END Test.
  21033. positive: indexing variable pointer to procedure array
  21034. MODULE Test;
  21035. VAR array: POINTER TO ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  21036. BEGIN result := array[0]
  21037. END Test.
  21038. positive: indexing temporary pointer to procedure array
  21039. MODULE Test;
  21040. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  21041. BEGIN result := array()[0]
  21042. END Test.
  21043. positive: changing indexed temporary pointer to procedure array
  21044. MODULE Test;
  21045. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF PROCEDURE; value: PROCEDURE;
  21046. BEGIN array()[0] := value;
  21047. END Test.
  21048. positive: indexing dereferenced variable pointer to procedure array
  21049. MODULE Test;
  21050. VAR array: POINTER TO ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  21051. BEGIN result := array^[0]
  21052. END Test.
  21053. positive: indexing dereferenced temporary pointer to procedure array
  21054. MODULE Test;
  21055. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF PROCEDURE; result: PROCEDURE;
  21056. BEGIN result := array()^[0]
  21057. END Test.
  21058. positive: changing dereferenced indexed temporary pointer to procedure array
  21059. MODULE Test;
  21060. VAR array: PROCEDURE (): POINTER TO ARRAY 10 OF PROCEDURE; value: PROCEDURE;
  21061. BEGIN array()^[0] := value;
  21062. END Test.
  21063. negative: variable pointer to array as index
  21064. MODULE Test;
  21065. VAR array: ARRAY 10 OF CHAR; result: CHAR; pointer: POINTER TO ARRAY 10 OF CHAR;
  21066. BEGIN result := array[pointer]
  21067. END Test.
  21068. negative: member selection on variable pointer to array
  21069. MODULE Test;
  21070. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  21071. BEGIN result := pointer.member
  21072. END Test.
  21073. negative: member selection on dereferenced variable pointer to array
  21074. MODULE Test;
  21075. VAR pointer: POINTER TO ARRAY 10 OF CHAR; result: ARRAY 10 OF CHAR;
  21076. BEGIN result := pointer^.member
  21077. END Test.
  21078. negative: calling variable pointer to array
  21079. MODULE Test;
  21080. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  21081. BEGIN pointer
  21082. END Test.
  21083. # variable procedures
  21084. negative: arithmetic negation on variable procedure
  21085. MODULE Test;
  21086. VAR procedure, result: PROCEDURE;
  21087. BEGIN result := -procedure;
  21088. END Test.
  21089. negative: logical negation on variable procedure
  21090. MODULE Test;
  21091. VAR procedure, result: PROCEDURE;
  21092. BEGIN result := ~procedure;
  21093. END Test.
  21094. negative: dereferencing variable pointer to procedure
  21095. MODULE Test;
  21096. VAR procedure, result: PROCEDURE;
  21097. BEGIN result := procedure^;
  21098. END Test.
  21099. negative: addition on variable procedures
  21100. MODULE Test;
  21101. VAR procedure, result: PROCEDURE;
  21102. BEGIN result := procedure + procedure;
  21103. END Test.
  21104. negative: subtraction on variable procedures
  21105. MODULE Test;
  21106. VAR procedure, result: PROCEDURE;
  21107. BEGIN result := procedure - procedure
  21108. END Test.
  21109. negative: multiplication on variable procedures
  21110. MODULE Test;
  21111. VAR procedure, result: PROCEDURE;
  21112. BEGIN result := procedure * procedure
  21113. END Test.
  21114. negative: integer division on variable procedures
  21115. MODULE Test;
  21116. VAR procedure: PROCEDURE; result: INTEGER;
  21117. BEGIN result := procedure DIV procedure
  21118. END Test.
  21119. negative: real division on variable procedures
  21120. MODULE Test;
  21121. VAR procedure: PROCEDURE; result: REAL;
  21122. BEGIN result := procedure / procedure
  21123. END Test.
  21124. negative: modulo on variable procedures
  21125. MODULE Test;
  21126. VAR procedure: PROCEDURE; result: INTEGER;
  21127. BEGIN result := procedure MOD procedure
  21128. END Test.
  21129. positive: equal relation on variable procedures
  21130. MODULE Test;
  21131. VAR procedure: PROCEDURE; result: BOOLEAN;
  21132. BEGIN result := procedure = procedure
  21133. END Test.
  21134. positive: equal relation on compatible variable procedures
  21135. MODULE Test;
  21136. VAR procedure1: PROCEDURE; procedure2: PROCEDURE; result: BOOLEAN;
  21137. BEGIN result := (procedure1 = procedure2) OR (procedure2 = procedure1)
  21138. END Test.
  21139. negative: equal relation on incompatible variable procedures
  21140. MODULE Test;
  21141. VAR procedure1: PROCEDURE; procedure2: PROCEDURE (p: PROCEDURE); result: BOOLEAN;
  21142. BEGIN result := (procedure1 = procedure2) OR (procedure2 = procedure1)
  21143. END Test.
  21144. positive: unequal relation on variable procedures
  21145. MODULE Test;
  21146. VAR procedure: PROCEDURE; result: BOOLEAN;
  21147. BEGIN result := procedure # procedure
  21148. END Test.
  21149. positive: unequal relation on compatible variable procedures
  21150. MODULE Test;
  21151. VAR procedure1: PROCEDURE; procedure2: PROCEDURE; result: BOOLEAN;
  21152. BEGIN result := (procedure1 # procedure2) OR (procedure2 # procedure1)
  21153. END Test.
  21154. negative: unequal relation on incompatible variable procedures
  21155. MODULE Test;
  21156. VAR procedure1: PROCEDURE; procedure2: PROCEDURE (p: PROCEDURE); result: BOOLEAN;
  21157. BEGIN result := (procedure1 # procedure2) OR (procedure2 # procedure1)
  21158. END Test.
  21159. negative: less relation on variable procedures
  21160. MODULE Test;
  21161. VAR procedure: PROCEDURE; result: BOOLEAN;
  21162. BEGIN result := procedure < procedure
  21163. END Test.
  21164. negative: less or equal relation on variable procedures
  21165. MODULE Test;
  21166. VAR procedure: PROCEDURE; result: BOOLEAN;
  21167. BEGIN result := procedure <= procedure
  21168. END Test.
  21169. negative: greater relation on variable procedures
  21170. MODULE Test;
  21171. VAR procedure: PROCEDURE; result: BOOLEAN;
  21172. BEGIN result := procedure > procedure
  21173. END Test.
  21174. negative: greater or equal relation on variable procedures
  21175. MODULE Test;
  21176. VAR procedure: PROCEDURE; result: BOOLEAN;
  21177. BEGIN result := procedure >= procedure
  21178. END Test.
  21179. negative: set membership on variable procedures
  21180. MODULE Test;
  21181. VAR procedure: PROCEDURE; result: BOOLEAN;
  21182. BEGIN result := procedure IN procedure
  21183. END Test.
  21184. negative: type test on variable procedures
  21185. MODULE Test;
  21186. VAR procedure: PROCEDURE; result: BOOLEAN;
  21187. BEGIN result := procedure IS procedure
  21188. END Test.
  21189. negative: type test on variable procedure
  21190. MODULE Test;
  21191. VAR procedure: PROCEDURE; result: BOOLEAN;
  21192. BEGIN result := procedure IS PROCEDURE
  21193. END Test.
  21194. negative: type test on pointer to procedure type
  21195. MODULE Test;
  21196. TYPE Type = PROCEDURE;
  21197. VAR procedure: Type; result: BOOLEAN;
  21198. BEGIN result := procedure IS Type
  21199. END Test.
  21200. negative: type guard on variable procedures
  21201. MODULE Test;
  21202. VAR procedure, result: PROCEDURE;
  21203. BEGIN result := procedure(procedure)
  21204. END Test.
  21205. negative: type guard on variable procedure
  21206. MODULE Test;
  21207. VAR procedure, result: PROCEDURE;
  21208. BEGIN result := procedure(PROCEDURE)
  21209. END Test.
  21210. negative: type guard on pointer to procedure type
  21211. MODULE Test;
  21212. TYPE Type = PROCEDURE;
  21213. VAR procedure: Type; result: Type;
  21214. BEGIN result := procedure(Type)
  21215. END Test.
  21216. negative: logical and on variable procedures
  21217. MODULE Test;
  21218. VAR procedure, result: PROCEDURE;
  21219. BEGIN result := procedure & procedure
  21220. END Test.
  21221. negative: logical or on variable procedures
  21222. MODULE Test;
  21223. VAR procedure, result: PROCEDURE;
  21224. BEGIN result := procedure OR procedure
  21225. END Test.
  21226. negative: ordinal value of variable procedure
  21227. MODULE Test;
  21228. VAR procedure: PROCEDURE; result: INTEGER;
  21229. BEGIN result := ORD (procedure)
  21230. END Test.
  21231. negative: character value of variable procedure
  21232. MODULE Test;
  21233. VAR procedure: PROCEDURE; result: CHAR;
  21234. BEGIN result := CHR (procedure)
  21235. END Test.
  21236. negative: absolute value of variable procedure
  21237. MODULE Test;
  21238. VAR procedure, result: PROCEDURE;
  21239. BEGIN result := ABS (procedure)
  21240. END Test.
  21241. negative: odd test on variable procedure
  21242. MODULE Test;
  21243. VAR procedure: PROCEDURE; result: BOOLEAN;
  21244. BEGIN result := ODD (procedure)
  21245. END Test.
  21246. negative: capital letter of variable procedure
  21247. MODULE Test;
  21248. VAR procedure: PROCEDURE; result: CHAR;
  21249. BEGIN result := CAP (procedure)
  21250. END Test.
  21251. negative: arithmetic shift of variable procedures
  21252. MODULE Test;
  21253. VAR procedure, result: PROCEDURE;
  21254. BEGIN result := ASH (procedure, procedure)
  21255. END Test.
  21256. negative: short on variable procedure
  21257. MODULE Test;
  21258. VAR procedure, result: PROCEDURE;
  21259. BEGIN result := SHORT (procedure)
  21260. END Test.
  21261. negative: long on variable procedure
  21262. MODULE Test;
  21263. VAR procedure, result: PROCEDURE;
  21264. BEGIN result := LONG (procedure)
  21265. END Test.
  21266. negative: entier on variable procedure
  21267. MODULE Test;
  21268. VAR procedure, result: PROCEDURE;
  21269. BEGIN result := ENTIER (procedure)
  21270. END Test.
  21271. negative: unary length of variable procedure
  21272. MODULE Test;
  21273. VAR procedure: PROCEDURE; result: LONGINT;
  21274. BEGIN result := LEN (procedure)
  21275. END Test.
  21276. negative: binary length of variable procedure
  21277. MODULE Test;
  21278. VAR procedure: PROCEDURE; result: LONGINT;
  21279. BEGIN result := LEN (procedure, 0)
  21280. END Test.
  21281. negative: indexing variable procedure
  21282. MODULE Test;
  21283. VAR procedure: PROCEDURE; result: CHAR;
  21284. BEGIN result := procedure[0]
  21285. END Test.
  21286. negative: variable procedure as index
  21287. MODULE Test;
  21288. VAR array: ARRAY 10 OF CHAR; result: CHAR; procedure: PROCEDURE;
  21289. BEGIN result := array[procedure]
  21290. END Test.
  21291. positive: calling variable procedure
  21292. MODULE Test;
  21293. VAR procedure: PROCEDURE;
  21294. BEGIN procedure
  21295. END Test.
  21296. negative: calling variable procedure returning boolean
  21297. MODULE Test;
  21298. VAR procedure: PROCEDURE (): BOOLEAN;
  21299. BEGIN procedure
  21300. END Test.
  21301. negative: calling variable procedure returning character
  21302. MODULE Test;
  21303. VAR procedure: PROCEDURE (): CHAR;
  21304. BEGIN procedure
  21305. END Test.
  21306. negative: calling variable procedure returning integer
  21307. MODULE Test;
  21308. VAR procedure: PROCEDURE (): INTEGER;
  21309. BEGIN procedure
  21310. END Test.
  21311. negative: calling variable procedure returning real
  21312. MODULE Test;
  21313. VAR procedure: PROCEDURE (): REAL;
  21314. BEGIN procedure
  21315. END Test.
  21316. negative: calling variable procedure returning set
  21317. MODULE Test;
  21318. VAR procedure: PROCEDURE (): SET;
  21319. BEGIN procedure
  21320. END Test.
  21321. negative: calling variable procedure returning array
  21322. MODULE Test;
  21323. VAR procedure: PROCEDURE (): ARRAY 10 OF CHAR;
  21324. BEGIN procedure
  21325. END Test.
  21326. negative: calling variable procedure returning record
  21327. MODULE Test;
  21328. VAR procedure: PROCEDURE (): RECORD END;
  21329. BEGIN procedure
  21330. END Test.
  21331. negative: calling variable procedure returning object
  21332. MODULE Test;
  21333. VAR procedure: PROCEDURE (): OBJECT END;
  21334. BEGIN procedure
  21335. END Test.
  21336. negative: calling variable procedure returning base object
  21337. MODULE Test;
  21338. VAR procedure: PROCEDURE (): OBJECT;
  21339. BEGIN procedure
  21340. END Test.
  21341. negative: calling variable procedure returning pointer to array
  21342. MODULE Test;
  21343. VAR procedure: PROCEDURE (): POINTER TO ARRAY 10 OF CHAR;
  21344. BEGIN procedure
  21345. END Test.
  21346. negative: calling variable procedure returning pointer to record
  21347. MODULE Test;
  21348. VAR procedure: PROCEDURE (): POINTER TO ARRAY 10 OF RECORD END;
  21349. BEGIN procedure
  21350. END Test.
  21351. negative: calling variable procedure returning procedure
  21352. MODULE Test;
  21353. VAR procedure: PROCEDURE (): PROCEDURE;
  21354. BEGIN procedure
  21355. END Test.
  21356. # implicit variable conversions
  21357. positive: implicit variable short to integer conversion
  21358. MODULE Test;
  21359. VAR shortint: SHORTINT; integer, result: INTEGER;
  21360. BEGIN result := shortint + integer
  21361. END Test.
  21362. positive: implicit variable short to long integer conversion
  21363. MODULE Test;
  21364. VAR shortint: SHORTINT; longint, result: LONGINT;
  21365. BEGIN result := shortint * longint
  21366. END Test.
  21367. positive: implicit variable short to huge integer conversion
  21368. MODULE Test;
  21369. VAR shortint: SHORTINT; hugeint, result: HUGEINT;
  21370. BEGIN result := hugeint DIV shortint
  21371. END Test.
  21372. positive: implicit variable integer to long integer conversion
  21373. MODULE Test;
  21374. VAR integer: INTEGER; longint, result: LONGINT;
  21375. BEGIN result := integer - longint
  21376. END Test.
  21377. positive: implicit variable integer to huge integer conversion
  21378. MODULE Test;
  21379. VAR integer: INTEGER; hugeint, result: HUGEINT;
  21380. BEGIN result := integer * hugeint
  21381. END Test.
  21382. positive: implicit variable long to huge integer conversion
  21383. MODULE Test;
  21384. VAR longint: INTEGER; hugeint, result: HUGEINT;
  21385. BEGIN result := hugeint + longint
  21386. END Test.
  21387. positive: implicit variable integer to real conversion
  21388. MODULE Test;
  21389. VAR integer: INTEGER; real, result: REAL;
  21390. BEGIN result := real + integer
  21391. END Test.
  21392. positive: implicit variable integer to long real conversion
  21393. MODULE Test;
  21394. VAR integer: INTEGER; longreal, result: LONGREAL;
  21395. BEGIN result := integer / longreal
  21396. END Test.
  21397. positive: implicit variable real to long real conversion
  21398. MODULE Test;
  21399. VAR real: REAL; longreal, result: LONGREAL;
  21400. BEGIN result := longreal * real
  21401. END Test.
  21402. negative: implicit conversion between variable boolean and character
  21403. MODULE Test;
  21404. VAR boolean, result: BOOLEAN; character: CHAR;
  21405. BEGIN result := boolean = character
  21406. END Test.
  21407. negative: implicit conversion between variable boolean and integer
  21408. MODULE Test;
  21409. VAR boolean, result: BOOLEAN; integer: INTEGER;
  21410. BEGIN result := boolean # integer
  21411. END Test.
  21412. negative: implicit conversion between variable boolean and real
  21413. MODULE Test;
  21414. VAR boolean, result: BOOLEAN; real: REAL;
  21415. BEGIN result := boolean = real
  21416. END Test.
  21417. negative: implicit conversion between variable boolean and set
  21418. MODULE Test;
  21419. VAR boolean, result: BOOLEAN; set: SET;
  21420. BEGIN result := boolean = set
  21421. END Test.
  21422. negative: implicit conversion between variable character and integer
  21423. MODULE Test;
  21424. VAR character: CHAR; integer: INTEGER; result: BOOLEAN;
  21425. BEGIN result := character # integer
  21426. END Test.
  21427. negative: implicit conversion between variable character and real
  21428. MODULE Test;
  21429. VAR character: CHAR; real: REAL; result: BOOLEAN;
  21430. BEGIN result := 't' # real
  21431. END Test.
  21432. negative: implicit conversion between variable character and set
  21433. MODULE Test;
  21434. VAR character: CHAR; set: SET; result: BOOLEAN;
  21435. BEGIN result := character = set
  21436. END Test.
  21437. positive: implicit conversion between variable integer and real
  21438. MODULE Test;
  21439. VAR integer: INTEGER; real: REAL; result: BOOLEAN;
  21440. BEGIN result := integer # real
  21441. END Test.
  21442. negative: implicit conversion between variable integer and set
  21443. MODULE Test;
  21444. VAR integer: INTEGER; set: SET; result: BOOLEAN;
  21445. BEGIN result := integer = set
  21446. END Test.
  21447. negative: implicit conversion between variable real and set
  21448. MODULE Test;
  21449. VAR real: REAL; set: SET; result: BOOLEAN;
  21450. BEGIN result := real = set
  21451. END Test.
  21452. # explicit variable conversions
  21453. negative: explicit long conversion on variable short integer
  21454. MODULE Test;
  21455. VAR shortint: SHORTINT;
  21456. BEGIN shortint := LONG (shortint);
  21457. END Test.
  21458. negative: explicit short conversion on variable short integer
  21459. MODULE Test;
  21460. VAR shortint: SHORTINT;
  21461. BEGIN shortint := SHORT (shortint);
  21462. END Test.
  21463. negative: explicit long conversion on variable integer
  21464. MODULE Test;
  21465. VAR integer: INTEGER;
  21466. BEGIN integer := LONG (integer);
  21467. END Test.
  21468. positive: explicit short conversion on variable integer
  21469. MODULE Test;
  21470. VAR integer: INTEGER;
  21471. BEGIN integer := SHORT (integer);
  21472. END Test.
  21473. negative: explicit long conversion on variable long integer
  21474. MODULE Test;
  21475. VAR longint: LONGINT;
  21476. BEGIN longint := LONG (longint);
  21477. END Test.
  21478. positive: explicit short conversion on variable long integer
  21479. MODULE Test;
  21480. VAR longint: LONGINT;
  21481. BEGIN longint := SHORT (longint);
  21482. END Test.
  21483. negative: explicit long conversion on variable huge integer
  21484. MODULE Test;
  21485. VAR hugeint: HUGEINT;
  21486. BEGIN hugeint := LONG (hugeint);
  21487. END Test.
  21488. positive: explicit short conversion on variable huge integer
  21489. MODULE Test;
  21490. VAR hugeint: HUGEINT;
  21491. BEGIN hugeint := SHORT (hugeint);
  21492. END Test.
  21493. positive: explicit variable short integer to integer conversion
  21494. MODULE Test;
  21495. VAR shortint: SHORTINT; integer: INTEGER;
  21496. BEGIN integer := LONG (shortint);
  21497. END Test.
  21498. positive: explicit variable short to long integer conversion
  21499. MODULE Test;
  21500. VAR shortint: SHORTINT; longint: LONGINT;
  21501. BEGIN longint := LONG (LONG (shortint));
  21502. END Test.
  21503. positive: explicit variable short to huge integer conversion
  21504. MODULE Test;
  21505. VAR shortint: SHORTINT; hugeint: HUGEINT;
  21506. BEGIN hugeint := LONG (LONG (LONG (shortint)));
  21507. END Test.
  21508. positive: explicit variable integer to short integer conversion
  21509. MODULE Test;
  21510. VAR integer: INTEGER; shortint: SHORTINT;
  21511. BEGIN integer := SHORT (integer);
  21512. END Test.
  21513. positive: explicit variable integer to long integer conversion
  21514. MODULE Test;
  21515. VAR integer: INTEGER; longint: LONGINT;
  21516. BEGIN longint := LONG (integer);
  21517. END Test.
  21518. positive: explicit variable integer to huge integer conversion
  21519. MODULE Test;
  21520. VAR integer: INTEGER; hugeint: HUGEINT;
  21521. BEGIN hugeint := LONG (LONG (integer));
  21522. END Test.
  21523. positive: explicit variable long to short integer conversion
  21524. MODULE Test;
  21525. VAR longint: LONGINT; shortint: SHORTINT;
  21526. BEGIN shortint := SHORT (SHORT (longint));
  21527. END Test.
  21528. positive: explicit variable long to integer conversion
  21529. MODULE Test;
  21530. VAR longint: LONGINT; integer: INTEGER;
  21531. BEGIN integer := SHORT (longint);
  21532. END Test.
  21533. positive: explicit variable long to huge integer conversion
  21534. MODULE Test;
  21535. VAR longint: LONGINT; hugeint: HUGEINT;
  21536. BEGIN hugeint := LONG (longint);
  21537. END Test.
  21538. positive: explicit variable huge to short integer conversion
  21539. MODULE Test;
  21540. VAR hugeint: HUGEINT; shortint: SHORTINT;
  21541. BEGIN shortint := SHORT (SHORT (SHORT (hugeint)));
  21542. END Test.
  21543. positive: explicit variable huge to integer conversion
  21544. MODULE Test;
  21545. VAR hugeint: HUGEINT; integer: INTEGER;
  21546. BEGIN integer := SHORT (SHORT (hugeint));
  21547. END Test.
  21548. positive: explicit variable huge to long integer conversion
  21549. MODULE Test;
  21550. VAR hugeint: HUGEINT; longint: LONGINT;
  21551. BEGIN hugeint := SHORT (hugeint);
  21552. END Test.
  21553. negative: explicit variable real to short integer conversion
  21554. MODULE Test;
  21555. VAR real: REAL; shortint: SHORTINT;
  21556. BEGIN shortint := ENTIER (real);
  21557. END Test.
  21558. negative: explicit variable real to integer conversion
  21559. MODULE Test;
  21560. VAR real: REAL; integer: INTEGER;
  21561. BEGIN integer := ENTIER (real);
  21562. END Test.
  21563. positive: explicit variable real to long integer conversion
  21564. MODULE Test;
  21565. VAR real: REAL; longint: LONGINT;
  21566. BEGIN longint := ENTIER (real);
  21567. END Test.
  21568. positive: explicit variable real to huge integer conversion
  21569. MODULE Test;
  21570. VAR real: REAL; hugeint: HUGEINT;
  21571. BEGIN hugeint := ENTIER (real);
  21572. END Test.
  21573. negative: explicit variable long real to short integer conversion
  21574. MODULE Test;
  21575. VAR longreal: LONGREAL; shortint: SHORTINT;
  21576. BEGIN shortint := ENTIER (longreal);
  21577. END Test.
  21578. negative: explicit variable long real to integer conversion
  21579. MODULE Test;
  21580. VAR longreal: LONGREAL; integer: INTEGER;
  21581. BEGIN integer := ENTIER (longreal);
  21582. END Test.
  21583. positive: explicit variable long real to long integer conversion
  21584. MODULE Test;
  21585. VAR longreal: LONGREAL; longint: LONGINT;
  21586. BEGIN longint := ENTIER (longreal);
  21587. END Test.
  21588. positive: explicit variable long real to huge integer conversion
  21589. MODULE Test;
  21590. VAR longreal: LONGREAL; hugeint: HUGEINT;
  21591. BEGIN hugeint := ENTIER (longreal);
  21592. END Test.
  21593. # for statement
  21594. negative: for statement with unknown counter
  21595. MODULE Test;
  21596. BEGIN FOR i := 0 TO 10 DO END
  21597. END Test.
  21598. negative: for statement with constant as counter
  21599. MODULE Test;
  21600. CONST i = 0;
  21601. BEGIN FOR i := 0 TO 10 DO END
  21602. END Test.
  21603. negative: for statement with type as counter
  21604. MODULE Test;
  21605. TYPE i = LONGINT;
  21606. BEGIN FOR i := 0 TO 10 DO END
  21607. END Test.
  21608. positive: for statement with variable as counter
  21609. MODULE Test;
  21610. VAR i: INTEGER;
  21611. BEGIN FOR i := 0 TO 10 DO END
  21612. END Test.
  21613. positive: for statement with parameter as counter
  21614. MODULE Test;
  21615. PROCEDURE Procedure (i: INTEGER);
  21616. BEGIN FOR i := 0 TO 10 DO END
  21617. END Procedure;
  21618. END Test.
  21619. negative: for statement with procedure as counter
  21620. MODULE Test;
  21621. PROCEDURE i; END i;
  21622. BEGIN FOR i := 0 TO 10 DO END
  21623. END Test.
  21624. negative: for statement with constant counter
  21625. MODULE Test;
  21626. VAR s, e: INTEGER;
  21627. BEGIN FOR 0 := s TO e DO END
  21628. END Test.
  21629. positive: for statement with constant start counter
  21630. MODULE Test;
  21631. VAR i, e: INTEGER;
  21632. BEGIN FOR i := 0 TO e DO END
  21633. END Test.
  21634. positive: for statement with constant end counter
  21635. MODULE Test;
  21636. VAR i, s: INTEGER;
  21637. BEGIN FOR i := s TO 0 DO END
  21638. END Test.
  21639. positive: for statement with variable counter
  21640. MODULE Test;
  21641. VAR i: INTEGER;
  21642. BEGIN FOR i := 0 TO 10 DO END
  21643. END Test.
  21644. positive: for statement with variable start counter
  21645. MODULE Test;
  21646. VAR i, s: INTEGER;
  21647. BEGIN FOR i := s TO 10 DO END
  21648. END Test.
  21649. positive: for statement with variable end counter
  21650. MODULE Test;
  21651. VAR i, e: INTEGER;
  21652. BEGIN FOR i := 0 TO e DO END
  21653. END Test.
  21654. negative: for statement with variable increment
  21655. MODULE Test;
  21656. VAR i, s: INTEGER;
  21657. BEGIN FOR i := 0 TO 10 BY s DO END
  21658. END Test.
  21659. positive: for statement with parameter counter
  21660. MODULE Test;
  21661. PROCEDURE P (i: INTEGER);
  21662. BEGIN FOR i := 0 TO 10 DO END
  21663. END P;
  21664. END Test.
  21665. positive: for statement with variable parameter counter
  21666. MODULE Test;
  21667. PROCEDURE P (VAR i: INTEGER);
  21668. BEGIN FOR i := 0 TO 10 DO END
  21669. END P;
  21670. END Test.
  21671. negative: for statement with constant parameter counter
  21672. MODULE Test;
  21673. PROCEDURE P (CONST i: INTEGER);
  21674. BEGIN FOR i := 0 TO 10 DO END
  21675. END P;
  21676. END Test.
  21677. positive: for statement with parameter start counter
  21678. MODULE Test;
  21679. VAR i: INTEGER;
  21680. PROCEDURE P (s: INTEGER);
  21681. BEGIN FOR i := s TO 10 DO END
  21682. END P;
  21683. END Test.
  21684. positive: for statement with variable parameter start counter
  21685. MODULE Test;
  21686. VAR i: INTEGER;
  21687. PROCEDURE P (VAR s: INTEGER);
  21688. BEGIN FOR i := s TO 10 DO END
  21689. END P;
  21690. END Test.
  21691. positive: for statement with constant parameter start counter
  21692. MODULE Test;
  21693. VAR i: INTEGER;
  21694. PROCEDURE P (CONST s: INTEGER);
  21695. BEGIN FOR i := s TO 10 DO END
  21696. END P;
  21697. END Test.
  21698. positive: for statement with parameter end counter
  21699. MODULE Test;
  21700. VAR i: INTEGER;
  21701. PROCEDURE P (e: INTEGER);
  21702. BEGIN FOR i := 0 TO e DO END
  21703. END P;
  21704. END Test.
  21705. positive: for statement with variable parameter end counter
  21706. MODULE Test;
  21707. VAR i: INTEGER;
  21708. PROCEDURE P (VAR e: INTEGER);
  21709. BEGIN FOR i := 0 TO e DO END
  21710. END P;
  21711. END Test.
  21712. positive: for statement with constant parameter end counter
  21713. MODULE Test;
  21714. VAR i: INTEGER;
  21715. PROCEDURE P (CONST e: INTEGER);
  21716. BEGIN FOR i := 0 TO e DO END
  21717. END P;
  21718. END Test.
  21719. negative: for statement with parameter increment
  21720. MODULE Test;
  21721. VAR i: INTEGER;
  21722. PROCEDURE P (s: INTEGER);
  21723. BEGIN FOR i := 0 TO 10 BY s DO END
  21724. END P;
  21725. END Test.
  21726. negative: for statement with variable parameter increment
  21727. MODULE Test;
  21728. VAR i: INTEGER;
  21729. PROCEDURE P (VAR s: INTEGER);
  21730. BEGIN FOR i := 0 TO 10 BY s DO END
  21731. END P;
  21732. END Test.
  21733. negative: for statement with constant parameter increment
  21734. MODULE Test;
  21735. VAR i: INTEGER;
  21736. PROCEDURE P (CONST s: INTEGER);
  21737. BEGIN FOR i := 0 TO 10 BY s DO END
  21738. END P;
  21739. END Test.
  21740. positive: for statement with positive constant increment
  21741. MODULE Test;
  21742. VAR i: INTEGER;
  21743. BEGIN FOR i := 0 TO 10 BY 1 DO END
  21744. END Test.
  21745. positive: for statement with negative constant increment
  21746. MODULE Test;
  21747. VAR i: INTEGER;
  21748. BEGIN FOR i := 0 TO 10 BY -1 DO END
  21749. END Test.
  21750. negative: for statement with zero increment
  21751. MODULE Test;
  21752. VAR i: INTEGER;
  21753. BEGIN FOR i := 0 TO 10 BY 0 DO END
  21754. END Test.
  21755. negative: for statement with counter of type boolean
  21756. MODULE Test;
  21757. VAR i, s, e: BOOLEAN;
  21758. BEGIN FOR i := s TO e DO END
  21759. END Test.
  21760. negative: for statement with counter of type character
  21761. MODULE Test;
  21762. VAR i, s, e: CHAR;
  21763. BEGIN FOR i := s TO e DO END
  21764. END Test.
  21765. positive: for statement with counter of type short integer
  21766. MODULE Test;
  21767. VAR i, s, e: SHORTINT;
  21768. BEGIN FOR i := s TO e DO END
  21769. END Test.
  21770. positive: for statement with counter of type integer
  21771. MODULE Test;
  21772. VAR i, s, e: INTEGER;
  21773. BEGIN FOR i := s TO e DO END
  21774. END Test.
  21775. positive: for statement with counter of type long integer
  21776. MODULE Test;
  21777. VAR i, s, e: LONGINT;
  21778. BEGIN FOR i := s TO e DO END
  21779. END Test.
  21780. positive: for statement with counter of type huge integer
  21781. MODULE Test;
  21782. VAR i, s, e: HUGEINT;
  21783. BEGIN FOR i := s TO e DO END
  21784. END Test.
  21785. negative: for statement with counter of type real
  21786. MODULE Test;
  21787. VAR i, s, e: REAL;
  21788. BEGIN FOR i := s TO e DO END
  21789. END Test.
  21790. negative: for statement with counter of type long real
  21791. MODULE Test;
  21792. VAR i, s, e: REAL;
  21793. BEGIN FOR i := s TO e DO END
  21794. END Test.
  21795. negative: for statement with counter of type set
  21796. MODULE Test;
  21797. VAR i, s, e: SET;
  21798. BEGIN FOR i := s TO e DO END
  21799. END Test.
  21800. negative: for statement with counter of type array
  21801. MODULE Test;
  21802. VAR i, s, e: ARRAY 10 OF CHAR;
  21803. BEGIN FOR i := s TO e DO END
  21804. END Test.
  21805. negative: for statement with counter of type record
  21806. MODULE Test;
  21807. VAR i, s, e: RECORD END;
  21808. BEGIN FOR i := s TO e DO END
  21809. END Test.
  21810. negative: for statement with counter of type object
  21811. MODULE Test;
  21812. VAR i, s, e: OBJECT END;
  21813. BEGIN FOR i := s TO e DO END
  21814. END Test.
  21815. negative: for statement with counter of type pointer
  21816. MODULE Test;
  21817. VAR i, s, e: POINTER TO RECORD;
  21818. BEGIN FOR i := s TO e DO END
  21819. END Test.
  21820. negative: for statement with counter of type procedure
  21821. MODULE Test;
  21822. VAR i, s, e: PROCEDURE;
  21823. BEGIN FOR i := s TO e DO END
  21824. END Test.
  21825. positive: for statement with short integer counter and short integer start counter
  21826. MODULE Test;
  21827. VAR i, s: SHORTINT;
  21828. BEGIN FOR i := s TO 10 DO END
  21829. END Test.
  21830. negative: for statement with short integer counter and integer start counter
  21831. MODULE Test;
  21832. VAR i: SHORTINT; s: INTEGER;
  21833. BEGIN FOR i := s TO 10 DO END
  21834. END Test.
  21835. negative: for statement with short integer counter and long integer start counter
  21836. MODULE Test;
  21837. VAR i: SHORTINT; s: LONGINT;
  21838. BEGIN FOR i := s TO 10 DO END
  21839. END Test.
  21840. negative: for statement with short integer counter and huge integer start counter
  21841. MODULE Test;
  21842. VAR i: SHORTINT; s: HUGEINT;
  21843. BEGIN FOR i := s TO 10 DO END
  21844. END Test.
  21845. positive: for statement with integer counter and short integer start counter
  21846. MODULE Test;
  21847. VAR i: INTEGER; s: SHORTINT;
  21848. BEGIN FOR i := s TO 10 DO END
  21849. END Test.
  21850. positive: for statement with integer counter and integer start counter
  21851. MODULE Test;
  21852. VAR i, s: INTEGER;
  21853. BEGIN FOR i := s TO 10 DO END
  21854. END Test.
  21855. negative: for statement with integer counter and long integer start counter
  21856. MODULE Test;
  21857. VAR i: INTEGER; s: LONGINT;
  21858. BEGIN FOR i := s TO 10 DO END
  21859. END Test.
  21860. negative: for statement with integer counter and huge integer start counter
  21861. MODULE Test;
  21862. VAR i: INTEGER; s: HUGEINT;
  21863. BEGIN FOR i := s TO 10 DO END
  21864. END Test.
  21865. positive: for statement with long integer counter and short integer start counter
  21866. MODULE Test;
  21867. VAR i: LONGINT; s: SHORTINT;
  21868. BEGIN FOR i := s TO 10 DO END
  21869. END Test.
  21870. positive: for statement with long integer counter and integer start counter
  21871. MODULE Test;
  21872. VAR i: LONGINT; s: INTEGER;
  21873. BEGIN FOR i := s TO 10 DO END
  21874. END Test.
  21875. positive: for statement with long integer counter and long integer start counter
  21876. MODULE Test;
  21877. VAR i, s: LONGINT;
  21878. BEGIN FOR i := s TO 10 DO END
  21879. END Test.
  21880. negative: for statement with long integer counter and huge integer start counter
  21881. MODULE Test;
  21882. VAR i: LONGINT; s: HUGEINT;
  21883. BEGIN FOR i := s TO 10 DO END
  21884. END Test.
  21885. positive: for statement with huge integer counter and short integer start counter
  21886. MODULE Test;
  21887. VAR i: HUGEINT; s: SHORTINT;
  21888. BEGIN FOR i := s TO 10 DO END
  21889. END Test.
  21890. positive: for statement with huge integer counter and integer start counter
  21891. MODULE Test;
  21892. VAR i: HUGEINT; s: INTEGER;
  21893. BEGIN FOR i := s TO 10 DO END
  21894. END Test.
  21895. positive: for statement with huge integer counter and long integer start counter
  21896. MODULE Test;
  21897. VAR i: HUGEINT; s: LONGINT;
  21898. BEGIN FOR i := s TO 10 DO END
  21899. END Test.
  21900. positive: for statement with huge integer counter and huge integer start counter
  21901. MODULE Test;
  21902. VAR i, s: HUGEINT;
  21903. BEGIN FOR i := s TO 10 DO END
  21904. END Test.
  21905. positive: for statement with short integer counter and short integer end counter
  21906. MODULE Test;
  21907. VAR i, e: SHORTINT;
  21908. BEGIN FOR i := 0 TO e DO END
  21909. END Test.
  21910. negative: for statement with short integer counter and integer end counter
  21911. MODULE Test;
  21912. VAR i: SHORTINT; e: INTEGER;
  21913. BEGIN FOR i := 0 TO e DO END
  21914. END Test.
  21915. negative: for statement with short integer counter and long integer end counter
  21916. MODULE Test;
  21917. VAR i: SHORTINT; e: LONGINT;
  21918. BEGIN FOR i := 0 TO e DO END
  21919. END Test.
  21920. negative: for statement with short integer counter and huge integer end counter
  21921. MODULE Test;
  21922. VAR i: SHORTINT; e: HUGEINT;
  21923. BEGIN FOR i := 0 TO e DO END
  21924. END Test.
  21925. positive: for statement with integer counter and short integer end counter
  21926. MODULE Test;
  21927. VAR i: INTEGER; e: SHORTINT;
  21928. BEGIN FOR i := 0 TO e DO END
  21929. END Test.
  21930. positive: for statement with integer counter and integer end counter
  21931. MODULE Test;
  21932. VAR i, e: INTEGER;
  21933. BEGIN FOR i := 0 TO e DO END
  21934. END Test.
  21935. negative: for statement with integer counter and long integer end counter
  21936. MODULE Test;
  21937. VAR i: INTEGER; e: LONGINT;
  21938. BEGIN FOR i := 0 TO e DO END
  21939. END Test.
  21940. negative: for statement with integer counter and huge integer end counter
  21941. MODULE Test;
  21942. VAR i: INTEGER; e: HUGEINT;
  21943. BEGIN FOR i := 0 TO e DO END
  21944. END Test.
  21945. positive: for statement with long integer counter and short integer end counter
  21946. MODULE Test;
  21947. VAR i: LONGINT; e: SHORTINT;
  21948. BEGIN FOR i := 0 TO e DO END
  21949. END Test.
  21950. positive: for statement with long integer counter and integer end counter
  21951. MODULE Test;
  21952. VAR i: LONGINT; e: INTEGER;
  21953. BEGIN FOR i := 0 TO e DO END
  21954. END Test.
  21955. positive: for statement with long integer counter and long integer end counter
  21956. MODULE Test;
  21957. VAR i, e: LONGINT;
  21958. BEGIN FOR i := 0 TO e DO END
  21959. END Test.
  21960. negative: for statement with long integer counter and huge integer end counter
  21961. MODULE Test;
  21962. VAR i: LONGINT; e: HUGEINT;
  21963. BEGIN FOR i := 0 TO e DO END
  21964. END Test.
  21965. positive: for statement with huge integer counter and short integer end counter
  21966. MODULE Test;
  21967. VAR i: HUGEINT; e: SHORTINT;
  21968. BEGIN FOR i := 0 TO e DO END
  21969. END Test.
  21970. positive: for statement with huge integer counter and integer end counter
  21971. MODULE Test;
  21972. VAR i: HUGEINT; e: INTEGER;
  21973. BEGIN FOR i := 0 TO e DO END
  21974. END Test.
  21975. positive: for statement with huge integer counter and long integer end counter
  21976. MODULE Test;
  21977. VAR i: HUGEINT; e: LONGINT;
  21978. BEGIN FOR i := 0 TO e DO END
  21979. END Test.
  21980. positive: for statement with huge integer counter and huge integer end counter
  21981. MODULE Test;
  21982. VAR i, e: HUGEINT;
  21983. BEGIN FOR i := 0 TO e DO END
  21984. END Test.
  21985. # return statement
  21986. negative: return statement with value in module body
  21987. MODULE Test;
  21988. BEGIN RETURN 0
  21989. END Test.
  21990. positive: return statement without value in module body
  21991. MODULE Test;
  21992. BEGIN RETURN
  21993. END Test.
  21994. negative: return statement with value in object body
  21995. MODULE Test;
  21996. TYPE Object = OBJECT
  21997. BEGIN RETURN 0
  21998. END Object;
  21999. END Test.
  22000. positive: return statement without value in object body
  22001. MODULE Test;
  22002. TYPE Object = OBJECT
  22003. BEGIN RETURN
  22004. END Object;
  22005. END Test.
  22006. positive: return statement with value in procedure with return type
  22007. MODULE Test;
  22008. PROCEDURE Procedure (): INTEGER;
  22009. BEGIN RETURN 0
  22010. END Procedure;
  22011. END Test.
  22012. negative: return statement without value in procedure with return type
  22013. MODULE Test;
  22014. PROCEDURE Procedure (): INTEGER;
  22015. BEGIN RETURN
  22016. END Procedure;
  22017. END Test.
  22018. negative: return statement with value in procedure without return type
  22019. MODULE Test;
  22020. PROCEDURE Procedure;
  22021. BEGIN RETURN 0
  22022. END Procedure;
  22023. END Test.
  22024. positive: return statement without value in procedure without return type
  22025. MODULE Test;
  22026. PROCEDURE Procedure;
  22027. BEGIN RETURN
  22028. END Procedure;
  22029. END Test.
  22030. positive: procedure with boolean as return type returning boolean
  22031. MODULE Test;
  22032. PROCEDURE Procedure (value: BOOLEAN): BOOLEAN; BEGIN RETURN value END Procedure;
  22033. END Test.
  22034. negative: procedure with boolean as return type returning character
  22035. MODULE Test;
  22036. PROCEDURE Procedure (value: CHAR): BOOLEAN; BEGIN RETURN value END Procedure;
  22037. END Test.
  22038. negative: procedure with boolean as return type returning integer
  22039. MODULE Test;
  22040. PROCEDURE Procedure (value: INTEGER): BOOLEAN; BEGIN RETURN value END Procedure;
  22041. END Test.
  22042. negative: procedure with boolean as return type returning real
  22043. MODULE Test;
  22044. PROCEDURE Procedure (value: REAL): BOOLEAN; BEGIN RETURN value END Procedure;
  22045. END Test.
  22046. negative: procedure with boolean as return type returning set
  22047. MODULE Test;
  22048. PROCEDURE Procedure (value: SET): BOOLEAN; BEGIN RETURN value END Procedure;
  22049. END Test.
  22050. negative: procedure with boolean as return type returning array
  22051. MODULE Test;
  22052. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): BOOLEAN; BEGIN RETURN value END Procedure;
  22053. END Test.
  22054. negative: procedure with boolean as return type returning record
  22055. MODULE Test;
  22056. PROCEDURE Procedure (value: RECORD END): BOOLEAN; BEGIN RETURN value END Procedure;
  22057. END Test.
  22058. negative: procedure with boolean as return type returning object
  22059. MODULE Test;
  22060. PROCEDURE Procedure (value: OBJECT END): BOOLEAN; BEGIN RETURN value END Procedure;
  22061. END Test.
  22062. negative: procedure with boolean as return type returning base object
  22063. MODULE Test;
  22064. PROCEDURE Procedure (value: OBJECT): BOOLEAN; BEGIN RETURN value END Procedure;
  22065. END Test.
  22066. negative: procedure with boolean as return type returning pointer to array
  22067. MODULE Test;
  22068. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): BOOLEAN; BEGIN RETURN value END Procedure;
  22069. END Test.
  22070. negative: procedure with boolean as return type returning pointer to record
  22071. MODULE Test;
  22072. PROCEDURE Procedure (value: POINTER TO RECORD END): BOOLEAN; BEGIN RETURN value END Procedure;
  22073. END Test.
  22074. negative: procedure with boolean as return type returning procedure
  22075. MODULE Test;
  22076. PROCEDURE Procedure (value: PROCEDURE): BOOLEAN; BEGIN RETURN value END Procedure;
  22077. END Test.
  22078. negative: procedure with character as return type returning boolean
  22079. MODULE Test;
  22080. PROCEDURE Procedure (value: BOOLEAN): CHAR; BEGIN RETURN value END Procedure;
  22081. END Test.
  22082. positive: procedure with character as return type returning character
  22083. MODULE Test;
  22084. PROCEDURE Procedure (value: CHAR): CHAR; BEGIN RETURN value END Procedure;
  22085. END Test.
  22086. negative: procedure with character as return type returning integer
  22087. MODULE Test;
  22088. PROCEDURE Procedure (value: INTEGER): CHAR; BEGIN RETURN value END Procedure;
  22089. END Test.
  22090. negative: procedure with character as return type returning real
  22091. MODULE Test;
  22092. PROCEDURE Procedure (value: REAL): CHAR; BEGIN RETURN value END Procedure;
  22093. END Test.
  22094. negative: procedure with character as return type returning set
  22095. MODULE Test;
  22096. PROCEDURE Procedure (value: SET): CHAR; BEGIN RETURN value END Procedure;
  22097. END Test.
  22098. negative: procedure with character as return type returning array
  22099. MODULE Test;
  22100. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): CHAR; BEGIN RETURN value END Procedure;
  22101. END Test.
  22102. negative: procedure with character as return type returning record
  22103. MODULE Test;
  22104. PROCEDURE Procedure (value: RECORD END): CHAR; BEGIN RETURN value END Procedure;
  22105. END Test.
  22106. negative: procedure with character as return type returning object
  22107. MODULE Test;
  22108. PROCEDURE Procedure (value: OBJECT END): CHAR; BEGIN RETURN value END Procedure;
  22109. END Test.
  22110. negative: procedure with character as return type returning base object
  22111. MODULE Test;
  22112. PROCEDURE Procedure (value: OBJECT): CHAR; BEGIN RETURN value END Procedure;
  22113. END Test.
  22114. negative: procedure with character as return type returning pointer to array
  22115. MODULE Test;
  22116. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): CHAR; BEGIN RETURN value END Procedure;
  22117. END Test.
  22118. negative: procedure with character as return type returning pointer to record
  22119. MODULE Test;
  22120. PROCEDURE Procedure (value: POINTER TO RECORD END): CHAR; BEGIN RETURN value END Procedure;
  22121. END Test.
  22122. negative: procedure with character as return type returning procedure
  22123. MODULE Test;
  22124. PROCEDURE Procedure (value: PROCEDURE): CHAR; BEGIN RETURN value END Procedure;
  22125. END Test.
  22126. negative: procedure with short integer as return type returning boolean
  22127. MODULE Test;
  22128. PROCEDURE Procedure (value: BOOLEAN): SHORTINT; BEGIN RETURN value END Procedure;
  22129. END Test.
  22130. negative: procedure with short integer as return type returning character
  22131. MODULE Test;
  22132. PROCEDURE Procedure (value: CHAR): SHORTINT; BEGIN RETURN value END Procedure;
  22133. END Test.
  22134. positive: procedure with short integer as return type returning short integer
  22135. MODULE Test;
  22136. PROCEDURE Procedure (value: SHORTINT): SHORTINT; BEGIN RETURN value END Procedure;
  22137. END Test.
  22138. negative: procedure with short integer as return type returning integer
  22139. MODULE Test;
  22140. PROCEDURE Procedure (value: INTEGER): SHORTINT; BEGIN RETURN value END Procedure;
  22141. END Test.
  22142. negative: procedure with short integer as return type returning long integer
  22143. MODULE Test;
  22144. PROCEDURE Procedure (value: LONGINT): SHORTINT; BEGIN RETURN value END Procedure;
  22145. END Test.
  22146. negative: procedure with short integer as return type returning huge integer
  22147. MODULE Test;
  22148. PROCEDURE Procedure (value: HUGEINT): SHORTINT; BEGIN RETURN value END Procedure;
  22149. END Test.
  22150. negative: procedure with short integer as return type returning real
  22151. MODULE Test;
  22152. PROCEDURE Procedure (value: REAL): SHORTINT; BEGIN RETURN value END Procedure;
  22153. END Test.
  22154. negative: procedure with short integer as return type returning set
  22155. MODULE Test;
  22156. PROCEDURE Procedure (value: SET): SHORTINT; BEGIN RETURN value END Procedure;
  22157. END Test.
  22158. negative: procedure with short integer as return type returning array
  22159. MODULE Test;
  22160. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): SHORTINT; BEGIN RETURN value END Procedure;
  22161. END Test.
  22162. negative: procedure with short integer as return type returning record
  22163. MODULE Test;
  22164. PROCEDURE Procedure (value: RECORD END): SHORTINT; BEGIN RETURN value END Procedure;
  22165. END Test.
  22166. negative: procedure with short integer as return type returning object
  22167. MODULE Test;
  22168. PROCEDURE Procedure (value: OBJECT END): SHORTINT; BEGIN RETURN value END Procedure;
  22169. END Test.
  22170. negative: procedure with short integer as return type returning base object
  22171. MODULE Test;
  22172. PROCEDURE Procedure (value: OBJECT): SHORTINT; BEGIN RETURN value END Procedure;
  22173. END Test.
  22174. negative: procedure with short integer as return type returning pointer to array
  22175. MODULE Test;
  22176. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): SHORTINT; BEGIN RETURN value END Procedure;
  22177. END Test.
  22178. negative: procedure with short integer as return type returning pointer to record
  22179. MODULE Test;
  22180. PROCEDURE Procedure (value: POINTER TO RECORD END): SHORTINT; BEGIN RETURN value END Procedure;
  22181. END Test.
  22182. negative: procedure with short integer as return type returning procedure
  22183. MODULE Test;
  22184. PROCEDURE Procedure (value: PROCEDURE): SHORTINT; BEGIN RETURN value END Procedure;
  22185. END Test.
  22186. negative: procedure with integer as return type returning boolean
  22187. MODULE Test;
  22188. PROCEDURE Procedure (value: BOOLEAN): INTEGER; BEGIN RETURN value END Procedure;
  22189. END Test.
  22190. negative: procedure with integer as return type returning character
  22191. MODULE Test;
  22192. PROCEDURE Procedure (value: CHAR): INTEGER; BEGIN RETURN value END Procedure;
  22193. END Test.
  22194. positive: procedure with integer as return type returning short integer
  22195. MODULE Test;
  22196. PROCEDURE Procedure (value: SHORTINT): INTEGER; BEGIN RETURN value END Procedure;
  22197. END Test.
  22198. positive: procedure with integer as return type returning integer
  22199. MODULE Test;
  22200. PROCEDURE Procedure (value: INTEGER): INTEGER; BEGIN RETURN value END Procedure;
  22201. END Test.
  22202. negative: procedure with integer as return type returning long integer
  22203. MODULE Test;
  22204. PROCEDURE Procedure (value: LONGINT): INTEGER; BEGIN RETURN value END Procedure;
  22205. END Test.
  22206. negative: procedure with integer as return type returning huge integer
  22207. MODULE Test;
  22208. PROCEDURE Procedure (value: HUGEINT): INTEGER; BEGIN RETURN value END Procedure;
  22209. END Test.
  22210. negative: procedure with integer as return type returning real
  22211. MODULE Test;
  22212. PROCEDURE Procedure (value: REAL): INTEGER; BEGIN RETURN value END Procedure;
  22213. END Test.
  22214. negative: procedure with integer as return type returning set
  22215. MODULE Test;
  22216. PROCEDURE Procedure (value: SET): INTEGER; BEGIN RETURN value END Procedure;
  22217. END Test.
  22218. negative: procedure with integer as return type returning array
  22219. MODULE Test;
  22220. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): INTEGER; BEGIN RETURN value END Procedure;
  22221. END Test.
  22222. negative: procedure with integer as return type returning record
  22223. MODULE Test;
  22224. PROCEDURE Procedure (value: RECORD END): INTEGER; BEGIN RETURN value END Procedure;
  22225. END Test.
  22226. negative: procedure with integer as return type returning object
  22227. MODULE Test;
  22228. PROCEDURE Procedure (value: OBJECT END): INTEGER; BEGIN RETURN value END Procedure;
  22229. END Test.
  22230. negative: procedure with integer as return type returning base object
  22231. MODULE Test;
  22232. PROCEDURE Procedure (value: OBJECT): INTEGER; BEGIN RETURN value END Procedure;
  22233. END Test.
  22234. negative: procedure with integer as return type returning pointer to array
  22235. MODULE Test;
  22236. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): INTEGER; BEGIN RETURN value END Procedure;
  22237. END Test.
  22238. negative: procedure with integer as return type returning pointer to record
  22239. MODULE Test;
  22240. PROCEDURE Procedure (value: POINTER TO RECORD END): INTEGER; BEGIN RETURN value END Procedure;
  22241. END Test.
  22242. negative: procedure with integer as return type returning procedure
  22243. MODULE Test;
  22244. PROCEDURE Procedure (value: PROCEDURE): INTEGER; BEGIN RETURN value END Procedure;
  22245. END Test.
  22246. negative: procedure with long integer as return type returning boolean
  22247. MODULE Test;
  22248. PROCEDURE Procedure (value: BOOLEAN): LONGINT; BEGIN RETURN value END Procedure;
  22249. END Test.
  22250. negative: procedure with long integer as return type returning character
  22251. MODULE Test;
  22252. PROCEDURE Procedure (value: CHAR): LONGINT; BEGIN RETURN value END Procedure;
  22253. END Test.
  22254. positive: procedure with long integer as return type returning short integer
  22255. MODULE Test;
  22256. PROCEDURE Procedure (value: SHORTINT): LONGINT; BEGIN RETURN value END Procedure;
  22257. END Test.
  22258. positive: procedure with long integer as return type returning integer
  22259. MODULE Test;
  22260. PROCEDURE Procedure (value: INTEGER): LONGINT; BEGIN RETURN value END Procedure;
  22261. END Test.
  22262. positive: procedure with long integer as return type returning long integer
  22263. MODULE Test;
  22264. PROCEDURE Procedure (value: LONGINT): LONGINT; BEGIN RETURN value END Procedure;
  22265. END Test.
  22266. negative: procedure with long integer as return type returning huge integer
  22267. MODULE Test;
  22268. PROCEDURE Procedure (value: HUGEINT): LONGINT; BEGIN RETURN value END Procedure;
  22269. END Test.
  22270. negative: procedure with long integer as return type returning real
  22271. MODULE Test;
  22272. PROCEDURE Procedure (value: REAL): LONGINT; BEGIN RETURN value END Procedure;
  22273. END Test.
  22274. negative: procedure with long integer as return type returning set
  22275. MODULE Test;
  22276. PROCEDURE Procedure (value: SET): LONGINT; BEGIN RETURN value END Procedure;
  22277. END Test.
  22278. negative: procedure with long integer as return type returning array
  22279. MODULE Test;
  22280. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): LONGINT; BEGIN RETURN value END Procedure;
  22281. END Test.
  22282. negative: procedure with long integer as return type returning record
  22283. MODULE Test;
  22284. PROCEDURE Procedure (value: RECORD END): LONGINT; BEGIN RETURN value END Procedure;
  22285. END Test.
  22286. negative: procedure with long integer as return type returning object
  22287. MODULE Test;
  22288. PROCEDURE Procedure (value: OBJECT END): LONGINT; BEGIN RETURN value END Procedure;
  22289. END Test.
  22290. negative: procedure with long integer as return type returning base object
  22291. MODULE Test;
  22292. PROCEDURE Procedure (value: OBJECT): LONGINT; BEGIN RETURN value END Procedure;
  22293. END Test.
  22294. negative: procedure with long integer as return type returning pointer to array
  22295. MODULE Test;
  22296. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): LONGINT; BEGIN RETURN value END Procedure;
  22297. END Test.
  22298. negative: procedure with long integer as return type returning pointer to record
  22299. MODULE Test;
  22300. PROCEDURE Procedure (value: POINTER TO RECORD END): LONGINT; BEGIN RETURN value END Procedure;
  22301. END Test.
  22302. negative: procedure with long integer as return type returning procedure
  22303. MODULE Test;
  22304. PROCEDURE Procedure (value: PROCEDURE): LONGINT; BEGIN RETURN value END Procedure;
  22305. END Test.
  22306. negative: procedure with huge integer as return type returning boolean
  22307. MODULE Test;
  22308. PROCEDURE Procedure (value: BOOLEAN): HUGEINT; BEGIN RETURN value END Procedure;
  22309. END Test.
  22310. negative: procedure with huge integer as return type returning character
  22311. MODULE Test;
  22312. PROCEDURE Procedure (value: CHAR): HUGEINT; BEGIN RETURN value END Procedure;
  22313. END Test.
  22314. positive: procedure with huge integer as return type returning short integer
  22315. MODULE Test;
  22316. PROCEDURE Procedure (value: SHORTINT): HUGEINT; BEGIN RETURN value END Procedure;
  22317. END Test.
  22318. positive: procedure with huge integer as return type returning integer
  22319. MODULE Test;
  22320. PROCEDURE Procedure (value: INTEGER): HUGEINT; BEGIN RETURN value END Procedure;
  22321. END Test.
  22322. positive: procedure with huge integer as return type returning long integer
  22323. MODULE Test;
  22324. PROCEDURE Procedure (value: LONGINT): HUGEINT; BEGIN RETURN value END Procedure;
  22325. END Test.
  22326. positive: procedure with huge integer as return type returning huge integer
  22327. MODULE Test;
  22328. PROCEDURE Procedure (value: HUGEINT): HUGEINT; BEGIN RETURN value END Procedure;
  22329. END Test.
  22330. negative: procedure with huge integer as return type returning real
  22331. MODULE Test;
  22332. PROCEDURE Procedure (value: REAL): HUGEINT; BEGIN RETURN value END Procedure;
  22333. END Test.
  22334. negative: procedure with huge integer as return type returning set
  22335. MODULE Test;
  22336. PROCEDURE Procedure (value: SET): HUGEINT; BEGIN RETURN value END Procedure;
  22337. END Test.
  22338. negative: procedure with huge integer as return type returning array
  22339. MODULE Test;
  22340. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): HUGEINT; BEGIN RETURN value END Procedure;
  22341. END Test.
  22342. negative: procedure with huge integer as return type returning record
  22343. MODULE Test;
  22344. PROCEDURE Procedure (value: RECORD END): HUGEINT; BEGIN RETURN value END Procedure;
  22345. END Test.
  22346. negative: procedure with huge integer as return type returning object
  22347. MODULE Test;
  22348. PROCEDURE Procedure (value: OBJECT END): HUGEINT; BEGIN RETURN value END Procedure;
  22349. END Test.
  22350. negative: procedure with huge integer as return type returning base object
  22351. MODULE Test;
  22352. PROCEDURE Procedure (value: OBJECT): HUGEINT; BEGIN RETURN value END Procedure;
  22353. END Test.
  22354. negative: procedure with huge integer as return type returning pointer to array
  22355. MODULE Test;
  22356. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): HUGEINT; BEGIN RETURN value END Procedure;
  22357. END Test.
  22358. negative: procedure with huge integer as return type returning pointer to record
  22359. MODULE Test;
  22360. PROCEDURE Procedure (value: POINTER TO RECORD END): HUGEINT; BEGIN RETURN value END Procedure;
  22361. END Test.
  22362. negative: procedure with huge integer as return type returning procedure
  22363. MODULE Test;
  22364. PROCEDURE Procedure (value: PROCEDURE): HUGEINT; BEGIN RETURN value END Procedure;
  22365. END Test.
  22366. negative: procedure with real as return type returning boolean
  22367. MODULE Test;
  22368. PROCEDURE Procedure (value: BOOLEAN): REAL; BEGIN RETURN value END Procedure;
  22369. END Test.
  22370. negative: procedure with real as return type returning character
  22371. MODULE Test;
  22372. PROCEDURE Procedure (value: CHAR): REAL; BEGIN RETURN value END Procedure;
  22373. END Test.
  22374. positive: procedure with real as return type returning short integer
  22375. MODULE Test;
  22376. PROCEDURE Procedure (value: SHORTINT): REAL; BEGIN RETURN value END Procedure;
  22377. END Test.
  22378. positive: procedure with real as return type returning integer
  22379. MODULE Test;
  22380. PROCEDURE Procedure (value: INTEGER): REAL; BEGIN RETURN value END Procedure;
  22381. END Test.
  22382. positive: procedure with real as return type returning long integer
  22383. MODULE Test;
  22384. PROCEDURE Procedure (value: LONGINT): REAL; BEGIN RETURN value END Procedure;
  22385. END Test.
  22386. positive: procedure with real as return type returning huge integer
  22387. MODULE Test;
  22388. PROCEDURE Procedure (value: HUGEINT): REAL; BEGIN RETURN value END Procedure;
  22389. END Test.
  22390. positive: procedure with real as return type returning real
  22391. MODULE Test;
  22392. PROCEDURE Procedure (value: REAL): REAL; BEGIN RETURN value END Procedure;
  22393. END Test.
  22394. negative: procedure with real as return type returning long real
  22395. MODULE Test;
  22396. PROCEDURE Procedure (value: LONGREAL): REAL; BEGIN RETURN value END Procedure;
  22397. END Test.
  22398. negative: procedure with real as return type returning set
  22399. MODULE Test;
  22400. PROCEDURE Procedure (value: SET): REAL; BEGIN RETURN value END Procedure;
  22401. END Test.
  22402. negative: procedure with real as return type returning array
  22403. MODULE Test;
  22404. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): REAL; BEGIN RETURN value END Procedure;
  22405. END Test.
  22406. negative: procedure with real as return type returning record
  22407. MODULE Test;
  22408. PROCEDURE Procedure (value: RECORD END): REAL; BEGIN RETURN value END Procedure;
  22409. END Test.
  22410. negative: procedure with real as return type returning object
  22411. MODULE Test;
  22412. PROCEDURE Procedure (value: OBJECT END): REAL; BEGIN RETURN value END Procedure;
  22413. END Test.
  22414. negative: procedure with real as return type returning base object
  22415. MODULE Test;
  22416. PROCEDURE Procedure (value: OBJECT): REAL; BEGIN RETURN value END Procedure;
  22417. END Test.
  22418. negative: procedure with real as return type returning pointer to array
  22419. MODULE Test;
  22420. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): REAL; BEGIN RETURN value END Procedure;
  22421. END Test.
  22422. negative: procedure with real as return type returning pointer to record
  22423. MODULE Test;
  22424. PROCEDURE Procedure (value: POINTER TO RECORD END): REAL; BEGIN RETURN value END Procedure;
  22425. END Test.
  22426. negative: procedure with real as return type returning procedure
  22427. MODULE Test;
  22428. PROCEDURE Procedure (value: PROCEDURE): REAL; BEGIN RETURN value END Procedure;
  22429. END Test.
  22430. negative: procedure with long real as return type returning boolean
  22431. MODULE Test;
  22432. PROCEDURE Procedure (value: BOOLEAN): LONGREAL; BEGIN RETURN value END Procedure;
  22433. END Test.
  22434. negative: procedure with long real as return type returning character
  22435. MODULE Test;
  22436. PROCEDURE Procedure (value: CHAR): LONGREAL; BEGIN RETURN value END Procedure;
  22437. END Test.
  22438. positive: procedure with long real as return type returning short integer
  22439. MODULE Test;
  22440. PROCEDURE Procedure (value: SHORTINT): LONGREAL; BEGIN RETURN value END Procedure;
  22441. END Test.
  22442. positive: procedure with long real as return type returning integer
  22443. MODULE Test;
  22444. PROCEDURE Procedure (value: INTEGER): LONGREAL; BEGIN RETURN value END Procedure;
  22445. END Test.
  22446. positive: procedure with long real as return type returning long integer
  22447. MODULE Test;
  22448. PROCEDURE Procedure (value: LONGINT): LONGREAL; BEGIN RETURN value END Procedure;
  22449. END Test.
  22450. positive: procedure with long real as return type returning huge integer
  22451. MODULE Test;
  22452. PROCEDURE Procedure (value: HUGEINT): LONGREAL; BEGIN RETURN value END Procedure;
  22453. END Test.
  22454. positive: procedure with long real as return type returning real
  22455. MODULE Test;
  22456. PROCEDURE Procedure (value: REAL): LONGREAL; BEGIN RETURN value END Procedure;
  22457. END Test.
  22458. positive: procedure with long real as return type returning long real
  22459. MODULE Test;
  22460. PROCEDURE Procedure (value: LONGREAL): LONGREAL; BEGIN RETURN value END Procedure;
  22461. END Test.
  22462. negative: procedure with long real as return type returning set
  22463. MODULE Test;
  22464. PROCEDURE Procedure (value: SET): LONGREAL; BEGIN RETURN value END Procedure;
  22465. END Test.
  22466. negative: procedure with long real as return type returning array
  22467. MODULE Test;
  22468. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): LONGREAL; BEGIN RETURN value END Procedure;
  22469. END Test.
  22470. negative: procedure with long real as return type returning record
  22471. MODULE Test;
  22472. PROCEDURE Procedure (value: RECORD END): LONGREAL; BEGIN RETURN value END Procedure;
  22473. END Test.
  22474. negative: procedure with long real as return type returning object
  22475. MODULE Test;
  22476. PROCEDURE Procedure (value: OBJECT END): LONGREAL; BEGIN RETURN value END Procedure;
  22477. END Test.
  22478. negative: procedure with long real as return type returning base object
  22479. MODULE Test;
  22480. PROCEDURE Procedure (value: OBJECT): LONGREAL; BEGIN RETURN value END Procedure;
  22481. END Test.
  22482. negative: procedure with long real as return type returning pointer to array
  22483. MODULE Test;
  22484. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): LONGREAL; BEGIN RETURN value END Procedure;
  22485. END Test.
  22486. negative: procedure with long real as return type returning pointer to record
  22487. MODULE Test;
  22488. PROCEDURE Procedure (value: POINTER TO RECORD END): LONGREAL; BEGIN RETURN value END Procedure;
  22489. END Test.
  22490. negative: procedure with long real as return type returning procedure
  22491. MODULE Test;
  22492. PROCEDURE Procedure (value: PROCEDURE): LONGREAL; BEGIN RETURN value END Procedure;
  22493. END Test.
  22494. negative: procedure with set as return type returning boolean
  22495. MODULE Test;
  22496. PROCEDURE Procedure (value: BOOLEAN): SET; BEGIN RETURN value END Procedure;
  22497. END Test.
  22498. negative: procedure with set as return type returning character
  22499. MODULE Test;
  22500. PROCEDURE Procedure (value: CHAR): SET; BEGIN RETURN value END Procedure;
  22501. END Test.
  22502. negative: procedure with set as return type returning integer
  22503. MODULE Test;
  22504. PROCEDURE Procedure (value: INTEGER): SET; BEGIN RETURN value END Procedure;
  22505. END Test.
  22506. negative: procedure with set as return type returning real
  22507. MODULE Test;
  22508. PROCEDURE Procedure (value: REAL): SET; BEGIN RETURN value END Procedure;
  22509. END Test.
  22510. positive: procedure with set as return type returning set
  22511. MODULE Test;
  22512. PROCEDURE Procedure (value: SET): SET; BEGIN RETURN value END Procedure;
  22513. END Test.
  22514. negative: procedure with set as return type returning array
  22515. MODULE Test;
  22516. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): SET; BEGIN RETURN value END Procedure;
  22517. END Test.
  22518. negative: procedure with set as return type returning record
  22519. MODULE Test;
  22520. PROCEDURE Procedure (value: RECORD END): SET; BEGIN RETURN value END Procedure;
  22521. END Test.
  22522. negative: procedure with set as return type returning object
  22523. MODULE Test;
  22524. PROCEDURE Procedure (value: OBJECT END): SET; BEGIN RETURN value END Procedure;
  22525. END Test.
  22526. negative: procedure with set as return type returning base object
  22527. MODULE Test;
  22528. PROCEDURE Procedure (value: OBJECT): SET; BEGIN RETURN value END Procedure;
  22529. END Test.
  22530. negative: procedure with set as return type returning pointer to array
  22531. MODULE Test;
  22532. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): SET; BEGIN RETURN value END Procedure;
  22533. END Test.
  22534. negative: procedure with set as return type returning pointer to record
  22535. MODULE Test;
  22536. PROCEDURE Procedure (value: POINTER TO RECORD END): SET; BEGIN RETURN value END Procedure;
  22537. END Test.
  22538. negative: procedure with set as return type returning procedure
  22539. MODULE Test;
  22540. PROCEDURE Procedure (value: PROCEDURE): SET; BEGIN RETURN value END Procedure;
  22541. END Test.
  22542. negative: procedure with array as return type returning boolean
  22543. MODULE Test;
  22544. PROCEDURE Procedure (value: BOOLEAN): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22545. END Test.
  22546. negative: procedure with array as return type returning character
  22547. MODULE Test;
  22548. PROCEDURE Procedure (value: CHAR): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22549. END Test.
  22550. negative: procedure with array as return type returning integer
  22551. MODULE Test;
  22552. PROCEDURE Procedure (value: INTEGER): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22553. END Test.
  22554. negative: procedure with array as return type returning real
  22555. MODULE Test;
  22556. PROCEDURE Procedure (value: REAL): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22557. END Test.
  22558. negative: procedure with array as return type returning set
  22559. MODULE Test;
  22560. PROCEDURE Procedure (value: SET): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22561. END Test.
  22562. positive: procedure with array as return type returning compatible array
  22563. MODULE Test;
  22564. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22565. END Test.
  22566. negative: procedure with array as return type returning incompatible array
  22567. MODULE Test;
  22568. PROCEDURE Procedure (value: ARRAY 10 OF SET): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22569. END Test.
  22570. negative: procedure with array as return type returning open array
  22571. MODULE Test;
  22572. PROCEDURE Procedure (value: ARRAY OF CHAR): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22573. END Test.
  22574. negative: procedure with array as return type returning record
  22575. MODULE Test;
  22576. PROCEDURE Procedure (value: RECORD END): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22577. END Test.
  22578. negative: procedure with array as return type returning object
  22579. MODULE Test;
  22580. PROCEDURE Procedure (value: OBJECT END): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22581. END Test.
  22582. negative: procedure with array as return type returning base object
  22583. MODULE Test;
  22584. PROCEDURE Procedure (value: OBJECT): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22585. END Test.
  22586. negative: procedure with array as return type returning pointer to array
  22587. MODULE Test;
  22588. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22589. END Test.
  22590. negative: procedure with array as return type returning pointer to record
  22591. MODULE Test;
  22592. PROCEDURE Procedure (value: POINTER TO RECORD END): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22593. END Test.
  22594. negative: procedure with array as return type returning procedure
  22595. MODULE Test;
  22596. PROCEDURE Procedure (value: PROCEDURE): ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22597. END Test.
  22598. negative: procedure with record as return type returning boolean
  22599. MODULE Test;
  22600. PROCEDURE Procedure (value: BOOLEAN): RECORD END; BEGIN RETURN value END Procedure;
  22601. END Test.
  22602. negative: procedure with record as return type returning character
  22603. MODULE Test;
  22604. PROCEDURE Procedure (value: CHAR): RECORD END; BEGIN RETURN value END Procedure;
  22605. END Test.
  22606. negative: procedure with record as return type returning integer
  22607. MODULE Test;
  22608. PROCEDURE Procedure (value: INTEGER): RECORD END; BEGIN RETURN value END Procedure;
  22609. END Test.
  22610. negative: procedure with record as return type returning real
  22611. MODULE Test;
  22612. PROCEDURE Procedure (value: REAL): RECORD END; BEGIN RETURN value END Procedure;
  22613. END Test.
  22614. negative: procedure with record as return type returning set
  22615. MODULE Test;
  22616. PROCEDURE Procedure (value: SET): RECORD END; BEGIN RETURN value END Procedure;
  22617. END Test.
  22618. negative: procedure with record as return type returning array
  22619. MODULE Test;
  22620. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): RECORD END; BEGIN RETURN value END Procedure;
  22621. END Test.
  22622. positive: procedure with record as return type returning record
  22623. MODULE Test;
  22624. TYPE Record = RECORD END;
  22625. PROCEDURE Procedure (value: Record): Record; BEGIN RETURN value END Procedure;
  22626. END Test.
  22627. positive: procedure with record as return type returning compatible record
  22628. MODULE Test;
  22629. TYPE Record = RECORD END;
  22630. PROCEDURE Procedure (value: RECORD (Record) END): Record; BEGIN RETURN value END Procedure;
  22631. END Test.
  22632. negative: procedure with record as return type returning incompatible record
  22633. MODULE Test;
  22634. TYPE Record = RECORD END;
  22635. PROCEDURE Procedure (value: Record): RECORD (Record) END; BEGIN RETURN value END Procedure;
  22636. END Test.
  22637. negative: procedure with record as return type returning object
  22638. MODULE Test;
  22639. PROCEDURE Procedure (value: OBJECT END): RECORD END; BEGIN RETURN value END Procedure;
  22640. END Test.
  22641. negative: procedure with record as return type returning base object
  22642. MODULE Test;
  22643. PROCEDURE Procedure (value: OBJECT): RECORD END; BEGIN RETURN value END Procedure;
  22644. END Test.
  22645. negative: procedure with record as return type returning pointer to array
  22646. MODULE Test;
  22647. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): RECORD END; BEGIN RETURN value END Procedure;
  22648. END Test.
  22649. negative: procedure with record as return type returning pointer to record
  22650. MODULE Test;
  22651. PROCEDURE Procedure (value: POINTER TO RECORD END): RECORD END; BEGIN RETURN value END Procedure;
  22652. END Test.
  22653. negative: procedure with record as return type returning procedure
  22654. MODULE Test;
  22655. PROCEDURE Procedure (value: PROCEDURE): RECORD END; BEGIN RETURN value END Procedure;
  22656. END Test.
  22657. negative: procedure with object as return type returning boolean
  22658. MODULE Test;
  22659. PROCEDURE Procedure (value: BOOLEAN): OBJECT END; BEGIN RETURN value END Procedure;
  22660. END Test.
  22661. negative: procedure with object as return type returning character
  22662. MODULE Test;
  22663. PROCEDURE Procedure (value: CHAR): OBJECT END; BEGIN RETURN value END Procedure;
  22664. END Test.
  22665. negative: procedure with object as return type returning integer
  22666. MODULE Test;
  22667. PROCEDURE Procedure (value: INTEGER): OBJECT END; BEGIN RETURN value END Procedure;
  22668. END Test.
  22669. negative: procedure with object as return type returning real
  22670. MODULE Test;
  22671. PROCEDURE Procedure (value: REAL): OBJECT END; BEGIN RETURN value END Procedure;
  22672. END Test.
  22673. negative: procedure with object as return type returning set
  22674. MODULE Test;
  22675. PROCEDURE Procedure (value: SET): OBJECT END; BEGIN RETURN value END Procedure;
  22676. END Test.
  22677. negative: procedure with object as return type returning array
  22678. MODULE Test;
  22679. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): OBJECT END; BEGIN RETURN value END Procedure;
  22680. END Test.
  22681. negative: procedure with object as return type returning record
  22682. MODULE Test;
  22683. PROCEDURE Procedure (value: RECORD END): OBJECT END; BEGIN RETURN value END Procedure;
  22684. END Test.
  22685. positive: procedure with object as return type returning object
  22686. MODULE Test;
  22687. TYPE Object = OBJECT END Object;
  22688. PROCEDURE Procedure (value: Object): Object; BEGIN RETURN value END Procedure;
  22689. END Test.
  22690. positive: procedure with object as return type returning compatible object
  22691. MODULE Test;
  22692. TYPE Object = OBJECT END Object;
  22693. PROCEDURE Procedure (value: OBJECT (Object) END): Object; BEGIN RETURN value END Procedure;
  22694. END Test.
  22695. negative: procedure with object as return type returning incompatible object
  22696. MODULE Test;
  22697. TYPE Object = OBJECT END Object;
  22698. PROCEDURE Procedure (value: Object): OBJECT (Object) END; BEGIN RETURN value END Procedure;
  22699. END Test.
  22700. negative: procedure with object as return type returning base object
  22701. MODULE Test;
  22702. PROCEDURE Procedure (value: OBJECT): OBJECT END; BEGIN RETURN value END Procedure;
  22703. END Test.
  22704. negative: procedure with object as return type returning pointer to array
  22705. MODULE Test;
  22706. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): OBJECT END; BEGIN RETURN value END Procedure;
  22707. END Test.
  22708. negative: procedure with object as return type returning pointer to record
  22709. MODULE Test;
  22710. PROCEDURE Procedure (value: POINTER TO RECORD END): OBJECT END; BEGIN RETURN value END Procedure;
  22711. END Test.
  22712. negative: procedure with object as return type returning procedure
  22713. MODULE Test;
  22714. PROCEDURE Procedure (value: PROCEDURE): OBJECT END; BEGIN RETURN value END Procedure;
  22715. END Test.
  22716. positive: procedure with object as return type returning nil pointer
  22717. MODULE Test;
  22718. PROCEDURE Procedure (): OBJECT END; BEGIN RETURN NIL END Procedure;
  22719. END Test.
  22720. negative: procedure with base object as return type returning boolean
  22721. MODULE Test;
  22722. PROCEDURE Procedure (value: BOOLEAN): OBJECT; BEGIN RETURN value END Procedure;
  22723. END Test.
  22724. negative: procedure with base object as return type returning character
  22725. MODULE Test;
  22726. PROCEDURE Procedure (value: CHAR): OBJECT; BEGIN RETURN value END Procedure;
  22727. END Test.
  22728. negative: procedure with base object as return type returning integer
  22729. MODULE Test;
  22730. PROCEDURE Procedure (value: INTEGER): OBJECT; BEGIN RETURN value END Procedure;
  22731. END Test.
  22732. negative: procedure with base object as return type returning real
  22733. MODULE Test;
  22734. PROCEDURE Procedure (value: REAL): OBJECT; BEGIN RETURN value END Procedure;
  22735. END Test.
  22736. negative: procedure with base object as return type returning set
  22737. MODULE Test;
  22738. PROCEDURE Procedure (value: SET): OBJECT; BEGIN RETURN value END Procedure;
  22739. END Test.
  22740. negative: procedure with base object as return type returning array
  22741. MODULE Test;
  22742. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): OBJECT; BEGIN RETURN value END Procedure;
  22743. END Test.
  22744. negative: procedure with base object as return type returning record
  22745. MODULE Test;
  22746. PROCEDURE Procedure (value: RECORD END): OBJECT; BEGIN RETURN value END Procedure;
  22747. END Test.
  22748. positive: procedure with base object as return type returning object
  22749. MODULE Test;
  22750. PROCEDURE Procedure (value: OBJECT END): OBJECT; BEGIN RETURN value END Procedure;
  22751. END Test.
  22752. positive: procedure with base object as return type returning base object
  22753. MODULE Test;
  22754. PROCEDURE Procedure (value: OBJECT): OBJECT; BEGIN RETURN value END Procedure;
  22755. END Test.
  22756. negative: procedure with base object as return type returning pointer to array
  22757. MODULE Test;
  22758. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): OBJECT; BEGIN RETURN value END Procedure;
  22759. END Test.
  22760. negative: procedure with base object as return type returning procedure
  22761. MODULE Test;
  22762. PROCEDURE Procedure (value: PROCEDURE): OBJECT; BEGIN RETURN value END Procedure;
  22763. END Test.
  22764. positive: procedure with base object as return type returning pointer to record
  22765. MODULE Test;
  22766. PROCEDURE Procedure (value: POINTER TO RECORD END): OBJECT; BEGIN RETURN value END Procedure;
  22767. END Test.
  22768. positive: procedure with base object as return type returning nil pointer
  22769. MODULE Test;
  22770. PROCEDURE Procedure (): OBJECT; BEGIN RETURN NIL END Procedure;
  22771. END Test.
  22772. negative: procedure with pointer to array as return type returning boolean
  22773. MODULE Test;
  22774. PROCEDURE Procedure (value: BOOLEAN): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22775. END Test.
  22776. negative: procedure with pointer to array as return type returning character
  22777. MODULE Test;
  22778. PROCEDURE Procedure (value: CHAR): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22779. END Test.
  22780. negative: procedure with pointer to array as return type returning integer
  22781. MODULE Test;
  22782. PROCEDURE Procedure (value: INTEGER): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22783. END Test.
  22784. negative: procedure with pointer to array as return type returning real
  22785. MODULE Test;
  22786. PROCEDURE Procedure (value: REAL): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22787. END Test.
  22788. negative: procedure with pointer to array as return type returning set
  22789. MODULE Test;
  22790. PROCEDURE Procedure (value: SET): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22791. END Test.
  22792. negative: procedure with pointer to array as return type returning array
  22793. MODULE Test;
  22794. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22795. END Test.
  22796. negative: procedure with pointer to array as return type returning record
  22797. MODULE Test;
  22798. PROCEDURE Procedure (value: RECORD END): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22799. END Test.
  22800. negative: procedure with pointer to array as return type returning object
  22801. MODULE Test;
  22802. PROCEDURE Procedure (value: OBJECT END): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22803. END Test.
  22804. negative: procedure with pointer to array as return type returning base object
  22805. MODULE Test;
  22806. PROCEDURE Procedure (value: OBJECT): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22807. END Test.
  22808. positive: procedure with pointer to array as return type returning compatible pointer to array
  22809. MODULE Test;
  22810. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22811. END Test.
  22812. negative: procedure with pointer to array as return type returning incompatible pointer to array
  22813. MODULE Test;
  22814. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF SET): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22815. END Test.
  22816. negative: procedure with pointer to array as return type returning pointer to record
  22817. MODULE Test;
  22818. PROCEDURE Procedure (value: POINTER TO RECORD END): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22819. END Test.
  22820. negative: procedure with pointer to array as return type returning procedure
  22821. MODULE Test;
  22822. PROCEDURE Procedure (value: PROCEDURE): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN value END Procedure;
  22823. END Test.
  22824. positive: procedure with pointer to array as return type returning nil pointer
  22825. MODULE Test;
  22826. PROCEDURE Procedure (): POINTER TO ARRAY 10 OF CHAR; BEGIN RETURN NIL END Procedure;
  22827. END Test.
  22828. negative: procedure with pointer to record as return type returning boolean
  22829. MODULE Test;
  22830. PROCEDURE Procedure (value: BOOLEAN): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22831. END Test.
  22832. negative: procedure with pointer to record as return type returning character
  22833. MODULE Test;
  22834. PROCEDURE Procedure (value: CHAR): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22835. END Test.
  22836. negative: procedure with pointer to record as return type returning integer
  22837. MODULE Test;
  22838. PROCEDURE Procedure (value: INTEGER): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22839. END Test.
  22840. negative: procedure with pointer to record as return type returning real
  22841. MODULE Test;
  22842. PROCEDURE Procedure (value: REAL): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22843. END Test.
  22844. negative: procedure with pointer to record as return type returning set
  22845. MODULE Test;
  22846. PROCEDURE Procedure (value: SET): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22847. END Test.
  22848. negative: procedure with pointer to record as return type returning array
  22849. MODULE Test;
  22850. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22851. END Test.
  22852. negative: procedure with pointer to record as return type returning record
  22853. MODULE Test;
  22854. PROCEDURE Procedure (value: RECORD END): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22855. END Test.
  22856. negative: procedure with pointer to record as return type returning object
  22857. MODULE Test;
  22858. PROCEDURE Procedure (value: OBJECT END): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22859. END Test.
  22860. negative: procedure with pointer to record as return type returning base object
  22861. MODULE Test;
  22862. PROCEDURE Procedure (value: OBJECT): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22863. END Test.
  22864. negative: procedure with pointer to record as return type returning pointer to array
  22865. MODULE Test;
  22866. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22867. END Test.
  22868. positive: procedure with pointer to record as return type returning pointer to record
  22869. MODULE Test;
  22870. TYPE Record = RECORD END;
  22871. PROCEDURE Procedure (value: POINTER TO Record): POINTER TO Record; BEGIN RETURN value END Procedure;
  22872. END Test.
  22873. positive: procedure with pointer to record as return type returning compatible pointer to record
  22874. MODULE Test;
  22875. TYPE Record = RECORD END;
  22876. PROCEDURE Procedure (value: POINTER TO RECORD (Record) END): POINTER TO Record; BEGIN RETURN value END Procedure;
  22877. END Test.
  22878. negative: procedure with pointer to record as return type returning incompatible pointer to record
  22879. MODULE Test;
  22880. TYPE Record = RECORD END;
  22881. PROCEDURE Procedure (value: POINTER TO Record): POINTER TO RECORD (Record) END; BEGIN RETURN value END Procedure;
  22882. END Test.
  22883. negative: procedure with pointer to record as return type returning procedure
  22884. MODULE Test;
  22885. PROCEDURE Procedure (value: PROCEDURE): POINTER TO RECORD END; BEGIN RETURN value END Procedure;
  22886. END Test.
  22887. positive: procedure with pointer to record as return type returning nil pointer
  22888. MODULE Test;
  22889. PROCEDURE Procedure (): POINTER TO RECORD END; BEGIN RETURN NIL END Procedure;
  22890. END Test.
  22891. negative: procedure with procedure as return type returning boolean
  22892. MODULE Test;
  22893. PROCEDURE Procedure (value: BOOLEAN): PROCEDURE; BEGIN RETURN value END Procedure;
  22894. END Test.
  22895. negative: procedure with procedure as return type returning character
  22896. MODULE Test;
  22897. PROCEDURE Procedure (value: CHAR): PROCEDURE; BEGIN RETURN value END Procedure;
  22898. END Test.
  22899. negative: procedure with procedure as return type returning integer
  22900. MODULE Test;
  22901. PROCEDURE Procedure (value: INTEGER): PROCEDURE; BEGIN RETURN value END Procedure;
  22902. END Test.
  22903. negative: procedure with procedure as return type returning real
  22904. MODULE Test;
  22905. PROCEDURE Procedure (value: REAL): PROCEDURE; BEGIN RETURN value END Procedure;
  22906. END Test.
  22907. negative: procedure with procedure as return type returning set
  22908. MODULE Test;
  22909. PROCEDURE Procedure (value: SET): PROCEDURE; BEGIN RETURN value END Procedure;
  22910. END Test.
  22911. negative: procedure with procedure as return type returning array
  22912. MODULE Test;
  22913. PROCEDURE Procedure (value: ARRAY 10 OF CHAR): PROCEDURE; BEGIN RETURN value END Procedure;
  22914. END Test.
  22915. negative: procedure with procedure as return type returning record
  22916. MODULE Test;
  22917. PROCEDURE Procedure (value: RECORD END): PROCEDURE; BEGIN RETURN value END Procedure;
  22918. END Test.
  22919. negative: procedure with procedure as return type returning object
  22920. MODULE Test;
  22921. PROCEDURE Procedure (value: OBJECT END): PROCEDURE; BEGIN RETURN value END Procedure;
  22922. END Test.
  22923. negative: procedure with procedure as return type returning base object
  22924. MODULE Test;
  22925. PROCEDURE Procedure (value: OBJECT): PROCEDURE; BEGIN RETURN value END Procedure;
  22926. END Test.
  22927. negative: procedure with procedure as return type returning pointer to array
  22928. MODULE Test;
  22929. PROCEDURE Procedure (value: POINTER TO ARRAY 10 OF CHAR): PROCEDURE; BEGIN RETURN value END Procedure;
  22930. END Test.
  22931. negative: procedure with procedure as return type returning pointer to record
  22932. MODULE Test;
  22933. PROCEDURE Procedure (value: POINTER TO RECORD END): PROCEDURE; BEGIN RETURN value END Procedure;
  22934. END Test.
  22935. positive: procedure with procedure as return type returning compatible procedure
  22936. MODULE Test;
  22937. PROCEDURE Procedure (value: PROCEDURE): PROCEDURE; BEGIN RETURN value END Procedure;
  22938. END Test.
  22939. negative: procedure with procedure as return type returning incompatible procedure
  22940. MODULE Test;
  22941. PROCEDURE Procedure (value: PROCEDURE (value: INTEGER)): PROCEDURE; BEGIN RETURN value END Procedure;
  22942. END Test.
  22943. positive: procedure with procedure as return type returning itself
  22944. MODULE Test;
  22945. TYPE Type = PROCEDURE (): Type;
  22946. PROCEDURE Procedure (): Type; BEGIN RETURN Procedure END Procedure;
  22947. END Test.
  22948. positive: procedure with procedure as return type returning nil pointer
  22949. MODULE Test;
  22950. PROCEDURE Procedure (): PROCEDURE; BEGIN RETURN NIL END Procedure;
  22951. END Test.
  22952. # exit statement
  22953. negative: unbounded exit statement
  22954. MODULE Test;
  22955. BEGIN EXIT
  22956. END Test.
  22957. positive: exit statement within loop
  22958. MODULE Test;
  22959. BEGIN LOOP EXIT END
  22960. END Test.
  22961. negative: exit statement before loop
  22962. MODULE Test;
  22963. BEGIN EXIT ; LOOP END
  22964. END Test.
  22965. negative: exit statement after loop
  22966. MODULE Test;
  22967. BEGIN LOOP END ; EXIT
  22968. END Test.
  22969. positive: exit statement within nested loop
  22970. MODULE Test;
  22971. BEGIN LOOP LOOP EXIT END END
  22972. END Test.
  22973. positive: exit statement before nested loop
  22974. MODULE Test;
  22975. BEGIN LOOP EXIT ; LOOP END END
  22976. END Test.
  22977. positive: exit statement after nested loop
  22978. MODULE Test;
  22979. BEGIN LOOP LOOP END ; EXIT END
  22980. END Test.
  22981. # assert statement
  22982. positive: assert statement with constant true condition
  22983. MODULE Test;
  22984. BEGIN ASSERT (TRUE);
  22985. END Test.
  22986. negative: assert statement with constant false condition
  22987. MODULE Test;
  22988. BEGIN ASSERT (FALSE);
  22989. END Test.
  22990. positive: unreachable assert statement with constant false condition
  22991. MODULE Test;
  22992. BEGIN IF FALSE THEN ASSERT (FALSE) END;
  22993. END Test.
  22994. positive: assert statement with positive number
  22995. MODULE Test;
  22996. BEGIN ASSERT (TRUE, 5);
  22997. END Test.
  22998. positive: assert statement with negative number
  22999. MODULE Test;
  23000. BEGIN ASSERT (TRUE, -5);
  23001. END Test.
  23002. positive: assert statement with zero number
  23003. MODULE Test;
  23004. BEGIN ASSERT (TRUE, 0);
  23005. END Test.
  23006. negative: assert statement with constant condition of type character
  23007. MODULE Test;
  23008. BEGIN ASSERT ('a');
  23009. END Test.
  23010. negative: assert statement with constant condition of type integer
  23011. MODULE Test;
  23012. BEGIN ASSERT (5);
  23013. END Test.
  23014. negative: assert statement with constant condition of type real
  23015. MODULE Test;
  23016. BEGIN ASSERT (4.5);
  23017. END Test.
  23018. negative: assert statement with constant condition of type set
  23019. MODULE Test;
  23020. BEGIN ASSERT ({5});
  23021. END Test.
  23022. negative: assert statement with constant condition of type string
  23023. MODULE Test;
  23024. BEGIN ASSERT ("condition");
  23025. END Test.
  23026. negative: assert statement with constant condition of type nil pointer
  23027. MODULE Test;
  23028. BEGIN ASSERT (NIL);
  23029. END Test.
  23030. positive: assert statement with condition of type boolean
  23031. MODULE Test;
  23032. VAR condition: BOOLEAN;
  23033. BEGIN ASSERT (condition);
  23034. END Test.
  23035. negative: assert statement with condition of type character
  23036. MODULE Test;
  23037. VAR condition: CHAR;
  23038. BEGIN ASSERT (condition);
  23039. END Test.
  23040. negative: assert statement with condition of type short integer
  23041. MODULE Test;
  23042. VAR condition: SHORTINT;
  23043. BEGIN ASSERT (condition);
  23044. END Test.
  23045. negative: assert statement with condition of type integer
  23046. MODULE Test;
  23047. VAR condition: INTEGER;
  23048. BEGIN ASSERT (condition);
  23049. END Test.
  23050. negative: assert statement with condition of type long integer
  23051. MODULE Test;
  23052. VAR condition: LONGINT;
  23053. BEGIN ASSERT (condition);
  23054. END Test.
  23055. negative: assert statement with condition of type huge integer
  23056. MODULE Test;
  23057. VAR condition: HUGEINT;
  23058. BEGIN ASSERT (condition);
  23059. END Test.
  23060. negative: assert statement with condition of type real
  23061. MODULE Test;
  23062. VAR condition: REAL;
  23063. BEGIN ASSERT (condition);
  23064. END Test.
  23065. negative: assert statement with condition of type long real
  23066. MODULE Test;
  23067. VAR condition: LONGREAL;
  23068. BEGIN ASSERT (condition);
  23069. END Test.
  23070. negative: assert statement with condition of type set
  23071. MODULE Test;
  23072. VAR condition: SET;
  23073. BEGIN ASSERT (condition);
  23074. END Test.
  23075. negative: assert statement with condition of type array
  23076. MODULE Test;
  23077. VAR condition: ARRAY 10 OF CHAR;
  23078. BEGIN ASSERT (condition);
  23079. END Test.
  23080. negative: assert statement with condition of type record
  23081. MODULE Test;
  23082. VAR condition: RECORD END;
  23083. BEGIN ASSERT (condition);
  23084. END Test.
  23085. negative: assert statement with condition of type object
  23086. MODULE Test;
  23087. VAR condition: OBJECT;
  23088. BEGIN ASSERT (condition);
  23089. END Test.
  23090. negative: assert statement with condition of type pointer
  23091. MODULE Test;
  23092. VAR condition: POINTER TO RECORD END;
  23093. BEGIN ASSERT (condition);
  23094. END Test.
  23095. negative: assert statement with condition of type procedure
  23096. MODULE Test;
  23097. VAR condition: PROCEDURE;
  23098. BEGIN ASSERT (condition);
  23099. END Test.
  23100. negative: assert statement with import as condition
  23101. MODULE Test;
  23102. IMPORT condition := Dummy;
  23103. BEGIN ASSERT (condition);
  23104. END Test.
  23105. negative: assert statement with type as condition
  23106. MODULE Test;
  23107. TYPE condition = BOOLEAN
  23108. BEGIN ASSERT (condition);
  23109. END Test.
  23110. negative: assert statement with constant number of type character
  23111. MODULE Test;
  23112. BEGIN ASSERT (TRUE, 'a');
  23113. END Test.
  23114. positive: assert statement with constant number of type integer
  23115. MODULE Test;
  23116. BEGIN ASSERT (TRUE, 5);
  23117. END Test.
  23118. negative: assert statement with constant number of type real
  23119. MODULE Test;
  23120. BEGIN ASSERT (TRUE, 4.5);
  23121. END Test.
  23122. negative: assert statement with constant number of type set
  23123. MODULE Test;
  23124. BEGIN ASSERT (TRUE, {5});
  23125. END Test.
  23126. negative: assert statement with constant number of type string
  23127. MODULE Test;
  23128. BEGIN ASSERT (TRUE, "number");
  23129. END Test.
  23130. negative: assert statement with constant number of type nil pointer
  23131. MODULE Test;
  23132. BEGIN ASSERT (TRUE, NIL);
  23133. END Test.
  23134. negative: assert statement with number of type boolean
  23135. MODULE Test;
  23136. VAR number: BOOLEAN;
  23137. BEGIN ASSERT (TRUE, number);
  23138. END Test.
  23139. negative: assert statement with number of type character
  23140. MODULE Test;
  23141. VAR number: CHAR;
  23142. BEGIN ASSERT (TRUE, number);
  23143. END Test.
  23144. negative: assert statement with number of type short integer
  23145. MODULE Test;
  23146. VAR number: SHORTINT;
  23147. BEGIN ASSERT (TRUE, number);
  23148. END Test.
  23149. negative: assert statement with number of type integer
  23150. MODULE Test;
  23151. VAR number: INTEGER;
  23152. BEGIN ASSERT (TRUE, number);
  23153. END Test.
  23154. negative: assert statement with number of type long integer
  23155. MODULE Test;
  23156. VAR number: LONGINT;
  23157. BEGIN ASSERT (TRUE, number);
  23158. END Test.
  23159. negative: assert statement with number of type huge integer
  23160. MODULE Test;
  23161. VAR number: HUGEINT;
  23162. BEGIN ASSERT (TRUE, number);
  23163. END Test.
  23164. negative: assert statement with number of type real
  23165. MODULE Test;
  23166. VAR number: REAL;
  23167. BEGIN ASSERT (TRUE, number);
  23168. END Test.
  23169. negative: assert statement with number of type long real
  23170. MODULE Test;
  23171. VAR number: LONGREAL;
  23172. BEGIN ASSERT (TRUE, number);
  23173. END Test.
  23174. negative: assert statement with number of type set
  23175. MODULE Test;
  23176. VAR number: SET;
  23177. BEGIN ASSERT (TRUE, number);
  23178. END Test.
  23179. negative: assert statement with number of type array
  23180. MODULE Test;
  23181. VAR number: ARRAY 10 OF CHAR;
  23182. BEGIN ASSERT (TRUE, number);
  23183. END Test.
  23184. negative: assert statement with number of type record
  23185. MODULE Test;
  23186. VAR number: RECORD END;
  23187. BEGIN ASSERT (TRUE, number);
  23188. END Test.
  23189. negative: assert statement with number of type object
  23190. MODULE Test;
  23191. VAR number: OBJECT;
  23192. BEGIN ASSERT (TRUE, number);
  23193. END Test.
  23194. negative: assert statement with number of type pointer
  23195. MODULE Test;
  23196. VAR number: POINTER TO RECORD END;
  23197. BEGIN ASSERT (TRUE, number);
  23198. END Test.
  23199. negative: assert statement with number of type procedure
  23200. MODULE Test;
  23201. VAR number: PROCEDURE;
  23202. BEGIN ASSERT (TRUE, number);
  23203. END Test.
  23204. negative: assert statement with import as number
  23205. MODULE Test;
  23206. IMPORT number := Dummy;
  23207. BEGIN ASSERT (TRUE, number);
  23208. END Test.
  23209. negative: assert statement with type as number
  23210. MODULE Test;
  23211. TYPE number = INTEGER
  23212. BEGIN ASSERT (TRUE, number);
  23213. END Test.
  23214. # if statement
  23215. positive: if statement with constant true condition
  23216. MODULE Test;
  23217. BEGIN IF TRUE THEN END;
  23218. END Test.
  23219. positive: if statement with constant false condition
  23220. MODULE Test;
  23221. BEGIN IF FALSE THEN END;
  23222. END Test.
  23223. negative: if statement with constant condition of type character
  23224. MODULE Test;
  23225. BEGIN IF 'a' THEN END;
  23226. END Test.
  23227. negative: if statement with constant condition of type integer
  23228. MODULE Test;
  23229. BEGIN IF 5 THEN END;
  23230. END Test.
  23231. negative: if statement with constant condition of type real
  23232. MODULE Test;
  23233. BEGIN IF 4.5 THEN END;
  23234. END Test.
  23235. negative: if statement with constant condition of type set
  23236. MODULE Test;
  23237. BEGIN IF {5} THEN END;
  23238. END Test.
  23239. negative: if statement with constant condition of type string
  23240. MODULE Test;
  23241. BEGIN IF "condition" THEN END;
  23242. END Test.
  23243. negative: if statement with constant condition of type nil pointer
  23244. MODULE Test;
  23245. BEGIN IF NIL THEN END;
  23246. END Test.
  23247. positive: if statement with condition of type boolean
  23248. MODULE Test;
  23249. VAR condition: BOOLEAN;
  23250. BEGIN IF condition THEN END;
  23251. END Test.
  23252. negative: if statement with condition of type character
  23253. MODULE Test;
  23254. VAR condition: CHAR;
  23255. BEGIN IF condition THEN END;
  23256. END Test.
  23257. negative: if statement with condition of type short integer
  23258. MODULE Test;
  23259. VAR condition: SHORTINT;
  23260. BEGIN IF condition THEN END;
  23261. END Test.
  23262. negative: if statement with condition of type integer
  23263. MODULE Test;
  23264. VAR condition: INTEGER;
  23265. BEGIN IF condition THEN END;
  23266. END Test.
  23267. negative: if statement with condition of type long integer
  23268. MODULE Test;
  23269. VAR condition: LONGINT;
  23270. BEGIN IF condition THEN END;
  23271. END Test.
  23272. negative: if statement with condition of type huge integer
  23273. MODULE Test;
  23274. VAR condition: HUGEINT;
  23275. BEGIN IF condition THEN END;
  23276. END Test.
  23277. negative: if statement with condition of type real
  23278. MODULE Test;
  23279. VAR condition: REAL;
  23280. BEGIN IF condition THEN END;
  23281. END Test.
  23282. negative: if statement with condition of type long real
  23283. MODULE Test;
  23284. VAR condition: LONGREAL;
  23285. BEGIN IF condition THEN END;
  23286. END Test.
  23287. negative: if statement with condition of type set
  23288. MODULE Test;
  23289. VAR condition: SET;
  23290. BEGIN IF condition THEN END;
  23291. END Test.
  23292. negative: if statement with condition of type array
  23293. MODULE Test;
  23294. VAR condition: ARRAY 10 OF CHAR;
  23295. BEGIN IF condition THEN END;
  23296. END Test.
  23297. negative: if statement with condition of type record
  23298. MODULE Test;
  23299. VAR condition: RECORD END;
  23300. BEGIN IF condition THEN END;
  23301. END Test.
  23302. negative: if statement with condition of type object
  23303. MODULE Test;
  23304. VAR condition: OBJECT;
  23305. BEGIN IF condition THEN END;
  23306. END Test.
  23307. negative: if statement with condition of type pointer
  23308. MODULE Test;
  23309. VAR condition: POINTER TO RECORD END;
  23310. BEGIN IF condition THEN END;
  23311. END Test.
  23312. negative: if statement with condition of type procedure
  23313. MODULE Test;
  23314. VAR condition: PROCEDURE;
  23315. BEGIN IF condition THEN END;
  23316. END Test.
  23317. negative: if statement with import as condition
  23318. MODULE Test;
  23319. IMPORT condition := Dummy;
  23320. BEGIN IF condition THEN END;
  23321. END Test.
  23322. negative: if statement with type as condition
  23323. MODULE Test;
  23324. TYPE condition = BOOLEAN;
  23325. BEGIN IF condition THEN END;
  23326. END Test.
  23327. positive: else if statement with constant true condition
  23328. MODULE Test;
  23329. BEGIN IF TRUE THEN ELSIF TRUE THEN END;
  23330. END Test.
  23331. positive: else if statement with constant false condition
  23332. MODULE Test;
  23333. BEGIN IF TRUE THEN ELSIF FALSE THEN END;
  23334. END Test.
  23335. negative: else if statement with constant condition of type character
  23336. MODULE Test;
  23337. BEGIN IF TRUE THEN ELSIF 'a' THEN END;
  23338. END Test.
  23339. negative: else if statement with constant condition of type integer
  23340. MODULE Test;
  23341. BEGIN IF TRUE THEN ELSIF 5 THEN END;
  23342. END Test.
  23343. negative: else if statement with constant condition of type real
  23344. MODULE Test;
  23345. BEGIN IF TRUE THEN ELSIF 4.5 THEN END;
  23346. END Test.
  23347. negative: else if statement with constant condition of type set
  23348. MODULE Test;
  23349. BEGIN IF TRUE THEN ELSIF {5} THEN END;
  23350. END Test.
  23351. negative: else if statement with constant condition of type string
  23352. MODULE Test;
  23353. BEGIN IF TRUE THEN ELSIF "condition" THEN END;
  23354. END Test.
  23355. negative: else if statement with constant condition of type nil pointer
  23356. MODULE Test;
  23357. BEGIN IF TRUE THEN ELSIF NIL THEN END;
  23358. END Test.
  23359. positive: else if statement with condition of type boolean
  23360. MODULE Test;
  23361. VAR condition: BOOLEAN;
  23362. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23363. END Test.
  23364. negative: else if statement with condition of type character
  23365. MODULE Test;
  23366. VAR condition: CHAR;
  23367. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23368. END Test.
  23369. negative: else if statement with condition of type short integer
  23370. MODULE Test;
  23371. VAR condition: SHORTINT;
  23372. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23373. END Test.
  23374. negative: else if statement with condition of type integer
  23375. MODULE Test;
  23376. VAR condition: INTEGER;
  23377. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23378. END Test.
  23379. negative: else if statement with condition of type long integer
  23380. MODULE Test;
  23381. VAR condition: LONGINT;
  23382. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23383. END Test.
  23384. negative: else if statement with condition of type huge integer
  23385. MODULE Test;
  23386. VAR condition: HUGEINT;
  23387. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23388. END Test.
  23389. negative: else if statement with condition of type real
  23390. MODULE Test;
  23391. VAR condition: REAL;
  23392. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23393. END Test.
  23394. negative: else if statement with condition of type long real
  23395. MODULE Test;
  23396. VAR condition: LONGREAL;
  23397. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23398. END Test.
  23399. negative: else if statement with condition of type set
  23400. MODULE Test;
  23401. VAR condition: SET;
  23402. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23403. END Test.
  23404. negative: else if statement with condition of type array
  23405. MODULE Test;
  23406. VAR condition: ARRAY 10 OF CHAR;
  23407. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23408. END Test.
  23409. negative: else if statement with condition of type record
  23410. MODULE Test;
  23411. VAR condition: RECORD END;
  23412. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23413. END Test.
  23414. negative: else if statement with condition of type object
  23415. MODULE Test;
  23416. VAR condition: OBJECT;
  23417. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23418. END Test.
  23419. negative: else if statement with condition of type pointer
  23420. MODULE Test;
  23421. VAR condition: POINTER TO RECORD END;
  23422. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23423. END Test.
  23424. negative: else if statement with condition of type procedure
  23425. MODULE Test;
  23426. VAR condition: PROCEDURE;
  23427. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23428. END Test.
  23429. negative: else if statement with import as condition
  23430. MODULE Test;
  23431. IMPORT condition := Dummy;
  23432. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23433. END Test.
  23434. negative: else if statement with type as condition
  23435. MODULE Test;
  23436. TYPE condition = BOOLEAN;
  23437. BEGIN IF TRUE THEN ELSIF condition THEN END;
  23438. END Test.
  23439. # halt statement
  23440. negative: halt statement with constant number of type character
  23441. MODULE Test;
  23442. BEGIN HALT ('a');
  23443. END Test.
  23444. positive: halt statement with constant number of type integer
  23445. MODULE Test;
  23446. BEGIN HALT (105);
  23447. END Test.
  23448. negative: halt statement with constant number of type real
  23449. MODULE Test;
  23450. BEGIN HALT (4.5);
  23451. END Test.
  23452. negative: halt statement with constant number of type set
  23453. MODULE Test;
  23454. BEGIN HALT ({5});
  23455. END Test.
  23456. negative: halt statement with constant number of type string
  23457. MODULE Test;
  23458. BEGIN HALT ("number");
  23459. END Test.
  23460. negative: halt statement with constant number of type nil pointer
  23461. MODULE Test;
  23462. BEGIN HALT (NIL);
  23463. END Test.
  23464. negative: halt statement with number of type boolean
  23465. MODULE Test;
  23466. VAR number: BOOLEAN;
  23467. BEGIN HALT (number);
  23468. END Test.
  23469. negative: halt statement with number of type character
  23470. MODULE Test;
  23471. VAR number: CHAR;
  23472. BEGIN HALT (number);
  23473. END Test.
  23474. negative: halt statement with number of type short integer
  23475. MODULE Test;
  23476. VAR number: SHORTINT;
  23477. BEGIN HALT (number);
  23478. END Test.
  23479. negative: halt statement with number of type integer
  23480. MODULE Test;
  23481. VAR number: INTEGER;
  23482. BEGIN HALT (number);
  23483. END Test.
  23484. negative: halt statement with number of type long integer
  23485. MODULE Test;
  23486. VAR number: LONGINT;
  23487. BEGIN HALT (number);
  23488. END Test.
  23489. negative: halt statement with number of type huge integer
  23490. MODULE Test;
  23491. VAR number: HUGEINT;
  23492. BEGIN HALT (number);
  23493. END Test.
  23494. negative: halt statement with number of type real
  23495. MODULE Test;
  23496. VAR number: REAL;
  23497. BEGIN HALT (number);
  23498. END Test.
  23499. negative: halt statement with number of type long real
  23500. MODULE Test;
  23501. VAR number: LONGREAL;
  23502. BEGIN HALT (number);
  23503. END Test.
  23504. negative: halt statement with number of type set
  23505. MODULE Test;
  23506. VAR number: SET;
  23507. BEGIN HALT (number);
  23508. END Test.
  23509. negative: halt statement with number of type array
  23510. MODULE Test;
  23511. VAR number: ARRAY 10 OF CHAR;
  23512. BEGIN HALT (number);
  23513. END Test.
  23514. negative: halt statement with number of type record
  23515. MODULE Test;
  23516. VAR number: RECORD END;
  23517. BEGIN HALT (number);
  23518. END Test.
  23519. negative: halt statement with number of type object
  23520. MODULE Test;
  23521. VAR number: OBJECT;
  23522. BEGIN HALT (number);
  23523. END Test.
  23524. negative: halt statement with number of type pointer
  23525. MODULE Test;
  23526. VAR number: POINTER TO RECORD END;
  23527. BEGIN HALT (number);
  23528. END Test.
  23529. negative: halt statement with number of type procedure
  23530. MODULE Test;
  23531. VAR number: PROCEDURE;
  23532. BEGIN HALT (number);
  23533. END Test.
  23534. negative: halt statement with import as number
  23535. MODULE Test;
  23536. IMPORT number := Dummy;
  23537. BEGIN HALT (number);
  23538. END Test.
  23539. negative: halt statement with type as number
  23540. MODULE Test;
  23541. TYPE number = INTEGER;
  23542. BEGIN HALT (number);
  23543. END Test.
  23544. # case statement
  23545. negative: case statement with constant boolean value
  23546. MODULE Test;
  23547. BEGIN CASE TRUE OF TRUE: END
  23548. END Test.
  23549. positive: case statement with constant character value
  23550. MODULE Test;
  23551. BEGIN CASE 'a' OF 'a': END
  23552. END Test.
  23553. negative: case statement with constant character value and unmatched case
  23554. MODULE Test;
  23555. BEGIN CASE 't' OF 'y': END
  23556. END Test.
  23557. positive: case statement with constant character value and unmatched case and else
  23558. MODULE Test;
  23559. BEGIN CASE 'e' OF 0X: ELSE END
  23560. END Test.
  23561. positive: case statement with constant short integer value
  23562. MODULE Test;
  23563. BEGIN CASE 10H OF 10H: END
  23564. END Test.
  23565. positive: case statement with constant integer value
  23566. MODULE Test;
  23567. BEGIN CASE 1000H OF 1000H: END
  23568. END Test.
  23569. positive: case statement with constant long integer value
  23570. MODULE Test;
  23571. BEGIN CASE 100000H OF 100000H: END
  23572. END Test.
  23573. positive: case statement with constant huge integer value
  23574. MODULE Test;
  23575. BEGIN CASE 100000000H OF 100000000H: END
  23576. END Test.
  23577. positive: case statement with constant integer value and matched case
  23578. MODULE Test;
  23579. BEGIN CASE 5 OF 5: END
  23580. END Test.
  23581. negative: case statement with constant integer value and unmatched case
  23582. MODULE Test;
  23583. BEGIN CASE 1 OF 2: END
  23584. END Test.
  23585. positive: case statement with constant integer value and unmatched case and else
  23586. MODULE Test;
  23587. BEGIN CASE 9 OF 4: ELSE END
  23588. END Test.
  23589. negative: case statement with constant real value
  23590. MODULE Test;
  23591. BEGIN CASE 1.0 OF 1.0: END
  23592. END Test.
  23593. negative: case statement with constant long real value
  23594. MODULE Test;
  23595. BEGIN CASE 1.D0 OF 1.D0: END
  23596. END Test.
  23597. negative: case statement with constant set value
  23598. MODULE Test;
  23599. BEGIN CASE {} OF {}: END
  23600. END Test.
  23601. negative: case statement with constant string value
  23602. MODULE Test;
  23603. BEGIN CASE "value" OF "value": END
  23604. END Test.
  23605. negative: case statement with nil pointer value
  23606. MODULE Test;
  23607. BEGIN CASE NIL OF NIL: END
  23608. END Test.
  23609. negative: case statement with variable boolean value
  23610. MODULE Test;
  23611. VAR value: BOOLEAN;
  23612. BEGIN CASE value OF TRUE: END
  23613. END Test.
  23614. positive: case statement with variable character value
  23615. MODULE Test;
  23616. VAR value: CHAR;
  23617. BEGIN CASE value OF 3X: END
  23618. END Test.
  23619. positive: case statement with variable short integer value
  23620. MODULE Test;
  23621. VAR value: SHORTINT;
  23622. BEGIN CASE value OF 5: END
  23623. END Test.
  23624. positive: case statement with variable integer value
  23625. MODULE Test;
  23626. VAR value: INTEGER;
  23627. BEGIN CASE value OF 10: END
  23628. END Test.
  23629. positive: case statement with variable long integer value
  23630. MODULE Test;
  23631. VAR value: LONGINT;
  23632. BEGIN CASE value OF 9: END
  23633. END Test.
  23634. positive: case statement with variable huge integer value
  23635. MODULE Test;
  23636. VAR value: HUGEINT;
  23637. BEGIN CASE value OF 6: END
  23638. END Test.
  23639. negative: case statement with variable real value
  23640. MODULE Test;
  23641. VAR value: REAL;
  23642. BEGIN CASE value OF 0.5: END
  23643. END Test.
  23644. negative: case statement with variable long real value
  23645. MODULE Test;
  23646. VAR value: REAL;
  23647. BEGIN CASE value OF 0.D0: END
  23648. END Test.
  23649. negative: case statement with variable set value
  23650. MODULE Test;
  23651. VAR value: SET;
  23652. BEGIN CASE value OF {}: END
  23653. END Test.
  23654. negative: case statement with variable array value
  23655. MODULE Test;
  23656. VAR value: ARRAY 10 OF CHAR;
  23657. BEGIN CASE value OF value: END
  23658. END Test.
  23659. negative: case statement with variable record value
  23660. MODULE Test;
  23661. VAR value: RECORD END;
  23662. BEGIN CASE value OF value: END
  23663. END Test.
  23664. negative: case statement with variable object value
  23665. MODULE Test;
  23666. VAR value: OBJECT END;
  23667. BEGIN CASE value OF value: END
  23668. END Test.
  23669. negative: case statement with variable base object value
  23670. MODULE Test;
  23671. VAR value: OBJECT;
  23672. BEGIN CASE value OF value: END
  23673. END Test.
  23674. negative: case statement with variable pointer to record value
  23675. MODULE Test;
  23676. VAR value: POINTER TO RECORD END;
  23677. BEGIN CASE value OF value: END
  23678. END Test.
  23679. negative: case statement with variable pointer to array value
  23680. MODULE Test;
  23681. VAR value: POINTER TO ARRAY OF CHAR;
  23682. BEGIN CASE value OF value: END
  23683. END Test.
  23684. negative: case statement with variable procedure value
  23685. MODULE Test;
  23686. VAR value: PROCEDURE;
  23687. BEGIN CASE value OF value: END
  23688. END Test.
  23689. negative: case statement with import value
  23690. MODULE Test;
  23691. IMPORT value := Dummy;
  23692. BEGIN CASE value OF value: END
  23693. END Test.
  23694. negative: case statement with type value
  23695. MODULE Test;
  23696. TYPE value = INTEGER;
  23697. BEGIN CASE value OF value: END
  23698. END Test.
  23699. negative: character case statement with constant boolean case
  23700. MODULE Test;
  23701. VAR value: CHAR;
  23702. BEGIN CASE value OF TRUE: END
  23703. END Test.
  23704. positive: character case statement with constant character case
  23705. MODULE Test;
  23706. VAR value: CHAR;
  23707. BEGIN CASE value OF 'a': END
  23708. END Test.
  23709. negative: character case statement with constant short integer case
  23710. MODULE Test;
  23711. VAR value: CHAR;
  23712. BEGIN CASE value OF 10H: END
  23713. END Test.
  23714. negative: character case statement with constant integer case
  23715. MODULE Test;
  23716. VAR value: CHAR;
  23717. BEGIN CASE value OF 1000H: END
  23718. END Test.
  23719. negative: character case statement with constant long integer case
  23720. MODULE Test;
  23721. VAR value: CHAR;
  23722. BEGIN CASE value OF 100000H: END
  23723. END Test.
  23724. negative: character case statement with constant huge integer case
  23725. MODULE Test;
  23726. VAR value: CHAR;
  23727. BEGIN CASE value OF 100000000H: END
  23728. END Test.
  23729. negative: character case statement with constant real case
  23730. MODULE Test;
  23731. VAR value: CHAR;
  23732. BEGIN CASE value OF 1.0: END
  23733. END Test.
  23734. negative: character case statement with constant long real case
  23735. MODULE Test;
  23736. VAR value: CHAR;
  23737. BEGIN CASE value OF 1.D0: END
  23738. END Test.
  23739. negative: character case statement with constant set case
  23740. MODULE Test;
  23741. VAR value: CHAR;
  23742. BEGIN CASE value OF {}: END
  23743. END Test.
  23744. negative: character case statement with constant string case
  23745. MODULE Test;
  23746. VAR value: CHAR;
  23747. BEGIN CASE value OF "value": END
  23748. END Test.
  23749. negative: character case statement with nil pointer case
  23750. MODULE Test;
  23751. VAR value: CHAR;
  23752. BEGIN CASE value OF NIL: END
  23753. END Test.
  23754. negative: character case statement variable boolean case
  23755. MODULE Test;
  23756. VAR value: CHAR; case: BOOLEAN;
  23757. BEGIN CASE value OF case: END
  23758. END Test.
  23759. negative: character case statement with variable character case
  23760. MODULE Test;
  23761. VAR value, case: CHAR;
  23762. BEGIN CASE value OF case: END
  23763. END Test.
  23764. negative: character case statement with variable short integer case
  23765. MODULE Test;
  23766. VAR value: CHAR; case: SHORTINT;
  23767. BEGIN CASE value OF case: END
  23768. END Test.
  23769. negative: character case statement with variable integer case
  23770. MODULE Test;
  23771. VAR value: CHAR; case: INTEGER;
  23772. BEGIN CASE value OF case: END
  23773. END Test.
  23774. negative: character case statement with variable long integer case
  23775. MODULE Test;
  23776. VAR value: CHAR; case: LONGINT;
  23777. BEGIN CASE value OF case: END
  23778. END Test.
  23779. negative: character case statement with variable huge integer case
  23780. MODULE Test;
  23781. VAR value: CHAR; case: HUGEINT;
  23782. BEGIN CASE value OF case: END
  23783. END Test.
  23784. negative: character case statement with variable real case
  23785. MODULE Test;
  23786. VAR value: CHAR; case: REAL;
  23787. BEGIN CASE value OF case: END
  23788. END Test.
  23789. negative: character case statement with variable long real case
  23790. MODULE Test;
  23791. VAR value: CHAR; case: LONGREAL;
  23792. BEGIN CASE value OF case: END
  23793. END Test.
  23794. negative: character case statement with variable set case
  23795. MODULE Test;
  23796. VAR value: CHAR; case: SET;
  23797. BEGIN CASE value OF case: END
  23798. END Test.
  23799. negative: character case statement with variable array case
  23800. MODULE Test;
  23801. VAR value: CHAR; case: ARRAY 10 OF CHAR;
  23802. BEGIN CASE value OF case: END
  23803. END Test.
  23804. negative: character case statement with variable record case
  23805. MODULE Test;
  23806. VAR value: CHAR; case: RECORD END;
  23807. BEGIN CASE value OF case: END
  23808. END Test.
  23809. negative: character case statement with variable object case
  23810. MODULE Test;
  23811. VAR value: CHAR; case: OBJECT END;
  23812. BEGIN CASE value OF case: END
  23813. END Test.
  23814. negative: character case statement with variable base object case
  23815. MODULE Test;
  23816. VAR value: CHAR; case: OBJECT;
  23817. BEGIN CASE value OF case: END
  23818. END Test.
  23819. negative: character case statement with variable pointer to record case
  23820. MODULE Test;
  23821. VAR value: CHAR; case: POINTER TO RECORD END;
  23822. BEGIN CASE value OF case: END
  23823. END Test.
  23824. negative: character case statement with variable pointer to array case
  23825. MODULE Test;
  23826. VAR value: CHAR; case: POINTER TO ARRAY OF CHAR;
  23827. BEGIN CASE value OF case: END
  23828. END Test.
  23829. negative: character case statement with variable procedure case
  23830. MODULE Test;
  23831. VAR value: CHAR; case: PROCEDURE;
  23832. BEGIN CASE value OF case: END
  23833. END Test.
  23834. negative: character case statement with import case
  23835. MODULE Test;
  23836. IMPORT case := Dummy;
  23837. VAR value: CHAR;
  23838. BEGIN CASE value OF case: END
  23839. END Test.
  23840. negative: character case statement with type as case
  23841. MODULE Test;
  23842. TYPE case = INTEGER;
  23843. VAR value: CHAR;
  23844. BEGIN CASE value OF case: END
  23845. END Test.
  23846. negative: short integer case statement with constant boolean case
  23847. MODULE Test;
  23848. VAR value: SHORTINT;
  23849. BEGIN CASE value OF TRUE: END
  23850. END Test.
  23851. negative: short integer case statement with constant character case
  23852. MODULE Test;
  23853. VAR value: SHORTINT;
  23854. BEGIN CASE value OF 'a': END
  23855. END Test.
  23856. positive: short integer case statement with constant short integer case
  23857. MODULE Test;
  23858. VAR value: SHORTINT;
  23859. BEGIN CASE value OF 10H: END
  23860. END Test.
  23861. negative: short integer case statement with constant integer case
  23862. MODULE Test;
  23863. VAR value: SHORTINT;
  23864. BEGIN CASE value OF 1000H: END
  23865. END Test.
  23866. negative: short integer case statement with constant long integer case
  23867. MODULE Test;
  23868. VAR value: SHORTINT;
  23869. BEGIN CASE value OF 100000H: END
  23870. END Test.
  23871. negative: short integer case statement with constant huge integer case
  23872. MODULE Test;
  23873. VAR value: SHORTINT;
  23874. BEGIN CASE value OF 100000000H: END
  23875. END Test.
  23876. negative: short integer case statement with constant real case
  23877. MODULE Test;
  23878. VAR value: SHORTINT;
  23879. BEGIN CASE value OF 1.0: END
  23880. END Test.
  23881. negative: short integer case statement with constant long real case
  23882. MODULE Test;
  23883. VAR value: SHORTINT;
  23884. BEGIN CASE value OF 1.D0: END
  23885. END Test.
  23886. negative: short integer case statement with constant set case
  23887. MODULE Test;
  23888. VAR value: SHORTINT;
  23889. BEGIN CASE value OF {}: END
  23890. END Test.
  23891. negative: short integer case statement with constant string case
  23892. MODULE Test;
  23893. VAR value: SHORTINT;
  23894. BEGIN CASE value OF "value": END
  23895. END Test.
  23896. negative: short integer case statement with nil pointer case
  23897. MODULE Test;
  23898. VAR value: SHORTINT;
  23899. BEGIN CASE value OF NIL: END
  23900. END Test.
  23901. negative: short integer case statement variable boolean case
  23902. MODULE Test;
  23903. VAR value: SHORTINT; case: BOOLEAN;
  23904. BEGIN CASE value OF case: END
  23905. END Test.
  23906. negative: short integer case statement with variable character case
  23907. MODULE Test;
  23908. VAR value: SHORTINT; case: CHAR;
  23909. BEGIN CASE value OF case: END
  23910. END Test.
  23911. negative: short integer case statement with variable short integer case
  23912. MODULE Test;
  23913. VAR value, case: SHORTINT;
  23914. BEGIN CASE value OF case: END
  23915. END Test.
  23916. negative: short integer case statement with variable integer case
  23917. MODULE Test;
  23918. VAR value: SHORTINT; case: INTEGER;
  23919. BEGIN CASE value OF case: END
  23920. END Test.
  23921. negative: short integer case statement with variable long integer case
  23922. MODULE Test;
  23923. VAR value: SHORTINT; case: LONGINT;
  23924. BEGIN CASE value OF case: END
  23925. END Test.
  23926. negative: short integer case statement with variable huge integer case
  23927. MODULE Test;
  23928. VAR value: SHORTINT; case: HUGEINT;
  23929. BEGIN CASE value OF case: END
  23930. END Test.
  23931. negative: short integer case statement with variable real case
  23932. MODULE Test;
  23933. VAR value: SHORTINT; case: REAL;
  23934. BEGIN CASE value OF case: END
  23935. END Test.
  23936. negative: short integer case statement with variable long real case
  23937. MODULE Test;
  23938. VAR value: SHORTINT; case: LONGREAL;
  23939. BEGIN CASE value OF case: END
  23940. END Test.
  23941. negative: short integer case statement with variable set case
  23942. MODULE Test;
  23943. VAR value: SHORTINT; case: SET;
  23944. BEGIN CASE value OF case: END
  23945. END Test.
  23946. negative: short integer case statement with variable array case
  23947. MODULE Test;
  23948. VAR value: SHORTINT; case: ARRAY 10 OF CHAR;
  23949. BEGIN CASE value OF case: END
  23950. END Test.
  23951. negative: short integer case statement with variable record case
  23952. MODULE Test;
  23953. VAR value: SHORTINT; case: RECORD END;
  23954. BEGIN CASE value OF case: END
  23955. END Test.
  23956. negative: short integer case statement with variable object case
  23957. MODULE Test;
  23958. VAR value: SHORTINT; case: OBJECT END;
  23959. BEGIN CASE value OF case: END
  23960. END Test.
  23961. negative: short integer case statement with variable base object case
  23962. MODULE Test;
  23963. VAR value: SHORTINT; case: OBJECT;
  23964. BEGIN CASE value OF case: END
  23965. END Test.
  23966. negative: short integer case statement with variable pointer to record case
  23967. MODULE Test;
  23968. VAR value: SHORTINT; case: POINTER TO RECORD END;
  23969. BEGIN CASE value OF case: END
  23970. END Test.
  23971. negative: short integer case statement with variable pointer to array case
  23972. MODULE Test;
  23973. VAR value: SHORTINT; case: POINTER TO ARRAY OF CHAR;
  23974. BEGIN CASE value OF case: END
  23975. END Test.
  23976. negative: short integer case statement with variable procedure case
  23977. MODULE Test;
  23978. VAR value: SHORTINT; case: PROCEDURE;
  23979. BEGIN CASE value OF case: END
  23980. END Test.
  23981. negative: short integer case statement with import case
  23982. MODULE Test;
  23983. IMPORT case := Dummy; VAR value: SHORTINT;
  23984. BEGIN CASE value OF case: END
  23985. END Test.
  23986. negative: short integer case statement with type as case
  23987. MODULE Test;
  23988. TYPE case = INTEGER; VAR value: case;
  23989. BEGIN CASE value OF case: END
  23990. END Test.
  23991. negative: integer case statement with constant boolean case
  23992. MODULE Test;
  23993. VAR value: INTEGER;
  23994. BEGIN CASE value OF TRUE: END
  23995. END Test.
  23996. negative: integer case statement with constant character case
  23997. MODULE Test;
  23998. VAR value: INTEGER;
  23999. BEGIN CASE value OF 'a': END
  24000. END Test.
  24001. positive: integer case statement with constant short integer case
  24002. MODULE Test;
  24003. VAR value: INTEGER;
  24004. BEGIN CASE value OF 10H: END
  24005. END Test.
  24006. positive: integer case statement with constant integer case
  24007. MODULE Test;
  24008. VAR value: INTEGER;
  24009. BEGIN CASE value OF 1000H: END
  24010. END Test.
  24011. negative: integer case statement with constant long integer case
  24012. MODULE Test;
  24013. VAR value: INTEGER;
  24014. BEGIN CASE value OF 100000H: END
  24015. END Test.
  24016. negative: integer case statement with constant huge integer case
  24017. MODULE Test;
  24018. VAR value: INTEGER;
  24019. BEGIN CASE value OF 100000000H: END
  24020. END Test.
  24021. negative: integer case statement with constant real case
  24022. MODULE Test;
  24023. VAR value: INTEGER;
  24024. BEGIN CASE value OF 1.0: END
  24025. END Test.
  24026. negative: integer case statement with constant long real case
  24027. MODULE Test;
  24028. VAR value: INTEGER;
  24029. BEGIN CASE value OF 1.D0: END
  24030. END Test.
  24031. negative: integer case statement with constant set case
  24032. MODULE Test;
  24033. VAR value: INTEGER;
  24034. BEGIN CASE value OF {}: END
  24035. END Test.
  24036. negative: integer case statement with constant string case
  24037. MODULE Test;
  24038. VAR value: INTEGER;
  24039. BEGIN CASE value OF "value": END
  24040. END Test.
  24041. negative: integer case statement with nil pointer case
  24042. MODULE Test;
  24043. VAR value: INTEGER;
  24044. BEGIN CASE value OF NIL: END
  24045. END Test.
  24046. negative: integer case statement variable boolean case
  24047. MODULE Test;
  24048. VAR value: INTEGER; case: BOOLEAN;
  24049. BEGIN CASE value OF case: END
  24050. END Test.
  24051. negative: integer case statement with variable character case
  24052. MODULE Test;
  24053. VAR value: INTEGER; case: CHAR;
  24054. BEGIN CASE value OF case: END
  24055. END Test.
  24056. negative: integer case statement with variable short integer case
  24057. MODULE Test;
  24058. VAR value: INTEGER; case: SHORTINT;
  24059. BEGIN CASE value OF case: END
  24060. END Test.
  24061. negative: integer case statement with variable integer case
  24062. MODULE Test;
  24063. VAR value, case: INTEGER;
  24064. BEGIN CASE value OF case: END
  24065. END Test.
  24066. negative: integer case statement with variable long integer case
  24067. MODULE Test;
  24068. VAR value: INTEGER; case: LONGINT;
  24069. BEGIN CASE value OF case: END
  24070. END Test.
  24071. negative: integer case statement with variable huge integer case
  24072. MODULE Test;
  24073. VAR value: INTEGER; case: HUGEINT;
  24074. BEGIN CASE value OF case: END
  24075. END Test.
  24076. negative: integer case statement with variable real case
  24077. MODULE Test;
  24078. VAR value: INTEGER; case: REAL;
  24079. BEGIN CASE value OF case: END
  24080. END Test.
  24081. negative: integer case statement with variable long real case
  24082. MODULE Test;
  24083. VAR value: INTEGER; case: LONGREAL;
  24084. BEGIN CASE value OF case: END
  24085. END Test.
  24086. negative: integer case statement with variable set case
  24087. MODULE Test;
  24088. VAR value: INTEGER; case: SET;
  24089. BEGIN CASE value OF case: END
  24090. END Test.
  24091. negative: integer case statement with variable array case
  24092. MODULE Test;
  24093. VAR value: INTEGER; case: ARRAY 10 OF CHAR;
  24094. BEGIN CASE value OF case: END
  24095. END Test.
  24096. negative: integer case statement with variable record case
  24097. MODULE Test;
  24098. VAR value: INTEGER; case: RECORD END;
  24099. BEGIN CASE value OF case: END
  24100. END Test.
  24101. negative: integer case statement with variable object case
  24102. MODULE Test;
  24103. VAR value: INTEGER; case: OBJECT END;
  24104. BEGIN CASE value OF case: END
  24105. END Test.
  24106. negative: integer case statement with variable base object case
  24107. MODULE Test;
  24108. VAR value: INTEGER; case: OBJECT;
  24109. BEGIN CASE value OF case: END
  24110. END Test.
  24111. negative: integer case statement with variable pointer to record case
  24112. MODULE Test;
  24113. VAR value: INTEGER; case: POINTER TO RECORD END;
  24114. BEGIN CASE value OF case: END
  24115. END Test.
  24116. negative: integer case statement with variable pointer to array case
  24117. MODULE Test;
  24118. VAR value: INTEGER; case: POINTER TO ARRAY OF CHAR;
  24119. BEGIN CASE value OF case: END
  24120. END Test.
  24121. negative: integer case statement with variable procedure case
  24122. MODULE Test;
  24123. VAR value: INTEGER; case: PROCEDURE;
  24124. BEGIN CASE value OF case: END
  24125. END Test.
  24126. negative: integer case statement with import case
  24127. MODULE Test;
  24128. IMPORT case := Dummy; VAR value: INTEGER;
  24129. BEGIN CASE value OF case: END
  24130. END Test.
  24131. negative: integer case statement with type as case
  24132. MODULE Test;
  24133. TYPE case = INTEGER; VAR value: case;
  24134. BEGIN CASE value OF case: END
  24135. END Test.
  24136. negative: long integer case statement with constant boolean case
  24137. MODULE Test;
  24138. VAR value: LONGINT;
  24139. BEGIN CASE value OF TRUE: END
  24140. END Test.
  24141. negative: long integer case statement with constant character case
  24142. MODULE Test;
  24143. VAR value: LONGINT;
  24144. BEGIN CASE value OF 'a': END
  24145. END Test.
  24146. positive: long integer case statement with constant short integer case
  24147. MODULE Test;
  24148. VAR value: LONGINT;
  24149. BEGIN CASE value OF 10H: END
  24150. END Test.
  24151. positive: long integer case statement with constant integer case
  24152. MODULE Test;
  24153. VAR value: LONGINT;
  24154. BEGIN CASE value OF 1000H: END
  24155. END Test.
  24156. positive: long integer case statement with constant long integer case
  24157. MODULE Test;
  24158. VAR value: LONGINT;
  24159. BEGIN CASE value OF 100000H: END
  24160. END Test.
  24161. negative: long integer case statement with constant huge integer case
  24162. MODULE Test;
  24163. VAR value: LONGINT;
  24164. BEGIN CASE value OF 100000000H: END
  24165. END Test.
  24166. negative: long integer case statement with constant real case
  24167. MODULE Test;
  24168. VAR value: LONGINT;
  24169. BEGIN CASE value OF 1.0: END
  24170. END Test.
  24171. negative: long integer case statement with constant long real case
  24172. MODULE Test;
  24173. VAR value: LONGINT;
  24174. BEGIN CASE value OF 1.D0: END
  24175. END Test.
  24176. negative: long integer case statement with constant set case
  24177. MODULE Test;
  24178. VAR value: LONGINT;
  24179. BEGIN CASE value OF {}: END
  24180. END Test.
  24181. negative: long integer case statement with constant string case
  24182. MODULE Test;
  24183. VAR value: LONGINT;
  24184. BEGIN CASE value OF "value": END
  24185. END Test.
  24186. negative: long integer case statement with nil pointer case
  24187. MODULE Test;
  24188. VAR value: LONGINT;
  24189. BEGIN CASE value OF NIL: END
  24190. END Test.
  24191. negative: long integer case statement variable boolean case
  24192. MODULE Test;
  24193. VAR value: LONGINT; case: BOOLEAN;
  24194. BEGIN CASE value OF case: END
  24195. END Test.
  24196. negative: long integer case statement with variable character case
  24197. MODULE Test;
  24198. VAR value: LONGINT; case: CHAR;
  24199. BEGIN CASE value OF case: END
  24200. END Test.
  24201. negative: long integer case statement with variable short integer case
  24202. MODULE Test;
  24203. VAR value: LONGINT; case: SHORTINT;
  24204. BEGIN CASE value OF case: END
  24205. END Test.
  24206. negative: long integer case statement with variable integer case
  24207. MODULE Test;
  24208. VAR value: LONGINT; case: INTEGER;
  24209. BEGIN CASE value OF case: END
  24210. END Test.
  24211. negative: long integer case statement with variable long integer case
  24212. MODULE Test;
  24213. VAR value, case: LONGINT;
  24214. BEGIN CASE value OF case: END
  24215. END Test.
  24216. negative: long integer case statement with variable huge integer case
  24217. MODULE Test;
  24218. VAR value: LONGINT; case: HUGEINT;
  24219. BEGIN CASE value OF case: END
  24220. END Test.
  24221. negative: long integer case statement with variable real case
  24222. MODULE Test;
  24223. VAR value: LONGINT; case: REAL;
  24224. BEGIN CASE value OF case: END
  24225. END Test.
  24226. negative: long integer case statement with variable long real case
  24227. MODULE Test;
  24228. VAR value: LONGINT; case: LONGREAL;
  24229. BEGIN CASE value OF case: END
  24230. END Test.
  24231. negative: long integer case statement with variable set case
  24232. MODULE Test;
  24233. VAR value: LONGINT; case: SET;
  24234. BEGIN CASE value OF case: END
  24235. END Test.
  24236. negative: long integer case statement with variable array case
  24237. MODULE Test;
  24238. VAR value: LONGINT; case: ARRAY 10 OF CHAR;
  24239. BEGIN CASE value OF case: END
  24240. END Test.
  24241. negative: long integer case statement with variable record case
  24242. MODULE Test;
  24243. VAR value: LONGINT; case: RECORD END;
  24244. BEGIN CASE value OF case: END
  24245. END Test.
  24246. negative: long integer case statement with variable object case
  24247. MODULE Test;
  24248. VAR value: LONGINT; case: OBJECT END;
  24249. BEGIN CASE value OF case: END
  24250. END Test.
  24251. negative: long integer case statement with variable base object case
  24252. MODULE Test;
  24253. VAR value: LONGINT; case: OBJECT;
  24254. BEGIN CASE value OF case: END
  24255. END Test.
  24256. negative: long integer case statement with variable pointer to record case
  24257. MODULE Test;
  24258. VAR value: LONGINT; case: POINTER TO RECORD END;
  24259. BEGIN CASE value OF case: END
  24260. END Test.
  24261. negative: long integer case statement with variable pointer to array case
  24262. MODULE Test;
  24263. VAR value: LONGINT; case: POINTER TO ARRAY OF CHAR;
  24264. BEGIN CASE value OF case: END
  24265. END Test.
  24266. negative: long integer case statement with variable procedure case
  24267. MODULE Test;
  24268. VAR value: LONGINT; case: PROCEDURE;
  24269. BEGIN CASE value OF case: END
  24270. END Test.
  24271. negative: long integer case statement with import case
  24272. MODULE Test;
  24273. IMPORT case := Dummy; VAR value: LONGINT;
  24274. BEGIN CASE value OF case: END
  24275. END Test.
  24276. negative: long integer case statement with type as case
  24277. MODULE Test;
  24278. TYPE case = LONGINT; VAR value: case;
  24279. BEGIN CASE value OF case: END
  24280. END Test.
  24281. negative: huge integer case statement with constant boolean case
  24282. MODULE Test;
  24283. VAR value: HUGEINT;
  24284. BEGIN CASE value OF TRUE: END
  24285. END Test.
  24286. negative: huge integer case statement with constant character case
  24287. MODULE Test;
  24288. VAR value: HUGEINT;
  24289. BEGIN CASE value OF 'a': END
  24290. END Test.
  24291. positive: huge integer case statement with constant short integer case
  24292. MODULE Test;
  24293. VAR value: HUGEINT;
  24294. BEGIN CASE value OF 10H: END
  24295. END Test.
  24296. positive: huge integer case statement with constant integer case
  24297. MODULE Test;
  24298. VAR value: HUGEINT;
  24299. BEGIN CASE value OF 1000H: END
  24300. END Test.
  24301. positive: huge integer case statement with constant long integer case
  24302. MODULE Test;
  24303. VAR value: HUGEINT;
  24304. BEGIN CASE value OF 100000H: END
  24305. END Test.
  24306. positive: huge integer case statement with constant huge integer case
  24307. MODULE Test;
  24308. VAR value: HUGEINT;
  24309. BEGIN CASE value OF 100000000H: END
  24310. END Test.
  24311. negative: huge integer case statement with constant real case
  24312. MODULE Test;
  24313. VAR value: HUGEINT;
  24314. BEGIN CASE value OF 1.0: END
  24315. END Test.
  24316. negative: huge integer case statement with constant long real case
  24317. MODULE Test;
  24318. VAR value: HUGEINT;
  24319. BEGIN CASE value OF 1.D0: END
  24320. END Test.
  24321. negative: huge integer case statement with constant set case
  24322. MODULE Test;
  24323. VAR value: HUGEINT;
  24324. BEGIN CASE value OF {}: END
  24325. END Test.
  24326. negative: huge integer case statement with constant string case
  24327. MODULE Test;
  24328. VAR value: HUGEINT;
  24329. BEGIN CASE value OF "value": END
  24330. END Test.
  24331. negative: huge integer case statement with nil pointer case
  24332. MODULE Test;
  24333. VAR value: HUGEINT;
  24334. BEGIN CASE value OF NIL: END
  24335. END Test.
  24336. negative: huge integer case statement variable boolean case
  24337. MODULE Test;
  24338. VAR value: HUGEINT; case: BOOLEAN;
  24339. BEGIN CASE value OF case: END
  24340. END Test.
  24341. negative: huge integer case statement with variable character case
  24342. MODULE Test;
  24343. VAR value: HUGEINT; case: CHAR;
  24344. BEGIN CASE value OF case: END
  24345. END Test.
  24346. negative: huge integer case statement with variable short integer case
  24347. MODULE Test;
  24348. VAR value: HUGEINT; case: SHORTINT;
  24349. BEGIN CASE value OF case: END
  24350. END Test.
  24351. negative: huge integer case statement with variable integer case
  24352. MODULE Test;
  24353. VAR value: HUGEINT; case: INTEGER;
  24354. BEGIN CASE value OF case: END
  24355. END Test.
  24356. negative: huge integer case statement with variable long integer case
  24357. MODULE Test;
  24358. VAR value: HUGEINT; case: LONGINT;
  24359. BEGIN CASE value OF case: END
  24360. END Test.
  24361. negative: huge integer case statement with variable huge integer case
  24362. MODULE Test;
  24363. VAR value, case: HUGEINT;
  24364. BEGIN CASE value OF case: END
  24365. END Test.
  24366. negative: huge integer case statement with variable real case
  24367. MODULE Test;
  24368. VAR value: HUGEINT; case: REAL;
  24369. BEGIN CASE value OF case: END
  24370. END Test.
  24371. negative: huge integer case statement with variable long real case
  24372. MODULE Test;
  24373. VAR value: HUGEINT; case: LONGREAL;
  24374. BEGIN CASE value OF case: END
  24375. END Test.
  24376. negative: huge integer case statement with variable set case
  24377. MODULE Test;
  24378. VAR value: HUGEINT; case: SET;
  24379. BEGIN CASE value OF case: END
  24380. END Test.
  24381. negative: huge integer case statement with variable array case
  24382. MODULE Test;
  24383. VAR value: HUGEINT; case: ARRAY 10 OF CHAR;
  24384. BEGIN CASE value OF case: END
  24385. END Test.
  24386. negative: huge integer case statement with variable record case
  24387. MODULE Test;
  24388. VAR value: HUGEINT; case: RECORD END;
  24389. BEGIN CASE value OF case: END
  24390. END Test.
  24391. negative: huge integer case statement with variable object case
  24392. MODULE Test;
  24393. VAR value: HUGEINT; case: OBJECT END;
  24394. BEGIN CASE value OF case: END
  24395. END Test.
  24396. negative: huge integer case statement with variable base object case
  24397. MODULE Test;
  24398. VAR value: HUGEINT; case: OBJECT;
  24399. BEGIN CASE value OF case: END
  24400. END Test.
  24401. negative: huge integer case statement with variable pointer to record case
  24402. MODULE Test;
  24403. VAR value: HUGEINT; case: POINTER TO RECORD END;
  24404. BEGIN CASE value OF case: END
  24405. END Test.
  24406. negative: huge integer case statement with variable pointer to array case
  24407. MODULE Test;
  24408. VAR value: HUGEINT; case: POINTER TO ARRAY OF CHAR;
  24409. BEGIN CASE value OF case: END
  24410. END Test.
  24411. negative: huge integer case statement with variable procedure case
  24412. MODULE Test;
  24413. VAR value: HUGEINT; case: PROCEDURE;
  24414. BEGIN CASE value OF case: END
  24415. END Test.
  24416. negative: huge integer case statement with import case
  24417. MODULE Test;
  24418. IMPORT case := Dummy; VAR value: HUGEINT;
  24419. BEGIN CASE value OF case: END
  24420. END Test.
  24421. negative: huge integer case statement with type as case
  24422. MODULE Test;
  24423. TYPE case = HUGEINT; VAR value: case;
  24424. BEGIN CASE value OF case: END
  24425. END Test.
  24426. positive: character case statement with multiple case range
  24427. MODULE Test;
  24428. VAR value: CHAR;
  24429. BEGIN CASE value OF 0X..10X, 11X..20X: END;
  24430. END Test.
  24431. positive: character case statement with empty case range
  24432. MODULE Test;
  24433. VAR value: CHAR;
  24434. BEGIN CASE value OF 10X..10X: END;
  24435. END Test.
  24436. negative: character case statement with invalid case range
  24437. MODULE Test;
  24438. VAR value: CHAR;
  24439. BEGIN CASE value OF 10X..0X: END;
  24440. END Test.
  24441. negative: character case statement with duplicated cases within same label
  24442. MODULE Test;
  24443. VAR value: CHAR;
  24444. BEGIN CASE value OF 10X, 10X: END;
  24445. END Test.
  24446. negative: character case statement with duplicated case ranges within same label
  24447. MODULE Test;
  24448. VAR value: CHAR;
  24449. BEGIN CASE value OF 0X..10X, 10X..20X: END;
  24450. END Test.
  24451. negative: character case statement with duplicated cases within different label
  24452. MODULE Test;
  24453. VAR value: CHAR;
  24454. BEGIN CASE value OF 10X: | 10X: END;
  24455. END Test.
  24456. negative: character case statement with duplicated case ranges within different label
  24457. MODULE Test;
  24458. VAR value: CHAR;
  24459. BEGIN CASE value OF 0X..10X: | 10X..20X: END;
  24460. END Test.
  24461. positive: character case statement with ascending cases
  24462. MODULE Test;
  24463. VAR value: CHAR;
  24464. BEGIN CASE value OF 0X..5X, 6X, 7X..7X, 8X, 9X: | 10X..20X, 21X: | 22X, 23X..29X, 30X: END;
  24465. END Test.
  24466. positive: character case statement with descending cases
  24467. MODULE Test;
  24468. VAR value: CHAR;
  24469. BEGIN CASE value OF 30X, 23X..29X, 22X: | 21X, 10X..20X: | 0X..5X, 6X, 7X..7X, 8X, 9X: END;
  24470. END Test.
  24471. positive: nested character case statement
  24472. MODULE Test;
  24473. VAR value: CHAR;
  24474. BEGIN CASE value OF 0X..10X: CASE value OF 0X..10X: END END;
  24475. END Test.
  24476. positive: integer case statement with negative case
  24477. MODULE Test;
  24478. VAR value: INTEGER;
  24479. BEGIN CASE value OF -10: END;
  24480. END Test.
  24481. positive: integer case statement with zero case
  24482. MODULE Test;
  24483. VAR value: INTEGER;
  24484. BEGIN CASE value OF 0: END;
  24485. END Test.
  24486. positive: integer case statement with positive case
  24487. MODULE Test;
  24488. VAR value: INTEGER;
  24489. BEGIN CASE value OF 10: END;
  24490. END Test.
  24491. positive: integer case statement with multiple case range
  24492. MODULE Test;
  24493. VAR value: INTEGER;
  24494. BEGIN CASE value OF 0..10, 11..20: END;
  24495. END Test.
  24496. positive: integer case statement with empty case range
  24497. MODULE Test;
  24498. VAR value: INTEGER;
  24499. BEGIN CASE value OF 10..10: END;
  24500. END Test.
  24501. negative: integer case statement with invalid case range
  24502. MODULE Test;
  24503. VAR value: INTEGER;
  24504. BEGIN CASE value OF 10..0: END;
  24505. END Test.
  24506. negative: integer case statement with duplicated cases within same label
  24507. MODULE Test;
  24508. VAR value: INTEGER;
  24509. BEGIN CASE value OF 10, 10: END;
  24510. END Test.
  24511. negative: integer case statement with duplicated case ranges within same label
  24512. MODULE Test;
  24513. VAR value: INTEGER;
  24514. BEGIN CASE value OF 0..10, 10..20: END;
  24515. END Test.
  24516. negative: integer case statement with duplicated cases within different label
  24517. MODULE Test;
  24518. VAR value: INTEGER;
  24519. BEGIN CASE value OF 10: | 10: END;
  24520. END Test.
  24521. negative: integer case statement with duplicated case ranges within different label
  24522. MODULE Test;
  24523. VAR value: INTEGER;
  24524. BEGIN CASE value OF 0..10: | 10..20: END;
  24525. END Test.
  24526. positive: integer case statement with ascending cases
  24527. MODULE Test;
  24528. VAR value: INTEGER;
  24529. BEGIN CASE value OF 0..5, 6, 7..7, 8, 9: | 10..20, 21: | 22, 23..29, 30: END;
  24530. END Test.
  24531. positive: integer case statement with descending cases
  24532. MODULE Test;
  24533. VAR value: INTEGER;
  24534. BEGIN CASE value OF 30, 23..29, 22: | 21, 10..20: | 0..5, 6, 7..7, 8, 9: END;
  24535. END Test.
  24536. positive: nested integer case statement
  24537. MODULE Test;
  24538. VAR value: INTEGER;
  24539. BEGIN CASE value OF 0..10: CASE value OF 0..10: END END;
  24540. END Test.
  24541. # with statement
  24542. negative: with statement with constant boolean value
  24543. MODULE Test;
  24544. BEGIN WITH TRUE : BOOLEAN DO END;
  24545. END Test.
  24546. negative: with statement with constant boolean value type
  24547. MODULE Test;
  24548. TYPE Type = BOOLEAN;
  24549. BEGIN WITH TRUE : Type DO END;
  24550. END Test.
  24551. negative: with statement with indirect constant boolean value
  24552. MODULE Test;
  24553. CONST Constant = TRUE;
  24554. BEGIN WITH Constant : BOOLEAN DO END;
  24555. END Test.
  24556. negative: with statement with indirect constant boolean value type
  24557. MODULE Test;
  24558. CONST Constant = TRUE;
  24559. TYPE Type = BOOLEAN;
  24560. BEGIN WITH Constant : Type DO END;
  24561. END Test.
  24562. negative: with statement with constant character value
  24563. MODULE Test;
  24564. BEGIN WITH '0' : CHAR DO END;
  24565. END Test.
  24566. negative: with statement with constant character value type
  24567. MODULE Test;
  24568. TYPE Type = CHAR;
  24569. BEGIN WITH '0' : Type DO END;
  24570. END Test.
  24571. negative: with statement with indirect constant character value
  24572. MODULE Test;
  24573. CONST Constant = '0';
  24574. BEGIN WITH Constant : CHAR DO END;
  24575. END Test.
  24576. negative: with statement with indirect constant character value type
  24577. MODULE Test;
  24578. CONST Constant = '0';
  24579. TYPE Type = CHAR;
  24580. BEGIN WITH Constant : Type DO END;
  24581. END Test.
  24582. negative: with statement with constant integer value
  24583. MODULE Test;
  24584. BEGIN WITH 0 : INTEGER DO END;
  24585. END Test.
  24586. negative: with statement with constant integer value type
  24587. MODULE Test;
  24588. TYPE Type = INTEGER;
  24589. BEGIN WITH 0 : Type DO END;
  24590. END Test.
  24591. negative: with statement with indirect constant integer value
  24592. MODULE Test;
  24593. CONST Constant = 0;
  24594. BEGIN WITH Constant : INTEGER DO END;
  24595. END Test.
  24596. negative: with statement with indirect constant integer value type
  24597. MODULE Test;
  24598. CONST Constant = 0;
  24599. TYPE Type = INTEGER;
  24600. BEGIN WITH Constant : Type DO END;
  24601. END Test.
  24602. negative: with statement with constant real value
  24603. MODULE Test;
  24604. BEGIN WITH 0.0 : REAL DO END;
  24605. END Test.
  24606. negative: with statement with constant real value type
  24607. MODULE Test;
  24608. TYPE Type = REAL;
  24609. BEGIN WITH 0.0 : Type DO END;
  24610. END Test.
  24611. negative: with statement with indirect constant real value
  24612. MODULE Test;
  24613. CONST Constant = 0.0;
  24614. BEGIN WITH Constant : REAL DO END;
  24615. END Test.
  24616. negative: with statement with indirect constant real value type
  24617. MODULE Test;
  24618. CONST Constant = 0.0;
  24619. TYPE Type = REAL;
  24620. BEGIN WITH Constant : Type DO END;
  24621. END Test.
  24622. negative: with statement with constant set value
  24623. MODULE Test;
  24624. BEGIN WITH {} : SET DO END;
  24625. END Test.
  24626. negative: with statement with constant set value type
  24627. MODULE Test;
  24628. TYPE Type = SET;
  24629. BEGIN WITH {} : Type DO END;
  24630. END Test.
  24631. negative: with statement with indirect constant set value
  24632. MODULE Test;
  24633. CONST Constant = {};
  24634. BEGIN WITH Constant : SET DO END;
  24635. END Test.
  24636. negative: with statement with indirect constant set value type
  24637. MODULE Test;
  24638. CONST Constant = {};
  24639. TYPE Type = SET;
  24640. BEGIN WITH Constant : Type DO END;
  24641. END Test.
  24642. negative: with statement with constant string value
  24643. MODULE Test;
  24644. BEGIN WITH "string" : ARRAY OF CHAR DO END;
  24645. END Test.
  24646. negative: with statement with constant string value type
  24647. MODULE Test;
  24648. TYPE Type = ARRAY OF CHAR;
  24649. BEGIN WITH "string" : Type DO END;
  24650. END Test.
  24651. negative: with statement with indirect constant string value
  24652. MODULE Test;
  24653. CONST Constant = "string";
  24654. BEGIN WITH Constant : ARRAY OF CHAR DO END;
  24655. END Test.
  24656. negative: with statement with indirect constant string value type
  24657. MODULE Test;
  24658. CONST Constant = "string";
  24659. TYPE Type = ARRAY OF CHAR;
  24660. BEGIN WITH Constant : Type DO END;
  24661. END Test.
  24662. negative: with statement with nil pointer value
  24663. MODULE Test;
  24664. BEGIN WITH NIL : OBJECT DO END;
  24665. END Test.
  24666. negative: with statement with nil pointer value type
  24667. MODULE Test;
  24668. TYPE Type = OBJECT;
  24669. BEGIN WITH NIL : Type DO END;
  24670. END Test.
  24671. negative: with statement with indirect nil pointer value
  24672. MODULE Test;
  24673. CONST Constant = NIL;
  24674. TYPE Type = OBJECT;
  24675. BEGIN WITH Constant : Type DO END;
  24676. END Test.
  24677. negative: with statement with indirect nil pointer value type
  24678. MODULE Test;
  24679. TYPE Type = OBJECT;
  24680. CONST Constant = NIL;
  24681. BEGIN WITH Constant : Type DO END;
  24682. END Test.
  24683. negative: with statement with variable boolean value
  24684. MODULE Test;
  24685. VAR value: BOOLEAN;
  24686. BEGIN WITH value : BOOLEAN DO END;
  24687. END Test.
  24688. negative: with statement with variable boolean value type
  24689. MODULE Test;
  24690. TYPE Type = BOOLEAN;
  24691. VAR value: Type;
  24692. BEGIN WITH value : Type DO END;
  24693. END Test.
  24694. negative: with statement with variable character value
  24695. MODULE Test;
  24696. VAR value: CHAR;
  24697. BEGIN WITH value : CHAR DO END;
  24698. END Test.
  24699. negative: with statement with variable character value type
  24700. MODULE Test;
  24701. TYPE Type = CHAR;
  24702. VAR value: Type;
  24703. BEGIN WITH value : Type DO END;
  24704. END Test.
  24705. negative: with statement with variable short integer value
  24706. MODULE Test;
  24707. VAR value: SHORTINT;
  24708. BEGIN WITH value : SHORTINT DO END;
  24709. END Test.
  24710. negative: with statement with variable short integer value type
  24711. MODULE Test;
  24712. TYPE Type = SHORTINT;
  24713. VAR value: Type;
  24714. BEGIN WITH value : Type DO END;
  24715. END Test.
  24716. negative: with statement with variable integer value
  24717. MODULE Test;
  24718. VAR value: INTEGER;
  24719. BEGIN WITH value : INTEGER DO END;
  24720. END Test.
  24721. negative: with statement with variable integer value type
  24722. MODULE Test;
  24723. TYPE Type = INTEGER;
  24724. VAR value: Type;
  24725. BEGIN WITH value : Type DO END;
  24726. END Test.
  24727. negative: with statement with variable long integer value
  24728. MODULE Test;
  24729. VAR value: LONGINT;
  24730. BEGIN WITH value : LONGINT DO END;
  24731. END Test.
  24732. negative: with statement with variable long integer value type
  24733. MODULE Test;
  24734. TYPE Type = LONGINT;
  24735. VAR value: Type;
  24736. BEGIN WITH value : Type DO END;
  24737. END Test.
  24738. negative: with statement with variable huge integer value
  24739. MODULE Test;
  24740. VAR value: HUGEINT;
  24741. BEGIN WITH value : HUGEINT DO END;
  24742. END Test.
  24743. negative: with statement with variable huge integer value type
  24744. MODULE Test;
  24745. TYPE Type = HUGEINT;
  24746. VAR value: Type;
  24747. BEGIN WITH value : Type DO END;
  24748. END Test.
  24749. negative: with statement with variable real value
  24750. MODULE Test;
  24751. VAR value: REAL;
  24752. BEGIN WITH value : REAL DO END;
  24753. END Test.
  24754. negative: with statement with variable real value type
  24755. MODULE Test;
  24756. TYPE Type = REAL;
  24757. VAR value: Type;
  24758. BEGIN WITH value : Type DO END;
  24759. END Test.
  24760. negative: with statement with variable long real value
  24761. MODULE Test;
  24762. VAR value: LONGREAL;
  24763. BEGIN WITH value : LONGREAL DO END;
  24764. END Test.
  24765. negative: with statement with variable long real value type
  24766. MODULE Test;
  24767. TYPE Type = LONGREAL;
  24768. VAR value: Type;
  24769. BEGIN WITH value : Type DO END;
  24770. END Test.
  24771. negative: with statement with variable set value
  24772. MODULE Test;
  24773. VAR value: SET;
  24774. BEGIN WITH value : SET DO END;
  24775. END Test.
  24776. negative: with statement with variable set value type
  24777. MODULE Test;
  24778. TYPE Type = SET;
  24779. VAR value: Type;
  24780. BEGIN WITH value : Type DO END;
  24781. END Test.
  24782. negative: with statement with variable array value
  24783. MODULE Test;
  24784. VAR value: ARRAY 10 OF CHAR;
  24785. BEGIN WITH value : ARRAY 10 OF CHAR DO END;
  24786. END Test.
  24787. negative: with statement with variable array value type
  24788. MODULE Test;
  24789. TYPE Type = ARRAY 10 OF CHAR;
  24790. VAR value: Type;
  24791. BEGIN WITH value : Type DO END;
  24792. END Test.
  24793. negative: with statement with variable record value
  24794. MODULE Test;
  24795. PROCEDURE Procedure (VAR value: RECORD END);
  24796. BEGIN WITH value : RECORD END DO END;
  24797. END Procedure;
  24798. END Test.
  24799. positive: with statement with same record type
  24800. MODULE Test;
  24801. TYPE Type = RECORD check: BOOLEAN END;
  24802. PROCEDURE Procedure (VAR value, check: Type);
  24803. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24804. END Procedure;
  24805. END Test.
  24806. positive: with statement with nested record types
  24807. MODULE Test;
  24808. TYPE A = RECORD a: BOOLEAN END;
  24809. TYPE B = RECORD (A) b: BOOLEAN END;
  24810. TYPE C = RECORD (B) c: BOOLEAN END;
  24811. PROCEDURE Procedure (VAR value: A);
  24812. BEGIN WITH value : B DO WITH value : C DO ASSERT (value.c) END; ASSERT (value.b) END; ASSERT (value.a);
  24813. END Procedure;
  24814. END Test.
  24815. negative: with statement with invalid nested record types
  24816. MODULE Test;
  24817. TYPE A = RECORD END;
  24818. TYPE B = RECORD (A) END;
  24819. TYPE C = RECORD (A) END;
  24820. PROCEDURE Procedure (VAR value: A);
  24821. BEGIN WITH value : B DO WITH value : C DO END END;
  24822. END Procedure;
  24823. END Test.
  24824. positive: with statement with extending record type
  24825. MODULE Test;
  24826. TYPE Record = RECORD END; Type = RECORD (Record) check: BOOLEAN END;
  24827. PROCEDURE Procedure (VAR value: Record; check: Type);
  24828. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24829. END Procedure;
  24830. END Test.
  24831. negative: with statement with static extending record type
  24832. MODULE Test;
  24833. TYPE Record = RECORD END; Type = RECORD (Record) check: BOOLEAN END;
  24834. VAR value: Record; check: Type;
  24835. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24836. END Test.
  24837. negative: with statement with extending record type and invalid assignment
  24838. MODULE Test;
  24839. TYPE Record = RECORD END; Type = RECORD (Record) END;
  24840. PROCEDURE Procedure (VAR value, check: Record);
  24841. BEGIN WITH value : Type DO value := check END;
  24842. END Procedure;
  24843. END Test.
  24844. negative: with statement with extended record type
  24845. MODULE Test;
  24846. TYPE Record = RECORD END; Type = Record;
  24847. PROCEDURE Procedure (VAR value: RECORD (Record) END);
  24848. BEGIN WITH value : Type DO END;
  24849. END Procedure;
  24850. END Test.
  24851. negative: with statement with incompatible record type
  24852. MODULE Test;
  24853. TYPE Type = RECORD END;
  24854. PROCEDURE Procedure (VAR value: RECORD END);
  24855. BEGIN WITH value : Type DO END;
  24856. END Procedure;
  24857. END Test.
  24858. negative: with statement with variable object value
  24859. MODULE Test;
  24860. VAR value: OBJECT END;
  24861. BEGIN WITH value : OBJECT END DO END;
  24862. END Test.
  24863. positive: with statement with same object type
  24864. MODULE Test;
  24865. TYPE Type = OBJECT VAR check: BOOLEAN END Type;
  24866. VAR value, check: Type;
  24867. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24868. END Test.
  24869. positive: with statement with nested object types
  24870. MODULE Test;
  24871. TYPE A = OBJECT VAR a: BOOLEAN END A;
  24872. TYPE B = OBJECT (A) VAR b: BOOLEAN END B;
  24873. TYPE C = OBJECT (B) VAR c: BOOLEAN END C;
  24874. VAR value: A;
  24875. BEGIN WITH value : B DO WITH value : C DO ASSERT (value.c) END; ASSERT (value.b) END; ASSERT (value.a);
  24876. END Test.
  24877. negative: with statement with invalid nested object types
  24878. MODULE Test;
  24879. TYPE A = OBJECT END A;
  24880. TYPE B = OBJECT (A) END B;
  24881. TYPE C = OBJECT (A) END C;
  24882. VAR value: A;
  24883. BEGIN WITH value : B DO WITH value : C DO END END;
  24884. END Test.
  24885. positive: with statement with extending object type
  24886. MODULE Test;
  24887. TYPE Object = OBJECT END Object; Type = OBJECT (Object) VAR check: BOOLEAN END Type;
  24888. VAR value: Object; check: Type;
  24889. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24890. END Test.
  24891. negative: with statement with extending object type and invalid assignment
  24892. MODULE Test;
  24893. TYPE Object = OBJECT END Object; Type = OBJECT (Object) END Type;
  24894. VAR value, check: Object;
  24895. BEGIN WITH value : Type DO value := check END;
  24896. END Test.
  24897. negative: with statement with extended object type
  24898. MODULE Test;
  24899. TYPE Object = OBJECT END Object; Type = Object;
  24900. VAR value: OBJECT (Object) END;
  24901. BEGIN WITH value : Type DO END;
  24902. END Test.
  24903. negative: with statement with incompatible object type
  24904. MODULE Test;
  24905. TYPE Type = OBJECT END Type;
  24906. VAR value: OBJECT END;
  24907. BEGIN WITH value : Type DO END;
  24908. END Test.
  24909. negative: with statement with variable base object value
  24910. MODULE Test;
  24911. VAR value: OBJECT;
  24912. BEGIN WITH value : OBJECT DO END;
  24913. END Test.
  24914. positive: with statement with same base object type
  24915. MODULE Test;
  24916. TYPE Type = OBJECT;
  24917. VAR value, check: Type;
  24918. BEGIN WITH value : Type DO check := value; value := check END;
  24919. END Test.
  24920. positive: with statement with nested base object types
  24921. MODULE Test;
  24922. TYPE A = OBJECT;
  24923. TYPE B = OBJECT (A) VAR b: BOOLEAN END B;
  24924. TYPE C = OBJECT (B) VAR c: BOOLEAN END C;
  24925. VAR value: A;
  24926. BEGIN WITH value : B DO WITH value : C DO ASSERT (value.c) END; ASSERT (value.b) END;
  24927. END Test.
  24928. negative: with statement with invalid nested base object types
  24929. MODULE Test;
  24930. TYPE A = OBJECT;
  24931. TYPE B = OBJECT (A) END B;
  24932. TYPE C = OBJECT (A) END C;
  24933. VAR value: A;
  24934. BEGIN WITH value : B DO WITH value : C DO END END;
  24935. END Test.
  24936. positive: with statement with extending base object type
  24937. MODULE Test;
  24938. TYPE Object = OBJECT; Type = OBJECT (Object) VAR check: BOOLEAN END Type;
  24939. VAR value: Object; check: Type;
  24940. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  24941. END Test.
  24942. negative: with statement with extending base object type and invalid assignment
  24943. MODULE Test;
  24944. TYPE Object = OBJECT; Type = OBJECT (Object) END Type;
  24945. VAR value, check: Object;
  24946. BEGIN WITH value : Type DO value := check END;
  24947. END Test.
  24948. negative: with statement with extended base object type
  24949. MODULE Test;
  24950. TYPE Object = OBJECT; Type = Object;
  24951. VAR value: OBJECT (Object) END;
  24952. BEGIN WITH value : Type DO END;
  24953. END Test.
  24954. negative: with statement with self and same object type
  24955. MODULE Test;
  24956. TYPE Object = OBJECT
  24957. BEGIN WITH SELF : Type DO END;
  24958. END Object;
  24959. TYPE Type = Object;
  24960. END Test.
  24961. negative: with statement with self and extending object type
  24962. MODULE Test;
  24963. TYPE Object = OBJECT
  24964. BEGIN WITH SELF : Type DO END;
  24965. END Object;
  24966. TYPE Type = OBJECT (Object) END Type;
  24967. END Test.
  24968. negative: with statement with self and extended object type
  24969. MODULE Test;
  24970. TYPE Object = OBJECT (Type)
  24971. BEGIN WITH SELF : Type DO END;
  24972. END Object;
  24973. TYPE Type = OBJECT END Type;
  24974. END Test.
  24975. positive: with statement with object variable and self assignment
  24976. MODULE Test;
  24977. TYPE Object = OBJECT
  24978. VAR value: Object;
  24979. BEGIN WITH value : Type DO ASSERT (value.check); value := value END;
  24980. END Object;
  24981. TYPE Type = OBJECT (Object) VAR check: BOOLEAN; END Type;
  24982. END Test.
  24983. positive: with statement with object variable and self assignment using self
  24984. MODULE Test;
  24985. TYPE Object = OBJECT
  24986. VAR value: Object;
  24987. BEGIN WITH value : Type DO ASSERT (value.check); value := SELF.value END;
  24988. END Object;
  24989. TYPE Type = OBJECT (Object) VAR check: BOOLEAN; END Type;
  24990. END Test.
  24991. negative: with statement with object variable and assignment using another object instance
  24992. MODULE Test;
  24993. TYPE Object = OBJECT
  24994. VAR value: Object;
  24995. BEGIN WITH value : Type DO ASSERT (value.check); value := value.value END;
  24996. END Object;
  24997. TYPE Type = OBJECT (Object) VAR check: BOOLEAN; END Type;
  24998. END Test.
  24999. negative: with statement with variable pointer to array value
  25000. MODULE Test;
  25001. VAR value: POINTER TO ARRAY 10 OF CHAR;
  25002. BEGIN WITH value : POINTER TO ARRAY 10 OF CHAR DO END;
  25003. END Test.
  25004. negative: with statement with variable pointer to array value type
  25005. MODULE Test;
  25006. TYPE Type = POINTER TO ARRAY 10 OF CHAR;
  25007. VAR value: Type;
  25008. BEGIN WITH value : Type DO END;
  25009. END Test.
  25010. negative: with statement with variable pointer to record value
  25011. MODULE Test;
  25012. VAR value: POINTER TO RECORD END;
  25013. BEGIN WITH value : POINTER TO RECORD END DO END;
  25014. END Test.
  25015. positive: with statement with same pointer to record type
  25016. MODULE Test;
  25017. TYPE Type = POINTER TO RECORD check: BOOLEAN END;
  25018. VAR value: Type; check: Type;
  25019. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  25020. END Test.
  25021. positive: with statement with nested pointer to record types
  25022. MODULE Test;
  25023. TYPE A = RECORD a: BOOLEAN END; PA = POINTER TO A;
  25024. TYPE B = RECORD (A) b: BOOLEAN END; PB = POINTER TO B;
  25025. TYPE C = RECORD (B) c: BOOLEAN END; PC = POINTER TO C;
  25026. VAR value: PA;
  25027. BEGIN WITH value : PB DO WITH value : PC DO ASSERT (value.c) END; ASSERT (value.b) END; ASSERT (value.a);
  25028. END Test.
  25029. negative: with statement with invalid nested pointer to record types
  25030. MODULE Test;
  25031. TYPE A = RECORD a: BOOLEAN END; PA = POINTER TO A;
  25032. TYPE B = RECORD (A) b: BOOLEAN END; PB = POINTER TO B;
  25033. TYPE C = RECORD (A) c: BOOLEAN END; PC = POINTER TO C;
  25034. VAR value: PA;
  25035. BEGIN WITH value : PB DO WITH value : PC DO END END;
  25036. END Test.
  25037. positive: with statement with extending pointer to record type
  25038. MODULE Test;
  25039. TYPE Record = RECORD END; Type = POINTER TO RECORD (Record) check: BOOLEAN END;
  25040. VAR value: POINTER TO Record; check: Type;
  25041. BEGIN WITH value : Type DO check := value; value := check; ASSERT (value.check) END;
  25042. END Test.
  25043. negative: with statement with extending pointer to record type and invalid assignment
  25044. MODULE Test;
  25045. TYPE Record = RECORD END; Type = POINTER TO RECORD (Record) END;
  25046. VAR value, check: POINTER TO Record;
  25047. BEGIN WITH value : Type DO value := check END;
  25048. END Test.
  25049. negative: with statement with extended pointer to record type
  25050. MODULE Test;
  25051. TYPE Record = RECORD END; Type = POINTER TO Record;
  25052. VAR value: POINTER TO RECORD (Record) END;
  25053. BEGIN WITH value : Type DO END;
  25054. END Test.
  25055. negative: with statement with incompatible pointer to record type
  25056. MODULE Test;
  25057. TYPE Type = POINTER TO RECORD END;
  25058. VAR value: POINTER TO RECORD END;
  25059. BEGIN WITH value : Type DO END;
  25060. END Test.
  25061. negative: with statement with variable procedure value
  25062. MODULE Test;
  25063. VAR value: PROCEDURE;
  25064. BEGIN WITH value : PROCEDURE DO END;
  25065. END Test.
  25066. negative: with statement with variable procedure value type
  25067. MODULE Test;
  25068. TYPE Type = PROCEDURE;
  25069. VAR value: Type;
  25070. BEGIN WITH value : Type DO END;
  25071. END Test.
  25072. # new statement
  25073. negative: new statement on constant boolean
  25074. MODULE Test;
  25075. CONST Constant = TRUE;
  25076. BEGIN NEW (Constant);
  25077. END Test.
  25078. negative: new statement on constant character
  25079. MODULE Test;
  25080. CONST Constant = 'a';
  25081. BEGIN NEW (Constant);
  25082. END Test.
  25083. negative: new statement on constant integer
  25084. MODULE Test;
  25085. CONST Constant = 42;
  25086. BEGIN NEW (Constant);
  25087. END Test.
  25088. negative: new statement on constant real
  25089. MODULE Test;
  25090. CONST Constant = 0.1;
  25091. BEGIN NEW (Constant);
  25092. END Test.
  25093. negative: new statement on constant set
  25094. MODULE Test;
  25095. CONST Constant = {};
  25096. BEGIN NEW (Constant);
  25097. END Test.
  25098. negative: new statement on constant string
  25099. MODULE Test;
  25100. CONST Constant = "string";
  25101. BEGIN NEW (Constant);
  25102. END Test.
  25103. negative: new statement on nil pointer
  25104. MODULE Test;
  25105. CONST Constant = NIL;
  25106. BEGIN NEW (Constant);
  25107. END Test.
  25108. negative: new statement on boolean
  25109. MODULE Test;
  25110. VAR boolean: BOOLEAN;
  25111. BEGIN NEW (boolean);
  25112. END Test.
  25113. negative: new statement on character
  25114. MODULE Test;
  25115. VAR character: CHAR;
  25116. BEGIN NEW (character);
  25117. END Test.
  25118. negative: new statement on integer
  25119. MODULE Test;
  25120. VAR integer: INTEGER;
  25121. BEGIN NEW (integer);
  25122. END Test.
  25123. negative: new statement on real
  25124. MODULE Test;
  25125. VAR real: REAL;
  25126. BEGIN NEW (real);
  25127. END Test.
  25128. negative: new statement on set
  25129. MODULE Test;
  25130. VAR set: SET;
  25131. BEGIN NEW (set);
  25132. END Test.
  25133. negative: new statement on array
  25134. MODULE Test;
  25135. VAR array: ARRAY 10 OF CHAR;
  25136. BEGIN NEW (array);
  25137. END Test.
  25138. negative: new statement on record
  25139. MODULE Test;
  25140. VAR record: RECORD END;
  25141. BEGIN NEW (record);
  25142. END Test.
  25143. positive: new statement on object parameter
  25144. MODULE Test;
  25145. PROCEDURE Procedure (object: OBJECT END);
  25146. BEGIN NEW (object);
  25147. END Procedure;
  25148. END Test.
  25149. positive: new statement on variable object parameter
  25150. MODULE Test;
  25151. PROCEDURE Procedure (VAR object: OBJECT END);
  25152. BEGIN NEW (object);
  25153. END Procedure;
  25154. END Test.
  25155. negative: new statement on constant object parameter
  25156. MODULE Test;
  25157. PROCEDURE Procedure (CONST object: OBJECT END);
  25158. BEGIN NEW (object);
  25159. END Procedure;
  25160. END Test.
  25161. negative: new statement on self
  25162. MODULE Test;
  25163. TYPE Object = OBJECT
  25164. BEGIN NEW (SELF);
  25165. END Object;
  25166. END Test.
  25167. positive: new statement on object without initializer
  25168. MODULE Test;
  25169. VAR object: OBJECT END;
  25170. BEGIN NEW (object);
  25171. END Test.
  25172. negative: new statement on object without initializer and one argument
  25173. MODULE Test;
  25174. VAR object: OBJECT END;
  25175. BEGIN NEW (object, 5);
  25176. END Test.
  25177. positive: new statement on object with simple initializer
  25178. MODULE Test;
  25179. TYPE Object = OBJECT
  25180. PROCEDURE &Initializer; END Initializer;
  25181. END Object;
  25182. VAR object: Object;
  25183. BEGIN NEW (object);
  25184. END Test.
  25185. negative: new statement on object with simple initializer and one argument
  25186. MODULE Test;
  25187. TYPE Object = OBJECT
  25188. PROCEDURE &Initializer; END Initializer;
  25189. END Object;
  25190. VAR object: Object;
  25191. BEGIN NEW (object, 5);
  25192. END Test.
  25193. negative: new statement on object with complex initializer and no argument
  25194. MODULE Test;
  25195. TYPE Object = OBJECT
  25196. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25197. END Object;
  25198. VAR object: Object;
  25199. BEGIN NEW (object);
  25200. END Test.
  25201. positive: new statement on object with complex initializer and one argument
  25202. MODULE Test;
  25203. TYPE Object = OBJECT
  25204. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25205. END Object;
  25206. VAR object: Object;
  25207. BEGIN NEW (object, 5);
  25208. END Test.
  25209. positive: new statement on object with complex initializer and matching arguments
  25210. MODULE Test;
  25211. TYPE Object = OBJECT
  25212. PROCEDURE &Initializer (i, j: INTEGER; b: BOOLEAN); END Initializer;
  25213. END Object;
  25214. VAR object: Object;
  25215. BEGIN NEW (object, 5, 6, TRUE);
  25216. END Test.
  25217. negative: new statement on object with complex initializer and incompatible arguments
  25218. MODULE Test;
  25219. TYPE Object = OBJECT
  25220. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25221. END Object;
  25222. VAR object: Object;
  25223. BEGIN NEW (object, TRUE);
  25224. END Test.
  25225. positive: new statement on object with simple inherited initializer
  25226. MODULE Test;
  25227. TYPE Base = OBJECT
  25228. PROCEDURE &Initializer; END Initializer;
  25229. END Base;
  25230. VAR object: OBJECT (Base) END;
  25231. BEGIN NEW (object);
  25232. END Test.
  25233. negative: new statement on object with simple inherited initializer and one argument
  25234. MODULE Test;
  25235. TYPE Base = OBJECT
  25236. PROCEDURE &Initializer; END Initializer;
  25237. END Base;
  25238. VAR object: OBJECT (Base) END;
  25239. BEGIN NEW (object, 5);
  25240. END Test.
  25241. negative: new statement on object with complex inherited initializer and no argument
  25242. MODULE Test;
  25243. TYPE Base = OBJECT
  25244. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25245. END Base;
  25246. VAR object: OBJECT (Base) END;
  25247. BEGIN NEW (object);
  25248. END Test.
  25249. positive: new statement on object with complex inherited initializer and one argument
  25250. MODULE Test;
  25251. TYPE Base = OBJECT
  25252. PROCEDURE &Initializer (i: INTEGER); END Initializer;
  25253. END Base;
  25254. VAR object: OBJECT (Base) END;
  25255. BEGIN NEW (object, 5);
  25256. END Test.
  25257. positive: new statement on object with complex inherited initializer and matching arguments
  25258. MODULE Test;
  25259. TYPE Base = OBJECT
  25260. PROCEDURE &Initializer(i, j: INTEGER; b: BOOLEAN); END Initializer;
  25261. END Base;
  25262. VAR object: OBJECT (Base) END;
  25263. BEGIN NEW (object, 5, 6, TRUE);
  25264. END Test.
  25265. positive: new statement on object with simple overridden initializer
  25266. MODULE Test;
  25267. TYPE Base = OBJECT
  25268. PROCEDURE &InitBase (i: INTEGER); END InitBase;
  25269. END Base;
  25270. TYPE Object = OBJECT (Base)
  25271. PROCEDURE &InitObject; BEGIN InitBase (5) END InitObject;
  25272. END Object;
  25273. VAR object: Object;
  25274. BEGIN NEW (object);
  25275. END Test.
  25276. negative: new statement on object with simple overridden initializer and one argument
  25277. MODULE Test;
  25278. TYPE Base = OBJECT
  25279. PROCEDURE &InitBase (i: INTEGER); END InitBase;
  25280. END Base;
  25281. TYPE Object = OBJECT (Base)
  25282. PROCEDURE &InitObject; END InitObject;
  25283. END Object;
  25284. VAR object: Object;
  25285. BEGIN NEW (object, 5);
  25286. END Test.
  25287. negative: new statement on object with complex overridden initializer and no argument
  25288. MODULE Test;
  25289. TYPE Base = OBJECT
  25290. PROCEDURE &InitBase; END InitBase;
  25291. END Base;
  25292. TYPE Object = OBJECT (Base)
  25293. PROCEDURE &InitObject (i: INTEGER); END InitObject;
  25294. END Object;
  25295. VAR object: Object;
  25296. BEGIN NEW (object);
  25297. END Test.
  25298. positive: new statement on object with complex overridden initializer and one argument
  25299. MODULE Test;
  25300. TYPE Base = OBJECT
  25301. PROCEDURE &InitBase; END InitBase;
  25302. END Base;
  25303. TYPE Object = OBJECT (Base)
  25304. PROCEDURE &InitObject (i: INTEGER); BEGIN InitBase END InitObject;
  25305. END Object;
  25306. VAR object: Object;
  25307. BEGIN NEW (object, 5);
  25308. END Test.
  25309. positive: new statement on object with complex overridden initializer and matching arguments
  25310. MODULE Test;
  25311. TYPE Base = OBJECT
  25312. PROCEDURE &InitBase (r: REAL; s: SET); END InitBase;
  25313. END Base;
  25314. TYPE Object = OBJECT (Base)
  25315. PROCEDURE &InitObject (i, j: INTEGER; b: BOOLEAN); BEGIN InitBase (0, {}) END InitObject;
  25316. END Object;
  25317. VAR object: Object;
  25318. BEGIN NEW (object, 5, 6, TRUE);
  25319. END Test.
  25320. positive: new statement on pointer to array with no dimension
  25321. MODULE Test;
  25322. VAR array: POINTER TO ARRAY 10 OF CHAR;
  25323. BEGIN NEW (array);
  25324. END Test.
  25325. positive: new statement on pointer to array parameter
  25326. MODULE Test;
  25327. PROCEDURE Procedure (array: POINTER TO ARRAY 10 OF CHAR);
  25328. BEGIN NEW (array);
  25329. END Procedure;
  25330. END Test.
  25331. positive: new statement on variable pointer to array parameter
  25332. MODULE Test;
  25333. PROCEDURE Procedure (VAR array: POINTER TO ARRAY 10 OF CHAR);
  25334. BEGIN NEW (array);
  25335. END Procedure;
  25336. END Test.
  25337. negative: new statement on constant pointer to array parameter
  25338. MODULE Test;
  25339. PROCEDURE Procedure (CONST array: POINTER TO ARRAY 10 OF CHAR);
  25340. BEGIN NEW (array);
  25341. END Procedure;
  25342. END Test.
  25343. negative: new statement on pointer to open array with no dimension
  25344. MODULE Test;
  25345. VAR array: POINTER TO ARRAY OF CHAR;
  25346. BEGIN NEW (array);
  25347. END Test.
  25348. positive: new statement on pointer to open array with one dimension
  25349. MODULE Test;
  25350. VAR array: POINTER TO ARRAY OF CHAR;
  25351. BEGIN NEW (array, 5);
  25352. END Test.
  25353. negative: new statement on pointer to open array with incompatible dimension
  25354. MODULE Test;
  25355. VAR array: POINTER TO ARRAY OF CHAR;
  25356. BEGIN NEW (array, 10X);
  25357. END Test.
  25358. negative: new statement on pointer to open array with negative dimension
  25359. MODULE Test;
  25360. VAR array: POINTER TO ARRAY OF CHAR;
  25361. BEGIN NEW (array, -5);
  25362. END Test.
  25363. positive: new statement on pointer to open array with zero dimension
  25364. MODULE Test;
  25365. VAR array: POINTER TO ARRAY OF CHAR;
  25366. BEGIN NEW (array, 0);
  25367. END Test.
  25368. negative: new statement on pointer to twice open array with no dimension
  25369. MODULE Test;
  25370. VAR array: POINTER TO ARRAY OF ARRAY 10 OF ARRAY OF CHAR;
  25371. BEGIN NEW (array);
  25372. END Test.
  25373. negative: new statement on pointer to twice open array with one dimension
  25374. MODULE Test;
  25375. VAR array: POINTER TO ARRAY OF ARRAY 10 OF ARRAY OF CHAR;
  25376. BEGIN NEW (array, 5);
  25377. END Test.
  25378. positive: new statement on pointer to twice open array with two dimensions
  25379. MODULE Test;
  25380. VAR array: POINTER TO ARRAY OF ARRAY OF ARRAY 10 OF CHAR;
  25381. BEGIN NEW (array, 5, 10);
  25382. END Test.
  25383. positive: new statement on pointer to record
  25384. MODULE Test;
  25385. VAR record: POINTER TO RECORD END;
  25386. BEGIN NEW (record);
  25387. END Test.
  25388. positive: new statement on pointer to record parameter
  25389. MODULE Test;
  25390. PROCEDURE Procedure (record: POINTER TO RECORD END);
  25391. BEGIN NEW (record);
  25392. END Procedure;
  25393. END Test.
  25394. positive: new statement on variable pointer to record parameter
  25395. MODULE Test;
  25396. PROCEDURE Procedure (VAR record: POINTER TO RECORD END);
  25397. BEGIN NEW (record);
  25398. END Procedure;
  25399. END Test.
  25400. negative: new statement on constant pointer to record parameter
  25401. MODULE Test;
  25402. PROCEDURE Procedure (CONST record: POINTER TO RECORD END);
  25403. BEGIN NEW (record);
  25404. END Procedure;
  25405. END Test.
  25406. negative: new statement on pointer to record with argument
  25407. MODULE Test;
  25408. VAR record: POINTER TO RECORD END;
  25409. BEGIN NEW (record, 1);
  25410. END Test.
  25411. negative: new statement on pointer to record with arguments
  25412. MODULE Test;
  25413. VAR record: POINTER TO RECORD END;
  25414. BEGIN NEW (record, 1, 2);
  25415. END Test.
  25416. negative: new statement on procedure
  25417. MODULE Test;
  25418. VAR procedure: PROCEDURE;
  25419. BEGIN NEW (procedure);
  25420. END Test.
  25421. # increment statement
  25422. negative: increment statement on constant boolean
  25423. MODULE Test;
  25424. CONST Constant = TRUE;
  25425. BEGIN INC (Constant);
  25426. END Test.
  25427. negative: increment statement on constant character
  25428. MODULE Test;
  25429. CONST Constant = 'a';
  25430. BEGIN INC (Constant);
  25431. END Test.
  25432. negative: increment statement on constant integer
  25433. MODULE Test;
  25434. CONST Constant = 42;
  25435. BEGIN INC (Constant);
  25436. END Test.
  25437. negative: increment statement on constant real
  25438. MODULE Test;
  25439. CONST Constant = 0.1;
  25440. BEGIN INC (Constant);
  25441. END Test.
  25442. negative: increment statement on constant set
  25443. MODULE Test;
  25444. CONST Constant = {};
  25445. BEGIN INC (Constant);
  25446. END Test.
  25447. negative: increment statement on constant string
  25448. MODULE Test;
  25449. CONST Constant = "string";
  25450. BEGIN INC (Constant);
  25451. END Test.
  25452. negative: increment statement on nil pointer
  25453. MODULE Test;
  25454. CONST Constant = NIL;
  25455. BEGIN INC (Constant);
  25456. END Test.
  25457. negative: increment statement on boolean
  25458. MODULE Test;
  25459. VAR boolean: BOOLEAN;
  25460. BEGIN INC (boolean);
  25461. END Test.
  25462. negative: increment statement on character
  25463. MODULE Test;
  25464. VAR character: CHAR;
  25465. BEGIN INC (character);
  25466. END Test.
  25467. positive: increment statement on short integer
  25468. MODULE Test;
  25469. VAR integer: SHORTINT;
  25470. BEGIN INC (integer);
  25471. END Test.
  25472. positive: increment statement on integer
  25473. MODULE Test;
  25474. VAR integer: INTEGER;
  25475. BEGIN INC (integer);
  25476. END Test.
  25477. positive: increment statement on long integer
  25478. MODULE Test;
  25479. VAR integer: LONGINT;
  25480. BEGIN INC (integer);
  25481. END Test.
  25482. positive: increment statement on huge integer
  25483. MODULE Test;
  25484. VAR integer: HUGEINT;
  25485. BEGIN INC (integer);
  25486. END Test.
  25487. positive: increment statement on integer parameter
  25488. MODULE Test;
  25489. PROCEDURE Procedure (integer: INTEGER);
  25490. BEGIN INC (integer);
  25491. END Procedure;
  25492. END Test.
  25493. positive: increment statement on variable integer parameter
  25494. MODULE Test;
  25495. PROCEDURE Procedure (VAR integer: INTEGER);
  25496. BEGIN INC (integer);
  25497. END Procedure;
  25498. END Test.
  25499. negative: increment statement on constant integer parameter
  25500. MODULE Test;
  25501. PROCEDURE Procedure (CONST integer: INTEGER);
  25502. BEGIN INC (integer);
  25503. END Procedure;
  25504. END Test.
  25505. negative: increment statement on real
  25506. MODULE Test;
  25507. VAR real: REAL;
  25508. BEGIN INC (real);
  25509. END Test.
  25510. negative: increment statement on set
  25511. MODULE Test;
  25512. VAR set: SET;
  25513. BEGIN INC (set);
  25514. END Test.
  25515. negative: increment statement on array
  25516. MODULE Test;
  25517. VAR array: ARRAY 10 OF CHAR;
  25518. BEGIN INC (array);
  25519. END Test.
  25520. negative: increment statement on record
  25521. MODULE Test;
  25522. VAR record: RECORD END;
  25523. BEGIN INC (record);
  25524. END Test.
  25525. negative: increment statement on object
  25526. MODULE Test;
  25527. VAR object: OBJECT END;
  25528. BEGIN INC (object);
  25529. END Test.
  25530. negative: increment statement on pointer to array
  25531. MODULE Test;
  25532. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  25533. BEGIN INC (pointer);
  25534. END Test.
  25535. negative: increment statement on pointer to record
  25536. MODULE Test;
  25537. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  25538. BEGIN INC (pointer);
  25539. END Test.
  25540. negative: increment statement on procedure
  25541. MODULE Test;
  25542. VAR procedure: PROCEDURE;
  25543. BEGIN INC (procedure);
  25544. END Test.
  25545. negative: increment statement with constant boolean as increment
  25546. MODULE Test;
  25547. CONST Constant = TRUE;
  25548. VAR integer: INTEGER;
  25549. BEGIN INC (integer, Constant);
  25550. END Test.
  25551. negative: increment statement with constant character as increment
  25552. MODULE Test;
  25553. CONST Constant = 'a';
  25554. VAR integer: INTEGER;
  25555. BEGIN INC (integer, Constant);
  25556. END Test.
  25557. positive: increment statement with constant integer as increment
  25558. MODULE Test;
  25559. CONST Constant = 42;
  25560. VAR integer: INTEGER;
  25561. BEGIN INC (integer, Constant);
  25562. END Test.
  25563. positive: increment statement with constant negative integer as increment
  25564. MODULE Test;
  25565. VAR integer: INTEGER;
  25566. BEGIN INC (integer, -5);
  25567. END Test.
  25568. positive: increment statement with zero as increment
  25569. MODULE Test;
  25570. VAR integer: INTEGER;
  25571. BEGIN INC (integer, 0);
  25572. END Test.
  25573. positive: increment statement with constant positive integer as increment
  25574. MODULE Test;
  25575. VAR integer: INTEGER;
  25576. BEGIN INC (integer, 5);
  25577. END Test.
  25578. negative: increment statement with constant real as increment
  25579. MODULE Test;
  25580. CONST Constant = 0.1;
  25581. VAR integer: INTEGER;
  25582. BEGIN INC (integer, Constant);
  25583. END Test.
  25584. negative: increment statement with constant set as increment
  25585. MODULE Test;
  25586. CONST Constant = {};
  25587. VAR integer: INTEGER;
  25588. BEGIN INC (integer, Constant);
  25589. END Test.
  25590. negative: increment statement with constant string as increment
  25591. MODULE Test;
  25592. CONST Constant = "string";
  25593. VAR integer: INTEGER;
  25594. BEGIN INC (integer, Constant);
  25595. END Test.
  25596. negative: increment statement with nil pointer as increment
  25597. MODULE Test;
  25598. CONST Constant = NIL;
  25599. VAR integer: INTEGER;
  25600. BEGIN INC (integer, Constant);
  25601. END Test.
  25602. negative: increment statement with boolean as increment
  25603. MODULE Test;
  25604. VAR integer: INTEGER; increment: BOOLEAN;
  25605. BEGIN INC (integer, increment);
  25606. END Test.
  25607. negative: increment statement with character as increment
  25608. MODULE Test;
  25609. VAR integer: INTEGER; increment: CHAR;
  25610. BEGIN INC (integer, increment);
  25611. END Test.
  25612. positive: increment statement on short integer with short integer as increment
  25613. MODULE Test;
  25614. VAR integer, increment: SHORTINT;
  25615. BEGIN INC (integer, increment);
  25616. END Test.
  25617. negative: increment statement on short integer with integer as increment
  25618. MODULE Test;
  25619. VAR integer: SHORTINT; increment: INTEGER;
  25620. BEGIN INC (integer, increment);
  25621. END Test.
  25622. negative: increment statement on short integer with long integer as increment
  25623. MODULE Test;
  25624. VAR integer: SHORTINT; increment: LONGINT;
  25625. BEGIN INC (integer, increment);
  25626. END Test.
  25627. negative: increment statement on short integer with huge integer as increment
  25628. MODULE Test;
  25629. VAR integer: SHORTINT; increment: HUGEINT;
  25630. BEGIN INC (integer, increment);
  25631. END Test.
  25632. positive: increment statement on integer with short integer as increment
  25633. MODULE Test;
  25634. VAR integer: INTEGER; increment: SHORTINT;
  25635. BEGIN INC (integer, increment);
  25636. END Test.
  25637. positive: increment statement on integer with integer as increment
  25638. MODULE Test;
  25639. VAR integer, increment: INTEGER;
  25640. BEGIN INC (integer, increment);
  25641. END Test.
  25642. negative: increment statement on integer with long integer as increment
  25643. MODULE Test;
  25644. VAR integer: INTEGER; increment: LONGINT;
  25645. BEGIN INC (integer, increment);
  25646. END Test.
  25647. negative: increment statement on integer with huge integer as increment
  25648. MODULE Test;
  25649. VAR integer: INTEGER; increment: HUGEINT;
  25650. BEGIN INC (integer, increment);
  25651. END Test.
  25652. positive: increment statement on long integer with short integer as increment
  25653. MODULE Test;
  25654. VAR integer: LONGINT; increment: SHORTINT;
  25655. BEGIN INC (integer, increment);
  25656. END Test.
  25657. positive: increment statement on long integer with integer as increment
  25658. MODULE Test;
  25659. VAR integer: LONGINT; increment: INTEGER;
  25660. BEGIN INC (integer, increment);
  25661. END Test.
  25662. positive: increment statement on long integer with long integer as increment
  25663. MODULE Test;
  25664. VAR integer, increment: LONGINT;
  25665. BEGIN INC (integer, increment);
  25666. END Test.
  25667. negative: increment statement on long integer with huge integer as increment
  25668. MODULE Test;
  25669. VAR integer: LONGINT; increment: HUGEINT;
  25670. BEGIN INC (integer, increment);
  25671. END Test.
  25672. positive: increment statement on huge integer with short integer as increment
  25673. MODULE Test;
  25674. VAR integer: HUGEINT; increment: SHORTINT;
  25675. BEGIN INC (integer, increment);
  25676. END Test.
  25677. positive: increment statement on huge integer with integer as increment
  25678. MODULE Test;
  25679. VAR integer: HUGEINT; increment: INTEGER;
  25680. BEGIN INC (integer, increment);
  25681. END Test.
  25682. positive: increment statement on huge integer with long integer as increment
  25683. MODULE Test;
  25684. VAR integer: HUGEINT; increment: LONGINT;
  25685. BEGIN INC (integer, increment);
  25686. END Test.
  25687. positive: increment statement on huge integer with huge integer as increment
  25688. MODULE Test;
  25689. VAR integer, increment: HUGEINT;
  25690. BEGIN INC (integer, increment);
  25691. END Test.
  25692. positive: increment statement with integer parameter as increment
  25693. MODULE Test;
  25694. PROCEDURE Procedure (increment: INTEGER);
  25695. VAR integer: INTEGER;
  25696. BEGIN INC (integer, increment);
  25697. END Procedure;
  25698. END Test.
  25699. positive: increment statement with variable integer parameter as increment
  25700. MODULE Test;
  25701. PROCEDURE Procedure (VAR increment: INTEGER);
  25702. VAR integer: INTEGER;
  25703. BEGIN INC (integer, increment);
  25704. END Procedure;
  25705. END Test.
  25706. positive: increment statement with constant integer parameter as increment
  25707. MODULE Test;
  25708. PROCEDURE Procedure (CONST increment: INTEGER);
  25709. VAR integer: INTEGER;
  25710. BEGIN INC (integer, increment);
  25711. END Procedure;
  25712. END Test.
  25713. negative: increment statement with real as increment
  25714. MODULE Test;
  25715. VAR integer: INTEGER; increment: REAL;
  25716. BEGIN INC (integer, increment);
  25717. END Test.
  25718. negative: increment statement with set as increment
  25719. MODULE Test;
  25720. VAR integer: INTEGER; increment: SET;
  25721. BEGIN INC (integer, increment);
  25722. END Test.
  25723. negative: increment statement with array as increment
  25724. MODULE Test;
  25725. VAR integer: INTEGER; increment: ARRAY 10 OF CHAR;
  25726. BEGIN INC (integer, increment);
  25727. END Test.
  25728. negative: increment statement with record as increment
  25729. MODULE Test;
  25730. VAR integer: INTEGER; increment: RECORD END;
  25731. BEGIN INC (integer, increment);
  25732. END Test.
  25733. negative: increment statement with object as increment
  25734. MODULE Test;
  25735. VAR integer: INTEGER; increment: OBJECT END;
  25736. BEGIN INC (integer, increment);
  25737. END Test.
  25738. negative: increment statement with pointer to array as increment
  25739. MODULE Test;
  25740. VAR integer: INTEGER; increment: POINTER TO ARRAY 10 OF CHAR;
  25741. BEGIN INC (integer, increment);
  25742. END Test.
  25743. negative: increment statement with pointer to record as increment
  25744. MODULE Test;
  25745. VAR integer: INTEGER; increment: POINTER TO ARRAY 10 OF CHAR;
  25746. BEGIN INC (integer, increment);
  25747. END Test.
  25748. negative: increment statement with procedure as increment
  25749. MODULE Test;
  25750. VAR integer: INTEGER; increment: PROCEDURE;
  25751. BEGIN INC (integer, increment);
  25752. END Test.
  25753. # decrement statement
  25754. negative: decrement statement on constant boolean
  25755. MODULE Test;
  25756. CONST Constant = TRUE;
  25757. BEGIN DEC (Constant);
  25758. END Test.
  25759. negative: decrement statement on constant character
  25760. MODULE Test;
  25761. CONST Constant = 'a';
  25762. BEGIN DEC (Constant);
  25763. END Test.
  25764. negative: decrement statement on constant integer
  25765. MODULE Test;
  25766. CONST Constant = 42;
  25767. BEGIN DEC (Constant);
  25768. END Test.
  25769. negative: decrement statement on constant real
  25770. MODULE Test;
  25771. CONST Constant = 0.1;
  25772. BEGIN DEC (Constant);
  25773. END Test.
  25774. negative: decrement statement on constant set
  25775. MODULE Test;
  25776. CONST Constant = {};
  25777. BEGIN DEC (Constant);
  25778. END Test.
  25779. negative: decrement statement on constant string
  25780. MODULE Test;
  25781. CONST Constant = "string";
  25782. BEGIN DEC (Constant);
  25783. END Test.
  25784. negative: decrement statement on nil pointer
  25785. MODULE Test;
  25786. CONST Constant = NIL;
  25787. BEGIN DEC (Constant);
  25788. END Test.
  25789. negative: decrement statement on boolean
  25790. MODULE Test;
  25791. VAR boolean: BOOLEAN;
  25792. BEGIN DEC (boolean);
  25793. END Test.
  25794. negative: decrement statement on character
  25795. MODULE Test;
  25796. VAR character: CHAR;
  25797. BEGIN DEC (character);
  25798. END Test.
  25799. positive: decrement statement on short integer
  25800. MODULE Test;
  25801. VAR integer: SHORTINT;
  25802. BEGIN DEC (integer);
  25803. END Test.
  25804. positive: decrement statement on integer
  25805. MODULE Test;
  25806. VAR integer: INTEGER;
  25807. BEGIN DEC (integer);
  25808. END Test.
  25809. positive: decrement statement on long integer
  25810. MODULE Test;
  25811. VAR integer: LONGINT;
  25812. BEGIN DEC (integer);
  25813. END Test.
  25814. positive: decrement statement on huge integer
  25815. MODULE Test;
  25816. VAR integer: HUGEINT;
  25817. BEGIN DEC (integer);
  25818. END Test.
  25819. positive: decrement statement on integer parameter
  25820. MODULE Test;
  25821. PROCEDURE Procedure (integer: INTEGER);
  25822. BEGIN DEC (integer);
  25823. END Procedure;
  25824. END Test.
  25825. positive: decrement statement on variable integer parameter
  25826. MODULE Test;
  25827. PROCEDURE Procedure (VAR integer: INTEGER);
  25828. BEGIN DEC (integer);
  25829. END Procedure;
  25830. END Test.
  25831. negative: decrement statement on constant integer parameter
  25832. MODULE Test;
  25833. PROCEDURE Procedure (CONST integer: INTEGER);
  25834. BEGIN DEC (integer);
  25835. END Procedure;
  25836. END Test.
  25837. negative: decrement statement on real
  25838. MODULE Test;
  25839. VAR real: REAL;
  25840. BEGIN DEC (real);
  25841. END Test.
  25842. negative: decrement statement on set
  25843. MODULE Test;
  25844. VAR set: SET;
  25845. BEGIN DEC (set);
  25846. END Test.
  25847. negative: decrement statement on array
  25848. MODULE Test;
  25849. VAR array: ARRAY 10 OF CHAR;
  25850. BEGIN DEC (array);
  25851. END Test.
  25852. negative: decrement statement on record
  25853. MODULE Test;
  25854. VAR record: RECORD END;
  25855. BEGIN DEC (record);
  25856. END Test.
  25857. negative: decrement statement on object
  25858. MODULE Test;
  25859. VAR object: OBJECT END;
  25860. BEGIN DEC (object);
  25861. END Test.
  25862. negative: decrement statement on pointer to array
  25863. MODULE Test;
  25864. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  25865. BEGIN DEC (pointer);
  25866. END Test.
  25867. negative: decrement statement on pointer to record
  25868. MODULE Test;
  25869. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  25870. BEGIN DEC (pointer);
  25871. END Test.
  25872. negative: decrement statement on procedure
  25873. MODULE Test;
  25874. VAR procedure: PROCEDURE;
  25875. BEGIN DEC (procedure);
  25876. END Test.
  25877. negative: decrement statement with constant boolean as increment
  25878. MODULE Test;
  25879. CONST Constant = TRUE;
  25880. VAR integer: INTEGER;
  25881. BEGIN DEC (integer, Constant);
  25882. END Test.
  25883. negative: decrement statement with constant character as increment
  25884. MODULE Test;
  25885. CONST Constant = 'a';
  25886. VAR integer: INTEGER;
  25887. BEGIN DEC (integer, Constant);
  25888. END Test.
  25889. positive: decrement statement with constant integer as increment
  25890. MODULE Test;
  25891. CONST Constant = 42;
  25892. VAR integer: INTEGER;
  25893. BEGIN DEC (integer, Constant);
  25894. END Test.
  25895. positive: decrement statement with constant negative integer as increment
  25896. MODULE Test;
  25897. VAR integer: INTEGER;
  25898. BEGIN DEC (integer, -5);
  25899. END Test.
  25900. positive: decrement statement with zero as increment
  25901. MODULE Test;
  25902. VAR integer: INTEGER;
  25903. BEGIN DEC (integer, 0);
  25904. END Test.
  25905. positive: decrement statement with constant positive integer as increment
  25906. MODULE Test;
  25907. VAR integer: INTEGER;
  25908. BEGIN DEC (integer, 5);
  25909. END Test.
  25910. negative: decrement statement with constant real as increment
  25911. MODULE Test;
  25912. CONST Constant = 0.1;
  25913. VAR integer: INTEGER;
  25914. BEGIN DEC (integer, Constant);
  25915. END Test.
  25916. negative: decrement statement with constant set as increment
  25917. MODULE Test;
  25918. CONST Constant = {};
  25919. VAR integer: INTEGER;
  25920. BEGIN DEC (integer, Constant);
  25921. END Test.
  25922. negative: decrement statement with constant string as increment
  25923. MODULE Test;
  25924. CONST Constant = "string";
  25925. VAR integer: INTEGER;
  25926. BEGIN DEC (integer, Constant);
  25927. END Test.
  25928. negative: decrement statement with nil pointer as increment
  25929. MODULE Test;
  25930. CONST Constant = NIL;
  25931. VAR integer: INTEGER;
  25932. BEGIN DEC (integer, Constant);
  25933. END Test.
  25934. negative: decrement statement with boolean as increment
  25935. MODULE Test;
  25936. VAR integer: INTEGER; increment: BOOLEAN;
  25937. BEGIN DEC (integer, increment);
  25938. END Test.
  25939. negative: decrement statement with character as increment
  25940. MODULE Test;
  25941. VAR integer: INTEGER; increment: CHAR;
  25942. BEGIN DEC (integer, increment);
  25943. END Test.
  25944. positive: decrement statement on short integer with short integer as increment
  25945. MODULE Test;
  25946. VAR integer, increment: SHORTINT;
  25947. BEGIN DEC (integer, increment);
  25948. END Test.
  25949. negative: decrement statement on short integer with integer as increment
  25950. MODULE Test;
  25951. VAR integer: SHORTINT; increment: INTEGER;
  25952. BEGIN DEC (integer, increment);
  25953. END Test.
  25954. negative: decrement statement on short integer with long integer as increment
  25955. MODULE Test;
  25956. VAR integer: SHORTINT; increment: LONGINT;
  25957. BEGIN DEC (integer, increment);
  25958. END Test.
  25959. negative: decrement statement on short integer with huge integer as increment
  25960. MODULE Test;
  25961. VAR integer: SHORTINT; increment: HUGEINT;
  25962. BEGIN DEC (integer, increment);
  25963. END Test.
  25964. positive: decrement statement on integer with short integer as increment
  25965. MODULE Test;
  25966. VAR integer: INTEGER; increment: SHORTINT;
  25967. BEGIN DEC (integer, increment);
  25968. END Test.
  25969. positive: decrement statement on integer with integer as increment
  25970. MODULE Test;
  25971. VAR integer, increment: INTEGER;
  25972. BEGIN DEC (integer, increment);
  25973. END Test.
  25974. negative: decrement statement on integer with long integer as increment
  25975. MODULE Test;
  25976. VAR integer: INTEGER; increment: LONGINT;
  25977. BEGIN DEC (integer, increment);
  25978. END Test.
  25979. negative: decrement statement on integer with huge integer as increment
  25980. MODULE Test;
  25981. VAR integer: INTEGER; increment: HUGEINT;
  25982. BEGIN DEC (integer, increment);
  25983. END Test.
  25984. positive: decrement statement on long integer with short integer as increment
  25985. MODULE Test;
  25986. VAR integer: LONGINT; increment: SHORTINT;
  25987. BEGIN DEC (integer, increment);
  25988. END Test.
  25989. positive: decrement statement on long integer with integer as increment
  25990. MODULE Test;
  25991. VAR integer: LONGINT; increment: INTEGER;
  25992. BEGIN DEC (integer, increment);
  25993. END Test.
  25994. positive: decrement statement on long integer with long integer as increment
  25995. MODULE Test;
  25996. VAR integer, increment: LONGINT;
  25997. BEGIN DEC (integer, increment);
  25998. END Test.
  25999. negative: decrement statement on long integer with huge integer as increment
  26000. MODULE Test;
  26001. VAR integer: LONGINT; increment: HUGEINT;
  26002. BEGIN DEC (integer, increment);
  26003. END Test.
  26004. positive: decrement statement on huge integer with short integer as increment
  26005. MODULE Test;
  26006. VAR integer: HUGEINT; increment: SHORTINT;
  26007. BEGIN DEC (integer, increment);
  26008. END Test.
  26009. positive: decrement statement on huge integer with integer as increment
  26010. MODULE Test;
  26011. VAR integer: HUGEINT; increment: INTEGER;
  26012. BEGIN DEC (integer, increment);
  26013. END Test.
  26014. positive: decrement statement on huge integer with long integer as increment
  26015. MODULE Test;
  26016. VAR integer: HUGEINT; increment: LONGINT;
  26017. BEGIN DEC (integer, increment);
  26018. END Test.
  26019. positive: decrement statement on huge integer with huge integer as increment
  26020. MODULE Test;
  26021. VAR integer, increment: HUGEINT;
  26022. BEGIN DEC (integer, increment);
  26023. END Test.
  26024. positive: decrement statement with integer parameter as increment
  26025. MODULE Test;
  26026. PROCEDURE Procedure (increment: INTEGER);
  26027. VAR integer: INTEGER;
  26028. BEGIN DEC (integer, increment);
  26029. END Procedure;
  26030. END Test.
  26031. positive: decrement statement with variable integer parameter as increment
  26032. MODULE Test;
  26033. PROCEDURE Procedure (VAR increment: INTEGER);
  26034. VAR integer: INTEGER;
  26035. BEGIN DEC (integer, increment);
  26036. END Procedure;
  26037. END Test.
  26038. positive: decrement statement with constant integer parameter as increment
  26039. MODULE Test;
  26040. PROCEDURE Procedure (CONST increment: INTEGER);
  26041. VAR integer: INTEGER;
  26042. BEGIN DEC (integer, increment);
  26043. END Procedure;
  26044. END Test.
  26045. negative: decrement statement with real as increment
  26046. MODULE Test;
  26047. VAR integer: INTEGER; increment: REAL;
  26048. BEGIN DEC (integer, increment);
  26049. END Test.
  26050. negative: decrement statement with set as increment
  26051. MODULE Test;
  26052. VAR integer: INTEGER; increment: SET;
  26053. BEGIN DEC (integer, increment);
  26054. END Test.
  26055. negative: decrement statement with array as increment
  26056. MODULE Test;
  26057. VAR integer: INTEGER; increment: ARRAY 10 OF CHAR;
  26058. BEGIN DEC (integer, increment);
  26059. END Test.
  26060. negative: decrement statement with record as increment
  26061. MODULE Test;
  26062. VAR integer: INTEGER; increment: RECORD END;
  26063. BEGIN DEC (integer, increment);
  26064. END Test.
  26065. negative: decrement statement with object as increment
  26066. MODULE Test;
  26067. VAR integer: INTEGER; increment: OBJECT END;
  26068. BEGIN DEC (integer, increment);
  26069. END Test.
  26070. negative: decrement statement with pointer to array as increment
  26071. MODULE Test;
  26072. VAR integer: INTEGER; increment: POINTER TO ARRAY 10 OF CHAR;
  26073. BEGIN DEC (integer, increment);
  26074. END Test.
  26075. negative: decrement statement with pointer to record as increment
  26076. MODULE Test;
  26077. VAR integer: INTEGER; increment: POINTER TO ARRAY 10 OF CHAR;
  26078. BEGIN DEC (integer, increment);
  26079. END Test.
  26080. negative: decrement statement with procedure as increment
  26081. MODULE Test;
  26082. VAR integer: INTEGER; increment: PROCEDURE;
  26083. BEGIN DEC (integer, increment);
  26084. END Test.
  26085. # include statement
  26086. negative: include statement on constant boolean
  26087. MODULE Test;
  26088. CONST Constant = TRUE;
  26089. BEGIN INCL (Constant, 0);
  26090. END Test.
  26091. negative: include statement on constant character
  26092. MODULE Test;
  26093. CONST Constant = 'a';
  26094. BEGIN INCL (Constant, 0);
  26095. END Test.
  26096. negative: include statement on constant integer
  26097. MODULE Test;
  26098. CONST Constant = 42;
  26099. BEGIN INCL (Constant, 0);
  26100. END Test.
  26101. negative: include statement on constant real
  26102. MODULE Test;
  26103. CONST Constant = 0.1;
  26104. BEGIN INCL (Constant, 0);
  26105. END Test.
  26106. negative: include statement on constant set
  26107. MODULE Test;
  26108. CONST Constant = {};
  26109. BEGIN INCL (Constant, 0);
  26110. END Test.
  26111. negative: include statement on constant string
  26112. MODULE Test;
  26113. CONST Constant = "string";
  26114. BEGIN INCL (Constant, 0);
  26115. END Test.
  26116. negative: include statement on nil pointer
  26117. MODULE Test;
  26118. CONST Constant = NIL;
  26119. BEGIN INCL (Constant, 0);
  26120. END Test.
  26121. negative: include statement on boolean
  26122. MODULE Test;
  26123. VAR boolean: BOOLEAN;
  26124. BEGIN INCL (boolean, 0);
  26125. END Test.
  26126. negative: include statement on character
  26127. MODULE Test;
  26128. VAR character: CHAR;
  26129. BEGIN INCL (character, 0);
  26130. END Test.
  26131. negative: include statement on integer
  26132. MODULE Test;
  26133. VAR integer: INTEGER;
  26134. BEGIN INCL (integer, 0);
  26135. END Test.
  26136. negative: include statement on real
  26137. MODULE Test;
  26138. VAR real: REAL;
  26139. BEGIN INCL (real, 0);
  26140. END Test.
  26141. negative: include statement on set with constant boolean
  26142. MODULE Test;
  26143. VAR set: SET;
  26144. BEGIN INCL (set, TRUE);
  26145. END Test.
  26146. negative: include statement on set with constant character
  26147. MODULE Test;
  26148. VAR set: SET;
  26149. BEGIN INCL (set, 'f');
  26150. END Test.
  26151. positive: include statement on set with positive constant integer
  26152. MODULE Test;
  26153. VAR set: SET;
  26154. BEGIN INCL (set, 5);
  26155. END Test.
  26156. negative: include statement on set with constant integer exceeding valid range
  26157. MODULE Test;
  26158. VAR set: SET;
  26159. BEGIN INCL (set, 5654);
  26160. END Test.
  26161. positive: include statement on set with zero
  26162. MODULE Test;
  26163. VAR set: SET;
  26164. BEGIN INCL (set, 0);
  26165. END Test.
  26166. negative: include statement on set with negative constant integer
  26167. MODULE Test;
  26168. VAR set: SET;
  26169. BEGIN INCL (set, -5);
  26170. END Test.
  26171. positive: include statement on set parameter
  26172. MODULE Test;
  26173. PROCEDURE Procedure (set: SET);
  26174. BEGIN INCL (set, 0);
  26175. END Procedure;
  26176. END Test.
  26177. positive: include statement on variable set parameter
  26178. MODULE Test;
  26179. PROCEDURE Procedure (VAR set: SET);
  26180. BEGIN INCL (set, 0);
  26181. END Procedure;
  26182. END Test.
  26183. negative: include statement on constant set parameter
  26184. MODULE Test;
  26185. PROCEDURE Procedure (CONST set: SET);
  26186. BEGIN INCL (set, 0);
  26187. END Procedure;
  26188. END Test.
  26189. positive: include statement on set with integer parameter
  26190. MODULE Test;
  26191. PROCEDURE Procedure (integer: INTEGER);
  26192. VAR set: SET;
  26193. BEGIN INCL (set, integer);
  26194. END Procedure;
  26195. END Test.
  26196. positive: include statement on set with variable integer parameter
  26197. MODULE Test;
  26198. PROCEDURE Procedure (VAR integer: INTEGER);
  26199. VAR set: SET;
  26200. BEGIN INCL (set, integer);
  26201. END Procedure;
  26202. END Test.
  26203. positive: include statement on set with constant integer parameter
  26204. MODULE Test;
  26205. PROCEDURE Procedure (CONST integer: INTEGER);
  26206. VAR set: SET;
  26207. BEGIN INCL (set, integer);
  26208. END Procedure;
  26209. END Test.
  26210. negative: include statement on set with constant real
  26211. MODULE Test;
  26212. VAR set: SET;
  26213. BEGIN INCL (set, 0.0);
  26214. END Test.
  26215. negative: include statement on set with constant set
  26216. MODULE Test;
  26217. VAR set: SET;
  26218. BEGIN INCL (set, {});
  26219. END Test.
  26220. negative: include statement on set with constant string
  26221. MODULE Test;
  26222. VAR set: SET;
  26223. BEGIN INCL (set, "element");
  26224. END Test.
  26225. negative: include statement on set with nil pointer
  26226. MODULE Test;
  26227. VAR set: SET;
  26228. BEGIN INCL (set, NIL);
  26229. END Test.
  26230. negative: include statement on set with boolean
  26231. MODULE Test;
  26232. VAR set: SET; boolean: BOOLEAN;
  26233. BEGIN INCL (set, boolean);
  26234. END Test.
  26235. negative: include statement on set with character
  26236. MODULE Test;
  26237. VAR set: SET; character: CHAR;
  26238. BEGIN INCL (set, character);
  26239. END Test.
  26240. positive: include statement on set with short integer
  26241. MODULE Test;
  26242. VAR set: SET; integer: SHORTINT;
  26243. BEGIN INCL (set, integer);
  26244. END Test.
  26245. positive: include statement on set with integer
  26246. MODULE Test;
  26247. VAR set: SET; integer: INTEGER;
  26248. BEGIN INCL (set, integer);
  26249. END Test.
  26250. positive: include statement on set with long integer
  26251. MODULE Test;
  26252. VAR set: SET; integer: LONGINT;
  26253. BEGIN INCL (set, integer);
  26254. END Test.
  26255. positive: include statement on set with huge integer
  26256. MODULE Test;
  26257. VAR set: SET; integer: HUGEINT;
  26258. BEGIN INCL (set, integer);
  26259. END Test.
  26260. negative: include statement on set with real
  26261. MODULE Test;
  26262. VAR set: SET; real: REAL;
  26263. BEGIN INCL (set, real);
  26264. END Test.
  26265. negative: include statement on array
  26266. MODULE Test;
  26267. VAR array: ARRAY 10 OF CHAR;
  26268. BEGIN INCL (array, 0);
  26269. END Test.
  26270. negative: include statement on record
  26271. MODULE Test;
  26272. VAR record: RECORD END;
  26273. BEGIN INCL (record, 0);
  26274. END Test.
  26275. negative: include statement on object
  26276. MODULE Test;
  26277. VAR object: OBJECT END;
  26278. BEGIN INCL (object, 0);
  26279. END Test.
  26280. negative: include statement on pointer to array
  26281. MODULE Test;
  26282. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26283. BEGIN INCL (pointer, 0);
  26284. END Test.
  26285. negative: include statement on pointer to record
  26286. MODULE Test;
  26287. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26288. BEGIN INCL (pointer, 0);
  26289. END Test.
  26290. negative: include statement on procedure
  26291. MODULE Test;
  26292. VAR procedure: PROCEDURE;
  26293. BEGIN INCL (procedure, 0);
  26294. END Test.
  26295. # exclude statement
  26296. negative: exclude statement on constant boolean
  26297. MODULE Test;
  26298. CONST Constant = TRUE;
  26299. BEGIN EXCL (Constant, 0);
  26300. END Test.
  26301. negative: exclude statement on constant character
  26302. MODULE Test;
  26303. CONST Constant = 'a';
  26304. BEGIN EXCL (Constant, 0);
  26305. END Test.
  26306. negative: exclude statement on constant integer
  26307. MODULE Test;
  26308. CONST Constant = 42;
  26309. BEGIN EXCL (Constant, 0);
  26310. END Test.
  26311. negative: exclude statement on constant real
  26312. MODULE Test;
  26313. CONST Constant = 0.1;
  26314. BEGIN EXCL (Constant, 0);
  26315. END Test.
  26316. negative: exclude statement on constant set
  26317. MODULE Test;
  26318. CONST Constant = {};
  26319. BEGIN EXCL (Constant, 0);
  26320. END Test.
  26321. negative: exclude statement on constant string
  26322. MODULE Test;
  26323. CONST Constant = "string";
  26324. BEGIN EXCL (Constant, 0);
  26325. END Test.
  26326. negative: exclude statement on nil pointer
  26327. MODULE Test;
  26328. CONST Constant = NIL;
  26329. BEGIN EXCL (Constant, 0);
  26330. END Test.
  26331. negative: exclude statement on boolean
  26332. MODULE Test;
  26333. VAR boolean: BOOLEAN;
  26334. BEGIN EXCL (boolean, 0);
  26335. END Test.
  26336. negative: exclude statement on character
  26337. MODULE Test;
  26338. VAR character: CHAR;
  26339. BEGIN EXCL (character, 0);
  26340. END Test.
  26341. negative: exclude statement on integer
  26342. MODULE Test;
  26343. VAR integer: INTEGER;
  26344. BEGIN EXCL (integer, 0);
  26345. END Test.
  26346. negative: exclude statement on real
  26347. MODULE Test;
  26348. VAR real: REAL;
  26349. BEGIN EXCL (real, 0);
  26350. END Test.
  26351. negative: exclude statement on set with constant boolean
  26352. MODULE Test;
  26353. VAR set: SET;
  26354. BEGIN EXCL (set, TRUE);
  26355. END Test.
  26356. negative: exclude statement on set with constant character
  26357. MODULE Test;
  26358. VAR set: SET;
  26359. BEGIN EXCL (set, 'f');
  26360. END Test.
  26361. positive: exclude statement on set with positive constant integer
  26362. MODULE Test;
  26363. VAR set: SET;
  26364. BEGIN EXCL (set, 5);
  26365. END Test.
  26366. negative: exclude statement on set with constant integer exceeding valid range
  26367. MODULE Test;
  26368. VAR set: SET;
  26369. BEGIN EXCL (set, 5654);
  26370. END Test.
  26371. positive: exclude statement on set with zero
  26372. MODULE Test;
  26373. VAR set: SET;
  26374. BEGIN EXCL (set, 0);
  26375. END Test.
  26376. negative: exclude statement on set with negative constant integer
  26377. MODULE Test;
  26378. VAR set: SET;
  26379. BEGIN EXCL (set, -5);
  26380. END Test.
  26381. positive: exclude statement on set parameter
  26382. MODULE Test;
  26383. PROCEDURE Procedure (set: SET);
  26384. BEGIN EXCL (set, 0);
  26385. END Procedure;
  26386. END Test.
  26387. positive: exclude statement on variable set parameter
  26388. MODULE Test;
  26389. PROCEDURE Procedure (VAR set: SET);
  26390. BEGIN EXCL (set, 0);
  26391. END Procedure;
  26392. END Test.
  26393. negative: exclude statement on constant set parameter
  26394. MODULE Test;
  26395. PROCEDURE Procedure (CONST set: SET);
  26396. BEGIN EXCL (set, 0);
  26397. END Procedure;
  26398. END Test.
  26399. positive: exclude statement on set with integer parameter
  26400. MODULE Test;
  26401. PROCEDURE Procedure (integer: INTEGER);
  26402. VAR set: SET;
  26403. BEGIN EXCL (set, integer);
  26404. END Procedure;
  26405. END Test.
  26406. positive: exclude statement on set with variable integer parameter
  26407. MODULE Test;
  26408. PROCEDURE Procedure (VAR integer: INTEGER);
  26409. VAR set: SET;
  26410. BEGIN EXCL (set, integer);
  26411. END Procedure;
  26412. END Test.
  26413. positive: exclude statement on set with constant integer parameter
  26414. MODULE Test;
  26415. PROCEDURE Procedure (CONST integer: INTEGER);
  26416. VAR set: SET;
  26417. BEGIN EXCL (set, integer);
  26418. END Procedure;
  26419. END Test.
  26420. negative: exclude statement on set with constant real
  26421. MODULE Test;
  26422. VAR set: SET;
  26423. BEGIN EXCL (set, 0.0);
  26424. END Test.
  26425. negative: exclude statement on set with constant set
  26426. MODULE Test;
  26427. VAR set: SET;
  26428. BEGIN EXCL (set, {});
  26429. END Test.
  26430. negative: exclude statement on set with constant string
  26431. MODULE Test;
  26432. VAR set: SET;
  26433. BEGIN EXCL (set, "element");
  26434. END Test.
  26435. negative: exclude statement on set with nil pointer
  26436. MODULE Test;
  26437. VAR set: SET;
  26438. BEGIN EXCL (set, NIL);
  26439. END Test.
  26440. negative: exclude statement on set with boolean
  26441. MODULE Test;
  26442. VAR set: SET; boolean: BOOLEAN;
  26443. BEGIN EXCL (set, boolean);
  26444. END Test.
  26445. negative: exclude statement on set with character
  26446. MODULE Test;
  26447. VAR set: SET; character: CHAR;
  26448. BEGIN EXCL (set, character);
  26449. END Test.
  26450. positive: exclude statement on set with short integer
  26451. MODULE Test;
  26452. VAR set: SET; integer: SHORTINT;
  26453. BEGIN EXCL (set, integer);
  26454. END Test.
  26455. positive: exclude statement on set with integer
  26456. MODULE Test;
  26457. VAR set: SET; integer: INTEGER;
  26458. BEGIN EXCL (set, integer);
  26459. END Test.
  26460. positive: exclude statement on set with long integer
  26461. MODULE Test;
  26462. VAR set: SET; integer: LONGINT;
  26463. BEGIN EXCL (set, integer);
  26464. END Test.
  26465. positive: exclude statement on set with huge integer
  26466. MODULE Test;
  26467. VAR set: SET; integer: HUGEINT;
  26468. BEGIN EXCL (set, integer);
  26469. END Test.
  26470. negative: exclude statement on set with real
  26471. MODULE Test;
  26472. VAR set: SET; real: REAL;
  26473. BEGIN EXCL (set, real);
  26474. END Test.
  26475. negative: exclude statement on array
  26476. MODULE Test;
  26477. VAR array: ARRAY 10 OF CHAR;
  26478. BEGIN EXCL (array, 0);
  26479. END Test.
  26480. negative: exclude statement on record
  26481. MODULE Test;
  26482. VAR record: RECORD END;
  26483. BEGIN EXCL (record, 0);
  26484. END Test.
  26485. negative: exclude statement on object
  26486. MODULE Test;
  26487. VAR object: OBJECT END;
  26488. BEGIN EXCL (object, 0);
  26489. END Test.
  26490. negative: exclude statement on pointer to array
  26491. MODULE Test;
  26492. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26493. BEGIN EXCL (pointer, 0);
  26494. END Test.
  26495. negative: exclude statement on pointer to record
  26496. MODULE Test;
  26497. VAR pointer: POINTER TO ARRAY 10 OF CHAR;
  26498. BEGIN EXCL (pointer, 0);
  26499. END Test.
  26500. negative: exclude statement on procedure
  26501. MODULE Test;
  26502. VAR procedure: PROCEDURE;
  26503. BEGIN EXCL (procedure, 0);
  26504. END Test.
  26505. # copy statement
  26506. negative: copy statement on boolean
  26507. MODULE Test;
  26508. VAR source, dest: BOOLEAN;
  26509. BEGIN COPY (source, dest);
  26510. END Test.
  26511. negative: copy statement on character
  26512. MODULE Test;
  26513. VAR source, dest: CHAR;
  26514. BEGIN COPY (source, dest);
  26515. END Test.
  26516. negative: copy statement on integer
  26517. MODULE Test;
  26518. VAR source, dest: INTEGER;
  26519. BEGIN COPY (source, dest);
  26520. END Test.
  26521. negative: copy statement on real
  26522. MODULE Test;
  26523. VAR source, dest: REAL;
  26524. BEGIN COPY (source, dest);
  26525. END Test.
  26526. negative: copy statement on set
  26527. MODULE Test;
  26528. VAR source, dest: SET;
  26529. BEGIN COPY (source, dest);
  26530. END Test.
  26531. negative: copy statement on array of boolean
  26532. MODULE Test;
  26533. VAR source, dest: ARRAY 10 OF BOOLEAN;
  26534. BEGIN COPY (source, dest);
  26535. END Test.
  26536. positive: copy statement on array of character
  26537. MODULE Test;
  26538. VAR source, dest: ARRAY 10 OF CHAR;
  26539. BEGIN COPY (source, dest);
  26540. END Test.
  26541. positive: copy statement on array of character and longer array of character
  26542. MODULE Test;
  26543. VAR source: ARRAY 10 OF CHAR; dest: ARRAY 20 OF CHAR;
  26544. BEGIN COPY (source, dest);
  26545. END Test.
  26546. positive: copy statement on array of character and shorter array of character
  26547. MODULE Test;
  26548. VAR source: ARRAY 20 OF CHAR; dest: ARRAY 10 OF CHAR;
  26549. BEGIN source[9] := 0X; COPY (source, dest);
  26550. END Test.
  26551. positive: copy statement on string and longer array of character
  26552. MODULE Test;
  26553. CONST Source = "source";
  26554. VAR dest: ARRAY 10 OF CHAR;
  26555. BEGIN COPY (Source, dest);
  26556. END Test.
  26557. negative: copy statement on string and shorter array of character
  26558. MODULE Test;
  26559. CONST Source = "longer source";
  26560. VAR dest: ARRAY 10 OF CHAR;
  26561. BEGIN COPY (Source, dest);
  26562. END Test.
  26563. negative: copy statement on array of character and string
  26564. MODULE Test;
  26565. CONST Dest = "dest";
  26566. VAR source: ARRAY 10 OF CHAR;
  26567. BEGIN COPY (source, Dest);
  26568. END Test.
  26569. positive: copy statement with array of character parameter as source
  26570. MODULE Test;
  26571. PROCEDURE Procedure (source: ARRAY 10 OF CHAR);
  26572. VAR dest: ARRAY 10 OF CHAR;
  26573. BEGIN COPY (source, dest);
  26574. END Procedure;
  26575. END Test.
  26576. positive: copy statement with variable array of character parameter as source
  26577. MODULE Test;
  26578. PROCEDURE Procedure (VAR source: ARRAY 10 OF CHAR);
  26579. VAR dest: ARRAY 10 OF CHAR;
  26580. BEGIN COPY (source, dest);
  26581. END Procedure;
  26582. END Test.
  26583. positive: copy statement with constant array of character parameter as source
  26584. MODULE Test;
  26585. PROCEDURE Procedure (CONST source: ARRAY 10 OF CHAR);
  26586. VAR dest: ARRAY 10 OF CHAR;
  26587. BEGIN COPY (source, dest);
  26588. END Procedure;
  26589. END Test.
  26590. positive: copy statement with open array of character parameter as source
  26591. MODULE Test;
  26592. PROCEDURE Procedure (source: ARRAY OF CHAR);
  26593. VAR dest: ARRAY 10 OF CHAR;
  26594. BEGIN COPY (source, dest);
  26595. END Procedure;
  26596. END Test.
  26597. positive: copy statement with open variable array of character parameter as source
  26598. MODULE Test;
  26599. PROCEDURE Procedure (VAR source: ARRAY OF CHAR);
  26600. VAR dest: ARRAY 10 OF CHAR;
  26601. BEGIN COPY (source, dest);
  26602. END Procedure;
  26603. END Test.
  26604. positive: copy statement with open constant array of character parameter as source
  26605. MODULE Test;
  26606. PROCEDURE Procedure (CONST source: ARRAY OF CHAR);
  26607. VAR dest: ARRAY 10 OF CHAR;
  26608. BEGIN COPY (source, dest);
  26609. END Procedure;
  26610. END Test.
  26611. positive: copy statement with array of character parameter as destination
  26612. MODULE Test;
  26613. PROCEDURE Procedure (dest: ARRAY 10 OF CHAR);
  26614. VAR source: ARRAY 10 OF CHAR;
  26615. BEGIN COPY (source, dest);
  26616. END Procedure;
  26617. END Test.
  26618. positive: copy statement with variable array of character parameter as destination
  26619. MODULE Test;
  26620. PROCEDURE Procedure (VAR dest: ARRAY 10 OF CHAR);
  26621. VAR source: ARRAY 10 OF CHAR;
  26622. BEGIN COPY (source, dest);
  26623. END Procedure;
  26624. END Test.
  26625. negative: copy statement with constant array of character parameter as destination
  26626. MODULE Test;
  26627. PROCEDURE Procedure (CONST dest: ARRAY 10 OF CHAR);
  26628. VAR source: ARRAY 10 OF CHAR;
  26629. BEGIN COPY (source, dest);
  26630. END Procedure;
  26631. END Test.
  26632. positive: copy statement with open array of character parameter as destination
  26633. MODULE Test;
  26634. PROCEDURE Procedure (dest: ARRAY OF CHAR);
  26635. VAR source: ARRAY 10 OF CHAR;
  26636. BEGIN COPY (source, dest);
  26637. END Procedure;
  26638. END Test.
  26639. positive: copy statement with open variable array of character parameter as destination
  26640. MODULE Test;
  26641. PROCEDURE Procedure (VAR dest: ARRAY OF CHAR);
  26642. VAR source: ARRAY 10 OF CHAR;
  26643. BEGIN COPY (source, dest);
  26644. END Procedure;
  26645. END Test.
  26646. negative: copy statement with open constant array of character parameter as destination
  26647. MODULE Test;
  26648. PROCEDURE Procedure (CONST dest: ARRAY OF CHAR);
  26649. VAR source: ARRAY 10 OF CHAR;
  26650. BEGIN COPY (source, dest);
  26651. END Procedure;
  26652. END Test.
  26653. positive: copy statement with string as source and array of character parameter as destination
  26654. MODULE Test;
  26655. PROCEDURE Procedure (dest: ARRAY 10 OF CHAR);
  26656. BEGIN COPY ("source", dest);
  26657. END Procedure;
  26658. END Test.
  26659. positive: copy statement with string as source and variable array of character parameter as destination
  26660. MODULE Test;
  26661. PROCEDURE Procedure (VAR dest: ARRAY 10 OF CHAR);
  26662. BEGIN COPY ("source", dest);
  26663. END Procedure;
  26664. END Test.
  26665. negative: copy statement with string as source and constant array of character parameter as destination
  26666. MODULE Test;
  26667. PROCEDURE Procedure (CONST dest: ARRAY 10 OF CHAR);
  26668. BEGIN COPY ("source", dest);
  26669. END Procedure;
  26670. END Test.
  26671. positive: copy statement with string as source and open array of character parameter as destination
  26672. MODULE Test;
  26673. PROCEDURE Procedure (dest: ARRAY OF CHAR);
  26674. BEGIN COPY ("source", dest);
  26675. END Procedure;
  26676. END Test.
  26677. positive: copy statement with string as source and open variable array of character parameter as destination
  26678. MODULE Test;
  26679. PROCEDURE Procedure (VAR dest: ARRAY OF CHAR);
  26680. BEGIN COPY ("source", dest);
  26681. END Procedure;
  26682. END Test.
  26683. negative: copy statement with string as source and open constant array of character parameter as destination
  26684. MODULE Test;
  26685. PROCEDURE Procedure (CONST dest: ARRAY OF CHAR);
  26686. BEGIN COPY ("source", dest);
  26687. END Procedure;
  26688. END Test.
  26689. negative: copy statement on array of integer
  26690. MODULE Test;
  26691. VAR source, dest: ARRAY 10 OF INTEGER;
  26692. BEGIN COPY (source, dest);
  26693. END Test.
  26694. negative: copy statement on array of real
  26695. MODULE Test;
  26696. VAR source, dest: ARRAY 10 OF REAL;
  26697. BEGIN COPY (source, dest);
  26698. END Test.
  26699. negative: copy statement on array of set
  26700. MODULE Test;
  26701. VAR source, dest: ARRAY 10 OF SET;
  26702. BEGIN COPY (source, dest);
  26703. END Test.
  26704. negative: copy statement on array of record
  26705. MODULE Test;
  26706. VAR source, dest: ARRAY 10 OF RECORD END;
  26707. BEGIN COPY (source, dest);
  26708. END Test.
  26709. negative: copy statement on array of object
  26710. MODULE Test;
  26711. VAR source, dest: ARRAY 10 OF OBJECT END;
  26712. BEGIN COPY (source, dest);
  26713. END Test.
  26714. negative: copy statement on array of base object
  26715. MODULE Test;
  26716. VAR source, dest: ARRAY 10 OF OBJECT;
  26717. BEGIN COPY (source, dest);
  26718. END Test.
  26719. negative: copy statement on array of pointer to array
  26720. MODULE Test;
  26721. VAR source, dest: ARRAY 10 OF POINTER TO ARRAY OF CHAR;
  26722. BEGIN COPY (source, dest);
  26723. END Test.
  26724. negative: copy statement on array of pointer to record
  26725. MODULE Test;
  26726. VAR source, dest: ARRAY 10 OF POINTER TO RECORD END;
  26727. BEGIN COPY (source, dest);
  26728. END Test.
  26729. negative: copy statement on array of procedure
  26730. MODULE Test;
  26731. VAR source, dest: ARRAY 10 OF PROCEDURE;
  26732. BEGIN COPY (source, dest);
  26733. END Test.
  26734. negative: copy statement on record
  26735. MODULE Test;
  26736. VAR source, dest: RECORD END;
  26737. BEGIN COPY (source, dest);
  26738. END Test.
  26739. negative: copy statement on object
  26740. MODULE Test;
  26741. VAR source, dest: OBJECT END;
  26742. BEGIN COPY (source, dest);
  26743. END Test.
  26744. negative: copy statement on base object
  26745. MODULE Test;
  26746. VAR source, dest: OBJECT;
  26747. BEGIN COPY (source, dest);
  26748. END Test.
  26749. negative: copy statement on pointer to array
  26750. MODULE Test;
  26751. VAR source, dest: POINTER TO ARRAY 10 OF CHAR;
  26752. BEGIN COPY (source, dest);
  26753. END Test.
  26754. negative: copy statement on pointer to record
  26755. MODULE Test;
  26756. VAR source, dest: POINTER TO RECORD END;
  26757. BEGIN COPY (source, dest);
  26758. END Test.
  26759. negative: copy statement on procedure
  26760. MODULE Test;
  26761. VAR source, dest: PROCEDURE;
  26762. BEGIN COPY (source, dest);
  26763. END Test.
  26764. # overriding object procedures
  26765. positive: overriding same object procedure
  26766. MODULE Test;
  26767. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26768. TYPE B = OBJECT (A) PROCEDURE P; END P; END B;
  26769. END Test.
  26770. positive: deep overriding same object procedure
  26771. MODULE Test;
  26772. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26773. TYPE B = OBJECT (A) END B;
  26774. TYPE C = OBJECT (D) PROCEDURE P; END P; END C;
  26775. TYPE D = OBJECT (B) END D;
  26776. END Test.
  26777. negative: deep overriding same object procedure with different return type
  26778. MODULE Test;
  26779. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26780. TYPE B = OBJECT (A) END B;
  26781. TYPE C = OBJECT (D) PROCEDURE P (): A; END P; END C;
  26782. TYPE D = OBJECT (B) END D;
  26783. END Test.
  26784. positive: deep overriding same object procedure with same symbol in-between
  26785. MODULE Test;
  26786. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26787. TYPE B = OBJECT (A) VAR P: A END B;
  26788. TYPE C = OBJECT (D) PROCEDURE P; END P; END C;
  26789. TYPE D = OBJECT (B) END D;
  26790. END Test.
  26791. negative: deep overriding same object procedure with different return type and same symbol in-between
  26792. MODULE Test;
  26793. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26794. TYPE B = OBJECT (A) VAR P: A END B;
  26795. TYPE C = OBJECT (D) PROCEDURE P (): A; END P; END C;
  26796. TYPE D = OBJECT (B) END D;
  26797. END Test.
  26798. negative: overriding same object procedure with one parameter
  26799. MODULE Test;
  26800. TYPE A = OBJECT PROCEDURE P; END P; END A;
  26801. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26802. END Test.
  26803. negative: overriding same object procedure with no parameter
  26804. MODULE Test;
  26805. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26806. TYPE B = OBJECT (A) PROCEDURE P; END P; END B;
  26807. END Test.
  26808. positive: overriding same object procedure with parameter
  26809. MODULE Test;
  26810. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26811. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26812. END Test.
  26813. negative: overriding same object procedure with var parameter
  26814. MODULE Test;
  26815. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26816. TYPE B = OBJECT (A) PROCEDURE P (VAR p: A); END P; END B;
  26817. END Test.
  26818. negative: overriding same object procedure with const parameter
  26819. MODULE Test;
  26820. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26821. TYPE B = OBJECT (A) PROCEDURE P (CONST p: A); END P; END B;
  26822. END Test.
  26823. negative: overriding same object procedure with var parameter with parameter
  26824. MODULE Test;
  26825. TYPE A = OBJECT PROCEDURE P (VAR p: A); END P; END A;
  26826. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26827. END Test.
  26828. positive: overriding same object procedure with var parameter with var parameter
  26829. MODULE Test;
  26830. TYPE A = OBJECT PROCEDURE P (VAR p: A); END P; END A;
  26831. TYPE B = OBJECT (A) PROCEDURE P (VAR p: A); END P; END B;
  26832. END Test.
  26833. negative: overriding same object procedure with var parameter with const parameter
  26834. MODULE Test;
  26835. TYPE A = OBJECT PROCEDURE P (VAR p: A); END P; END A;
  26836. TYPE B = OBJECT (A) PROCEDURE P (CONST p: A); END P; END B;
  26837. END Test.
  26838. negative: overriding same object procedure with const parameter with parameter
  26839. MODULE Test;
  26840. TYPE A = OBJECT PROCEDURE P (CONST p: A); END P; END A;
  26841. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26842. END Test.
  26843. negative: overriding same object procedure with const parameter with var parameter
  26844. MODULE Test;
  26845. TYPE A = OBJECT PROCEDURE P (CONST p: A); END P; END A;
  26846. TYPE B = OBJECT (A) PROCEDURE P (VAR p: A); END P; END B;
  26847. END Test.
  26848. positive: overriding same object procedure with const parameter with const parameter
  26849. MODULE Test;
  26850. TYPE A = OBJECT PROCEDURE P (CONST p: A); END P; END A;
  26851. TYPE B = OBJECT (A) PROCEDURE P (CONST p: A); END P; END B;
  26852. END Test.
  26853. positive: overriding same object procedure with same parameter type
  26854. MODULE Test;
  26855. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26856. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26857. END Test.
  26858. negative: overriding same object procedure with covariant parameter type
  26859. MODULE Test;
  26860. TYPE A = OBJECT PROCEDURE P (p: A); END P; END A;
  26861. TYPE B = OBJECT (A) PROCEDURE P (p: B); END P; END B;
  26862. END Test.
  26863. negative: overriding same object procedure with contravariant parameter type
  26864. MODULE Test;
  26865. TYPE A = OBJECT PROCEDURE P (p: B); END P; END A;
  26866. TYPE B = OBJECT (A) PROCEDURE P (p: A); END P; END B;
  26867. END Test.
  26868. negative: overriding same object procedure with different parameter type
  26869. MODULE Test;
  26870. TYPE A = OBJECT PROCEDURE P (p: SET); END P; END A;
  26871. TYPE B = OBJECT (A) PROCEDURE P (p: CHAR); END P; END B;
  26872. END Test.
  26873. positive: overriding object procedure with same return type
  26874. MODULE Test;
  26875. TYPE A = OBJECT PROCEDURE P(): A; END P; END A;
  26876. TYPE B = OBJECT (A) PROCEDURE P(): A; END P; END B;
  26877. END Test.
  26878. negative: overriding object procedure with covariant return type
  26879. MODULE Test;
  26880. TYPE A = OBJECT PROCEDURE P(): A; END P; END A;
  26881. TYPE B = OBJECT (A) PROCEDURE P(): B; END P; END B;
  26882. END Test.
  26883. negative: overriding object procedure with contravariant return type
  26884. MODULE Test;
  26885. TYPE A = OBJECT PROCEDURE P(): B; END P; END A;
  26886. TYPE B = OBJECT (A) PROCEDURE P(): A; END P; END B;
  26887. END Test.
  26888. negative: overriding object procedure with different return type
  26889. MODULE Test;
  26890. TYPE A = OBJECT PROCEDURE P(): SET; END P; END A;
  26891. TYPE B = OBJECT (A) PROCEDURE P(): CHAR; END P; END B;
  26892. END Test.
  26893. negative: super call on procedure variable in module
  26894. MODULE Test;
  26895. VAR procedure: PROCEDURE;
  26896. BEGIN procedure^
  26897. END Test.
  26898. negative: super call on procedure variable in procedure
  26899. MODULE Test;
  26900. PROCEDURE Procedure;
  26901. VAR procedure: PROCEDURE;
  26902. BEGIN procedure^
  26903. END Procedure;
  26904. END Test.
  26905. negative: super call on procedure variable in object
  26906. MODULE Test;
  26907. TYPE Object = OBJECT
  26908. VAR procedure: PROCEDURE;
  26909. BEGIN procedure^
  26910. END Object;
  26911. END Test.
  26912. negative: super call on hidden procedure variable in object
  26913. MODULE Test;
  26914. TYPE Base = OBJECT
  26915. VAR procedure: PROCEDURE;
  26916. END Base;
  26917. TYPE Derived = OBJECT (Base)
  26918. BEGIN procedure^
  26919. END Derived;
  26920. END Test.
  26921. negative: super call on hiding procedure variable in object
  26922. MODULE Test;
  26923. TYPE Base = OBJECT
  26924. VAR procedure: PROCEDURE;
  26925. END Base;
  26926. TYPE Derived = OBJECT (Base)
  26927. VAR procedure: PROCEDURE;
  26928. BEGIN procedure^
  26929. END Derived;
  26930. END Test.
  26931. negative: super call to procedure in module
  26932. MODULE Test;
  26933. PROCEDURE Procedure; END Procedure;
  26934. BEGIN Procedure^
  26935. END Test.
  26936. negative: super call to procedure in procedure
  26937. MODULE Test;
  26938. PROCEDURE Procedure;
  26939. PROCEDURE Procedure; END Procedure;
  26940. BEGIN Procedure^
  26941. END Procedure;
  26942. END Test.
  26943. negative: super call to non-overriding procedure in object
  26944. MODULE Test;
  26945. TYPE Object = OBJECT
  26946. PROCEDURE Procedure; END Procedure;
  26947. BEGIN Procedure^
  26948. END Object;
  26949. END Test.
  26950. negative: super call to non-overridden procedure in object
  26951. MODULE Test;
  26952. TYPE Base = OBJECT
  26953. PROCEDURE Procedure; END Procedure;
  26954. END Base;
  26955. TYPE Derived = OBJECT (Base)
  26956. BEGIN Procedure^
  26957. END Derived;
  26958. END Test.
  26959. positive: super call to overridden procedure in object
  26960. MODULE Test;
  26961. TYPE Base = OBJECT
  26962. PROCEDURE Procedure; END Procedure;
  26963. END Base;
  26964. TYPE Derived = OBJECT (Base)
  26965. PROCEDURE Procedure; END Procedure;
  26966. BEGIN Procedure^
  26967. END Derived;
  26968. END Test.
  26969. negative: qualified super call to overridden but non-overriding procedure in object
  26970. MODULE Test;
  26971. TYPE A = OBJECT
  26972. PROCEDURE Procedure; END Procedure;
  26973. END A;
  26974. TYPE B = OBJECT (A)
  26975. PROCEDURE Procedure; END Procedure;
  26976. END B;
  26977. TYPE C = OBJECT (B)
  26978. BEGIN SELF.Procedure^
  26979. END C;
  26980. END Test.
  26981. negative: qualified super call on reference to overridden procedure in object
  26982. MODULE Test;
  26983. TYPE Base = OBJECT
  26984. PROCEDURE Procedure; END Procedure;
  26985. END Base;
  26986. TYPE Derived = OBJECT (Base)
  26987. VAR object: Derived;
  26988. PROCEDURE Procedure; END Procedure;
  26989. BEGIN object.Procedure^
  26990. END Derived;
  26991. END Test.
  26992. negative: qualified super call on reference to overridden procedure in module
  26993. MODULE Test;
  26994. TYPE Base = OBJECT
  26995. PROCEDURE Procedure; END Procedure;
  26996. END Base;
  26997. TYPE Derived = OBJECT (Base)
  26998. PROCEDURE Procedure; END Procedure;
  26999. END Derived;
  27000. VAR object: Derived;
  27001. BEGIN object.Procedure^
  27002. END Test.
  27003. # flags
  27004. negative: procedure illegaly marked delegate
  27005. MODULE Test;
  27006. PROCEDURE {DELEGATE} P; END P;
  27007. END Test.
  27008. negative: procedure illegaly marked untraced
  27009. MODULE Test;
  27010. PROCEDURE {UNTRACED} P; END P;
  27011. END Test.
  27012. positive: pointer to array variable marked untraced
  27013. MODULE Test;
  27014. VAR a {UNTRACED}: POINTER TO ARRAY OF CHAR;
  27015. END Test.
  27016. positive: pointer to record variable marked untraced
  27017. MODULE Test;
  27018. VAR a {UNTRACED}: POINTER TO RECORD END;
  27019. END Test.
  27020. negative: non-pointer variable marked untraced
  27021. MODULE Test;
  27022. VAR a {UNTRACED}: LONGINT;
  27023. END Test.
  27024. negative: variable marked delegate
  27025. MODULE Test;
  27026. VAR a{DELEGATE}: PROCEDURE;
  27027. END Test.
  27028. positive: delegate procedure type
  27029. MODULE Test;
  27030. TYPE TP=PROCEDURE{DELEGATE};
  27031. END Test.
  27032. positive: delegate procedure type with arguments
  27033. MODULE Test;
  27034. TYPE TP=PROCEDURE{DELEGATE}(a: LONGINT): LONGINT;
  27035. END Test.
  27036. positive: delegate procedure variable assignment
  27037. MODULE Test;
  27038. VAR p:PROCEDURE{DELEGATE};
  27039. PROCEDURE P; END P;
  27040. BEGIN p := P
  27041. END Test.
  27042. positive: delegate procedure variable nil assignment
  27043. MODULE Test;
  27044. VAR p: PROCEDURE{DELEGATE};
  27045. BEGIN p := NIL
  27046. END Test.
  27047. positive: delegate procedure variable assignment in exclusive block
  27048. MODULE Test;
  27049. VAR p:PROCEDURE{DELEGATE};
  27050. PROCEDURE P; END P;
  27051. BEGIN {EXCLUSIVE} p := P
  27052. END Test.
  27053. positive: delegate procedure variable nil assignment in exclusive block
  27054. MODULE Test;
  27055. VAR p: PROCEDURE{DELEGATE};
  27056. BEGIN {EXCLUSIVE} p := NIL
  27057. END Test.
  27058. positive: delegate procedure variable assigned to method
  27059. MODULE Test;
  27060. TYPE O=OBJECT PROCEDURE P; END P; END O;
  27061. VAR o:O; p:PROCEDURE{DELEGATE};
  27062. BEGIN p := o.P
  27063. END Test.
  27064. negative: non-delegate procedure variable assigned to method
  27065. MODULE Test;
  27066. TYPE O=OBJECT PROCEDURE P; END P; END O;
  27067. VAR o:O; p:PROCEDURE;
  27068. BEGIN p := o.P
  27069. END Test.
  27070. # signatures
  27071. positive: signature matching extension of object
  27072. MODULE Test;
  27073. TYPE O=OBJECT
  27074. PROCEDURE P; END P;
  27075. PROCEDURE Q(i: INTEGER); END Q;
  27076. PROCEDURE R(i: LONGINT): LONGINT; END R;
  27077. END O;
  27078. TYPE OO=OBJECT(O);
  27079. PROCEDURE P; END P;
  27080. PROCEDURE Q(i: INTEGER); END Q;
  27081. PROCEDURE R(i: LONGINT): LONGINT; END R;
  27082. END OO;
  27083. END Test.
  27084. negative: extension of objects with nonmatching signature: parameter incompatible
  27085. MODULE Test;
  27086. TYPE O=OBJECT
  27087. PROCEDURE P(i: INTEGER); END P;
  27088. END O;
  27089. TYPE OO=OBJECT(O)
  27090. PROCEDURE P(i: LONGINT); END P;
  27091. END OO;
  27092. END Test.
  27093. positive: extension of object matching signature: constructor extends non-constructor
  27094. MODULE Test;
  27095. TYPE O=OBJECT
  27096. PROCEDURE P; END P;
  27097. END O;
  27098. TYPE OO=OBJECT(O);
  27099. PROCEDURE &P; END P;
  27100. END OO;
  27101. END Test.
  27102. negative: extension of object with nonmatching signature: non-constructor extends constructor
  27103. MODULE Test;
  27104. TYPE O=OBJECT
  27105. PROCEDURE &P; END P;
  27106. END O;
  27107. TYPE OO=OBJECT(O);
  27108. PROCEDURE P; END P;
  27109. END OO;
  27110. END Test.
  27111. positive: non-exported constructor used in same module
  27112. MODULE Dummy;
  27113. TYPE O*=OBJECT
  27114. PROCEDURE & Init (x: LONGINT; CONST y: ARRAY OF CHAR);
  27115. END Init;
  27116. END O;
  27117. VAR o:O;
  27118. BEGIN
  27119. NEW(o,10,"test")
  27120. END Dummy.
  27121. negative: non-exported constructor used as method in different module
  27122. MODULE Test;
  27123. IMPORT Dummy;
  27124. VAR a: Dummy.O;
  27125. BEGIN
  27126. a.Init(10,"test")
  27127. END Test.
  27128. negative: non-exported constructor used as constructor in different module
  27129. MODULE Test;
  27130. IMPORT Dummy;
  27131. VAR a: Dummy.O;
  27132. BEGIN
  27133. NEW(a,10,"test");
  27134. END Test.
  27135. positive: non-exported constructor overwritten by new constructor with different name in different module
  27136. MODULE Test;
  27137. IMPORT Dummy;
  27138. TYPE O=OBJECT (Dummy.O)
  27139. PROCEDURE & InitX(a,b: LONGINT); END InitX;
  27140. END O;
  27141. VAR a: O;
  27142. BEGIN
  27143. NEW(a,10,20);
  27144. END Test.
  27145. positive: non-exported constructor overwritten by new constructor with same name in different module
  27146. MODULE Test;
  27147. IMPORT Dummy;
  27148. TYPE O=OBJECT (Dummy.O)
  27149. PROCEDURE & Init(a,b: LONGINT); END Init;
  27150. END O;
  27151. VAR a: O;
  27152. BEGIN
  27153. NEW(a,10,20);
  27154. END Test.
  27155. positive: exported constructor used in same module
  27156. MODULE Dummy;
  27157. TYPE O*=OBJECT
  27158. PROCEDURE & Init* (x: LONGINT; CONST y: ARRAY OF CHAR);
  27159. END Init;
  27160. END O;
  27161. VAR o:O;
  27162. BEGIN
  27163. NEW(o,10,"test")
  27164. END Dummy.
  27165. positive: exported constructor used as method in different module
  27166. MODULE Test;
  27167. IMPORT Dummy;
  27168. VAR a: Dummy.O;
  27169. BEGIN
  27170. a.Init(10,"test")
  27171. END Test.
  27172. positive: exported constructor used as constructor in different module
  27173. MODULE Test;
  27174. IMPORT Dummy;
  27175. VAR a: Dummy.O;
  27176. BEGIN
  27177. NEW(a,10,"test");
  27178. END Test.
  27179. positive: exported constructor overwritten by new constructor with different name and non-matching signature in different module
  27180. MODULE Test;
  27181. IMPORT Dummy;
  27182. TYPE O=OBJECT (Dummy.O)
  27183. PROCEDURE & InitX(a,b: LONGINT); END InitX;
  27184. END O;
  27185. VAR a: O;
  27186. BEGIN
  27187. NEW(a,10,20);
  27188. END Test.
  27189. negative: non-exported constructor overwritten by new constructor with same name and non-matching signature in different module
  27190. MODULE Test;
  27191. IMPORT Dummy;
  27192. TYPE O=OBJECT (Dummy.O)
  27193. PROCEDURE & Init(a,b: LONGINT); END Init;
  27194. END O;
  27195. END Test.
  27196. positive: non-exported constructor overwritten by new constructor with same name and matching signature in different module
  27197. MODULE Test;
  27198. IMPORT Dummy;
  27199. TYPE O=OBJECT (Dummy.O)
  27200. PROCEDURE & Init(a: LONGINT; CONST name: ARRAY OF CHAR); END Init;
  27201. END O;
  27202. VAR a: O;
  27203. BEGIN
  27204. NEW(a,10,"test");
  27205. END Test.
  27206. negative: new on object with non-exported constructor with empty parameter list
  27207. MODULE Dummy;
  27208. TYPE O*=OBJECT
  27209. PROCEDURE & Init;
  27210. END Init;
  27211. END O;
  27212. END Dummy.
  27213. MODULE Test;
  27214. IMPORT Dummy;
  27215. VAR o: Dummy.O;
  27216. BEGIN NEW(o)
  27217. END Test.
  27218. # realtime objects
  27219. positive: plain realtime object
  27220. MODULE Test;
  27221. TYPE A = OBJECT {REALTIME} END A;
  27222. END Test.
  27223. positive: realtime pointer to record
  27224. MODULE Test;
  27225. TYPE A = POINTER {REALTIME} TO RECORD END;
  27226. END Test.
  27227. positive: realtime pointer to array
  27228. MODULE Test;
  27229. TYPE A = POINTER {REALTIME} TO ARRAY OF CHAR;
  27230. END Test.
  27231. positive: realtime object containing basic type fields
  27232. MODULE Test;
  27233. IMPORT SYSTEM;
  27234. TYPE A = OBJECT {REALTIME}
  27235. VAR a0: CHAR8; a1: CHAR16; a2: CHAR32; a3: SHORTINT; a4: INTEGER; a5: LONGINT; a6: HUGEINT; a7: REAL;
  27236. a8: LONGREAL; a9: BOOLEAN; a10: SET; a11: ADDRESS; a12:SIZE; a13: SYSTEM.BYTE;
  27237. END A;
  27238. END Test.
  27239. positive: realtime pointer to record that contains basic type fields
  27240. MODULE Test;
  27241. IMPORT SYSTEM;
  27242. TYPE A = POINTER {REALTIME} TO RECORD
  27243. a0: CHAR8; a1: CHAR16; a2: CHAR32; a3: SHORTINT; a4: INTEGER; a5: LONGINT; a6: HUGEINT; a7: REAL;
  27244. a8: LONGREAL; a9: BOOLEAN; a10: SET; a11: ADDRESS; a12:SIZE; a13: SYSTEM.BYTE;
  27245. END;
  27246. END Test.
  27247. positive: realtime pointer to array where the elements contain basic type fields
  27248. MODULE Test;
  27249. IMPORT SYSTEM;
  27250. TYPE A0 = POINTER {REALTIME} TO ARRAY OF RECORD
  27251. a0: CHAR8; a1: CHAR16; a2: CHAR32; a3: SHORTINT; a4: INTEGER; a5: LONGINT; a6: HUGEINT; a7: REAL;
  27252. a8: LONGREAL; a9: BOOLEAN; a10: SET; a11: ADDRESS; a12:SIZE; a13: SYSTEM.BYTE;
  27253. END;
  27254. END Test.
  27255. positive: realtime object containing enumeration type field
  27256. MODULE Test;
  27257. TYPE Color = ENUM red, green, blue END;
  27258. RTObject = OBJECT {REALTIME} VAR color: Color; END RTObject;
  27259. END Test.
  27260. positive: realtime object containing non-basic type realtime fields
  27261. MODULE Test;
  27262. TYPE A = OBJECT {REALTIME} END A;
  27263. B = OBJECT {REALTIME} VAR a: A; b: B; END B;
  27264. END Test.
  27265. positive: realtime pointer to record that contains non-basic type fields
  27266. MODULE Test;
  27267. TYPE A = POINTER {REALTIME} TO RECORD END;
  27268. B = POINTER {REALTIME} TO RECORD a: A; b: B END;
  27269. END Test.
  27270. positive: realtime pointer to array where the elements contain non-basic realtime fields
  27271. MODULE Test;
  27272. TYPE A = POINTER {REALTIME} TO RECORD END;
  27273. B = POINTER {REALTIME} TO ARRAY OF RECORD a: A; b: B END;
  27274. END Test.
  27275. negative: realtime object containing non-realtime any pointer
  27276. MODULE Test;
  27277. TYPE A = OBJECT {REALTIME} VAR a0: ANY END A;
  27278. END Test;
  27279. negative: realtime object containing non-realtime pointer to record
  27280. MODULE Test;
  27281. TYPE A = OBJECT {REALTIME} VAR a0: POINTER TO RECORD END END A;
  27282. END Test;
  27283. negative: realtime object containing non-realtime pointer to array
  27284. MODULE Test;
  27285. TYPE A = OBJECT {REALTIME} VAR a0: POINTER TO ARRAY OF CHAR END A;
  27286. END Test;
  27287. negative: realtime object containing non-realtime object reference
  27288. MODULE Test;
  27289. TYPE A = OBJECT END A;
  27290. B = OBJECT {REALTIME} b: A END B;
  27291. END Test;
  27292. positive: realtime object containing record variable with realtime fields
  27293. MODULE Test;
  27294. TYPE A = OBJECT {REALTIME} VAR a: RECORD k: SHORTINT; l: INTEGER; m: A END END A;
  27295. END Test.
  27296. positive: realtime object containing record variable with realtime pointers
  27297. MODULE Test;
  27298. TYPE A = OBJECT {REALTIME} VAR a: RECORD p0: POINTER {REALTIME} TO RECORD END;
  27299. p1: POINTER {REALTIME} TO ARRAY OF CHAR; END; END A;
  27300. END Test.
  27301. negative: realtime object containing record variable with a non-realtime any pointer
  27302. MODULE Test;
  27303. TYPE A = OBJECT {REALTIME} VAR a: RECORD p: ANY END; END A;
  27304. END Test.
  27305. negative: realtime object containing record variable with a non-realtime record pointer
  27306. MODULE Test;
  27307. TYPE A = OBJECT {REALTIME} VAR a: RECORD p: POINTER TO RECORD END; END; END A;
  27308. END Test.
  27309. negative: realtime object containing record variable with a non-realtime array pointer
  27310. MODULE Test;
  27311. TYPE A = OBJECT {REALTIME} VAR a: RECORD p: POINTER TO ARRAY OF CHAR END; END A;
  27312. END Test.
  27313. positive: non-realtime object containing reference to realtime object
  27314. MODULE Test;
  27315. TYPE A = OBJECT {REALTIME} VAR a0: LONGINT; a1: CHAR; END A;
  27316. B = OBJECT VAR a: A; END B;
  27317. END Test.
  27318. positive: extension of realtime object declared as realtime object
  27319. MODULE Test;
  27320. TYPE A = OBJECT {REALTIME} VAR a0: CHAR; a1: SET; END A;
  27321. B = OBJECT {REALTIME} (A) VAR b0: INTEGER; b1: LONGINT; END B;
  27322. END Test.
  27323. positive: variable of realtime pointer to record type
  27324. MODULE Test;
  27325. VAR p: POINTER {REALTIME} TO RECORD k, l: LONGINT END;
  27326. END Test.
  27327. positive: variable of realtime pointer to array type
  27328. MODULE Test;
  27329. VAR p: POINTER {REALTIME} TO ARRAY OF BOOLEAN;
  27330. END Test.
  27331. negative: realtime extension of non-realtime object
  27332. MODULE Test;
  27333. TYPE A = OBJECT VAR a0: CHAR; a1: SET; END A;
  27334. B = OBJECT {REALTIME} (A) VAR b0: INTEGER; b1: LONGINT; END B;
  27335. END Test.
  27336. negative: non-realtime extension of realtime object
  27337. MODULE Test;
  27338. TYPE A = OBJECT {REALTIME} VAR a0: CHAR; a1: SET; END A;
  27339. B = OBJECT (A) VAR b0: INTEGER; b1: LONGINT; END B;
  27340. END Test.
  27341. positive: record extensions - both record types are implicit realtime objects
  27342. MODULE Test;
  27343. TYPE A = RECORD a0: CHAR; a1: SET; END;
  27344. B = RECORD (A) b0: INTEGER; b1: LONGINT; END;
  27345. AP = POINTER {REALTIME} TO A;
  27346. BP = POINTER {REALTIME} TO B;
  27347. END Test.
  27348. negative: record extensions - only base type is realtime object
  27349. MODULE Test;
  27350. TYPE A = RECORD a0: CHAR; a1: SET; END;
  27351. B = RECORD (A) b0: INTEGER; b1: ANY; END;
  27352. AP = POINTER {REALTIME} TO A;
  27353. BP = POINTER {REALTIME} TO B;
  27354. END Test.
  27355. positive: extension of realtime pointer
  27356. MODULE Test;
  27357. TYPE R = RECORD r0, r1: LONGINT; END;
  27358. P = POINTER {REALTIME} TO Q;
  27359. Q = RECORD (R) q0, q1: LONGINT; END;
  27360. S = OBJECT {REALTIME} (P) VAR s0, s1: LONGINT; END S;
  27361. END Test.
  27362. positive: module Dummy for realtime and non-realtime types
  27363. MODULE Dummy;
  27364. TYPE RTRec* = RECORD r0: LONGINT; r1: CHAR; END;
  27365. NRTRec* = RECORD n0: LONGINT; n1: ANY; END;
  27366. RTO* = OBJECT {REALTIME} VAR m0: SET; END RTO;
  27367. NRTO0* = OBJECT VAR p: ANY; END NRTO0;
  27368. NRTO1* = OBJECT VAR k: LONGINT; END NRTO1;
  27369. END Dummy.
  27370. positive: realtime pointer to (realtime) record from imported module
  27371. MODULE Test;
  27372. IMPORT Dummy;
  27373. TYPE RTPtr = POINTER {REALTIME} TO Dummy.RTRec;
  27374. END Test.
  27375. positive: non-realtime pointer to (non-realtime) record from imported module
  27376. MODULE Test;
  27377. IMPORT Dummy;
  27378. TYPE NRTPtr = POINTER TO Dummy.NRTRec;
  27379. END Test.
  27380. positive: non-realtime pointer to (realtime) record from imported module
  27381. MODULE Test;
  27382. IMPORT Dummy;
  27383. TYPE NRTPtr = POINTER TO Dummy.RTRec;
  27384. END Test.
  27385. negative: realtime pointer to (non-realtime) record from imported module
  27386. MODULE Test;
  27387. IMPORT Dummy;
  27388. TYPE RTPtr = POINTER {REALTIME} TO Dummy.NRTRec;
  27389. END Test.
  27390. positive: realtime extension of imported realtime object
  27391. MODULE Test;
  27392. IMPORT Dummy;
  27393. TYPE RTE = OBJECT {REALTIME} (Dummy.RTO) VAR t0: POINTER {REALTIME} TO ARRAY OF CHAR; END RTE;
  27394. END Test.
  27395. negative: non-realtime extension of imported realtime object
  27396. MODULE Test;
  27397. IMPORT Dummy;
  27398. TYPE NRTE = OBJECT (Dummy.RTO) VAR k: LONGINT; END NRTE;
  27399. END Test.
  27400. positive: non-realtime extension of imported non-realtime object that contains non-realtime fields
  27401. MODULE Test;
  27402. IMPORT Dummy;
  27403. TYPE NRTE = OBJECT (Dummy.NRTO0) VAR c: CHAR; END NRTE;
  27404. END Test.
  27405. positive: non-realtime extension of imported non-realtime object that contains only realtime fields
  27406. MODULE Test;
  27407. IMPORT Dummy;
  27408. TYPE NRTE = OBJECT (Dummy.NRTO1) VAR c: CHAR; END NRTE;
  27409. END Test.
  27410. # realtime procedures
  27411. positive: procedure marked as realtime
  27412. MODULE Test;
  27413. PROCEDURE {REALTIME} P; END P;
  27414. END Test.
  27415. positive: calling realtime procedure in non-realtime procedure
  27416. MODULE Test;
  27417. PROCEDURE {REALTIME} RTP; END RTP;
  27418. PROCEDURE NRTP; BEGIN RTP; END NRTP;
  27419. END Test.
  27420. positive: recursive call of realtime procedure
  27421. MODULE Test;
  27422. PROCEDURE {REALTIME} RTP; BEGIN RTP; END RTP;
  27423. END Test.
  27424. negative: calling non-realtime procedure in realtime procedure
  27425. MODULE Test;
  27426. PROCEDURE NRTP; END NRTP;
  27427. PROCEDURE {REALTIME} RTP; BEGIN NRTP; END RTP;
  27428. END Test.
  27429. negative: new statement in realtime procedure
  27430. MODULE Test;
  27431. PROCEDURE {REALTIME} P;
  27432. VAR p: POINTER TO RECORD END;
  27433. BEGIN NEW (p);
  27434. END P;
  27435. END Test.
  27436. negative: exclusive block in realtime procedure
  27437. MODULE Test;
  27438. PROCEDURE {REALTIME} P;
  27439. BEGIN {EXCLUSIVE}
  27440. END P;
  27441. END Test.
  27442. negative: await statement in realtime procedure
  27443. MODULE Test;
  27444. VAR condition: BOOLEAN;
  27445. PROCEDURE {REALTIME} P;
  27446. BEGIN AWAIT (condition);
  27447. END P;
  27448. END Test.
  27449. positive: realtime procedure variable to non-realtime procedure variable assignment
  27450. MODULE Test;
  27451. VAR rtp: PROCEDURE {REALTIME}; nrtp: PROCEDURE;
  27452. BEGIN nrtp := rtp;
  27453. END Test.
  27454. positive: realtime procedure variable to realtime procedure variable assignment
  27455. MODULE Test;
  27456. VAR rtp: PROCEDURE {REALTIME};
  27457. BEGIN rtp := rtp;
  27458. END Test.
  27459. negative: non-realtime procedure variable to realtime procedure variable assignment
  27460. MODULE Test;
  27461. VAR rtp: PROCEDURE {REALTIME}; nrtp: PROCEDURE;
  27462. BEGIN rtp := nrtp;
  27463. END Test.
  27464. negative: module body marked as realtime
  27465. MODULE Test;
  27466. BEGIN {REALTIME}
  27467. END Test.
  27468. negative: procedure body marked as realtime
  27469. MODULE Test;
  27470. PROCEDURE P;
  27471. BEGIN {REALTIME}
  27472. END P;
  27473. END Test.
  27474. positive: passive object body marked as realtime
  27475. MODULE Test;
  27476. TYPE Object = OBJECT
  27477. BEGIN {REALTIME}
  27478. END Object;
  27479. END Test.
  27480. positive: calling realtime procedure in passive object body marked as realtime
  27481. MODULE Test;
  27482. TYPE Object = OBJECT {REALTIME}
  27483. PROCEDURE {REALTIME} P; END P;
  27484. BEGIN {REALTIME} P;
  27485. END Object;
  27486. END Test.
  27487. negative: calling non-realtime procedure in passive object body marked as realtime
  27488. MODULE Test;
  27489. TYPE Object = OBJECT
  27490. PROCEDURE P; END P;
  27491. BEGIN {REALTIME} P;
  27492. END Object;
  27493. END Test.
  27494. positive: active object body marked as realtime
  27495. MODULE Test;
  27496. TYPE Object = OBJECT
  27497. BEGIN {ACTIVE, REALTIME}
  27498. END Object;
  27499. END Test.
  27500. positive: calling realtime procedure in active object body marked as realtime
  27501. MODULE Test;
  27502. TYPE Object = OBJECT {REALTIME}
  27503. PROCEDURE {REALTIME} P; END P;
  27504. BEGIN {ACTIVE, REALTIME} P;
  27505. END Object;
  27506. END Test.
  27507. negative: declaring realtime procedure/method in non-realtime object
  27508. MODULE Test;
  27509. TYPE A = OBJECT
  27510. PROCEDURE {REALTIME} P;
  27511. END P;
  27512. END A;
  27513. END Test.
  27514. negative: calling non-realtime procedure in active object body marked as realtime
  27515. MODULE Test;
  27516. TYPE Object = OBJECT
  27517. PROCEDURE P; END P;
  27518. BEGIN {ACTIVE, REALTIME} P;
  27519. END Object;
  27520. END Test.
  27521. positive: overwriting realtime procedure with realtime procedure
  27522. MODULE Test;
  27523. TYPE Base = OBJECT {REALTIME}
  27524. PROCEDURE {REALTIME} P; END P;
  27525. END Base;
  27526. TYPE Object = OBJECT {REALTIME} (Base)
  27527. PROCEDURE {REALTIME} P; END P;
  27528. END Object;
  27529. END Test.
  27530. negative: overwriting non-realtime procedure with realtime procedure
  27531. MODULE Test;
  27532. TYPE Base = OBJECT {REALTIME}
  27533. PROCEDURE P; END P;
  27534. END Base;
  27535. TYPE Object = OBJECT {REALTIME} (Base)
  27536. PROCEDURE {REALTIME} P; END P;
  27537. END Object;
  27538. END Test.
  27539. negative: overwriting realtime procedure with non-realtime procedure
  27540. MODULE Test;
  27541. TYPE Base = OBJECT {REALTIME}
  27542. PROCEDURE {REALTIME} P; END P;
  27543. END Base;
  27544. TYPE Object = OBJECT {REALTIME} (Base)
  27545. PROCEDURE P; END P;
  27546. END Object;
  27547. END Test.
  27548. positive: exporting realtime procedure
  27549. MODULE Dummy;
  27550. PROCEDURE {REALTIME} P*;
  27551. BEGIN END P;
  27552. PROCEDURE {REALTIME} Pp*(i: LONGINT);
  27553. BEGIN END Pp;
  27554. PROCEDURE Q*;
  27555. BEGIN END Q;
  27556. END Dummy.
  27557. positive: using imported realtime procedure in realtime and non-realtime procedure
  27558. MODULE Test;
  27559. IMPORT Dummy;
  27560. PROCEDURE {REALTIME} P;
  27561. BEGIN Dummy.P; Dummy.Pp(10)
  27562. END P;
  27563. PROCEDURE Q;
  27564. BEGIN Dummy.P
  27565. END Q;
  27566. END Test.
  27567. negative: using imported non-realtime procedure in realtime procedure
  27568. MODULE Test;
  27569. IMPORT Dummy;
  27570. PROCEDURE {REALTIME} P;
  27571. BEGIN Dummy.Q; Dummy.Pp(10)
  27572. END P;
  27573. END Test.
  27574. positive: use of basic type realtime variables and parameters in realtime procedure
  27575. MODULE Test;
  27576. PROCEDURE {REALTIME} P(VAR k: LONGINT);
  27577. VAR l: SET;
  27578. BEGIN l:= {}; k:= 5;
  27579. END P;
  27580. END Test.
  27581. positive: use of structured realtime variables in realtime procedure
  27582. MODULE Test;
  27583. TYPE A = OBJECT {REALTIME} VAR k, l: LONGINT END A;
  27584. PROCEDURE {REALTIME} P(VAR a: A);
  27585. BEGIN a.k := 0; a.l := 0;
  27586. END P;
  27587. END Test.
  27588. negative: use of non-realtime variables in realtime procedure
  27589. MODULE Test;
  27590. PROCEDURE {REALTIME} P(VAR a: POINTER TO ARRAY OF CHAR);
  27591. VAR i: LONGINT
  27592. BEGIN FOR i := 0 TO LEN(a) DO a[i] := '' END;
  27593. END P;
  27594. END Test.
  27595. positive: use of string constant (of implicit realtime type) in realtime procedure
  27596. MODULE Test;
  27597. PROCEDURE {REALTIME} P;
  27598. VAR a: ARRAY 10 OF CHAR;
  27599. BEGIN a := "AA";
  27600. END P;
  27601. END Test.
  27602. positive: module Dummy for realtime and non-realtime types and variables
  27603. MODULE Dummy;
  27604. TYPE RTRec* = RECORD i*: LONGINT; END;
  27605. NRTRec* = RECORD p*: ANY; END;
  27606. RTO* = OBJECT {REALTIME} VAR s: SET; END RTO;
  27607. NRTO* = OBJECT VAR p: ANY; END NRTO;
  27608. VAR rtrec*: RTRec;
  27609. nrtrec*: NRTRec;
  27610. PROCEDURE {REALTIME} P*;
  27611. END P;
  27612. PROCEDURE Q*;
  27613. END Q;
  27614. END Dummy.
  27615. positive: use of imported realtime type in realtime procedure
  27616. MODULE Test;
  27617. IMPORT Dummy;
  27618. PROCEDURE {REALTIME} P(VAR r: Dummy.RTO);
  27619. END P;
  27620. END Test.
  27621. negative: use of imported non-realtime type in realtime procedure
  27622. MODULE Test;
  27623. IMPORT Dummy;
  27624. PROCEDURE {REALTIME} P(VAR n: Dummy.NRTO);
  27625. END P;
  27626. END Test.
  27627. positive: use of imported realtime variable in realtime procedure
  27628. MODULE Test;
  27629. IMPORT Dummy;
  27630. PROCEDURE {REALTIME} P;
  27631. BEGIN Dummy.rtrec.i := 0;
  27632. END P;
  27633. END Test.
  27634. negative: use of imported non-realtime variable in realtime procedure
  27635. MODULE Test;
  27636. IMPORT Dummy;
  27637. PROCEDURE {REALTIME} P;
  27638. BEGIN Dummy.nrtrec.p := NIL;
  27639. END P;
  27640. END Test.
  27641. positive: use of imported realtime variable in non-realtime procedure
  27642. MODULE Test;
  27643. IMPORT Dummy;
  27644. PROCEDURE P;
  27645. BEGIN Dummy.rtrec.i := 0;
  27646. END P;
  27647. END Test.
  27648. positive: use of imported non-realtime variable in non-realtime procedure
  27649. MODULE Test;
  27650. IMPORT Dummy;
  27651. PROCEDURE P;
  27652. BEGIN Dummy.nrtrec.p := NIL;
  27653. END P;
  27654. END Test.
  27655. positive: realtime procedure used as parameter in realtime procedure
  27656. MODULE Test;
  27657. TYPE RTPT = PROCEDURE {REALTIME};
  27658. VAR rtp: PROCEDURE {REALTIME};
  27659. PROCEDURE {REALTIME} P(rtp: RTPT);
  27660. END P;
  27661. BEGIN P(rtp);
  27662. END Test.
  27663. negative: non-realtime procedure as parameter in realtime procedure
  27664. MODULE Test;
  27665. TYPE RTPT = PROCEDURE {REALTIME};
  27666. VAR rtp: PROCEDURE;
  27667. PROCEDURE {REALTIME} P(rtp: RTPT);
  27668. END P;
  27669. BEGIN P(rtp);
  27670. END Test.
  27671. positive: realtime procedure used as var-parameter in realtime procedure
  27672. MODULE Test;
  27673. TYPE RTPT = PROCEDURE {REALTIME};
  27674. VAR rtp: PROCEDURE {REALTIME};
  27675. PROCEDURE {REALTIME} P(VAR rtp: RTPT);
  27676. END P;
  27677. BEGIN P(rtp);
  27678. END Test.
  27679. negative: use of exclusive section in realtime module procedure
  27680. MODULE Test;
  27681. PROCEDURE {REALTIME} P;
  27682. BEGIN {EXCLUSIVE}
  27683. END P;
  27684. END Test.
  27685. # handling of untraced flag
  27686. positive: untraced flag on pointer to record
  27687. MODULE Test;
  27688. TYPE P= POINTER TO RECORD END;
  27689. VAR x {UNTRACED}: P;
  27690. END Test.
  27691. positive: untraced flag on object
  27692. MODULE Test;
  27693. TYPE P= OBJECT END P;
  27694. VAR x {UNTRACED}: P;
  27695. END Test.
  27696. positive: untraced flag on pointer to array
  27697. MODULE Test;
  27698. TYPE P=POINTER TO ARRAY OF CHAR;
  27699. VAR x {UNTRACED}: P;
  27700. END Test.
  27701. positive: untraced flag on delegate procedure
  27702. MODULE Test;
  27703. TYPE P=PROCEDURE {DELEGATE};
  27704. VAR x {UNTRACED}: P;
  27705. END Test.
  27706. negative: untraced flag on basic type
  27707. MODULE Test;
  27708. TYPE P=LONGINT;
  27709. VAR x{UNTRACED}: P;
  27710. END Test.
  27711. negative: untraced flag on procedure type
  27712. MODULE Test;
  27713. TYPE P= PROCEDURE;
  27714. VAR x{UNTRACED}: P;
  27715. END Test.
  27716. negative: untraced flag on record type;
  27717. MODULE Test;
  27718. TYPE P=RECORD END;
  27719. VAR x{UNTRACED}: P;
  27720. END Test.
  27721. #miscellaneous
  27722. positive: system address type size
  27723. MODULE Test;
  27724. IMPORT SYSTEM;
  27725. VAR a: LONGINT;
  27726. BEGIN a := SIZEOF(ADDRESS)
  27727. END Test.
  27728. negative: system address function on size-incompatible type
  27729. MODULE Test;
  27730. IMPORT SYSTEM;
  27731. VAR a: SHORTINT;
  27732. BEGIN a := SYSTEM.ADR(a)
  27733. END Test.
  27734. positive: system address function on size-compatible type
  27735. MODULE Test;
  27736. IMPORT SYSTEM;
  27737. VAR a: HUGEINT;
  27738. BEGIN a := SYSTEM.ADR(a)
  27739. END Test.
  27740. positive: unsigned system address function
  27741. MODULE Test;
  27742. IMPORT SYSTEM;
  27743. VAR a: ADDRESS;
  27744. BEGIN a := SYSTEM.ADR(a)
  27745. END Test.
  27746. positive: mixture of 32 and 8 bit types implying high register pressure by using an array
  27747. MODULE Test;
  27748. VAR b: ARRAY 2 OF CHAR; a: LONGINT; ch: CHAR;
  27749. BEGIN
  27750. b[a] := CHR(((a MOD 0AH) + 30H))
  27751. END Test.
  27752. positive: system.val
  27753. MODULE Test;
  27754. IMPORT SYSTEM;
  27755. VAR a: LONGINT; b: REAL; c: POINTER TO ARRAY OF CHAR; i: INTEGER; ch: CHAR;
  27756. BEGIN
  27757. a := SYSTEM.VAL(LONGINT,a);
  27758. a := SYSTEM.VAL(LONGINT,c);
  27759. a := SYSTEM.VAL(LONGINT,b);
  27760. a := SYSTEM.VAL(LONGINT,i);
  27761. a := SYSTEM.VAL(LONGINT,ch);
  27762. END Test.
  27763. positive: shift of unsigned type by signed value
  27764. MODULE Test;
  27765. IMPORT SYSTEM;
  27766. VAR ebx: SET;
  27767. BEGIN
  27768. ebx := LSH(ebx, -16)
  27769. END Test.
  27770. positive: shift of unsigned type by signed variable
  27771. MODULE Test;
  27772. IMPORT SYSTEM;
  27773. VAR ebx: SET; a: LONGINT;
  27774. BEGIN
  27775. ebx := LSH(ebx, a)
  27776. END Test.
  27777. positive: assignment of converted unsigned type to signed type
  27778. MODULE Test;
  27779. IMPORT SYSTEM;
  27780. VAR ebx: SET; a,i: LONGINT;
  27781. BEGIN
  27782. i := SYSTEM.VAL(LONGINT, LSH(ebx * {16..23}, -16));
  27783. END Test.
  27784. positive: getprocedure builtin call
  27785. MODULE Test;
  27786. TYPE
  27787. R= RECORD END;
  27788. MyO= OBJECT END MyO;
  27789. VAR
  27790. p: PROCEDURE;
  27791. q: PROCEDURE(r: R);
  27792. r: PROCEDURE():MyO;
  27793. s: PROCEDURE(p: MyO): MyO;
  27794. t: PROCEDURE(p:MyO);
  27795. u: PROCEDURE(r: R): MyO;
  27796. BEGIN
  27797. GETPROCEDURE("TestModule","TestProcedure",p);
  27798. GETPROCEDURE("X","Y",p);
  27799. GETPROCEDURE("TestModule","TestProcedure",p);
  27800. GETPROCEDURE("TestModule","TestProcedure",q);
  27801. GETPROCEDURE("TestModule","TestProcedure",r);
  27802. GETPROCEDURE("TestModule","TestProcedure",t);
  27803. GETPROCEDURE("TestModule","TestProcedure",s);
  27804. GETPROCEDURE("TestModule","TestProcedure",u);
  27805. END Test.
  27806. negative: procedure call designator returning nil as index
  27807. MODULE Test;
  27808. VAR a: ARRAY 32 OF CHAR; c: CHAR;
  27809. PROCEDURE P;
  27810. BEGIN
  27811. END P;
  27812. BEGIN
  27813. c := a[P()];
  27814. END Test.
  27815. negative: procedure call designator returning nil in binary expression
  27816. MODULE Test;
  27817. VAR a,b: LONGINT;
  27818. PROCEDURE P;
  27819. BEGIN
  27820. END P;
  27821. BEGIN
  27822. a := b + P();
  27823. END Test.
  27824. positive: module exporting procedure variable with return type
  27825. MODULE Dummy;
  27826. VAR
  27827. p-: PROCEDURE(a,b: LONGINT): LONGINT;
  27828. END Dummy.
  27829. positive: module importing procedure variable with return type
  27830. MODULE Test;
  27831. IMPORT Dummy;
  27832. VAR a: LONGINT;
  27833. BEGIN
  27834. a := a + Dummy.p(0,0);
  27835. END Test.
  27836. positive: passing NIL parameter on WINAPI string parameter
  27837. MODULE Test;
  27838. IMPORT SYSTEM;
  27839. VAR
  27840. p: PROCEDURE{WINAPI}(CONST a: ARRAY OF CHAR);
  27841. BEGIN
  27842. p(NIL);
  27843. END Test.
  27844. positive: SYSTEM.TYPECODE on records, pointer to record and object
  27845. MODULE Test;
  27846. IMPORT SYSTEM;
  27847. TYPE
  27848. R1=RECORD END; R2=RECORD (R1) END;
  27849. P1= POINTER TO RECORD END; P2=POINTER TO RECORD (P1) END;
  27850. O1 = OBJECT END O1; O2=OBJECT(O1) END O2;
  27851. PROCEDURE P(VAR r: R1; p: P1; o: O1);
  27852. VAR a: ADDRESS;
  27853. BEGIN
  27854. IF r IS R2 THEN END;
  27855. a := SYSTEM.TYPECODE(R2);
  27856. IF p IS P2 THEN END;
  27857. a := SYSTEM.TYPECODE(P2);
  27858. IF o IS O2 THEN END;
  27859. a := SYSTEM.TYPECODE(O2);
  27860. END P;
  27861. END Test.
  27862. negative: SYSTEM.TYPECODE with basic type
  27863. MODULE Test;
  27864. IMPORT SYSTEM;
  27865. TYPE
  27866. T = INTEGER;
  27867. VAR
  27868. a: LONGINT;
  27869. BEGIN
  27870. a:= SYSTEM.TYPECODE(T);
  27871. END Test.
  27872. negative: SYSTEM.TYPECODE with ANY type
  27873. MODULE Test;
  27874. IMPORT SYSTEM;
  27875. TYPE
  27876. T = ANY;
  27877. VAR
  27878. a: LONGINT;
  27879. BEGIN
  27880. a:= SYSTEM.TYPECODE(T);
  27881. END Test.
  27882. negative: SYSTEM.TYPECODE with OBJECT type
  27883. MODULE Test;
  27884. IMPORT SYSTEM;
  27885. TYPE
  27886. T = OBJECT;
  27887. VAR
  27888. a: LONGINT;
  27889. BEGIN
  27890. a:= SYSTEM.TYPECODE(T);
  27891. END Test.
  27892. negative: SYSTEM.TYPECODE with static array
  27893. MODULE Test;
  27894. IMPORT SYSTEM;
  27895. TYPE
  27896. T = ARRAY 32 OF CHAR;
  27897. VAR
  27898. a: LONGINT;
  27899. BEGIN
  27900. a:= SYSTEM.TYPECODE(T);
  27901. END Test.
  27902. negative: SYSTEM.TYPECODE with pointer to static array
  27903. MODULE Test;
  27904. IMPORT SYSTEM;
  27905. TYPE
  27906. T = POINTER TO ARRAY 32 OF LONGINT;
  27907. VAR
  27908. a: LONGINT;
  27909. BEGIN
  27910. a:= SYSTEM.TYPECODE(T);
  27911. END Test.
  27912. negative: SYSTEM.TYPECODE with pointer to dynamic array without pointers
  27913. MODULE Test;
  27914. IMPORT SYSTEM;
  27915. TYPE
  27916. T = POINTER TO ARRAY OF LONGINT;
  27917. VAR
  27918. a: LONGINT;
  27919. BEGIN
  27920. a:= SYSTEM.TYPECODE(T);
  27921. END Test.
  27922. positive: SYSTEM.HALT statement
  27923. MODULE Test;
  27924. IMPORT SYSTEM;
  27925. BEGIN
  27926. SYSTEM.HALT(100);
  27927. SYSTEM.HALT(10);
  27928. END Test.
  27929. positive: HALT statement with small parameter
  27930. MODULE Test;
  27931. BEGIN HALT(14)
  27932. END Test.
  27933. positive: pass a one and two character array as string and pass one array character as character
  27934. MODULE Test;
  27935. PROCEDURE P(CONST s: ARRAY OF CHAR);
  27936. BEGIN END P;
  27937. PROCEDURE Q(CONST c: CHAR);
  27938. BEGIN END Q;
  27939. BEGIN P("a"); P("ab"); Q("a"); P('a'); P('ab'); Q('a');
  27940. END Test.
  27941. positive: assign one character array to character
  27942. MODULE Test;
  27943. VAR a: CHAR;
  27944. BEGIN a := "a"
  27945. END Test.
  27946. negative: assign a character to a string
  27947. MODULE Test;
  27948. VAR a: ARRAY 2 OF CHAR;
  27949. BEGIN a := 0X;
  27950. END Test.
  27951. negative: pass a character value as a string
  27952. MODULE Test;
  27953. PROCEDURE P(CONST a: ARRAY OF CHAR);
  27954. BEGIN END P;
  27955. BEGIN P(0X);
  27956. END Test.
  27957. positive: assign a string of length zero to variable parameter
  27958. MODULE Test;
  27959. PROCEDURE P(VAR a: ARRAY OF CHAR);
  27960. BEGIN
  27961. a := "";
  27962. END P;
  27963. END Test.
  27964. positive: index array of record and pass as parameter
  27965. MODULE Test;
  27966. TYPE R=RECORD END;
  27967. VAR a: ARRAY 32 OF R;
  27968. PROCEDURE P(CONST r: R);
  27969. BEGIN END P;
  27970. BEGIN P(a[10]);
  27971. END Test.
  27972. positive: export of a type
  27973. MODULE Dummy;
  27974. TYPE R*=RECORD END;
  27975. END Dummy.
  27976. positive: reexport a type
  27977. MODULE Test;
  27978. IMPORT Dummy;
  27979. PROCEDURE P*(VAR r: Dummy.R);
  27980. BEGIN END P;
  27981. END Test.
  27982. positive: new on pointer to array containing pointers (any)
  27983. MODULE Test;
  27984. VAR a: POINTER TO ARRAY OF ANY;
  27985. BEGIN NEW(a,10) END Test.
  27986. positive: new on pointer to array containing pointers (delegates)
  27987. MODULE Test;
  27988. TYPE delegate = PROCEDURE{DELEGATE}(x: LONGINT);
  27989. VAR a: POINTER TO ARRAY OF delegate;
  27990. BEGIN NEW(a,10) END Test.
  27991. positive: new on pointer to array containing pointers (objects)
  27992. MODULE Test;
  27993. TYPE object = OBJECT END object;
  27994. VAR a: POINTER TO ARRAY OF object;
  27995. BEGIN NEW(a,10) END Test.
  27996. positive: new on pointer to array containing pointers (record with pointer)
  27997. MODULE Test;
  27998. TYPE
  27999. r1 = RECORD a: LONGINT; b: POINTER TO r1 END;
  28000. r2 = RECORD r: r1 END;
  28001. record = RECORD (r2) b: LONGINT END;
  28002. VAR a: POINTER TO ARRAY OF record;
  28003. BEGIN NEW(a,10) END Test.
  28004. positive: export object with field
  28005. MODULE Dummy;
  28006. TYPE
  28007. Volume* = OBJECT
  28008. VAR size-: LONGINT
  28009. END Volume;
  28010. END Dummy.
  28011. positive: import object with field
  28012. MODULE Test;
  28013. IMPORT Dummy;
  28014. TYPE
  28015. File = OBJECT
  28016. VAR
  28017. vol: Dummy.Volume;
  28018. PROCEDURE P;
  28019. VAR size: LONGINT;
  28020. BEGIN
  28021. size := vol.size;
  28022. END P;
  28023. END File;
  28024. END Test.
  28025. positive: export string value
  28026. MODULE Dummy;
  28027. CONST str*="myString";
  28028. END Dummy.
  28029. positive: import and use string value
  28030. MODULE Test;
  28031. IMPORT Dummy;
  28032. PROCEDURE P(str: ARRAY OF CHAR);
  28033. BEGIN
  28034. END P;
  28035. BEGIN P(Dummy.str);
  28036. END Test.
  28037. positive: boolean in record designator in pointer to array
  28038. MODULE Test;
  28039. TYPE
  28040. R= RECORD a,b: BOOLEAN END;
  28041. P= POINTER TO ARRAY OF R;
  28042. B= ARRAY 20 OF BOOLEAN;
  28043. VAR p:P; b:B;
  28044. BEGIN ASSERT(p[10].b); ASSERT(b[10]);
  28045. END Test.
  28046. positive: formal array of system.byte parameter used with basic actual parameter
  28047. MODULE Test;
  28048. IMPORT SYSTEM;
  28049. VAR a: ARRAY 32 OF CHAR; b: LONGINT;
  28050. PROCEDURE P(CONST a: ARRAY OF SYSTEM.BYTE);
  28051. BEGIN
  28052. END P;
  28053. BEGIN P(a); P(b); P(a[0]);
  28054. END Test.
  28055. positive: module exporting OBJECT
  28056. MODULE Dummy;
  28057. VAR a*: OBJECT;
  28058. END Dummy.
  28059. positive: module importing OBJECT
  28060. MODULE Test;
  28061. IMPORT Dummy;
  28062. PROCEDURE P(a: OBJECT);
  28063. BEGIN
  28064. END P;
  28065. BEGIN P(Dummy.a);
  28066. END Test.
  28067. positive: binary MIN function
  28068. MODULE Test;
  28069. CONST min = MIN(10,20);
  28070. VAR a,b: LONGINT; r1,r2: REAL;
  28071. BEGIN
  28072. a := MIN(a,b);
  28073. r1 := MIN(r1,r2);
  28074. a := MIN(a,256);
  28075. r1 := MIN(r1,20);
  28076. r1 := MIN(2.0,200);
  28077. ASSERT(MIN(1,10)=1);
  28078. ASSERT(MIN(-10,10)=-10);
  28079. END Test.
  28080. positive: binary MAX function
  28081. MODULE Test;
  28082. CONST min = MAX(10,20);
  28083. VAR a,b: LONGINT; r1,r2: REAL;
  28084. BEGIN
  28085. a := MAX(a,b);
  28086. r1 := MAX(r1,r2);
  28087. a := MAX(a,256);
  28088. r1 := MAX(r1,20);
  28089. r1 := MAX(2.0,200);
  28090. ASSERT(MAX(1,10)=10);
  28091. ASSERT(MAX(-10,10)=10);
  28092. END Test.
  28093. positive: method returning a delegate type
  28094. MODULE Test;
  28095. IMPORT SYSTEM;
  28096. TYPE Proc = PROCEDURE{DELEGATE};
  28097. TYPE O= OBJECT
  28098. VAR
  28099. PROCEDURE P;
  28100. BEGIN END P;
  28101. PROCEDURE Q(): Proc;
  28102. BEGIN
  28103. RETURN P;
  28104. END Q;
  28105. END O;
  28106. VAR x: Proc; o:O;
  28107. BEGIN x := o.Q(); x:= x;
  28108. END Test.
  28109. positive: type test on pointer returned by procedure
  28110. MODULE Test;
  28111. TYPE O = OBJECT END O;
  28112. PROCEDURE P(): OBJECT; BEGIN RETURN NIL; END P;
  28113. BEGIN ASSERT(P() IS O);
  28114. END Test.
  28115. positive: delegate array element assignment
  28116. MODULE Test;
  28117. IMPORT SYSTEM;
  28118. TYPE Handler= PROCEDURE{DELEGATE};
  28119. VAR
  28120. handlers: ARRAY 6 OF Handler; h: Handler;
  28121. BEGIN handlers[3] := h;
  28122. END Test.
  28123. positive: large stack size
  28124. MODULE Test;
  28125. CONST stackSize = 10000H;
  28126. PROCEDURE P;
  28127. VAR a: ARRAY stackSize OF CHAR;
  28128. BEGIN
  28129. END P;
  28130. PROCEDURE Q;
  28131. VAR a: ARRAY 100 OF CHAR;
  28132. BEGIN
  28133. END Q;
  28134. END Test.
  28135. positive: shortint variable multiplied by shortint value (8bit multiply)
  28136. MODULE Test;
  28137. PROCEDURE P;
  28138. VAR a: SHORTINT;
  28139. BEGIN
  28140. IF a = a*3 THEN END;
  28141. END P;
  28142. END Test.
  28143. positive: with statement on object field
  28144. MODULE Test;
  28145. TYPE Object = OBJECT VAR a: LONGINT; END Object;
  28146. TYPE Object2 = OBJECT (Object) VAR a: Object; END Object2;
  28147. TYPE Object3 = OBJECT VAR a: Object; BEGIN WITH a: Object2 DO a.a.a := a.a.a; END; END Object3;
  28148. END Test.
  28149. negative: access to different instance of a with-guarded variable
  28150. MODULE Test;
  28151. TYPE A = OBJECT END A;
  28152. TYPE B = OBJECT (A)
  28153. VAR a: A;
  28154. BEGIN WITH a: B DO a.a.a := NIL END;
  28155. END B;
  28156. END Test.
  28157. positive: use of SYSTEM.NEW
  28158. MODULE Test;
  28159. IMPORT SYSTEM;
  28160. VAR any: ANY;
  28161. BEGIN SYSTEM.NEW(any,100);
  28162. END Test.
  28163. positive: expression involving a reordering of floating point stack
  28164. MODULE Test;
  28165. VAR x,y: LONGREAL;
  28166. PROCEDURE Sqrt(x: REAL): REAL;
  28167. BEGIN END Sqrt;
  28168. BEGIN
  28169. x := x*y + Sqrt(SHORT(x)) + x*y;
  28170. END Test.
  28171. positive: use string length with different lengths (to check side-effects on length field in string value)
  28172. MODULE Test;
  28173. TYPE
  28174. String = ARRAY 128 OF CHAR;
  28175. PROCEDURE PutBareName ( VAR name : String);
  28176. VAR ix : LONGINT;
  28177. BEGIN
  28178. WHILE (ix<LEN(name)) DO END;
  28179. END PutBareName;
  28180. PROCEDURE AddUserToName (VAR thisName : String);
  28181. VAR pos : INTEGER;
  28182. BEGIN
  28183. IF pos < LEN (thisName) THEN END;
  28184. END AddUserToName;
  28185. END Test.
  28186. positive: SYSTEM.BYTE varpar
  28187. MODULE Test;
  28188. IMPORT SYSTEM;
  28189. VAR c: CHAR;
  28190. PROCEDURE P(VAR x: SYSTEM.BYTE);
  28191. BEGIN
  28192. END P;
  28193. BEGIN
  28194. P(c);
  28195. END Test.
  28196. positive: write a SYSTEM.BYTE varpar without conversion
  28197. MODULE Test;
  28198. IMPORT SYSTEM;
  28199. PROCEDURE P(VAR buf: SYSTEM.BYTE);
  28200. VAR s1,s2: SHORTINT;
  28201. BEGIN
  28202. buf := s2*16 + (s1 MOD 16)
  28203. END P;
  28204. END Test.
  28205. positive: use a value for a the address in SYSTEM.GET
  28206. MODULE Test;
  28207. IMPORT SYSTEM;
  28208. PROCEDURE P(VAR buf: SYSTEM.BYTE);
  28209. VAR adr: ADDRESS;
  28210. BEGIN
  28211. adr := 0;
  28212. SYSTEM.GET (040EH, SYSTEM.VAL (INTEGER, adr)); (* EBDA address *)
  28213. END P;
  28214. END Test.
  28215. negative: use a non variable for destination in SYSTEM.GET
  28216. MODULE Test;
  28217. IMPORT SYSTEM;
  28218. PROCEDURE P(VAR buf: SYSTEM.BYTE);
  28219. VAR adr: ADDRESS;
  28220. BEGIN
  28221. SYSTEM.GET (adr, adr+1); (* EBDA address *)
  28222. END P;
  28223. END Test.
  28224. positive: negative values in address
  28225. MODULE Test;
  28226. IMPORT SYSTEM;
  28227. VAR a: ADDRESS;
  28228. BEGIN
  28229. a := -1;
  28230. END Test.
  28231. positive: negative values in address in SYSTEM.GET
  28232. MODULE Test;
  28233. IMPORT SYSTEM;
  28234. VAR a: LONGINT;
  28235. BEGIN
  28236. SYSTEM.GET(-1,a)
  28237. END Test.
  28238. positive: ugly system.val with records
  28239. MODULE Test;
  28240. IMPORT SYSTEM;
  28241. TYPE Record= RECORD a,b: LONGINT END;
  28242. PROCEDURE P(VAR r: Record);
  28243. VAR a: LONGINT;
  28244. BEGIN
  28245. P(SYSTEM.VAL(Record,a));
  28246. END P;
  28247. PROCEDURE Q(r: Record);
  28248. VAR a: LONGINT;
  28249. BEGIN
  28250. Q(SYSTEM.VAL(Record,a));
  28251. END Q;
  28252. END Test.
  28253. positive: call an empty inline code
  28254. MODULE Test;
  28255. IMPORT SYSTEM;
  28256. PROCEDURE -P;
  28257. CODE{SYSTEM.i386}
  28258. END P;
  28259. BEGIN P;
  28260. END Test.
  28261. positive: export inline code with reference to (local) constant
  28262. MODULE Test;
  28263. IMPORT SYSTEM;
  28264. PROCEDURE -P*;
  28265. CONST const=16;
  28266. CODE{SYSTEM.i386}
  28267. MOV EAX,[EAX+const]
  28268. END P;
  28269. END Test.
  28270. positive: export and import real number
  28271. MODULE A;
  28272. CONST
  28273. e*=1.2345D0;
  28274. END A.
  28275. MODULE Test;
  28276. IMPORT A;
  28277. CONST e=1.2345D0;
  28278. BEGIN
  28279. ASSERT(A.e = e);
  28280. END Test.
  28281. positive: addition of ADDRESS and SIZE
  28282. MODULE Test;
  28283. IMPORT SYSTEM;
  28284. VAR a: ADDRESS; s: SIZE;
  28285. BEGIN
  28286. a := a + s;
  28287. END Test.
  28288. positive: implicit HUGEINT conversion in comparison
  28289. MODULE Test;
  28290. VAR h: HUGEINT;
  28291. BEGIN
  28292. IF h < 0 THEN END
  28293. END Test.
  28294. positive: ADDRESS as variable in for loop
  28295. MODULE Test;
  28296. IMPORT SYSTEM;
  28297. VAR a,b,i: ADDRESS;
  28298. BEGIN
  28299. FOR i := a TO b DO
  28300. END;
  28301. END Test.
  28302. positive: subtract a ADDRESS from ADDRESS
  28303. MODULE Test;
  28304. IMPORT SYSTEM;
  28305. VAR a,b: ADDRESS; size: SIZE;
  28306. BEGIN
  28307. size := a-b;
  28308. size := -size
  28309. END Test.
  28310. negative: LONG conversion on ADDRESS
  28311. MODULE Test;
  28312. IMPORT SYSTEM;
  28313. VAR a: ADDRESS; v: HUGEINT;
  28314. BEGIN
  28315. v := LONG(a)
  28316. END Test.
  28317. positive: add negative value to ADDRESS
  28318. MODULE Test;
  28319. IMPORT SYSTEM;
  28320. VAR a: ADDRESS;
  28321. CONST const = -4;
  28322. BEGIN
  28323. a := a + const;
  28324. END Test.
  28325. positive: unary negation of ADDRESS
  28326. MODULE Test;
  28327. IMPORT SYSTEM;
  28328. VAR a: ADDRESS;
  28329. BEGIN
  28330. a := a + (-a) MOD 4;
  28331. END Test.
  28332. positive: export and import ADDRESS parameter
  28333. MODULE A;
  28334. IMPORT SYSTEM;
  28335. PROCEDURE P*(VAR a: ADDRESS);
  28336. BEGIN
  28337. END P;
  28338. END A.
  28339. MODULE Test;
  28340. IMPORT SYSTEM,A;
  28341. VAR a: ADDRESS;
  28342. BEGIN A.P(a)
  28343. END Test.
  28344. positive: use ADDRESS as array index
  28345. MODULE Test;
  28346. IMPORT SYSTEM;
  28347. VAR a: ADDRESS; b: ARRAY 32 OF ADDRESS;
  28348. BEGIN b[a] := b[a]
  28349. END Test.
  28350. positive: long jumps (backend test for TRM)
  28351. MODULE Test;
  28352. PROCEDURE LongJumpBackwards;
  28353. VAR a,b,c: LONGINT;
  28354. BEGIN
  28355. REPEAT
  28356. 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;
  28357. 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;
  28358. 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;
  28359. 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;
  28360. 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;
  28361. 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;
  28362. 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;
  28363. 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;
  28364. UNTIL a<b
  28365. END LongJumpBackwards;
  28366. PROCEDURE LongJumpForwards;
  28367. VAR a,b,c: LONGINT;
  28368. BEGIN
  28369. IF a>=b THEN
  28370. 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;
  28371. 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;
  28372. 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;
  28373. 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;
  28374. 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;
  28375. 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;
  28376. 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;
  28377. 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;
  28378. END;
  28379. END LongJumpForwards;
  28380. END Test.
  28381. positive: expressions of type real with longint divisions
  28382. MODULE Test;
  28383. PROCEDURE Do*(x: REAL): REAL;
  28384. VAR v: REAL;
  28385. BEGIN
  28386. v := x * (x * (x * (x * ((11 / 11520) - x * (1 / 14400)) - 583 / 69120) + 14597 / 276480) - 156409 / 737280) + 381773117 / 928972800;
  28387. RETURN v;
  28388. END Do;
  28389. END Test.
  28390. negative: invalid arrow designator
  28391. MODULE Test;
  28392. VAR s: ARRAY 128 OF CHAR;
  28393. BEGIN
  28394. COPY("WMClock.Open~", s)^;
  28395. END Test.