lists.xml 653 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134
  1. <xml xmlns="http://www.w3.org/1999/xhtml">
  2. <block type="unittest_main" x="13" y="13">
  3. <statement name="DO">
  4. <block type="procedures_callnoreturn">
  5. <mutation name="test create"></mutation>
  6. <next>
  7. <block type="procedures_callnoreturn">
  8. <mutation name="test empty"></mutation>
  9. <next>
  10. <block type="procedures_callnoreturn">
  11. <mutation name="test length"></mutation>
  12. <next>
  13. <block type="procedures_callnoreturn">
  14. <mutation name="test find simple"></mutation>
  15. <next>
  16. <block type="procedures_callnoreturn">
  17. <mutation name="test find complex"></mutation>
  18. <next>
  19. <block type="procedures_callnoreturn">
  20. <mutation name="test get simple"></mutation>
  21. <next>
  22. <block type="procedures_callnoreturn">
  23. <mutation name="test get complex"></mutation>
  24. <next>
  25. <block type="procedures_callnoreturn">
  26. <mutation name="test getRemove"></mutation>
  27. <next>
  28. <block type="procedures_callnoreturn">
  29. <mutation name="test remove"></mutation>
  30. <next>
  31. <block type="procedures_callnoreturn">
  32. <mutation name="test set"></mutation>
  33. <next>
  34. <block type="procedures_callnoreturn">
  35. <mutation name="test insert"></mutation>
  36. <next>
  37. <block type="procedures_callnoreturn">
  38. <mutation name="test sublist simple"></mutation>
  39. <next>
  40. <block type="procedures_callnoreturn">
  41. <mutation name="test sublist complex"></mutation>
  42. <next>
  43. <block type="procedures_callnoreturn">
  44. <mutation name="test join"></mutation>
  45. <next>
  46. <block type="procedures_callnoreturn">
  47. <mutation name="test split"></mutation>
  48. <next>
  49. <block type="procedures_callnoreturn">
  50. <mutation name="test sort alphabetic"></mutation>
  51. <next>
  52. <block type="procedures_callnoreturn">
  53. <mutation name="test sort ignoreCase"></mutation>
  54. <next>
  55. <block type="procedures_callnoreturn">
  56. <mutation name="test sort numeric"></mutation>
  57. </block>
  58. </next>
  59. </block>
  60. </next>
  61. </block>
  62. </next>
  63. </block>
  64. </next>
  65. </block>
  66. </next>
  67. </block>
  68. </next>
  69. </block>
  70. </next>
  71. </block>
  72. </next>
  73. </block>
  74. </next>
  75. </block>
  76. </next>
  77. </block>
  78. </next>
  79. </block>
  80. </next>
  81. </block>
  82. </next>
  83. </block>
  84. </next>
  85. </block>
  86. </next>
  87. </block>
  88. </next>
  89. </block>
  90. </next>
  91. </block>
  92. </statement>
  93. </block>
  94. <block type="procedures_defnoreturn" x="13" y="538">
  95. <mutation>
  96. <arg name="test name"></arg>
  97. </mutation>
  98. <field name="NAME">check number of calls</field>
  99. <comment pinned="false" h="78" w="257">Checks that the number of calls is one in order to confirm that a function was only called once.</comment>
  100. <statement name="STACK">
  101. <block type="text_append">
  102. <field name="VAR">test name</field>
  103. <value name="TEXT">
  104. <block type="text">
  105. <field name="TEXT">number of calls</field>
  106. </block>
  107. </value>
  108. <next>
  109. <block type="unittest_assertequals" inline="false">
  110. <value name="MESSAGE">
  111. <block type="variables_get">
  112. <field name="VAR">test name</field>
  113. </block>
  114. </value>
  115. <value name="ACTUAL">
  116. <block type="variables_get">
  117. <field name="VAR">number of calls</field>
  118. </block>
  119. </value>
  120. <value name="EXPECTED">
  121. <block type="math_number">
  122. <field name="NUM">1</field>
  123. </block>
  124. </value>
  125. </block>
  126. </next>
  127. </block>
  128. </statement>
  129. </block>
  130. <block type="procedures_defnoreturn" x="13" y="713">
  131. <field name="NAME">test create</field>
  132. <comment pinned="false" h="80" w="160">Tests the "create list with" and "create empty list" blocks.</comment>
  133. <statement name="STACK">
  134. <block type="unittest_assertequals" inline="false">
  135. <value name="MESSAGE">
  136. <block type="text">
  137. <field name="TEXT">create empty</field>
  138. </block>
  139. </value>
  140. <value name="ACTUAL">
  141. <block type="lists_create_with">
  142. <mutation items="0"></mutation>
  143. </block>
  144. </value>
  145. <value name="EXPECTED">
  146. <block type="lists_create_empty"></block>
  147. </value>
  148. <next>
  149. <block type="unittest_assertequals" inline="false">
  150. <value name="MESSAGE">
  151. <block type="text">
  152. <field name="TEXT">create items</field>
  153. </block>
  154. </value>
  155. <value name="ACTUAL">
  156. <block type="lists_create_with" inline="true">
  157. <mutation items="2"></mutation>
  158. <value name="ADD0">
  159. <block type="logic_boolean">
  160. <field name="BOOL">TRUE</field>
  161. </block>
  162. </value>
  163. <value name="ADD1">
  164. <block type="text">
  165. <field name="TEXT">love</field>
  166. </block>
  167. </value>
  168. </block>
  169. </value>
  170. <value name="EXPECTED">
  171. <block type="lists_create_with" inline="true">
  172. <mutation items="2"></mutation>
  173. <value name="ADD0">
  174. <block type="logic_boolean">
  175. <field name="BOOL">TRUE</field>
  176. </block>
  177. </value>
  178. <value name="ADD1">
  179. <block type="text">
  180. <field name="TEXT">love</field>
  181. </block>
  182. </value>
  183. </block>
  184. </value>
  185. <next>
  186. <block type="unittest_assertequals" inline="false">
  187. <value name="MESSAGE">
  188. <block type="text">
  189. <field name="TEXT">create repeated</field>
  190. </block>
  191. </value>
  192. <value name="ACTUAL">
  193. <block type="lists_repeat" inline="true">
  194. <value name="ITEM">
  195. <block type="text">
  196. <field name="TEXT">Eject</field>
  197. </block>
  198. </value>
  199. <value name="NUM">
  200. <block type="math_number">
  201. <field name="NUM">3</field>
  202. </block>
  203. </value>
  204. </block>
  205. </value>
  206. <value name="EXPECTED">
  207. <block type="lists_create_with" inline="true">
  208. <mutation items="3"></mutation>
  209. <value name="ADD0">
  210. <block type="text">
  211. <field name="TEXT">Eject</field>
  212. </block>
  213. </value>
  214. <value name="ADD1">
  215. <block type="text">
  216. <field name="TEXT">Eject</field>
  217. </block>
  218. </value>
  219. <value name="ADD2">
  220. <block type="text">
  221. <field name="TEXT">Eject</field>
  222. </block>
  223. </value>
  224. </block>
  225. </value>
  226. <next>
  227. <block type="unittest_assertequals" inline="false">
  228. <value name="MESSAGE">
  229. <block type="text">
  230. <field name="TEXT">create repeated order</field>
  231. </block>
  232. </value>
  233. <value name="ACTUAL">
  234. <block type="lists_repeat" inline="true">
  235. <value name="ITEM">
  236. <block type="text">
  237. <field name="TEXT">Eject</field>
  238. </block>
  239. </value>
  240. <value name="NUM">
  241. <block type="math_arithmetic">
  242. <field name="OP">ADD</field>
  243. <value name="A">
  244. <block type="math_number">
  245. <field name="NUM">0</field>
  246. </block>
  247. </value>
  248. <value name="B">
  249. <block type="math_number">
  250. <field name="NUM">3</field>
  251. </block>
  252. </value>
  253. </block>
  254. </value>
  255. </block>
  256. </value>
  257. <value name="EXPECTED">
  258. <block type="lists_create_with" inline="true">
  259. <mutation items="3"></mutation>
  260. <value name="ADD0">
  261. <block type="text">
  262. <field name="TEXT">Eject</field>
  263. </block>
  264. </value>
  265. <value name="ADD1">
  266. <block type="text">
  267. <field name="TEXT">Eject</field>
  268. </block>
  269. </value>
  270. <value name="ADD2">
  271. <block type="text">
  272. <field name="TEXT">Eject</field>
  273. </block>
  274. </value>
  275. </block>
  276. </value>
  277. </block>
  278. </next>
  279. </block>
  280. </next>
  281. </block>
  282. </next>
  283. </block>
  284. </statement>
  285. </block>
  286. <block type="procedures_defreturn" x="13" y="1163">
  287. <mutation statements="false"></mutation>
  288. <field name="NAME">get empty list</field>
  289. <comment pinned="false" h="80" w="160">Creates an empty list for use with the empty test.</comment>
  290. <value name="RETURN">
  291. <block type="lists_create_empty"></block>
  292. </value>
  293. </block>
  294. <block type="procedures_defnoreturn" x="13" y="1238">
  295. <field name="NAME">test empty</field>
  296. <comment pinned="false" h="80" w="160">Tests the "is empty" block.</comment>
  297. <statement name="STACK">
  298. <block type="unittest_assertvalue" inline="false">
  299. <field name="EXPECTED">FALSE</field>
  300. <value name="MESSAGE">
  301. <block type="text">
  302. <field name="TEXT">not empty</field>
  303. </block>
  304. </value>
  305. <value name="ACTUAL">
  306. <block type="lists_isEmpty" inline="true">
  307. <value name="VALUE">
  308. <block type="lists_create_with" inline="false">
  309. <mutation items="1"></mutation>
  310. <value name="ADD0">
  311. <block type="math_number">
  312. <field name="NUM">0</field>
  313. </block>
  314. </value>
  315. </block>
  316. </value>
  317. </block>
  318. </value>
  319. <next>
  320. <block type="unittest_assertvalue" inline="false">
  321. <field name="EXPECTED">TRUE</field>
  322. <value name="MESSAGE">
  323. <block type="text">
  324. <field name="TEXT">empty</field>
  325. </block>
  326. </value>
  327. <value name="ACTUAL">
  328. <block type="lists_isEmpty" inline="true">
  329. <value name="VALUE">
  330. <block type="lists_create_empty"></block>
  331. </value>
  332. </block>
  333. </value>
  334. <next>
  335. <block type="unittest_assertvalue" inline="false">
  336. <field name="EXPECTED">TRUE</field>
  337. <value name="MESSAGE">
  338. <block type="text">
  339. <field name="TEXT">empty complex</field>
  340. </block>
  341. </value>
  342. <value name="ACTUAL">
  343. <block type="lists_isEmpty" inline="true">
  344. <value name="VALUE">
  345. <block type="procedures_callreturn">
  346. <mutation name="get empty list"></mutation>
  347. </block>
  348. </value>
  349. </block>
  350. </value>
  351. <next>
  352. <block type="unittest_assertvalue" inline="false">
  353. <field name="EXPECTED">TRUE</field>
  354. <value name="MESSAGE">
  355. <block type="text">
  356. <field name="TEXT">empty order</field>
  357. </block>
  358. </value>
  359. <value name="ACTUAL">
  360. <block type="lists_isEmpty" inline="true">
  361. <value name="VALUE">
  362. <block type="logic_ternary" inline="true">
  363. <value name="IF">
  364. <block type="logic_boolean">
  365. <field name="BOOL">TRUE</field>
  366. </block>
  367. </value>
  368. <value name="THEN">
  369. <block type="lists_create_empty"></block>
  370. </value>
  371. <value name="ELSE">
  372. <block type="logic_null"></block>
  373. </value>
  374. </block>
  375. </value>
  376. </block>
  377. </value>
  378. </block>
  379. </next>
  380. </block>
  381. </next>
  382. </block>
  383. </next>
  384. </block>
  385. </statement>
  386. </block>
  387. <block type="procedures_defnoreturn" x="13" y="1563">
  388. <field name="NAME">test length</field>
  389. <comment pinned="false" h="80" w="160">Tests the "length" block.</comment>
  390. <statement name="STACK">
  391. <block type="unittest_assertequals" inline="false">
  392. <value name="MESSAGE">
  393. <block type="text">
  394. <field name="TEXT">zero length</field>
  395. </block>
  396. </value>
  397. <value name="ACTUAL">
  398. <block type="lists_length" inline="false">
  399. <value name="VALUE">
  400. <block type="lists_create_empty"></block>
  401. </value>
  402. </block>
  403. </value>
  404. <value name="EXPECTED">
  405. <block type="math_number">
  406. <field name="NUM">0</field>
  407. </block>
  408. </value>
  409. <next>
  410. <block type="unittest_assertequals" inline="false">
  411. <value name="MESSAGE">
  412. <block type="text">
  413. <field name="TEXT">one length</field>
  414. </block>
  415. </value>
  416. <value name="ACTUAL">
  417. <block type="lists_length" inline="false">
  418. <value name="VALUE">
  419. <block type="lists_create_with" inline="false">
  420. <mutation items="1"></mutation>
  421. <value name="ADD0">
  422. <block type="text">
  423. <field name="TEXT">cat</field>
  424. </block>
  425. </value>
  426. </block>
  427. </value>
  428. </block>
  429. </value>
  430. <value name="EXPECTED">
  431. <block type="math_number">
  432. <field name="NUM">1</field>
  433. </block>
  434. </value>
  435. <next>
  436. <block type="unittest_assertequals" inline="false">
  437. <value name="MESSAGE">
  438. <block type="text">
  439. <field name="TEXT">three length</field>
  440. </block>
  441. </value>
  442. <value name="ACTUAL">
  443. <block type="lists_length" inline="false">
  444. <value name="VALUE">
  445. <block type="lists_create_with" inline="true">
  446. <mutation items="3"></mutation>
  447. <value name="ADD0">
  448. <block type="text">
  449. <field name="TEXT">cat</field>
  450. </block>
  451. </value>
  452. <value name="ADD1">
  453. <block type="logic_boolean">
  454. <field name="BOOL">TRUE</field>
  455. </block>
  456. </value>
  457. <value name="ADD2">
  458. <block type="lists_create_empty"></block>
  459. </value>
  460. </block>
  461. </value>
  462. </block>
  463. </value>
  464. <value name="EXPECTED">
  465. <block type="math_number">
  466. <field name="NUM">3</field>
  467. </block>
  468. </value>
  469. <next>
  470. <block type="unittest_assertequals" inline="false">
  471. <value name="MESSAGE">
  472. <block type="text">
  473. <field name="TEXT">two length order</field>
  474. </block>
  475. </value>
  476. <value name="ACTUAL">
  477. <block type="lists_length" inline="false">
  478. <value name="VALUE">
  479. <block type="logic_ternary" inline="true">
  480. <value name="IF">
  481. <block type="logic_boolean">
  482. <field name="BOOL">TRUE</field>
  483. </block>
  484. </value>
  485. <value name="THEN">
  486. <block type="lists_create_with" inline="false">
  487. <mutation items="2"></mutation>
  488. <value name="ADD0">
  489. <block type="text">
  490. <field name="TEXT">cat</field>
  491. </block>
  492. </value>
  493. <value name="ADD1">
  494. <block type="logic_boolean">
  495. <field name="BOOL">TRUE</field>
  496. </block>
  497. </value>
  498. </block>
  499. </value>
  500. <value name="ELSE">
  501. <block type="logic_null"></block>
  502. </value>
  503. </block>
  504. </value>
  505. </block>
  506. </value>
  507. <value name="EXPECTED">
  508. <block type="math_number">
  509. <field name="NUM">2</field>
  510. </block>
  511. </value>
  512. </block>
  513. </next>
  514. </block>
  515. </next>
  516. </block>
  517. </next>
  518. </block>
  519. </statement>
  520. </block>
  521. <block type="procedures_defnoreturn" x="13" y="1988">
  522. <field name="NAME">test find simple</field>
  523. <comment pinned="false" h="80" w="160">Tests the "find" block with a variable.</comment>
  524. <statement name="STACK">
  525. <block type="variables_set">
  526. <field name="VAR">list</field>
  527. <value name="VALUE">
  528. <block type="lists_create_with" inline="true">
  529. <mutation items="4"></mutation>
  530. <value name="ADD0">
  531. <block type="text">
  532. <field name="TEXT">Alice</field>
  533. </block>
  534. </value>
  535. <value name="ADD1">
  536. <block type="text">
  537. <field name="TEXT">Eve</field>
  538. </block>
  539. </value>
  540. <value name="ADD2">
  541. <block type="text">
  542. <field name="TEXT">Bob</field>
  543. </block>
  544. </value>
  545. <value name="ADD3">
  546. <block type="text">
  547. <field name="TEXT">Eve</field>
  548. </block>
  549. </value>
  550. </block>
  551. </value>
  552. <next>
  553. <block type="unittest_assertequals" inline="false">
  554. <value name="MESSAGE">
  555. <block type="text">
  556. <field name="TEXT">find first simple</field>
  557. </block>
  558. </value>
  559. <value name="ACTUAL">
  560. <block type="lists_indexOf" inline="false">
  561. <field name="END">FIRST</field>
  562. <value name="VALUE">
  563. <block type="variables_get">
  564. <field name="VAR">list</field>
  565. </block>
  566. </value>
  567. <value name="FIND">
  568. <block type="text">
  569. <field name="TEXT">Eve</field>
  570. </block>
  571. </value>
  572. </block>
  573. </value>
  574. <value name="EXPECTED">
  575. <block type="unittest_adjustindex">
  576. <value name="INDEX">
  577. <block type="math_number">
  578. <field name="NUM">1</field>
  579. </block>
  580. </value>
  581. </block>
  582. </value>
  583. <next>
  584. <block type="unittest_assertequals" inline="false">
  585. <value name="MESSAGE">
  586. <block type="text">
  587. <field name="TEXT">find last simple</field>
  588. </block>
  589. </value>
  590. <value name="ACTUAL">
  591. <block type="lists_indexOf" inline="false">
  592. <field name="END">LAST</field>
  593. <value name="VALUE">
  594. <block type="variables_get">
  595. <field name="VAR">list</field>
  596. </block>
  597. </value>
  598. <value name="FIND">
  599. <block type="text">
  600. <field name="TEXT">Eve</field>
  601. </block>
  602. </value>
  603. </block>
  604. </value>
  605. <value name="EXPECTED">
  606. <block type="unittest_adjustindex">
  607. <value name="INDEX">
  608. <block type="math_number">
  609. <field name="NUM">3</field>
  610. </block>
  611. </value>
  612. </block>
  613. </value>
  614. <next>
  615. <block type="unittest_assertequals" inline="false">
  616. <value name="MESSAGE">
  617. <block type="text">
  618. <field name="TEXT">find none simple</field>
  619. </block>
  620. </value>
  621. <value name="ACTUAL">
  622. <block type="lists_indexOf" inline="false">
  623. <field name="END">FIRST</field>
  624. <value name="VALUE">
  625. <block type="variables_get">
  626. <field name="VAR">list</field>
  627. </block>
  628. </value>
  629. <value name="FIND">
  630. <block type="text">
  631. <field name="TEXT">Dave</field>
  632. </block>
  633. </value>
  634. </block>
  635. </value>
  636. <value name="EXPECTED">
  637. <block type="unittest_adjustindex">
  638. <value name="INDEX">
  639. <block type="math_number">
  640. <field name="NUM">-1</field>
  641. </block>
  642. </value>
  643. </block>
  644. </value>
  645. </block>
  646. </next>
  647. </block>
  648. </next>
  649. </block>
  650. </next>
  651. </block>
  652. </statement>
  653. </block>
  654. <block type="procedures_defreturn" x="13" y="2438">
  655. <field name="NAME">get names</field>
  656. <comment pinned="false" h="80" w="160">Creates a list for use with the find test.</comment>
  657. <statement name="STACK">
  658. <block type="math_change">
  659. <field name="VAR">number of calls</field>
  660. <value name="DELTA">
  661. <block type="math_number">
  662. <field name="NUM">1</field>
  663. </block>
  664. </value>
  665. </block>
  666. </statement>
  667. <value name="RETURN">
  668. <block type="lists_create_with" inline="true">
  669. <mutation items="4"></mutation>
  670. <value name="ADD0">
  671. <block type="text">
  672. <field name="TEXT">Alice</field>
  673. </block>
  674. </value>
  675. <value name="ADD1">
  676. <block type="text">
  677. <field name="TEXT">Eve</field>
  678. </block>
  679. </value>
  680. <value name="ADD2">
  681. <block type="text">
  682. <field name="TEXT">Bob</field>
  683. </block>
  684. </value>
  685. <value name="ADD3">
  686. <block type="text">
  687. <field name="TEXT">Eve</field>
  688. </block>
  689. </value>
  690. </block>
  691. </value>
  692. </block>
  693. <block type="procedures_defnoreturn" x="13" y="2563">
  694. <field name="NAME">test find complex</field>
  695. <comment pinned="false" h="80" w="160">Tests the "find" block with a function call.</comment>
  696. <statement name="STACK">
  697. <block type="variables_set">
  698. <field name="VAR">number of calls</field>
  699. <value name="VALUE">
  700. <block type="math_number">
  701. <field name="NUM">0</field>
  702. </block>
  703. </value>
  704. <next>
  705. <block type="unittest_assertequals" inline="false">
  706. <value name="MESSAGE">
  707. <block type="text">
  708. <field name="TEXT">find first complex</field>
  709. </block>
  710. </value>
  711. <value name="ACTUAL">
  712. <block type="lists_indexOf" inline="false">
  713. <field name="END">FIRST</field>
  714. <value name="VALUE">
  715. <block type="procedures_callreturn">
  716. <mutation name="get names"></mutation>
  717. </block>
  718. </value>
  719. <value name="FIND">
  720. <block type="text">
  721. <field name="TEXT">Eve</field>
  722. </block>
  723. </value>
  724. </block>
  725. </value>
  726. <value name="EXPECTED">
  727. <block type="unittest_adjustindex">
  728. <value name="INDEX">
  729. <block type="math_number">
  730. <field name="NUM">1</field>
  731. </block>
  732. </value>
  733. </block>
  734. </value>
  735. <next>
  736. <block type="procedures_callnoreturn" inline="true">
  737. <mutation name="check number of calls">
  738. <arg name="test name"></arg>
  739. </mutation>
  740. <value name="ARG0">
  741. <block type="text">
  742. <field name="TEXT">find first complex</field>
  743. </block>
  744. </value>
  745. <next>
  746. <block type="variables_set">
  747. <field name="VAR">number of calls</field>
  748. <value name="VALUE">
  749. <block type="math_number">
  750. <field name="NUM">0</field>
  751. </block>
  752. </value>
  753. <next>
  754. <block type="unittest_assertequals" inline="false">
  755. <value name="MESSAGE">
  756. <block type="text">
  757. <field name="TEXT">find first order complex</field>
  758. </block>
  759. </value>
  760. <value name="ACTUAL">
  761. <block type="lists_indexOf" inline="false">
  762. <field name="END">FIRST</field>
  763. <value name="VALUE">
  764. <block type="logic_ternary" inline="true">
  765. <value name="IF">
  766. <block type="logic_boolean">
  767. <field name="BOOL">TRUE</field>
  768. </block>
  769. </value>
  770. <value name="THEN">
  771. <block type="procedures_callreturn">
  772. <mutation name="get names"></mutation>
  773. </block>
  774. </value>
  775. <value name="ELSE">
  776. <block type="logic_null"></block>
  777. </value>
  778. </block>
  779. </value>
  780. <value name="FIND">
  781. <block type="text">
  782. <field name="TEXT">Eve</field>
  783. </block>
  784. </value>
  785. </block>
  786. </value>
  787. <value name="EXPECTED">
  788. <block type="unittest_adjustindex">
  789. <value name="INDEX">
  790. <block type="math_number">
  791. <field name="NUM">1</field>
  792. </block>
  793. </value>
  794. </block>
  795. </value>
  796. <next>
  797. <block type="procedures_callnoreturn" inline="true">
  798. <mutation name="check number of calls">
  799. <arg name="test name"></arg>
  800. </mutation>
  801. <value name="ARG0">
  802. <block type="text">
  803. <field name="TEXT">find first order complex</field>
  804. </block>
  805. </value>
  806. <next>
  807. <block type="variables_set">
  808. <field name="VAR">number of calls</field>
  809. <value name="VALUE">
  810. <block type="math_number">
  811. <field name="NUM">0</field>
  812. </block>
  813. </value>
  814. <next>
  815. <block type="unittest_assertequals" inline="false">
  816. <value name="MESSAGE">
  817. <block type="text">
  818. <field name="TEXT">find last complex</field>
  819. </block>
  820. </value>
  821. <value name="ACTUAL">
  822. <block type="lists_indexOf" inline="false">
  823. <field name="END">LAST</field>
  824. <value name="VALUE">
  825. <block type="procedures_callreturn">
  826. <mutation name="get names"></mutation>
  827. </block>
  828. </value>
  829. <value name="FIND">
  830. <block type="text">
  831. <field name="TEXT">Eve</field>
  832. </block>
  833. </value>
  834. </block>
  835. </value>
  836. <value name="EXPECTED">
  837. <block type="unittest_adjustindex">
  838. <value name="INDEX">
  839. <block type="math_number">
  840. <field name="NUM">3</field>
  841. </block>
  842. </value>
  843. </block>
  844. </value>
  845. <next>
  846. <block type="procedures_callnoreturn" inline="true">
  847. <mutation name="check number of calls">
  848. <arg name="test name"></arg>
  849. </mutation>
  850. <value name="ARG0">
  851. <block type="text">
  852. <field name="TEXT">find last complex</field>
  853. </block>
  854. </value>
  855. <next>
  856. <block type="variables_set">
  857. <field name="VAR">number of calls</field>
  858. <value name="VALUE">
  859. <block type="math_number">
  860. <field name="NUM">0</field>
  861. </block>
  862. </value>
  863. <next>
  864. <block type="unittest_assertequals" inline="false">
  865. <value name="MESSAGE">
  866. <block type="text">
  867. <field name="TEXT">find last order complex</field>
  868. </block>
  869. </value>
  870. <value name="ACTUAL">
  871. <block type="lists_indexOf" inline="false">
  872. <field name="END">LAST</field>
  873. <value name="VALUE">
  874. <block type="logic_ternary" inline="true">
  875. <value name="IF">
  876. <block type="logic_boolean">
  877. <field name="BOOL">TRUE</field>
  878. </block>
  879. </value>
  880. <value name="THEN">
  881. <block type="procedures_callreturn">
  882. <mutation name="get names"></mutation>
  883. </block>
  884. </value>
  885. <value name="ELSE">
  886. <block type="logic_null"></block>
  887. </value>
  888. </block>
  889. </value>
  890. <value name="FIND">
  891. <block type="text">
  892. <field name="TEXT">Eve</field>
  893. </block>
  894. </value>
  895. </block>
  896. </value>
  897. <value name="EXPECTED">
  898. <block type="unittest_adjustindex">
  899. <value name="INDEX">
  900. <block type="math_number">
  901. <field name="NUM">3</field>
  902. </block>
  903. </value>
  904. </block>
  905. </value>
  906. <next>
  907. <block type="procedures_callnoreturn" inline="true">
  908. <mutation name="check number of calls">
  909. <arg name="test name"></arg>
  910. </mutation>
  911. <value name="ARG0">
  912. <block type="text">
  913. <field name="TEXT">find last order complex</field>
  914. </block>
  915. </value>
  916. <next>
  917. <block type="variables_set">
  918. <field name="VAR">number of calls</field>
  919. <value name="VALUE">
  920. <block type="math_number">
  921. <field name="NUM">0</field>
  922. </block>
  923. </value>
  924. <next>
  925. <block type="unittest_assertequals" inline="false">
  926. <value name="MESSAGE">
  927. <block type="text">
  928. <field name="TEXT">find none complex</field>
  929. </block>
  930. </value>
  931. <value name="ACTUAL">
  932. <block type="lists_indexOf" inline="false">
  933. <field name="END">FIRST</field>
  934. <value name="VALUE">
  935. <block type="procedures_callreturn">
  936. <mutation name="get names"></mutation>
  937. </block>
  938. </value>
  939. <value name="FIND">
  940. <block type="text">
  941. <field name="TEXT">Dave</field>
  942. </block>
  943. </value>
  944. </block>
  945. </value>
  946. <value name="EXPECTED">
  947. <block type="unittest_adjustindex">
  948. <value name="INDEX">
  949. <block type="math_number">
  950. <field name="NUM">-1</field>
  951. </block>
  952. </value>
  953. </block>
  954. </value>
  955. <next>
  956. <block type="procedures_callnoreturn" inline="true">
  957. <mutation name="check number of calls">
  958. <arg name="test name"></arg>
  959. </mutation>
  960. <value name="ARG0">
  961. <block type="text">
  962. <field name="TEXT">find none complex</field>
  963. </block>
  964. </value>
  965. <next>
  966. <block type="variables_set">
  967. <field name="VAR">number of calls</field>
  968. <value name="VALUE">
  969. <block type="math_number">
  970. <field name="NUM">0</field>
  971. </block>
  972. </value>
  973. <next>
  974. <block type="unittest_assertequals" inline="false">
  975. <value name="MESSAGE">
  976. <block type="text">
  977. <field name="TEXT">find none order complex</field>
  978. </block>
  979. </value>
  980. <value name="ACTUAL">
  981. <block type="lists_indexOf" inline="false">
  982. <field name="END">FIRST</field>
  983. <value name="VALUE">
  984. <block type="logic_ternary" inline="true">
  985. <value name="IF">
  986. <block type="logic_boolean">
  987. <field name="BOOL">TRUE</field>
  988. </block>
  989. </value>
  990. <value name="THEN">
  991. <block type="procedures_callreturn">
  992. <mutation name="get names"></mutation>
  993. </block>
  994. </value>
  995. <value name="ELSE">
  996. <block type="logic_null"></block>
  997. </value>
  998. </block>
  999. </value>
  1000. <value name="FIND">
  1001. <block type="text">
  1002. <field name="TEXT">Dave</field>
  1003. </block>
  1004. </value>
  1005. </block>
  1006. </value>
  1007. <value name="EXPECTED">
  1008. <block type="unittest_adjustindex">
  1009. <value name="INDEX">
  1010. <block type="math_number">
  1011. <field name="NUM">-1</field>
  1012. </block>
  1013. </value>
  1014. </block>
  1015. </value>
  1016. <next>
  1017. <block type="procedures_callnoreturn" inline="true">
  1018. <mutation name="check number of calls">
  1019. <arg name="test name"></arg>
  1020. </mutation>
  1021. <value name="ARG0">
  1022. <block type="text">
  1023. <field name="TEXT">find none order complex</field>
  1024. </block>
  1025. </value>
  1026. </block>
  1027. </next>
  1028. </block>
  1029. </next>
  1030. </block>
  1031. </next>
  1032. </block>
  1033. </next>
  1034. </block>
  1035. </next>
  1036. </block>
  1037. </next>
  1038. </block>
  1039. </next>
  1040. </block>
  1041. </next>
  1042. </block>
  1043. </next>
  1044. </block>
  1045. </next>
  1046. </block>
  1047. </next>
  1048. </block>
  1049. </next>
  1050. </block>
  1051. </next>
  1052. </block>
  1053. </next>
  1054. </block>
  1055. </next>
  1056. </block>
  1057. </next>
  1058. </block>
  1059. </next>
  1060. </block>
  1061. </statement>
  1062. </block>
  1063. <block type="procedures_defnoreturn" x="13" y="3738">
  1064. <field name="NAME">test get simple</field>
  1065. <comment pinned="false" h="80" w="160">Tests the "get" block with a variable.</comment>
  1066. <statement name="STACK">
  1067. <block type="variables_set" inline="false">
  1068. <field name="VAR">list</field>
  1069. <value name="VALUE">
  1070. <block type="lists_create_with" inline="true">
  1071. <mutation items="3"></mutation>
  1072. <value name="ADD0">
  1073. <block type="text">
  1074. <field name="TEXT">Kirk</field>
  1075. </block>
  1076. </value>
  1077. <value name="ADD1">
  1078. <block type="text">
  1079. <field name="TEXT">Spock</field>
  1080. </block>
  1081. </value>
  1082. <value name="ADD2">
  1083. <block type="text">
  1084. <field name="TEXT">McCoy</field>
  1085. </block>
  1086. </value>
  1087. </block>
  1088. </value>
  1089. <next>
  1090. <block type="unittest_assertequals" inline="false">
  1091. <value name="MESSAGE">
  1092. <block type="text">
  1093. <field name="TEXT">get first simple</field>
  1094. </block>
  1095. </value>
  1096. <value name="ACTUAL">
  1097. <block type="lists_getIndex">
  1098. <mutation statement="false" at="false"></mutation>
  1099. <field name="MODE">GET</field>
  1100. <field name="WHERE">FIRST</field>
  1101. <value name="VALUE">
  1102. <block type="variables_get">
  1103. <field name="VAR">list</field>
  1104. </block>
  1105. </value>
  1106. </block>
  1107. </value>
  1108. <value name="EXPECTED">
  1109. <block type="text">
  1110. <field name="TEXT">Kirk</field>
  1111. </block>
  1112. </value>
  1113. <next>
  1114. <block type="unittest_assertequals" inline="false">
  1115. <value name="MESSAGE">
  1116. <block type="text">
  1117. <field name="TEXT">get last simple</field>
  1118. </block>
  1119. </value>
  1120. <value name="ACTUAL">
  1121. <block type="lists_getIndex">
  1122. <mutation statement="false" at="false"></mutation>
  1123. <field name="MODE">GET</field>
  1124. <field name="WHERE">LAST</field>
  1125. <value name="VALUE">
  1126. <block type="variables_get">
  1127. <field name="VAR">list</field>
  1128. </block>
  1129. </value>
  1130. </block>
  1131. </value>
  1132. <value name="EXPECTED">
  1133. <block type="text">
  1134. <field name="TEXT">McCoy</field>
  1135. </block>
  1136. </value>
  1137. <next>
  1138. <block type="unittest_assertvalue" inline="false">
  1139. <field name="EXPECTED">TRUE</field>
  1140. <value name="MESSAGE">
  1141. <block type="text">
  1142. <field name="TEXT">get random simple</field>
  1143. </block>
  1144. </value>
  1145. <value name="ACTUAL">
  1146. <block type="logic_compare">
  1147. <field name="OP">GT</field>
  1148. <value name="A">
  1149. <block type="lists_indexOf" inline="false">
  1150. <field name="END">FIRST</field>
  1151. <value name="VALUE">
  1152. <block type="variables_get">
  1153. <field name="VAR">list</field>
  1154. </block>
  1155. </value>
  1156. <value name="FIND">
  1157. <block type="lists_getIndex">
  1158. <mutation statement="false" at="false"></mutation>
  1159. <field name="MODE">GET</field>
  1160. <field name="WHERE">RANDOM</field>
  1161. <value name="VALUE">
  1162. <block type="variables_get">
  1163. <field name="VAR">list</field>
  1164. </block>
  1165. </value>
  1166. </block>
  1167. </value>
  1168. </block>
  1169. </value>
  1170. <value name="B">
  1171. <block type="unittest_adjustindex">
  1172. <value name="INDEX">
  1173. <block type="math_number">
  1174. <field name="NUM">-1</field>
  1175. </block>
  1176. </value>
  1177. </block>
  1178. </value>
  1179. </block>
  1180. </value>
  1181. <next>
  1182. <block type="unittest_assertequals" inline="false">
  1183. <value name="MESSAGE">
  1184. <block type="text">
  1185. <field name="TEXT">get # simple</field>
  1186. </block>
  1187. </value>
  1188. <value name="ACTUAL">
  1189. <block type="lists_getIndex">
  1190. <mutation statement="false" at="true"></mutation>
  1191. <field name="MODE">GET</field>
  1192. <field name="WHERE">FROM_START</field>
  1193. <value name="VALUE">
  1194. <block type="variables_get">
  1195. <field name="VAR">list</field>
  1196. </block>
  1197. </value>
  1198. <value name="AT">
  1199. <block type="unittest_adjustindex">
  1200. <value name="INDEX">
  1201. <block type="math_number">
  1202. <field name="NUM">1</field>
  1203. </block>
  1204. </value>
  1205. </block>
  1206. </value>
  1207. </block>
  1208. </value>
  1209. <value name="EXPECTED">
  1210. <block type="text">
  1211. <field name="TEXT">Spock</field>
  1212. </block>
  1213. </value>
  1214. <next>
  1215. <block type="unittest_assertequals" inline="false">
  1216. <value name="MESSAGE">
  1217. <block type="text">
  1218. <field name="TEXT">get # order simple</field>
  1219. </block>
  1220. </value>
  1221. <value name="ACTUAL">
  1222. <block type="lists_getIndex">
  1223. <mutation statement="false" at="true"></mutation>
  1224. <field name="MODE">GET</field>
  1225. <field name="WHERE">FROM_START</field>
  1226. <value name="VALUE">
  1227. <block type="variables_get">
  1228. <field name="VAR">list</field>
  1229. </block>
  1230. </value>
  1231. <value name="AT">
  1232. <block type="logic_ternary" inline="true">
  1233. <value name="IF">
  1234. <block type="logic_boolean">
  1235. <field name="BOOL">TRUE</field>
  1236. </block>
  1237. </value>
  1238. <value name="THEN">
  1239. <block type="unittest_adjustindex">
  1240. <value name="INDEX">
  1241. <block type="math_number">
  1242. <field name="NUM">1</field>
  1243. </block>
  1244. </value>
  1245. </block>
  1246. </value>
  1247. <value name="ELSE">
  1248. <block type="logic_null"></block>
  1249. </value>
  1250. </block>
  1251. </value>
  1252. </block>
  1253. </value>
  1254. <value name="EXPECTED">
  1255. <block type="text">
  1256. <field name="TEXT">Spock</field>
  1257. </block>
  1258. </value>
  1259. <next>
  1260. <block type="unittest_assertequals" inline="false">
  1261. <value name="MESSAGE">
  1262. <block type="text">
  1263. <field name="TEXT">get #-end simple</field>
  1264. </block>
  1265. </value>
  1266. <value name="ACTUAL">
  1267. <block type="lists_getIndex">
  1268. <mutation statement="false" at="true"></mutation>
  1269. <field name="MODE">GET</field>
  1270. <field name="WHERE">FROM_END</field>
  1271. <value name="VALUE">
  1272. <block type="variables_get">
  1273. <field name="VAR">list</field>
  1274. </block>
  1275. </value>
  1276. <value name="AT">
  1277. <block type="unittest_adjustindex">
  1278. <value name="INDEX">
  1279. <block type="math_number">
  1280. <field name="NUM">2</field>
  1281. </block>
  1282. </value>
  1283. </block>
  1284. </value>
  1285. </block>
  1286. </value>
  1287. <value name="EXPECTED">
  1288. <block type="text">
  1289. <field name="TEXT">Kirk</field>
  1290. </block>
  1291. </value>
  1292. <next>
  1293. <block type="unittest_assertequals" inline="false">
  1294. <value name="MESSAGE">
  1295. <block type="text">
  1296. <field name="TEXT">get #-end order simple</field>
  1297. </block>
  1298. </value>
  1299. <value name="ACTUAL">
  1300. <block type="lists_getIndex">
  1301. <mutation statement="false" at="true"></mutation>
  1302. <field name="MODE">GET</field>
  1303. <field name="WHERE">FROM_END</field>
  1304. <comment pinned="false" h="81" w="289">The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index.</comment>
  1305. <value name="VALUE">
  1306. <block type="variables_get">
  1307. <field name="VAR">list</field>
  1308. </block>
  1309. </value>
  1310. <value name="AT">
  1311. <block type="math_arithmetic">
  1312. <field name="OP">ADD</field>
  1313. <value name="A">
  1314. <block type="math_number">
  1315. <field name="NUM">0</field>
  1316. </block>
  1317. </value>
  1318. <value name="B">
  1319. <block type="unittest_adjustindex">
  1320. <value name="INDEX">
  1321. <block type="math_number">
  1322. <field name="NUM">2</field>
  1323. </block>
  1324. </value>
  1325. </block>
  1326. </value>
  1327. </block>
  1328. </value>
  1329. </block>
  1330. </value>
  1331. <value name="EXPECTED">
  1332. <block type="text">
  1333. <field name="TEXT">Kirk</field>
  1334. </block>
  1335. </value>
  1336. </block>
  1337. </next>
  1338. </block>
  1339. </next>
  1340. </block>
  1341. </next>
  1342. </block>
  1343. </next>
  1344. </block>
  1345. </next>
  1346. </block>
  1347. </next>
  1348. </block>
  1349. </next>
  1350. </block>
  1351. </statement>
  1352. </block>
  1353. <block type="procedures_defreturn" x="13" y="4538">
  1354. <field name="NAME">get star wars</field>
  1355. <comment pinned="false" h="80" w="160">Creates a list for use with the get test.</comment>
  1356. <statement name="STACK">
  1357. <block type="math_change">
  1358. <field name="VAR">number of calls</field>
  1359. <value name="DELTA">
  1360. <block type="math_number">
  1361. <field name="NUM">1</field>
  1362. </block>
  1363. </value>
  1364. </block>
  1365. </statement>
  1366. <value name="RETURN">
  1367. <block type="lists_create_with" inline="true">
  1368. <mutation items="3"></mutation>
  1369. <value name="ADD0">
  1370. <block type="text">
  1371. <field name="TEXT">Kirk</field>
  1372. </block>
  1373. </value>
  1374. <value name="ADD1">
  1375. <block type="text">
  1376. <field name="TEXT">Spock</field>
  1377. </block>
  1378. </value>
  1379. <value name="ADD2">
  1380. <block type="text">
  1381. <field name="TEXT">McCoy</field>
  1382. </block>
  1383. </value>
  1384. </block>
  1385. </value>
  1386. </block>
  1387. <block type="procedures_defnoreturn" x="13" y="4663">
  1388. <field name="NAME">test get complex</field>
  1389. <comment pinned="false" h="80" w="160">Tests the "get" block with a function call.</comment>
  1390. <statement name="STACK">
  1391. <block type="variables_set" inline="false">
  1392. <field name="VAR">list</field>
  1393. <value name="VALUE">
  1394. <block type="lists_create_with" inline="true">
  1395. <mutation items="3"></mutation>
  1396. <value name="ADD0">
  1397. <block type="text">
  1398. <field name="TEXT">Kirk</field>
  1399. </block>
  1400. </value>
  1401. <value name="ADD1">
  1402. <block type="text">
  1403. <field name="TEXT">Spock</field>
  1404. </block>
  1405. </value>
  1406. <value name="ADD2">
  1407. <block type="text">
  1408. <field name="TEXT">McCoy</field>
  1409. </block>
  1410. </value>
  1411. </block>
  1412. </value>
  1413. <next>
  1414. <block type="variables_set">
  1415. <field name="VAR">number of calls</field>
  1416. <value name="VALUE">
  1417. <block type="math_number">
  1418. <field name="NUM">0</field>
  1419. </block>
  1420. </value>
  1421. <next>
  1422. <block type="unittest_assertequals" inline="false">
  1423. <value name="MESSAGE">
  1424. <block type="text">
  1425. <field name="TEXT">get first complex</field>
  1426. </block>
  1427. </value>
  1428. <value name="ACTUAL">
  1429. <block type="lists_getIndex">
  1430. <mutation statement="false" at="false"></mutation>
  1431. <field name="MODE">GET</field>
  1432. <field name="WHERE">FIRST</field>
  1433. <value name="VALUE">
  1434. <block type="procedures_callreturn">
  1435. <mutation name="get star wars"></mutation>
  1436. </block>
  1437. </value>
  1438. </block>
  1439. </value>
  1440. <value name="EXPECTED">
  1441. <block type="text">
  1442. <field name="TEXT">Kirk</field>
  1443. </block>
  1444. </value>
  1445. <next>
  1446. <block type="procedures_callnoreturn" inline="true">
  1447. <mutation name="check number of calls">
  1448. <arg name="test name"></arg>
  1449. </mutation>
  1450. <value name="ARG0">
  1451. <block type="text">
  1452. <field name="TEXT">get first complex</field>
  1453. </block>
  1454. </value>
  1455. <next>
  1456. <block type="variables_set">
  1457. <field name="VAR">number of calls</field>
  1458. <value name="VALUE">
  1459. <block type="math_number">
  1460. <field name="NUM">0</field>
  1461. </block>
  1462. </value>
  1463. <next>
  1464. <block type="unittest_assertequals" inline="false">
  1465. <value name="MESSAGE">
  1466. <block type="text">
  1467. <field name="TEXT">get first order complex</field>
  1468. </block>
  1469. </value>
  1470. <value name="ACTUAL">
  1471. <block type="lists_getIndex">
  1472. <mutation statement="false" at="false"></mutation>
  1473. <field name="MODE">GET</field>
  1474. <field name="WHERE">FIRST</field>
  1475. <value name="VALUE">
  1476. <block type="logic_ternary" inline="true">
  1477. <value name="IF">
  1478. <block type="logic_boolean">
  1479. <field name="BOOL">TRUE</field>
  1480. </block>
  1481. </value>
  1482. <value name="THEN">
  1483. <block type="procedures_callreturn">
  1484. <mutation name="get star wars"></mutation>
  1485. </block>
  1486. </value>
  1487. <value name="ELSE">
  1488. <block type="logic_null"></block>
  1489. </value>
  1490. </block>
  1491. </value>
  1492. </block>
  1493. </value>
  1494. <value name="EXPECTED">
  1495. <block type="text">
  1496. <field name="TEXT">Kirk</field>
  1497. </block>
  1498. </value>
  1499. <next>
  1500. <block type="procedures_callnoreturn" inline="true">
  1501. <mutation name="check number of calls">
  1502. <arg name="test name"></arg>
  1503. </mutation>
  1504. <value name="ARG0">
  1505. <block type="text">
  1506. <field name="TEXT">get first order complex</field>
  1507. </block>
  1508. </value>
  1509. <next>
  1510. <block type="variables_set">
  1511. <field name="VAR">number of calls</field>
  1512. <value name="VALUE">
  1513. <block type="math_number">
  1514. <field name="NUM">0</field>
  1515. </block>
  1516. </value>
  1517. <next>
  1518. <block type="unittest_assertequals" inline="false">
  1519. <value name="MESSAGE">
  1520. <block type="text">
  1521. <field name="TEXT">get last complex</field>
  1522. </block>
  1523. </value>
  1524. <value name="ACTUAL">
  1525. <block type="lists_getIndex">
  1526. <mutation statement="false" at="false"></mutation>
  1527. <field name="MODE">GET</field>
  1528. <field name="WHERE">LAST</field>
  1529. <value name="VALUE">
  1530. <block type="procedures_callreturn">
  1531. <mutation name="get star wars"></mutation>
  1532. </block>
  1533. </value>
  1534. </block>
  1535. </value>
  1536. <value name="EXPECTED">
  1537. <block type="text">
  1538. <field name="TEXT">McCoy</field>
  1539. </block>
  1540. </value>
  1541. <next>
  1542. <block type="procedures_callnoreturn" inline="true">
  1543. <mutation name="check number of calls">
  1544. <arg name="test name"></arg>
  1545. </mutation>
  1546. <value name="ARG0">
  1547. <block type="text">
  1548. <field name="TEXT">get last complex</field>
  1549. </block>
  1550. </value>
  1551. <next>
  1552. <block type="variables_set">
  1553. <field name="VAR">number of calls</field>
  1554. <value name="VALUE">
  1555. <block type="math_number">
  1556. <field name="NUM">0</field>
  1557. </block>
  1558. </value>
  1559. <next>
  1560. <block type="unittest_assertequals" inline="false">
  1561. <value name="MESSAGE">
  1562. <block type="text">
  1563. <field name="TEXT">get last order complex</field>
  1564. </block>
  1565. </value>
  1566. <value name="ACTUAL">
  1567. <block type="lists_getIndex">
  1568. <mutation statement="false" at="false"></mutation>
  1569. <field name="MODE">GET</field>
  1570. <field name="WHERE">LAST</field>
  1571. <value name="VALUE">
  1572. <block type="logic_ternary" inline="true">
  1573. <value name="IF">
  1574. <block type="logic_boolean">
  1575. <field name="BOOL">TRUE</field>
  1576. </block>
  1577. </value>
  1578. <value name="THEN">
  1579. <block type="procedures_callreturn">
  1580. <mutation name="get star wars"></mutation>
  1581. </block>
  1582. </value>
  1583. <value name="ELSE">
  1584. <block type="logic_null"></block>
  1585. </value>
  1586. </block>
  1587. </value>
  1588. </block>
  1589. </value>
  1590. <value name="EXPECTED">
  1591. <block type="text">
  1592. <field name="TEXT">McCoy</field>
  1593. </block>
  1594. </value>
  1595. <next>
  1596. <block type="procedures_callnoreturn" inline="true">
  1597. <mutation name="check number of calls">
  1598. <arg name="test name"></arg>
  1599. </mutation>
  1600. <value name="ARG0">
  1601. <block type="text">
  1602. <field name="TEXT">get last order complex</field>
  1603. </block>
  1604. </value>
  1605. <next>
  1606. <block type="variables_set">
  1607. <field name="VAR">number of calls</field>
  1608. <value name="VALUE">
  1609. <block type="math_number">
  1610. <field name="NUM">0</field>
  1611. </block>
  1612. </value>
  1613. <next>
  1614. <block type="unittest_assertvalue" inline="false">
  1615. <field name="EXPECTED">TRUE</field>
  1616. <value name="MESSAGE">
  1617. <block type="text">
  1618. <field name="TEXT">get random complex</field>
  1619. </block>
  1620. </value>
  1621. <value name="ACTUAL">
  1622. <block type="logic_compare">
  1623. <field name="OP">GT</field>
  1624. <value name="A">
  1625. <block type="lists_indexOf" inline="false">
  1626. <field name="END">FIRST</field>
  1627. <value name="VALUE">
  1628. <block type="variables_get">
  1629. <field name="VAR">list</field>
  1630. </block>
  1631. </value>
  1632. <value name="FIND">
  1633. <block type="lists_getIndex">
  1634. <mutation statement="false" at="false"></mutation>
  1635. <field name="MODE">GET</field>
  1636. <field name="WHERE">RANDOM</field>
  1637. <value name="VALUE">
  1638. <block type="procedures_callreturn">
  1639. <mutation name="get star wars"></mutation>
  1640. </block>
  1641. </value>
  1642. </block>
  1643. </value>
  1644. </block>
  1645. </value>
  1646. <value name="B">
  1647. <block type="unittest_adjustindex">
  1648. <value name="INDEX">
  1649. <block type="math_number">
  1650. <field name="NUM">-1</field>
  1651. </block>
  1652. </value>
  1653. </block>
  1654. </value>
  1655. </block>
  1656. </value>
  1657. <next>
  1658. <block type="procedures_callnoreturn" inline="true">
  1659. <mutation name="check number of calls">
  1660. <arg name="test name"></arg>
  1661. </mutation>
  1662. <value name="ARG0">
  1663. <block type="text">
  1664. <field name="TEXT">get random complex</field>
  1665. </block>
  1666. </value>
  1667. <next>
  1668. <block type="variables_set">
  1669. <field name="VAR">number of calls</field>
  1670. <value name="VALUE">
  1671. <block type="math_number">
  1672. <field name="NUM">0</field>
  1673. </block>
  1674. </value>
  1675. <next>
  1676. <block type="unittest_assertvalue" inline="false">
  1677. <field name="EXPECTED">TRUE</field>
  1678. <value name="MESSAGE">
  1679. <block type="text">
  1680. <field name="TEXT">get random order complex</field>
  1681. </block>
  1682. </value>
  1683. <value name="ACTUAL">
  1684. <block type="logic_compare">
  1685. <field name="OP">GT</field>
  1686. <value name="A">
  1687. <block type="lists_indexOf" inline="false">
  1688. <field name="END">FIRST</field>
  1689. <value name="VALUE">
  1690. <block type="variables_get">
  1691. <field name="VAR">list</field>
  1692. </block>
  1693. </value>
  1694. <value name="FIND">
  1695. <block type="lists_getIndex">
  1696. <mutation statement="false" at="false"></mutation>
  1697. <field name="MODE">GET</field>
  1698. <field name="WHERE">RANDOM</field>
  1699. <value name="VALUE">
  1700. <block type="logic_ternary">
  1701. <value name="IF">
  1702. <block type="logic_boolean">
  1703. <field name="BOOL">TRUE</field>
  1704. </block>
  1705. </value>
  1706. <value name="THEN">
  1707. <block type="procedures_callreturn">
  1708. <mutation name="get star wars"></mutation>
  1709. </block>
  1710. </value>
  1711. <value name="ELSE">
  1712. <block type="logic_null"></block>
  1713. </value>
  1714. </block>
  1715. </value>
  1716. </block>
  1717. </value>
  1718. </block>
  1719. </value>
  1720. <value name="B">
  1721. <block type="unittest_adjustindex">
  1722. <value name="INDEX">
  1723. <block type="math_number">
  1724. <field name="NUM">-1</field>
  1725. </block>
  1726. </value>
  1727. </block>
  1728. </value>
  1729. </block>
  1730. </value>
  1731. <next>
  1732. <block type="procedures_callnoreturn" inline="true">
  1733. <mutation name="check number of calls">
  1734. <arg name="test name"></arg>
  1735. </mutation>
  1736. <value name="ARG0">
  1737. <block type="text">
  1738. <field name="TEXT">get random order complex</field>
  1739. </block>
  1740. </value>
  1741. <next>
  1742. <block type="variables_set">
  1743. <field name="VAR">number of calls</field>
  1744. <value name="VALUE">
  1745. <block type="math_number">
  1746. <field name="NUM">0</field>
  1747. </block>
  1748. </value>
  1749. <next>
  1750. <block type="unittest_assertequals" inline="false">
  1751. <value name="MESSAGE">
  1752. <block type="text">
  1753. <field name="TEXT">get # complex</field>
  1754. </block>
  1755. </value>
  1756. <value name="ACTUAL">
  1757. <block type="lists_getIndex">
  1758. <mutation statement="false" at="true"></mutation>
  1759. <field name="MODE">GET</field>
  1760. <field name="WHERE">FROM_START</field>
  1761. <value name="VALUE">
  1762. <block type="procedures_callreturn">
  1763. <mutation name="get star wars"></mutation>
  1764. </block>
  1765. </value>
  1766. <value name="AT">
  1767. <block type="unittest_adjustindex">
  1768. <value name="INDEX">
  1769. <block type="math_number">
  1770. <field name="NUM">1</field>
  1771. </block>
  1772. </value>
  1773. </block>
  1774. </value>
  1775. </block>
  1776. </value>
  1777. <value name="EXPECTED">
  1778. <block type="text">
  1779. <field name="TEXT">Spock</field>
  1780. </block>
  1781. </value>
  1782. <next>
  1783. <block type="procedures_callnoreturn" inline="true">
  1784. <mutation name="check number of calls">
  1785. <arg name="test name"></arg>
  1786. </mutation>
  1787. <value name="ARG0">
  1788. <block type="text">
  1789. <field name="TEXT">get # complex</field>
  1790. </block>
  1791. </value>
  1792. <next>
  1793. <block type="variables_set">
  1794. <field name="VAR">number of calls</field>
  1795. <value name="VALUE">
  1796. <block type="math_number">
  1797. <field name="NUM">0</field>
  1798. </block>
  1799. </value>
  1800. <next>
  1801. <block type="unittest_assertequals" inline="false">
  1802. <value name="MESSAGE">
  1803. <block type="text">
  1804. <field name="TEXT">get # order complex</field>
  1805. </block>
  1806. </value>
  1807. <value name="ACTUAL">
  1808. <block type="lists_getIndex">
  1809. <mutation statement="false" at="true"></mutation>
  1810. <field name="MODE">GET</field>
  1811. <field name="WHERE">FROM_START</field>
  1812. <value name="VALUE">
  1813. <block type="logic_ternary">
  1814. <value name="IF">
  1815. <block type="logic_boolean">
  1816. <field name="BOOL">TRUE</field>
  1817. </block>
  1818. </value>
  1819. <value name="THEN">
  1820. <block type="procedures_callreturn">
  1821. <mutation name="get star wars"></mutation>
  1822. </block>
  1823. </value>
  1824. <value name="ELSE">
  1825. <block type="logic_null"></block>
  1826. </value>
  1827. </block>
  1828. </value>
  1829. <value name="AT">
  1830. <block type="logic_ternary">
  1831. <value name="IF">
  1832. <block type="logic_boolean">
  1833. <field name="BOOL">TRUE</field>
  1834. </block>
  1835. </value>
  1836. <value name="THEN">
  1837. <block type="unittest_adjustindex">
  1838. <value name="INDEX">
  1839. <block type="math_number">
  1840. <field name="NUM">1</field>
  1841. </block>
  1842. </value>
  1843. </block>
  1844. </value>
  1845. <value name="ELSE">
  1846. <block type="logic_null"></block>
  1847. </value>
  1848. </block>
  1849. </value>
  1850. </block>
  1851. </value>
  1852. <value name="EXPECTED">
  1853. <block type="text">
  1854. <field name="TEXT">Spock</field>
  1855. </block>
  1856. </value>
  1857. <next>
  1858. <block type="procedures_callnoreturn" inline="true">
  1859. <mutation name="check number of calls">
  1860. <arg name="test name"></arg>
  1861. </mutation>
  1862. <value name="ARG0">
  1863. <block type="text">
  1864. <field name="TEXT">get # order complex</field>
  1865. </block>
  1866. </value>
  1867. <next>
  1868. <block type="variables_set">
  1869. <field name="VAR">number of calls</field>
  1870. <value name="VALUE">
  1871. <block type="math_number">
  1872. <field name="NUM">0</field>
  1873. </block>
  1874. </value>
  1875. <next>
  1876. <block type="unittest_assertequals" inline="false">
  1877. <value name="MESSAGE">
  1878. <block type="text">
  1879. <field name="TEXT">get #-end complex</field>
  1880. </block>
  1881. </value>
  1882. <value name="ACTUAL">
  1883. <block type="lists_getIndex">
  1884. <mutation statement="false" at="true"></mutation>
  1885. <field name="MODE">GET</field>
  1886. <field name="WHERE">FROM_END</field>
  1887. <value name="VALUE">
  1888. <block type="procedures_callreturn">
  1889. <mutation name="get star wars"></mutation>
  1890. </block>
  1891. </value>
  1892. <value name="AT">
  1893. <block type="unittest_adjustindex">
  1894. <value name="INDEX">
  1895. <block type="math_number">
  1896. <field name="NUM">2</field>
  1897. </block>
  1898. </value>
  1899. </block>
  1900. </value>
  1901. </block>
  1902. </value>
  1903. <value name="EXPECTED">
  1904. <block type="text">
  1905. <field name="TEXT">Kirk</field>
  1906. </block>
  1907. </value>
  1908. <next>
  1909. <block type="procedures_callnoreturn" inline="true">
  1910. <mutation name="check number of calls">
  1911. <arg name="test name"></arg>
  1912. </mutation>
  1913. <value name="ARG0">
  1914. <block type="text">
  1915. <field name="TEXT">get #-end complex</field>
  1916. </block>
  1917. </value>
  1918. <next>
  1919. <block type="variables_set">
  1920. <field name="VAR">number of calls</field>
  1921. <value name="VALUE">
  1922. <block type="math_number">
  1923. <field name="NUM">0</field>
  1924. </block>
  1925. </value>
  1926. <next>
  1927. <block type="unittest_assertequals" inline="false">
  1928. <value name="MESSAGE">
  1929. <block type="text">
  1930. <field name="TEXT">get #-end order complex</field>
  1931. </block>
  1932. </value>
  1933. <value name="ACTUAL">
  1934. <block type="lists_getIndex">
  1935. <mutation statement="false" at="true"></mutation>
  1936. <field name="MODE">GET</field>
  1937. <field name="WHERE">FROM_END</field>
  1938. <comment pinned="false" h="87" w="299">The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index.</comment>
  1939. <value name="VALUE">
  1940. <block type="logic_ternary" inline="true">
  1941. <value name="IF">
  1942. <block type="logic_boolean">
  1943. <field name="BOOL">TRUE</field>
  1944. </block>
  1945. </value>
  1946. <value name="THEN">
  1947. <block type="procedures_callreturn">
  1948. <mutation name="get star wars"></mutation>
  1949. </block>
  1950. </value>
  1951. <value name="ELSE">
  1952. <block type="logic_null"></block>
  1953. </value>
  1954. </block>
  1955. </value>
  1956. <value name="AT">
  1957. <block type="math_arithmetic">
  1958. <field name="OP">ADD</field>
  1959. <value name="A">
  1960. <block type="math_number">
  1961. <field name="NUM">0</field>
  1962. </block>
  1963. </value>
  1964. <value name="B">
  1965. <block type="unittest_adjustindex">
  1966. <value name="INDEX">
  1967. <block type="math_number">
  1968. <field name="NUM">2</field>
  1969. </block>
  1970. </value>
  1971. </block>
  1972. </value>
  1973. </block>
  1974. </value>
  1975. </block>
  1976. </value>
  1977. <value name="EXPECTED">
  1978. <block type="text">
  1979. <field name="TEXT">Kirk</field>
  1980. </block>
  1981. </value>
  1982. <next>
  1983. <block type="procedures_callnoreturn" inline="true">
  1984. <mutation name="check number of calls">
  1985. <arg name="test name"></arg>
  1986. </mutation>
  1987. <value name="ARG0">
  1988. <block type="text">
  1989. <field name="TEXT">get #-end order complex</field>
  1990. </block>
  1991. </value>
  1992. </block>
  1993. </next>
  1994. </block>
  1995. </next>
  1996. </block>
  1997. </next>
  1998. </block>
  1999. </next>
  2000. </block>
  2001. </next>
  2002. </block>
  2003. </next>
  2004. </block>
  2005. </next>
  2006. </block>
  2007. </next>
  2008. </block>
  2009. </next>
  2010. </block>
  2011. </next>
  2012. </block>
  2013. </next>
  2014. </block>
  2015. </next>
  2016. </block>
  2017. </next>
  2018. </block>
  2019. </next>
  2020. </block>
  2021. </next>
  2022. </block>
  2023. </next>
  2024. </block>
  2025. </next>
  2026. </block>
  2027. </next>
  2028. </block>
  2029. </next>
  2030. </block>
  2031. </next>
  2032. </block>
  2033. </next>
  2034. </block>
  2035. </next>
  2036. </block>
  2037. </next>
  2038. </block>
  2039. </next>
  2040. </block>
  2041. </next>
  2042. </block>
  2043. </next>
  2044. </block>
  2045. </next>
  2046. </block>
  2047. </next>
  2048. </block>
  2049. </next>
  2050. </block>
  2051. </next>
  2052. </block>
  2053. </statement>
  2054. </block>
  2055. <block type="procedures_defnoreturn" x="13" y="6488">
  2056. <field name="NAME">test getRemove</field>
  2057. <comment pinned="false" h="80" w="160">Tests the "get and remove" block.</comment>
  2058. <statement name="STACK">
  2059. <block type="variables_set" inline="false">
  2060. <field name="VAR">list</field>
  2061. <value name="VALUE">
  2062. <block type="lists_create_with" inline="true">
  2063. <mutation items="3"></mutation>
  2064. <value name="ADD0">
  2065. <block type="text">
  2066. <field name="TEXT">Kirk</field>
  2067. </block>
  2068. </value>
  2069. <value name="ADD1">
  2070. <block type="text">
  2071. <field name="TEXT">Spock</field>
  2072. </block>
  2073. </value>
  2074. <value name="ADD2">
  2075. <block type="text">
  2076. <field name="TEXT">McCoy</field>
  2077. </block>
  2078. </value>
  2079. </block>
  2080. </value>
  2081. <next>
  2082. <block type="unittest_assertequals" inline="false">
  2083. <value name="MESSAGE">
  2084. <block type="text">
  2085. <field name="TEXT">getremove first</field>
  2086. </block>
  2087. </value>
  2088. <value name="ACTUAL">
  2089. <block type="lists_getIndex">
  2090. <mutation statement="false" at="false"></mutation>
  2091. <field name="MODE">GET_REMOVE</field>
  2092. <field name="WHERE">FIRST</field>
  2093. <value name="VALUE">
  2094. <block type="variables_get">
  2095. <field name="VAR">list</field>
  2096. </block>
  2097. </value>
  2098. </block>
  2099. </value>
  2100. <value name="EXPECTED">
  2101. <block type="text">
  2102. <field name="TEXT">Kirk</field>
  2103. </block>
  2104. </value>
  2105. <next>
  2106. <block type="unittest_assertequals" inline="false">
  2107. <value name="MESSAGE">
  2108. <block type="text">
  2109. <field name="TEXT">getremove first list</field>
  2110. </block>
  2111. </value>
  2112. <value name="ACTUAL">
  2113. <block type="variables_get">
  2114. <field name="VAR">list</field>
  2115. </block>
  2116. </value>
  2117. <value name="EXPECTED">
  2118. <block type="lists_create_with" inline="true">
  2119. <mutation items="2"></mutation>
  2120. <value name="ADD0">
  2121. <block type="text">
  2122. <field name="TEXT">Spock</field>
  2123. </block>
  2124. </value>
  2125. <value name="ADD1">
  2126. <block type="text">
  2127. <field name="TEXT">McCoy</field>
  2128. </block>
  2129. </value>
  2130. </block>
  2131. </value>
  2132. <next>
  2133. <block type="variables_set" inline="false">
  2134. <field name="VAR">list</field>
  2135. <value name="VALUE">
  2136. <block type="lists_create_with" inline="true">
  2137. <mutation items="3"></mutation>
  2138. <value name="ADD0">
  2139. <block type="text">
  2140. <field name="TEXT">Kirk</field>
  2141. </block>
  2142. </value>
  2143. <value name="ADD1">
  2144. <block type="text">
  2145. <field name="TEXT">Spock</field>
  2146. </block>
  2147. </value>
  2148. <value name="ADD2">
  2149. <block type="text">
  2150. <field name="TEXT">McCoy</field>
  2151. </block>
  2152. </value>
  2153. </block>
  2154. </value>
  2155. <next>
  2156. <block type="unittest_assertequals" inline="false">
  2157. <value name="MESSAGE">
  2158. <block type="text">
  2159. <field name="TEXT">getremove first order</field>
  2160. </block>
  2161. </value>
  2162. <value name="ACTUAL">
  2163. <block type="lists_getIndex">
  2164. <mutation statement="false" at="false"></mutation>
  2165. <field name="MODE">GET_REMOVE</field>
  2166. <field name="WHERE">FIRST</field>
  2167. <value name="VALUE">
  2168. <block type="logic_ternary" inline="true">
  2169. <value name="IF">
  2170. <block type="logic_boolean">
  2171. <field name="BOOL">TRUE</field>
  2172. </block>
  2173. </value>
  2174. <value name="THEN">
  2175. <block type="variables_get">
  2176. <field name="VAR">list</field>
  2177. </block>
  2178. </value>
  2179. <value name="ELSE">
  2180. <block type="logic_null"></block>
  2181. </value>
  2182. </block>
  2183. </value>
  2184. </block>
  2185. </value>
  2186. <value name="EXPECTED">
  2187. <block type="text">
  2188. <field name="TEXT">Kirk</field>
  2189. </block>
  2190. </value>
  2191. <next>
  2192. <block type="unittest_assertequals" inline="false">
  2193. <value name="MESSAGE">
  2194. <block type="text">
  2195. <field name="TEXT">getremove first order list</field>
  2196. </block>
  2197. </value>
  2198. <value name="ACTUAL">
  2199. <block type="variables_get">
  2200. <field name="VAR">list</field>
  2201. </block>
  2202. </value>
  2203. <value name="EXPECTED">
  2204. <block type="lists_create_with" inline="true">
  2205. <mutation items="2"></mutation>
  2206. <value name="ADD0">
  2207. <block type="text">
  2208. <field name="TEXT">Spock</field>
  2209. </block>
  2210. </value>
  2211. <value name="ADD1">
  2212. <block type="text">
  2213. <field name="TEXT">McCoy</field>
  2214. </block>
  2215. </value>
  2216. </block>
  2217. </value>
  2218. <next>
  2219. <block type="variables_set" inline="false">
  2220. <field name="VAR">list</field>
  2221. <value name="VALUE">
  2222. <block type="lists_create_with" inline="true">
  2223. <mutation items="3"></mutation>
  2224. <value name="ADD0">
  2225. <block type="text">
  2226. <field name="TEXT">Kirk</field>
  2227. </block>
  2228. </value>
  2229. <value name="ADD1">
  2230. <block type="text">
  2231. <field name="TEXT">Spock</field>
  2232. </block>
  2233. </value>
  2234. <value name="ADD2">
  2235. <block type="text">
  2236. <field name="TEXT">McCoy</field>
  2237. </block>
  2238. </value>
  2239. </block>
  2240. </value>
  2241. <next>
  2242. <block type="unittest_assertequals" inline="false">
  2243. <value name="MESSAGE">
  2244. <block type="text">
  2245. <field name="TEXT">getremove last</field>
  2246. </block>
  2247. </value>
  2248. <value name="ACTUAL">
  2249. <block type="lists_getIndex">
  2250. <mutation statement="false" at="false"></mutation>
  2251. <field name="MODE">GET_REMOVE</field>
  2252. <field name="WHERE">LAST</field>
  2253. <value name="VALUE">
  2254. <block type="variables_get">
  2255. <field name="VAR">list</field>
  2256. </block>
  2257. </value>
  2258. </block>
  2259. </value>
  2260. <value name="EXPECTED">
  2261. <block type="text">
  2262. <field name="TEXT">McCoy</field>
  2263. </block>
  2264. </value>
  2265. <next>
  2266. <block type="unittest_assertequals" inline="false">
  2267. <value name="MESSAGE">
  2268. <block type="text">
  2269. <field name="TEXT">getremove last list</field>
  2270. </block>
  2271. </value>
  2272. <value name="ACTUAL">
  2273. <block type="variables_get">
  2274. <field name="VAR">list</field>
  2275. </block>
  2276. </value>
  2277. <value name="EXPECTED">
  2278. <block type="lists_create_with" inline="true">
  2279. <mutation items="2"></mutation>
  2280. <value name="ADD0">
  2281. <block type="text">
  2282. <field name="TEXT">Kirk</field>
  2283. </block>
  2284. </value>
  2285. <value name="ADD1">
  2286. <block type="text">
  2287. <field name="TEXT">Spock</field>
  2288. </block>
  2289. </value>
  2290. </block>
  2291. </value>
  2292. <next>
  2293. <block type="variables_set" inline="false">
  2294. <field name="VAR">list</field>
  2295. <value name="VALUE">
  2296. <block type="lists_create_with" inline="true">
  2297. <mutation items="3"></mutation>
  2298. <value name="ADD0">
  2299. <block type="text">
  2300. <field name="TEXT">Kirk</field>
  2301. </block>
  2302. </value>
  2303. <value name="ADD1">
  2304. <block type="text">
  2305. <field name="TEXT">Spock</field>
  2306. </block>
  2307. </value>
  2308. <value name="ADD2">
  2309. <block type="text">
  2310. <field name="TEXT">McCoy</field>
  2311. </block>
  2312. </value>
  2313. </block>
  2314. </value>
  2315. <next>
  2316. <block type="unittest_assertequals" inline="false">
  2317. <value name="MESSAGE">
  2318. <block type="text">
  2319. <field name="TEXT">getremove last order</field>
  2320. </block>
  2321. </value>
  2322. <value name="ACTUAL">
  2323. <block type="lists_getIndex">
  2324. <mutation statement="false" at="false"></mutation>
  2325. <field name="MODE">GET_REMOVE</field>
  2326. <field name="WHERE">LAST</field>
  2327. <value name="VALUE">
  2328. <block type="logic_ternary" inline="true">
  2329. <value name="IF">
  2330. <block type="logic_boolean">
  2331. <field name="BOOL">TRUE</field>
  2332. </block>
  2333. </value>
  2334. <value name="THEN">
  2335. <block type="variables_get">
  2336. <field name="VAR">list</field>
  2337. </block>
  2338. </value>
  2339. <value name="ELSE">
  2340. <block type="logic_null"></block>
  2341. </value>
  2342. </block>
  2343. </value>
  2344. </block>
  2345. </value>
  2346. <value name="EXPECTED">
  2347. <block type="text">
  2348. <field name="TEXT">McCoy</field>
  2349. </block>
  2350. </value>
  2351. <next>
  2352. <block type="unittest_assertequals" inline="false">
  2353. <value name="MESSAGE">
  2354. <block type="text">
  2355. <field name="TEXT">getremove last order list</field>
  2356. </block>
  2357. </value>
  2358. <value name="ACTUAL">
  2359. <block type="variables_get">
  2360. <field name="VAR">list</field>
  2361. </block>
  2362. </value>
  2363. <value name="EXPECTED">
  2364. <block type="lists_create_with" inline="true">
  2365. <mutation items="2"></mutation>
  2366. <value name="ADD0">
  2367. <block type="text">
  2368. <field name="TEXT">Kirk</field>
  2369. </block>
  2370. </value>
  2371. <value name="ADD1">
  2372. <block type="text">
  2373. <field name="TEXT">Spock</field>
  2374. </block>
  2375. </value>
  2376. </block>
  2377. </value>
  2378. <next>
  2379. <block type="variables_set" inline="false">
  2380. <field name="VAR">list</field>
  2381. <value name="VALUE">
  2382. <block type="lists_create_with" inline="true">
  2383. <mutation items="3"></mutation>
  2384. <value name="ADD0">
  2385. <block type="text">
  2386. <field name="TEXT">Kirk</field>
  2387. </block>
  2388. </value>
  2389. <value name="ADD1">
  2390. <block type="text">
  2391. <field name="TEXT">Spock</field>
  2392. </block>
  2393. </value>
  2394. <value name="ADD2">
  2395. <block type="text">
  2396. <field name="TEXT">McCoy</field>
  2397. </block>
  2398. </value>
  2399. </block>
  2400. </value>
  2401. <next>
  2402. <block type="unittest_assertvalue" inline="false">
  2403. <field name="EXPECTED">TRUE</field>
  2404. <value name="MESSAGE">
  2405. <block type="text">
  2406. <field name="TEXT">getremove random</field>
  2407. </block>
  2408. </value>
  2409. <value name="ACTUAL">
  2410. <block type="logic_compare">
  2411. <field name="OP">EQ</field>
  2412. <value name="A">
  2413. <block type="lists_indexOf" inline="false">
  2414. <field name="END">FIRST</field>
  2415. <value name="VALUE">
  2416. <block type="variables_get">
  2417. <field name="VAR">list</field>
  2418. </block>
  2419. </value>
  2420. <value name="FIND">
  2421. <block type="lists_getIndex">
  2422. <mutation statement="false" at="false"></mutation>
  2423. <field name="MODE">GET_REMOVE</field>
  2424. <field name="WHERE">RANDOM</field>
  2425. <value name="VALUE">
  2426. <block type="variables_get">
  2427. <field name="VAR">list</field>
  2428. </block>
  2429. </value>
  2430. </block>
  2431. </value>
  2432. </block>
  2433. </value>
  2434. <value name="B">
  2435. <block type="unittest_adjustindex">
  2436. <value name="INDEX">
  2437. <block type="math_number">
  2438. <field name="NUM">-1</field>
  2439. </block>
  2440. </value>
  2441. </block>
  2442. </value>
  2443. </block>
  2444. </value>
  2445. <next>
  2446. <block type="unittest_assertequals" inline="false">
  2447. <value name="MESSAGE">
  2448. <block type="text">
  2449. <field name="TEXT">getremove random list</field>
  2450. </block>
  2451. </value>
  2452. <value name="ACTUAL">
  2453. <block type="lists_length" inline="false">
  2454. <value name="VALUE">
  2455. <block type="variables_get">
  2456. <field name="VAR">list</field>
  2457. </block>
  2458. </value>
  2459. </block>
  2460. </value>
  2461. <value name="EXPECTED">
  2462. <block type="math_number">
  2463. <field name="NUM">2</field>
  2464. </block>
  2465. </value>
  2466. <next>
  2467. <block type="variables_set" inline="false">
  2468. <field name="VAR">list</field>
  2469. <value name="VALUE">
  2470. <block type="lists_create_with" inline="true">
  2471. <mutation items="3"></mutation>
  2472. <value name="ADD0">
  2473. <block type="text">
  2474. <field name="TEXT">Kirk</field>
  2475. </block>
  2476. </value>
  2477. <value name="ADD1">
  2478. <block type="text">
  2479. <field name="TEXT">Spock</field>
  2480. </block>
  2481. </value>
  2482. <value name="ADD2">
  2483. <block type="text">
  2484. <field name="TEXT">McCoy</field>
  2485. </block>
  2486. </value>
  2487. </block>
  2488. </value>
  2489. <next>
  2490. <block type="unittest_assertvalue" inline="false">
  2491. <field name="EXPECTED">TRUE</field>
  2492. <value name="MESSAGE">
  2493. <block type="text">
  2494. <field name="TEXT">getremove random order</field>
  2495. </block>
  2496. </value>
  2497. <value name="ACTUAL">
  2498. <block type="logic_compare">
  2499. <field name="OP">EQ</field>
  2500. <value name="A">
  2501. <block type="lists_indexOf" inline="false">
  2502. <field name="END">FIRST</field>
  2503. <value name="VALUE">
  2504. <block type="variables_get">
  2505. <field name="VAR">list</field>
  2506. </block>
  2507. </value>
  2508. <value name="FIND">
  2509. <block type="lists_getIndex">
  2510. <mutation statement="false" at="false"></mutation>
  2511. <field name="MODE">GET_REMOVE</field>
  2512. <field name="WHERE">RANDOM</field>
  2513. <value name="VALUE">
  2514. <block type="logic_ternary" inline="false">
  2515. <value name="IF">
  2516. <block type="logic_boolean">
  2517. <field name="BOOL">TRUE</field>
  2518. </block>
  2519. </value>
  2520. <value name="THEN">
  2521. <block type="variables_get">
  2522. <field name="VAR">list</field>
  2523. </block>
  2524. </value>
  2525. <value name="ELSE">
  2526. <block type="logic_null"></block>
  2527. </value>
  2528. </block>
  2529. </value>
  2530. </block>
  2531. </value>
  2532. </block>
  2533. </value>
  2534. <value name="B">
  2535. <block type="unittest_adjustindex">
  2536. <value name="INDEX">
  2537. <block type="math_number">
  2538. <field name="NUM">-1</field>
  2539. </block>
  2540. </value>
  2541. </block>
  2542. </value>
  2543. </block>
  2544. </value>
  2545. <next>
  2546. <block type="unittest_assertequals" inline="false">
  2547. <value name="MESSAGE">
  2548. <block type="text">
  2549. <field name="TEXT">getremove random order list</field>
  2550. </block>
  2551. </value>
  2552. <value name="ACTUAL">
  2553. <block type="lists_length" inline="false">
  2554. <value name="VALUE">
  2555. <block type="variables_get">
  2556. <field name="VAR">list</field>
  2557. </block>
  2558. </value>
  2559. </block>
  2560. </value>
  2561. <value name="EXPECTED">
  2562. <block type="math_number">
  2563. <field name="NUM">2</field>
  2564. </block>
  2565. </value>
  2566. <next>
  2567. <block type="variables_set" inline="false">
  2568. <field name="VAR">list</field>
  2569. <value name="VALUE">
  2570. <block type="lists_create_with" inline="true">
  2571. <mutation items="3"></mutation>
  2572. <value name="ADD0">
  2573. <block type="text">
  2574. <field name="TEXT">Kirk</field>
  2575. </block>
  2576. </value>
  2577. <value name="ADD1">
  2578. <block type="text">
  2579. <field name="TEXT">Spock</field>
  2580. </block>
  2581. </value>
  2582. <value name="ADD2">
  2583. <block type="text">
  2584. <field name="TEXT">McCoy</field>
  2585. </block>
  2586. </value>
  2587. </block>
  2588. </value>
  2589. <next>
  2590. <block type="unittest_assertequals" inline="false">
  2591. <value name="MESSAGE">
  2592. <block type="text">
  2593. <field name="TEXT">getremove #</field>
  2594. </block>
  2595. </value>
  2596. <value name="ACTUAL">
  2597. <block type="lists_getIndex">
  2598. <mutation statement="false" at="true"></mutation>
  2599. <field name="MODE">GET_REMOVE</field>
  2600. <field name="WHERE">FROM_START</field>
  2601. <value name="VALUE">
  2602. <block type="variables_get">
  2603. <field name="VAR">list</field>
  2604. </block>
  2605. </value>
  2606. <value name="AT">
  2607. <block type="unittest_adjustindex">
  2608. <value name="INDEX">
  2609. <block type="math_number">
  2610. <field name="NUM">1</field>
  2611. </block>
  2612. </value>
  2613. </block>
  2614. </value>
  2615. </block>
  2616. </value>
  2617. <value name="EXPECTED">
  2618. <block type="text">
  2619. <field name="TEXT">Spock</field>
  2620. </block>
  2621. </value>
  2622. <next>
  2623. <block type="unittest_assertequals" inline="false">
  2624. <value name="MESSAGE">
  2625. <block type="text">
  2626. <field name="TEXT">getremove # list</field>
  2627. </block>
  2628. </value>
  2629. <value name="ACTUAL">
  2630. <block type="variables_get">
  2631. <field name="VAR">list</field>
  2632. </block>
  2633. </value>
  2634. <value name="EXPECTED">
  2635. <block type="lists_create_with" inline="true">
  2636. <mutation items="2"></mutation>
  2637. <value name="ADD0">
  2638. <block type="text">
  2639. <field name="TEXT">Kirk</field>
  2640. </block>
  2641. </value>
  2642. <value name="ADD1">
  2643. <block type="text">
  2644. <field name="TEXT">McCoy</field>
  2645. </block>
  2646. </value>
  2647. </block>
  2648. </value>
  2649. <next>
  2650. <block type="variables_set" inline="false">
  2651. <field name="VAR">list</field>
  2652. <value name="VALUE">
  2653. <block type="lists_create_with" inline="true">
  2654. <mutation items="3"></mutation>
  2655. <value name="ADD0">
  2656. <block type="text">
  2657. <field name="TEXT">Kirk</field>
  2658. </block>
  2659. </value>
  2660. <value name="ADD1">
  2661. <block type="text">
  2662. <field name="TEXT">Spock</field>
  2663. </block>
  2664. </value>
  2665. <value name="ADD2">
  2666. <block type="text">
  2667. <field name="TEXT">McCoy</field>
  2668. </block>
  2669. </value>
  2670. </block>
  2671. </value>
  2672. <next>
  2673. <block type="unittest_assertequals" inline="false">
  2674. <value name="MESSAGE">
  2675. <block type="text">
  2676. <field name="TEXT">getremove # order</field>
  2677. </block>
  2678. </value>
  2679. <value name="ACTUAL">
  2680. <block type="lists_getIndex">
  2681. <mutation statement="false" at="true"></mutation>
  2682. <field name="MODE">GET_REMOVE</field>
  2683. <field name="WHERE">FROM_START</field>
  2684. <value name="VALUE">
  2685. <block type="logic_ternary" inline="false">
  2686. <value name="IF">
  2687. <block type="logic_boolean">
  2688. <field name="BOOL">TRUE</field>
  2689. </block>
  2690. </value>
  2691. <value name="THEN">
  2692. <block type="variables_get">
  2693. <field name="VAR">list</field>
  2694. </block>
  2695. </value>
  2696. <value name="ELSE">
  2697. <block type="logic_null"></block>
  2698. </value>
  2699. </block>
  2700. </value>
  2701. <value name="AT">
  2702. <block type="logic_ternary">
  2703. <value name="IF">
  2704. <block type="logic_boolean">
  2705. <field name="BOOL">TRUE</field>
  2706. </block>
  2707. </value>
  2708. <value name="THEN">
  2709. <block type="unittest_adjustindex">
  2710. <value name="INDEX">
  2711. <block type="math_number">
  2712. <field name="NUM">1</field>
  2713. </block>
  2714. </value>
  2715. </block>
  2716. </value>
  2717. <value name="ELSE">
  2718. <block type="logic_null"></block>
  2719. </value>
  2720. </block>
  2721. </value>
  2722. </block>
  2723. </value>
  2724. <value name="EXPECTED">
  2725. <block type="text">
  2726. <field name="TEXT">Spock</field>
  2727. </block>
  2728. </value>
  2729. <next>
  2730. <block type="unittest_assertequals" inline="false">
  2731. <value name="MESSAGE">
  2732. <block type="text">
  2733. <field name="TEXT">getremove # order list</field>
  2734. </block>
  2735. </value>
  2736. <value name="ACTUAL">
  2737. <block type="variables_get">
  2738. <field name="VAR">list</field>
  2739. </block>
  2740. </value>
  2741. <value name="EXPECTED">
  2742. <block type="lists_create_with" inline="true">
  2743. <mutation items="2"></mutation>
  2744. <value name="ADD0">
  2745. <block type="text">
  2746. <field name="TEXT">Kirk</field>
  2747. </block>
  2748. </value>
  2749. <value name="ADD1">
  2750. <block type="text">
  2751. <field name="TEXT">McCoy</field>
  2752. </block>
  2753. </value>
  2754. </block>
  2755. </value>
  2756. <next>
  2757. <block type="variables_set" inline="false">
  2758. <field name="VAR">list</field>
  2759. <value name="VALUE">
  2760. <block type="lists_create_with" inline="true">
  2761. <mutation items="3"></mutation>
  2762. <value name="ADD0">
  2763. <block type="text">
  2764. <field name="TEXT">Kirk</field>
  2765. </block>
  2766. </value>
  2767. <value name="ADD1">
  2768. <block type="text">
  2769. <field name="TEXT">Spock</field>
  2770. </block>
  2771. </value>
  2772. <value name="ADD2">
  2773. <block type="text">
  2774. <field name="TEXT">McCoy</field>
  2775. </block>
  2776. </value>
  2777. </block>
  2778. </value>
  2779. <next>
  2780. <block type="unittest_assertequals" inline="false">
  2781. <value name="MESSAGE">
  2782. <block type="text">
  2783. <field name="TEXT">getremove #-end</field>
  2784. </block>
  2785. </value>
  2786. <value name="ACTUAL">
  2787. <block type="lists_getIndex">
  2788. <mutation statement="false" at="true"></mutation>
  2789. <field name="MODE">GET_REMOVE</field>
  2790. <field name="WHERE">FROM_END</field>
  2791. <value name="VALUE">
  2792. <block type="variables_get">
  2793. <field name="VAR">list</field>
  2794. </block>
  2795. </value>
  2796. <value name="AT">
  2797. <block type="unittest_adjustindex">
  2798. <value name="INDEX">
  2799. <block type="math_number">
  2800. <field name="NUM">2</field>
  2801. </block>
  2802. </value>
  2803. </block>
  2804. </value>
  2805. </block>
  2806. </value>
  2807. <value name="EXPECTED">
  2808. <block type="text">
  2809. <field name="TEXT">Kirk</field>
  2810. </block>
  2811. </value>
  2812. <next>
  2813. <block type="unittest_assertequals" inline="false">
  2814. <value name="MESSAGE">
  2815. <block type="text">
  2816. <field name="TEXT">getremove #-end list</field>
  2817. </block>
  2818. </value>
  2819. <value name="ACTUAL">
  2820. <block type="variables_get">
  2821. <field name="VAR">list</field>
  2822. </block>
  2823. </value>
  2824. <value name="EXPECTED">
  2825. <block type="lists_create_with" inline="true">
  2826. <mutation items="2"></mutation>
  2827. <value name="ADD0">
  2828. <block type="text">
  2829. <field name="TEXT">Spock</field>
  2830. </block>
  2831. </value>
  2832. <value name="ADD1">
  2833. <block type="text">
  2834. <field name="TEXT">McCoy</field>
  2835. </block>
  2836. </value>
  2837. </block>
  2838. </value>
  2839. <next>
  2840. <block type="variables_set" inline="false">
  2841. <field name="VAR">list</field>
  2842. <value name="VALUE">
  2843. <block type="lists_create_with" inline="true">
  2844. <mutation items="3"></mutation>
  2845. <value name="ADD0">
  2846. <block type="text">
  2847. <field name="TEXT">Kirk</field>
  2848. </block>
  2849. </value>
  2850. <value name="ADD1">
  2851. <block type="text">
  2852. <field name="TEXT">Spock</field>
  2853. </block>
  2854. </value>
  2855. <value name="ADD2">
  2856. <block type="text">
  2857. <field name="TEXT">McCoy</field>
  2858. </block>
  2859. </value>
  2860. </block>
  2861. </value>
  2862. <next>
  2863. <block type="unittest_assertequals" inline="false">
  2864. <value name="MESSAGE">
  2865. <block type="text">
  2866. <field name="TEXT">getremove #-end order</field>
  2867. </block>
  2868. </value>
  2869. <value name="ACTUAL">
  2870. <block type="lists_getIndex">
  2871. <mutation statement="false" at="true"></mutation>
  2872. <field name="MODE">GET_REMOVE</field>
  2873. <field name="WHERE">FROM_END</field>
  2874. <comment pinned="false" h="94" w="258">The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index.</comment>
  2875. <value name="VALUE">
  2876. <block type="logic_ternary" inline="true">
  2877. <value name="IF">
  2878. <block type="logic_boolean">
  2879. <field name="BOOL">TRUE</field>
  2880. </block>
  2881. </value>
  2882. <value name="THEN">
  2883. <block type="variables_get">
  2884. <field name="VAR">list</field>
  2885. </block>
  2886. </value>
  2887. <value name="ELSE">
  2888. <block type="logic_null"></block>
  2889. </value>
  2890. </block>
  2891. </value>
  2892. <value name="AT">
  2893. <block type="math_arithmetic">
  2894. <field name="OP">ADD</field>
  2895. <value name="A">
  2896. <block type="math_number">
  2897. <field name="NUM">0</field>
  2898. </block>
  2899. </value>
  2900. <value name="B">
  2901. <block type="unittest_adjustindex">
  2902. <value name="INDEX">
  2903. <block type="math_number">
  2904. <field name="NUM">2</field>
  2905. </block>
  2906. </value>
  2907. </block>
  2908. </value>
  2909. </block>
  2910. </value>
  2911. </block>
  2912. </value>
  2913. <value name="EXPECTED">
  2914. <block type="text">
  2915. <field name="TEXT">Kirk</field>
  2916. </block>
  2917. </value>
  2918. <next>
  2919. <block type="unittest_assertequals" inline="false">
  2920. <value name="MESSAGE">
  2921. <block type="text">
  2922. <field name="TEXT">getremove #-end order list</field>
  2923. </block>
  2924. </value>
  2925. <value name="ACTUAL">
  2926. <block type="variables_get">
  2927. <field name="VAR">list</field>
  2928. </block>
  2929. </value>
  2930. <value name="EXPECTED">
  2931. <block type="lists_create_with" inline="true">
  2932. <mutation items="2"></mutation>
  2933. <value name="ADD0">
  2934. <block type="text">
  2935. <field name="TEXT">Spock</field>
  2936. </block>
  2937. </value>
  2938. <value name="ADD1">
  2939. <block type="text">
  2940. <field name="TEXT">McCoy</field>
  2941. </block>
  2942. </value>
  2943. </block>
  2944. </value>
  2945. </block>
  2946. </next>
  2947. </block>
  2948. </next>
  2949. </block>
  2950. </next>
  2951. </block>
  2952. </next>
  2953. </block>
  2954. </next>
  2955. </block>
  2956. </next>
  2957. </block>
  2958. </next>
  2959. </block>
  2960. </next>
  2961. </block>
  2962. </next>
  2963. </block>
  2964. </next>
  2965. </block>
  2966. </next>
  2967. </block>
  2968. </next>
  2969. </block>
  2970. </next>
  2971. </block>
  2972. </next>
  2973. </block>
  2974. </next>
  2975. </block>
  2976. </next>
  2977. </block>
  2978. </next>
  2979. </block>
  2980. </next>
  2981. </block>
  2982. </next>
  2983. </block>
  2984. </next>
  2985. </block>
  2986. </next>
  2987. </block>
  2988. </next>
  2989. </block>
  2990. </next>
  2991. </block>
  2992. </next>
  2993. </block>
  2994. </next>
  2995. </block>
  2996. </next>
  2997. </block>
  2998. </next>
  2999. </block>
  3000. </next>
  3001. </block>
  3002. </next>
  3003. </block>
  3004. </statement>
  3005. </block>
  3006. <block type="procedures_defnoreturn" x="13" y="8888">
  3007. <field name="NAME">test remove</field>
  3008. <comment pinned="false" h="80" w="160">Tests the "remove" block.</comment>
  3009. <statement name="STACK">
  3010. <block type="variables_set" inline="false">
  3011. <field name="VAR">list</field>
  3012. <value name="VALUE">
  3013. <block type="lists_create_with" inline="true">
  3014. <mutation items="3"></mutation>
  3015. <value name="ADD0">
  3016. <block type="text">
  3017. <field name="TEXT">Kirk</field>
  3018. </block>
  3019. </value>
  3020. <value name="ADD1">
  3021. <block type="text">
  3022. <field name="TEXT">Spock</field>
  3023. </block>
  3024. </value>
  3025. <value name="ADD2">
  3026. <block type="text">
  3027. <field name="TEXT">McCoy</field>
  3028. </block>
  3029. </value>
  3030. </block>
  3031. </value>
  3032. <next>
  3033. <block type="lists_getIndex">
  3034. <mutation statement="true" at="false"></mutation>
  3035. <field name="MODE">REMOVE</field>
  3036. <field name="WHERE">FIRST</field>
  3037. <value name="VALUE">
  3038. <block type="variables_get">
  3039. <field name="VAR">list</field>
  3040. </block>
  3041. </value>
  3042. <next>
  3043. <block type="unittest_assertequals" inline="false">
  3044. <value name="MESSAGE">
  3045. <block type="text">
  3046. <field name="TEXT">remove first list</field>
  3047. </block>
  3048. </value>
  3049. <value name="ACTUAL">
  3050. <block type="variables_get">
  3051. <field name="VAR">list</field>
  3052. </block>
  3053. </value>
  3054. <value name="EXPECTED">
  3055. <block type="lists_create_with" inline="true">
  3056. <mutation items="2"></mutation>
  3057. <value name="ADD0">
  3058. <block type="text">
  3059. <field name="TEXT">Spock</field>
  3060. </block>
  3061. </value>
  3062. <value name="ADD1">
  3063. <block type="text">
  3064. <field name="TEXT">McCoy</field>
  3065. </block>
  3066. </value>
  3067. </block>
  3068. </value>
  3069. <next>
  3070. <block type="variables_set" inline="false">
  3071. <field name="VAR">list</field>
  3072. <value name="VALUE">
  3073. <block type="lists_create_with" inline="true">
  3074. <mutation items="3"></mutation>
  3075. <value name="ADD0">
  3076. <block type="text">
  3077. <field name="TEXT">Kirk</field>
  3078. </block>
  3079. </value>
  3080. <value name="ADD1">
  3081. <block type="text">
  3082. <field name="TEXT">Spock</field>
  3083. </block>
  3084. </value>
  3085. <value name="ADD2">
  3086. <block type="text">
  3087. <field name="TEXT">McCoy</field>
  3088. </block>
  3089. </value>
  3090. </block>
  3091. </value>
  3092. <next>
  3093. <block type="lists_getIndex">
  3094. <mutation statement="true" at="false"></mutation>
  3095. <field name="MODE">REMOVE</field>
  3096. <field name="WHERE">FIRST</field>
  3097. <value name="VALUE">
  3098. <block type="logic_ternary" inline="true">
  3099. <value name="IF">
  3100. <block type="logic_boolean">
  3101. <field name="BOOL">TRUE</field>
  3102. </block>
  3103. </value>
  3104. <value name="THEN">
  3105. <block type="variables_get">
  3106. <field name="VAR">list</field>
  3107. </block>
  3108. </value>
  3109. <value name="ELSE">
  3110. <block type="logic_null"></block>
  3111. </value>
  3112. </block>
  3113. </value>
  3114. <next>
  3115. <block type="unittest_assertequals" inline="false">
  3116. <value name="MESSAGE">
  3117. <block type="text">
  3118. <field name="TEXT">remove first order list</field>
  3119. </block>
  3120. </value>
  3121. <value name="ACTUAL">
  3122. <block type="variables_get">
  3123. <field name="VAR">list</field>
  3124. </block>
  3125. </value>
  3126. <value name="EXPECTED">
  3127. <block type="lists_create_with" inline="true">
  3128. <mutation items="2"></mutation>
  3129. <value name="ADD0">
  3130. <block type="text">
  3131. <field name="TEXT">Spock</field>
  3132. </block>
  3133. </value>
  3134. <value name="ADD1">
  3135. <block type="text">
  3136. <field name="TEXT">McCoy</field>
  3137. </block>
  3138. </value>
  3139. </block>
  3140. </value>
  3141. <next>
  3142. <block type="variables_set" inline="false">
  3143. <field name="VAR">list</field>
  3144. <value name="VALUE">
  3145. <block type="lists_create_with" inline="true">
  3146. <mutation items="3"></mutation>
  3147. <value name="ADD0">
  3148. <block type="text">
  3149. <field name="TEXT">Kirk</field>
  3150. </block>
  3151. </value>
  3152. <value name="ADD1">
  3153. <block type="text">
  3154. <field name="TEXT">Spock</field>
  3155. </block>
  3156. </value>
  3157. <value name="ADD2">
  3158. <block type="text">
  3159. <field name="TEXT">McCoy</field>
  3160. </block>
  3161. </value>
  3162. </block>
  3163. </value>
  3164. <next>
  3165. <block type="lists_getIndex">
  3166. <mutation statement="true" at="false"></mutation>
  3167. <field name="MODE">REMOVE</field>
  3168. <field name="WHERE">LAST</field>
  3169. <value name="VALUE">
  3170. <block type="variables_get">
  3171. <field name="VAR">list</field>
  3172. </block>
  3173. </value>
  3174. <next>
  3175. <block type="unittest_assertequals" inline="false">
  3176. <value name="MESSAGE">
  3177. <block type="text">
  3178. <field name="TEXT">remove last list</field>
  3179. </block>
  3180. </value>
  3181. <value name="ACTUAL">
  3182. <block type="variables_get">
  3183. <field name="VAR">list</field>
  3184. </block>
  3185. </value>
  3186. <value name="EXPECTED">
  3187. <block type="lists_create_with" inline="true">
  3188. <mutation items="2"></mutation>
  3189. <value name="ADD0">
  3190. <block type="text">
  3191. <field name="TEXT">Kirk</field>
  3192. </block>
  3193. </value>
  3194. <value name="ADD1">
  3195. <block type="text">
  3196. <field name="TEXT">Spock</field>
  3197. </block>
  3198. </value>
  3199. </block>
  3200. </value>
  3201. <next>
  3202. <block type="variables_set" inline="false">
  3203. <field name="VAR">list</field>
  3204. <value name="VALUE">
  3205. <block type="lists_create_with" inline="true">
  3206. <mutation items="3"></mutation>
  3207. <value name="ADD0">
  3208. <block type="text">
  3209. <field name="TEXT">Kirk</field>
  3210. </block>
  3211. </value>
  3212. <value name="ADD1">
  3213. <block type="text">
  3214. <field name="TEXT">Spock</field>
  3215. </block>
  3216. </value>
  3217. <value name="ADD2">
  3218. <block type="text">
  3219. <field name="TEXT">McCoy</field>
  3220. </block>
  3221. </value>
  3222. </block>
  3223. </value>
  3224. <next>
  3225. <block type="lists_getIndex">
  3226. <mutation statement="true" at="false"></mutation>
  3227. <field name="MODE">REMOVE</field>
  3228. <field name="WHERE">LAST</field>
  3229. <value name="VALUE">
  3230. <block type="logic_ternary" inline="true">
  3231. <value name="IF">
  3232. <block type="logic_boolean">
  3233. <field name="BOOL">TRUE</field>
  3234. </block>
  3235. </value>
  3236. <value name="THEN">
  3237. <block type="variables_get">
  3238. <field name="VAR">list</field>
  3239. </block>
  3240. </value>
  3241. <value name="ELSE">
  3242. <block type="logic_null"></block>
  3243. </value>
  3244. </block>
  3245. </value>
  3246. <next>
  3247. <block type="unittest_assertequals" inline="false">
  3248. <value name="MESSAGE">
  3249. <block type="text">
  3250. <field name="TEXT">remove last order list</field>
  3251. </block>
  3252. </value>
  3253. <value name="ACTUAL">
  3254. <block type="variables_get">
  3255. <field name="VAR">list</field>
  3256. </block>
  3257. </value>
  3258. <value name="EXPECTED">
  3259. <block type="lists_create_with" inline="true">
  3260. <mutation items="2"></mutation>
  3261. <value name="ADD0">
  3262. <block type="text">
  3263. <field name="TEXT">Kirk</field>
  3264. </block>
  3265. </value>
  3266. <value name="ADD1">
  3267. <block type="text">
  3268. <field name="TEXT">Spock</field>
  3269. </block>
  3270. </value>
  3271. </block>
  3272. </value>
  3273. <next>
  3274. <block type="variables_set" inline="false">
  3275. <field name="VAR">list</field>
  3276. <value name="VALUE">
  3277. <block type="lists_create_with" inline="true">
  3278. <mutation items="3"></mutation>
  3279. <value name="ADD0">
  3280. <block type="text">
  3281. <field name="TEXT">Kirk</field>
  3282. </block>
  3283. </value>
  3284. <value name="ADD1">
  3285. <block type="text">
  3286. <field name="TEXT">Spock</field>
  3287. </block>
  3288. </value>
  3289. <value name="ADD2">
  3290. <block type="text">
  3291. <field name="TEXT">McCoy</field>
  3292. </block>
  3293. </value>
  3294. </block>
  3295. </value>
  3296. <next>
  3297. <block type="lists_getIndex">
  3298. <mutation statement="true" at="false"></mutation>
  3299. <field name="MODE">REMOVE</field>
  3300. <field name="WHERE">RANDOM</field>
  3301. <value name="VALUE">
  3302. <block type="variables_get">
  3303. <field name="VAR">list</field>
  3304. </block>
  3305. </value>
  3306. <next>
  3307. <block type="unittest_assertequals" inline="false">
  3308. <value name="MESSAGE">
  3309. <block type="text">
  3310. <field name="TEXT">remove random list</field>
  3311. </block>
  3312. </value>
  3313. <value name="ACTUAL">
  3314. <block type="lists_length" inline="false">
  3315. <value name="VALUE">
  3316. <block type="variables_get">
  3317. <field name="VAR">list</field>
  3318. </block>
  3319. </value>
  3320. </block>
  3321. </value>
  3322. <value name="EXPECTED">
  3323. <block type="math_number">
  3324. <field name="NUM">2</field>
  3325. </block>
  3326. </value>
  3327. <next>
  3328. <block type="variables_set" inline="false">
  3329. <field name="VAR">list</field>
  3330. <value name="VALUE">
  3331. <block type="lists_create_with" inline="true">
  3332. <mutation items="3"></mutation>
  3333. <value name="ADD0">
  3334. <block type="text">
  3335. <field name="TEXT">Kirk</field>
  3336. </block>
  3337. </value>
  3338. <value name="ADD1">
  3339. <block type="text">
  3340. <field name="TEXT">Spock</field>
  3341. </block>
  3342. </value>
  3343. <value name="ADD2">
  3344. <block type="text">
  3345. <field name="TEXT">McCoy</field>
  3346. </block>
  3347. </value>
  3348. </block>
  3349. </value>
  3350. <next>
  3351. <block type="lists_getIndex">
  3352. <mutation statement="true" at="false"></mutation>
  3353. <field name="MODE">REMOVE</field>
  3354. <field name="WHERE">RANDOM</field>
  3355. <value name="VALUE">
  3356. <block type="logic_ternary" inline="true">
  3357. <value name="IF">
  3358. <block type="logic_boolean">
  3359. <field name="BOOL">TRUE</field>
  3360. </block>
  3361. </value>
  3362. <value name="THEN">
  3363. <block type="variables_get">
  3364. <field name="VAR">list</field>
  3365. </block>
  3366. </value>
  3367. <value name="ELSE">
  3368. <block type="logic_null"></block>
  3369. </value>
  3370. </block>
  3371. </value>
  3372. <next>
  3373. <block type="unittest_assertequals" inline="false">
  3374. <value name="MESSAGE">
  3375. <block type="text">
  3376. <field name="TEXT">remove random order list</field>
  3377. </block>
  3378. </value>
  3379. <value name="ACTUAL">
  3380. <block type="lists_length" inline="false">
  3381. <value name="VALUE">
  3382. <block type="variables_get">
  3383. <field name="VAR">list</field>
  3384. </block>
  3385. </value>
  3386. </block>
  3387. </value>
  3388. <value name="EXPECTED">
  3389. <block type="math_number">
  3390. <field name="NUM">2</field>
  3391. </block>
  3392. </value>
  3393. <next>
  3394. <block type="variables_set" inline="false">
  3395. <field name="VAR">list</field>
  3396. <value name="VALUE">
  3397. <block type="lists_create_with" inline="true">
  3398. <mutation items="3"></mutation>
  3399. <value name="ADD0">
  3400. <block type="text">
  3401. <field name="TEXT">Kirk</field>
  3402. </block>
  3403. </value>
  3404. <value name="ADD1">
  3405. <block type="text">
  3406. <field name="TEXT">Spock</field>
  3407. </block>
  3408. </value>
  3409. <value name="ADD2">
  3410. <block type="text">
  3411. <field name="TEXT">McCoy</field>
  3412. </block>
  3413. </value>
  3414. </block>
  3415. </value>
  3416. <next>
  3417. <block type="lists_getIndex">
  3418. <mutation statement="true" at="true"></mutation>
  3419. <field name="MODE">REMOVE</field>
  3420. <field name="WHERE">FROM_START</field>
  3421. <value name="VALUE">
  3422. <block type="variables_get">
  3423. <field name="VAR">list</field>
  3424. </block>
  3425. </value>
  3426. <value name="AT">
  3427. <block type="unittest_adjustindex">
  3428. <value name="INDEX">
  3429. <block type="math_number">
  3430. <field name="NUM">1</field>
  3431. </block>
  3432. </value>
  3433. </block>
  3434. </value>
  3435. <next>
  3436. <block type="unittest_assertequals" inline="false">
  3437. <value name="MESSAGE">
  3438. <block type="text">
  3439. <field name="TEXT">remove # list</field>
  3440. </block>
  3441. </value>
  3442. <value name="ACTUAL">
  3443. <block type="variables_get">
  3444. <field name="VAR">list</field>
  3445. </block>
  3446. </value>
  3447. <value name="EXPECTED">
  3448. <block type="lists_create_with" inline="true">
  3449. <mutation items="2"></mutation>
  3450. <value name="ADD0">
  3451. <block type="text">
  3452. <field name="TEXT">Kirk</field>
  3453. </block>
  3454. </value>
  3455. <value name="ADD1">
  3456. <block type="text">
  3457. <field name="TEXT">McCoy</field>
  3458. </block>
  3459. </value>
  3460. </block>
  3461. </value>
  3462. <next>
  3463. <block type="variables_set" inline="false">
  3464. <field name="VAR">list</field>
  3465. <value name="VALUE">
  3466. <block type="lists_create_with" inline="true">
  3467. <mutation items="3"></mutation>
  3468. <value name="ADD0">
  3469. <block type="text">
  3470. <field name="TEXT">Kirk</field>
  3471. </block>
  3472. </value>
  3473. <value name="ADD1">
  3474. <block type="text">
  3475. <field name="TEXT">Spock</field>
  3476. </block>
  3477. </value>
  3478. <value name="ADD2">
  3479. <block type="text">
  3480. <field name="TEXT">McCoy</field>
  3481. </block>
  3482. </value>
  3483. </block>
  3484. </value>
  3485. <next>
  3486. <block type="lists_getIndex">
  3487. <mutation statement="true" at="true"></mutation>
  3488. <field name="MODE">REMOVE</field>
  3489. <field name="WHERE">FROM_START</field>
  3490. <value name="VALUE">
  3491. <block type="logic_ternary" inline="false">
  3492. <value name="IF">
  3493. <block type="logic_boolean">
  3494. <field name="BOOL">TRUE</field>
  3495. </block>
  3496. </value>
  3497. <value name="THEN">
  3498. <block type="variables_get">
  3499. <field name="VAR">list</field>
  3500. </block>
  3501. </value>
  3502. <value name="ELSE">
  3503. <block type="logic_null"></block>
  3504. </value>
  3505. </block>
  3506. </value>
  3507. <value name="AT">
  3508. <block type="logic_ternary">
  3509. <value name="IF">
  3510. <block type="logic_boolean">
  3511. <field name="BOOL">TRUE</field>
  3512. </block>
  3513. </value>
  3514. <value name="THEN">
  3515. <block type="unittest_adjustindex">
  3516. <value name="INDEX">
  3517. <block type="math_number">
  3518. <field name="NUM">1</field>
  3519. </block>
  3520. </value>
  3521. </block>
  3522. </value>
  3523. <value name="ELSE">
  3524. <block type="logic_null"></block>
  3525. </value>
  3526. </block>
  3527. </value>
  3528. <next>
  3529. <block type="unittest_assertequals" inline="false">
  3530. <value name="MESSAGE">
  3531. <block type="text">
  3532. <field name="TEXT">remove # order list</field>
  3533. </block>
  3534. </value>
  3535. <value name="ACTUAL">
  3536. <block type="variables_get">
  3537. <field name="VAR">list</field>
  3538. </block>
  3539. </value>
  3540. <value name="EXPECTED">
  3541. <block type="lists_create_with" inline="true">
  3542. <mutation items="2"></mutation>
  3543. <value name="ADD0">
  3544. <block type="text">
  3545. <field name="TEXT">Kirk</field>
  3546. </block>
  3547. </value>
  3548. <value name="ADD1">
  3549. <block type="text">
  3550. <field name="TEXT">McCoy</field>
  3551. </block>
  3552. </value>
  3553. </block>
  3554. </value>
  3555. <next>
  3556. <block type="variables_set" inline="false">
  3557. <field name="VAR">list</field>
  3558. <value name="VALUE">
  3559. <block type="lists_create_with" inline="true">
  3560. <mutation items="3"></mutation>
  3561. <value name="ADD0">
  3562. <block type="text">
  3563. <field name="TEXT">Kirk</field>
  3564. </block>
  3565. </value>
  3566. <value name="ADD1">
  3567. <block type="text">
  3568. <field name="TEXT">Spock</field>
  3569. </block>
  3570. </value>
  3571. <value name="ADD2">
  3572. <block type="text">
  3573. <field name="TEXT">McCoy</field>
  3574. </block>
  3575. </value>
  3576. </block>
  3577. </value>
  3578. <next>
  3579. <block type="lists_getIndex">
  3580. <mutation statement="true" at="true"></mutation>
  3581. <field name="MODE">REMOVE</field>
  3582. <field name="WHERE">FROM_END</field>
  3583. <value name="VALUE">
  3584. <block type="variables_get">
  3585. <field name="VAR">list</field>
  3586. </block>
  3587. </value>
  3588. <value name="AT">
  3589. <block type="unittest_adjustindex">
  3590. <value name="INDEX">
  3591. <block type="math_number">
  3592. <field name="NUM">2</field>
  3593. </block>
  3594. </value>
  3595. </block>
  3596. </value>
  3597. <next>
  3598. <block type="unittest_assertequals" inline="false">
  3599. <value name="MESSAGE">
  3600. <block type="text">
  3601. <field name="TEXT">remove #-end list</field>
  3602. </block>
  3603. </value>
  3604. <value name="ACTUAL">
  3605. <block type="variables_get">
  3606. <field name="VAR">list</field>
  3607. </block>
  3608. </value>
  3609. <value name="EXPECTED">
  3610. <block type="lists_create_with" inline="true">
  3611. <mutation items="2"></mutation>
  3612. <value name="ADD0">
  3613. <block type="text">
  3614. <field name="TEXT">Spock</field>
  3615. </block>
  3616. </value>
  3617. <value name="ADD1">
  3618. <block type="text">
  3619. <field name="TEXT">McCoy</field>
  3620. </block>
  3621. </value>
  3622. </block>
  3623. </value>
  3624. <next>
  3625. <block type="variables_set" inline="false">
  3626. <field name="VAR">list</field>
  3627. <value name="VALUE">
  3628. <block type="lists_create_with" inline="true">
  3629. <mutation items="3"></mutation>
  3630. <value name="ADD0">
  3631. <block type="text">
  3632. <field name="TEXT">Kirk</field>
  3633. </block>
  3634. </value>
  3635. <value name="ADD1">
  3636. <block type="text">
  3637. <field name="TEXT">Spock</field>
  3638. </block>
  3639. </value>
  3640. <value name="ADD2">
  3641. <block type="text">
  3642. <field name="TEXT">McCoy</field>
  3643. </block>
  3644. </value>
  3645. </block>
  3646. </value>
  3647. <next>
  3648. <block type="lists_getIndex">
  3649. <mutation statement="true" at="true"></mutation>
  3650. <field name="MODE">REMOVE</field>
  3651. <field name="WHERE">FROM_END</field>
  3652. <comment pinned="false" h="94" w="256">The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index.</comment>
  3653. <value name="VALUE">
  3654. <block type="logic_ternary" inline="true">
  3655. <value name="IF">
  3656. <block type="logic_boolean">
  3657. <field name="BOOL">TRUE</field>
  3658. </block>
  3659. </value>
  3660. <value name="THEN">
  3661. <block type="variables_get">
  3662. <field name="VAR">list</field>
  3663. </block>
  3664. </value>
  3665. <value name="ELSE">
  3666. <block type="logic_null"></block>
  3667. </value>
  3668. </block>
  3669. </value>
  3670. <value name="AT">
  3671. <block type="math_arithmetic">
  3672. <field name="OP">ADD</field>
  3673. <value name="A">
  3674. <block type="math_number">
  3675. <field name="NUM">0</field>
  3676. </block>
  3677. </value>
  3678. <value name="B">
  3679. <block type="unittest_adjustindex">
  3680. <value name="INDEX">
  3681. <block type="math_number">
  3682. <field name="NUM">2</field>
  3683. </block>
  3684. </value>
  3685. </block>
  3686. </value>
  3687. </block>
  3688. </value>
  3689. <next>
  3690. <block type="unittest_assertequals" inline="false">
  3691. <value name="MESSAGE">
  3692. <block type="text">
  3693. <field name="TEXT">remove #-end order list</field>
  3694. </block>
  3695. </value>
  3696. <value name="ACTUAL">
  3697. <block type="variables_get">
  3698. <field name="VAR">list</field>
  3699. </block>
  3700. </value>
  3701. <value name="EXPECTED">
  3702. <block type="lists_create_with" inline="true">
  3703. <mutation items="2"></mutation>
  3704. <value name="ADD0">
  3705. <block type="text">
  3706. <field name="TEXT">Spock</field>
  3707. </block>
  3708. </value>
  3709. <value name="ADD1">
  3710. <block type="text">
  3711. <field name="TEXT">McCoy</field>
  3712. </block>
  3713. </value>
  3714. </block>
  3715. </value>
  3716. </block>
  3717. </next>
  3718. </block>
  3719. </next>
  3720. </block>
  3721. </next>
  3722. </block>
  3723. </next>
  3724. </block>
  3725. </next>
  3726. </block>
  3727. </next>
  3728. </block>
  3729. </next>
  3730. </block>
  3731. </next>
  3732. </block>
  3733. </next>
  3734. </block>
  3735. </next>
  3736. </block>
  3737. </next>
  3738. </block>
  3739. </next>
  3740. </block>
  3741. </next>
  3742. </block>
  3743. </next>
  3744. </block>
  3745. </next>
  3746. </block>
  3747. </next>
  3748. </block>
  3749. </next>
  3750. </block>
  3751. </next>
  3752. </block>
  3753. </next>
  3754. </block>
  3755. </next>
  3756. </block>
  3757. </next>
  3758. </block>
  3759. </next>
  3760. </block>
  3761. </next>
  3762. </block>
  3763. </next>
  3764. </block>
  3765. </next>
  3766. </block>
  3767. </next>
  3768. </block>
  3769. </next>
  3770. </block>
  3771. </next>
  3772. </block>
  3773. </next>
  3774. </block>
  3775. </statement>
  3776. </block>
  3777. <block type="procedures_defnoreturn" x="13" y="10713">
  3778. <field name="NAME">test set</field>
  3779. <comment pinned="false" h="80" w="160">Tests the "set" block.</comment>
  3780. <statement name="STACK">
  3781. <block type="variables_set" inline="false">
  3782. <field name="VAR">list</field>
  3783. <value name="VALUE">
  3784. <block type="lists_create_with" inline="true">
  3785. <mutation items="3"></mutation>
  3786. <value name="ADD0">
  3787. <block type="text">
  3788. <field name="TEXT">Picard</field>
  3789. </block>
  3790. </value>
  3791. <value name="ADD1">
  3792. <block type="text">
  3793. <field name="TEXT">Riker</field>
  3794. </block>
  3795. </value>
  3796. <value name="ADD2">
  3797. <block type="text">
  3798. <field name="TEXT">Crusher</field>
  3799. </block>
  3800. </value>
  3801. </block>
  3802. </value>
  3803. <next>
  3804. <block type="lists_setIndex">
  3805. <mutation at="false"></mutation>
  3806. <field name="MODE">SET</field>
  3807. <field name="WHERE">FIRST</field>
  3808. <value name="LIST">
  3809. <block type="variables_get">
  3810. <field name="VAR">list</field>
  3811. </block>
  3812. </value>
  3813. <value name="TO">
  3814. <block type="text">
  3815. <field name="TEXT">Jean-Luc</field>
  3816. </block>
  3817. </value>
  3818. <next>
  3819. <block type="unittest_assertequals" inline="false">
  3820. <value name="MESSAGE">
  3821. <block type="text">
  3822. <field name="TEXT">set first list</field>
  3823. </block>
  3824. </value>
  3825. <value name="ACTUAL">
  3826. <block type="variables_get">
  3827. <field name="VAR">list</field>
  3828. </block>
  3829. </value>
  3830. <value name="EXPECTED">
  3831. <block type="lists_create_with" inline="true">
  3832. <mutation items="3"></mutation>
  3833. <value name="ADD0">
  3834. <block type="text">
  3835. <field name="TEXT">Jean-Luc</field>
  3836. </block>
  3837. </value>
  3838. <value name="ADD1">
  3839. <block type="text">
  3840. <field name="TEXT">Riker</field>
  3841. </block>
  3842. </value>
  3843. <value name="ADD2">
  3844. <block type="text">
  3845. <field name="TEXT">Crusher</field>
  3846. </block>
  3847. </value>
  3848. </block>
  3849. </value>
  3850. <next>
  3851. <block type="variables_set" inline="false">
  3852. <field name="VAR">list</field>
  3853. <value name="VALUE">
  3854. <block type="lists_create_with" inline="true">
  3855. <mutation items="3"></mutation>
  3856. <value name="ADD0">
  3857. <block type="text">
  3858. <field name="TEXT">Picard</field>
  3859. </block>
  3860. </value>
  3861. <value name="ADD1">
  3862. <block type="text">
  3863. <field name="TEXT">Riker</field>
  3864. </block>
  3865. </value>
  3866. <value name="ADD2">
  3867. <block type="text">
  3868. <field name="TEXT">Crusher</field>
  3869. </block>
  3870. </value>
  3871. </block>
  3872. </value>
  3873. <next>
  3874. <block type="lists_setIndex">
  3875. <mutation at="false"></mutation>
  3876. <field name="MODE">SET</field>
  3877. <field name="WHERE">FIRST</field>
  3878. <value name="LIST">
  3879. <block type="logic_ternary" inline="true">
  3880. <value name="IF">
  3881. <block type="logic_boolean">
  3882. <field name="BOOL">TRUE</field>
  3883. </block>
  3884. </value>
  3885. <value name="THEN">
  3886. <block type="variables_get">
  3887. <field name="VAR">list</field>
  3888. </block>
  3889. </value>
  3890. <value name="ELSE">
  3891. <block type="logic_null"></block>
  3892. </value>
  3893. </block>
  3894. </value>
  3895. <value name="TO">
  3896. <block type="text">
  3897. <field name="TEXT">Jean-Luc</field>
  3898. </block>
  3899. </value>
  3900. <next>
  3901. <block type="unittest_assertequals" inline="false">
  3902. <value name="MESSAGE">
  3903. <block type="text">
  3904. <field name="TEXT">set first order list</field>
  3905. </block>
  3906. </value>
  3907. <value name="ACTUAL">
  3908. <block type="variables_get">
  3909. <field name="VAR">list</field>
  3910. </block>
  3911. </value>
  3912. <value name="EXPECTED">
  3913. <block type="lists_create_with" inline="true">
  3914. <mutation items="3"></mutation>
  3915. <value name="ADD0">
  3916. <block type="text">
  3917. <field name="TEXT">Jean-Luc</field>
  3918. </block>
  3919. </value>
  3920. <value name="ADD1">
  3921. <block type="text">
  3922. <field name="TEXT">Riker</field>
  3923. </block>
  3924. </value>
  3925. <value name="ADD2">
  3926. <block type="text">
  3927. <field name="TEXT">Crusher</field>
  3928. </block>
  3929. </value>
  3930. </block>
  3931. </value>
  3932. <next>
  3933. <block type="variables_set" inline="false">
  3934. <field name="VAR">list</field>
  3935. <value name="VALUE">
  3936. <block type="lists_create_with" inline="true">
  3937. <mutation items="3"></mutation>
  3938. <value name="ADD0">
  3939. <block type="text">
  3940. <field name="TEXT">Picard</field>
  3941. </block>
  3942. </value>
  3943. <value name="ADD1">
  3944. <block type="text">
  3945. <field name="TEXT">Riker</field>
  3946. </block>
  3947. </value>
  3948. <value name="ADD2">
  3949. <block type="text">
  3950. <field name="TEXT">Crusher</field>
  3951. </block>
  3952. </value>
  3953. </block>
  3954. </value>
  3955. <next>
  3956. <block type="lists_setIndex">
  3957. <mutation at="false"></mutation>
  3958. <field name="MODE">SET</field>
  3959. <field name="WHERE">LAST</field>
  3960. <value name="LIST">
  3961. <block type="variables_get">
  3962. <field name="VAR">list</field>
  3963. </block>
  3964. </value>
  3965. <value name="TO">
  3966. <block type="text">
  3967. <field name="TEXT">Beverly</field>
  3968. </block>
  3969. </value>
  3970. <next>
  3971. <block type="unittest_assertequals" inline="false">
  3972. <value name="MESSAGE">
  3973. <block type="text">
  3974. <field name="TEXT">set last list</field>
  3975. </block>
  3976. </value>
  3977. <value name="ACTUAL">
  3978. <block type="variables_get">
  3979. <field name="VAR">list</field>
  3980. </block>
  3981. </value>
  3982. <value name="EXPECTED">
  3983. <block type="lists_create_with" inline="true">
  3984. <mutation items="3"></mutation>
  3985. <value name="ADD0">
  3986. <block type="text">
  3987. <field name="TEXT">Picard</field>
  3988. </block>
  3989. </value>
  3990. <value name="ADD1">
  3991. <block type="text">
  3992. <field name="TEXT">Riker</field>
  3993. </block>
  3994. </value>
  3995. <value name="ADD2">
  3996. <block type="text">
  3997. <field name="TEXT">Beverly</field>
  3998. </block>
  3999. </value>
  4000. </block>
  4001. </value>
  4002. <next>
  4003. <block type="variables_set" inline="false">
  4004. <field name="VAR">list</field>
  4005. <value name="VALUE">
  4006. <block type="lists_create_with" inline="true">
  4007. <mutation items="3"></mutation>
  4008. <value name="ADD0">
  4009. <block type="text">
  4010. <field name="TEXT">Picard</field>
  4011. </block>
  4012. </value>
  4013. <value name="ADD1">
  4014. <block type="text">
  4015. <field name="TEXT">Riker</field>
  4016. </block>
  4017. </value>
  4018. <value name="ADD2">
  4019. <block type="text">
  4020. <field name="TEXT">Crusher</field>
  4021. </block>
  4022. </value>
  4023. </block>
  4024. </value>
  4025. <next>
  4026. <block type="lists_setIndex">
  4027. <mutation at="false"></mutation>
  4028. <field name="MODE">SET</field>
  4029. <field name="WHERE">LAST</field>
  4030. <value name="LIST">
  4031. <block type="logic_ternary" inline="true">
  4032. <value name="IF">
  4033. <block type="logic_boolean">
  4034. <field name="BOOL">TRUE</field>
  4035. </block>
  4036. </value>
  4037. <value name="THEN">
  4038. <block type="variables_get">
  4039. <field name="VAR">list</field>
  4040. </block>
  4041. </value>
  4042. <value name="ELSE">
  4043. <block type="logic_null"></block>
  4044. </value>
  4045. </block>
  4046. </value>
  4047. <value name="TO">
  4048. <block type="text">
  4049. <field name="TEXT">Beverly</field>
  4050. </block>
  4051. </value>
  4052. <next>
  4053. <block type="unittest_assertequals" inline="false">
  4054. <value name="MESSAGE">
  4055. <block type="text">
  4056. <field name="TEXT">set last order list</field>
  4057. </block>
  4058. </value>
  4059. <value name="ACTUAL">
  4060. <block type="variables_get">
  4061. <field name="VAR">list</field>
  4062. </block>
  4063. </value>
  4064. <value name="EXPECTED">
  4065. <block type="lists_create_with" inline="true">
  4066. <mutation items="3"></mutation>
  4067. <value name="ADD0">
  4068. <block type="text">
  4069. <field name="TEXT">Picard</field>
  4070. </block>
  4071. </value>
  4072. <value name="ADD1">
  4073. <block type="text">
  4074. <field name="TEXT">Riker</field>
  4075. </block>
  4076. </value>
  4077. <value name="ADD2">
  4078. <block type="text">
  4079. <field name="TEXT">Beverly</field>
  4080. </block>
  4081. </value>
  4082. </block>
  4083. </value>
  4084. <next>
  4085. <block type="variables_set" inline="false">
  4086. <field name="VAR">list</field>
  4087. <value name="VALUE">
  4088. <block type="lists_create_with" inline="true">
  4089. <mutation items="3"></mutation>
  4090. <value name="ADD0">
  4091. <block type="text">
  4092. <field name="TEXT">Picard</field>
  4093. </block>
  4094. </value>
  4095. <value name="ADD1">
  4096. <block type="text">
  4097. <field name="TEXT">Riker</field>
  4098. </block>
  4099. </value>
  4100. <value name="ADD2">
  4101. <block type="text">
  4102. <field name="TEXT">Crusher</field>
  4103. </block>
  4104. </value>
  4105. </block>
  4106. </value>
  4107. <next>
  4108. <block type="lists_setIndex">
  4109. <mutation at="false"></mutation>
  4110. <field name="MODE">SET</field>
  4111. <field name="WHERE">RANDOM</field>
  4112. <value name="LIST">
  4113. <block type="variables_get">
  4114. <field name="VAR">list</field>
  4115. </block>
  4116. </value>
  4117. <value name="TO">
  4118. <block type="text">
  4119. <field name="TEXT">Data</field>
  4120. </block>
  4121. </value>
  4122. <next>
  4123. <block type="unittest_assertequals" inline="false">
  4124. <value name="MESSAGE">
  4125. <block type="text">
  4126. <field name="TEXT">set random list</field>
  4127. </block>
  4128. </value>
  4129. <value name="ACTUAL">
  4130. <block type="lists_length" inline="false">
  4131. <value name="VALUE">
  4132. <block type="variables_get">
  4133. <field name="VAR">list</field>
  4134. </block>
  4135. </value>
  4136. </block>
  4137. </value>
  4138. <value name="EXPECTED">
  4139. <block type="math_number">
  4140. <field name="NUM">3</field>
  4141. </block>
  4142. </value>
  4143. <next>
  4144. <block type="variables_set" inline="false">
  4145. <field name="VAR">list</field>
  4146. <value name="VALUE">
  4147. <block type="lists_create_with" inline="true">
  4148. <mutation items="3"></mutation>
  4149. <value name="ADD0">
  4150. <block type="text">
  4151. <field name="TEXT">Picard</field>
  4152. </block>
  4153. </value>
  4154. <value name="ADD1">
  4155. <block type="text">
  4156. <field name="TEXT">Riker</field>
  4157. </block>
  4158. </value>
  4159. <value name="ADD2">
  4160. <block type="text">
  4161. <field name="TEXT">Crusher</field>
  4162. </block>
  4163. </value>
  4164. </block>
  4165. </value>
  4166. <next>
  4167. <block type="lists_setIndex">
  4168. <mutation at="false"></mutation>
  4169. <field name="MODE">SET</field>
  4170. <field name="WHERE">RANDOM</field>
  4171. <value name="LIST">
  4172. <block type="logic_ternary" inline="true">
  4173. <value name="IF">
  4174. <block type="logic_boolean">
  4175. <field name="BOOL">TRUE</field>
  4176. </block>
  4177. </value>
  4178. <value name="THEN">
  4179. <block type="variables_get">
  4180. <field name="VAR">list</field>
  4181. </block>
  4182. </value>
  4183. <value name="ELSE">
  4184. <block type="logic_null"></block>
  4185. </value>
  4186. </block>
  4187. </value>
  4188. <value name="TO">
  4189. <block type="text">
  4190. <field name="TEXT">Data</field>
  4191. </block>
  4192. </value>
  4193. <next>
  4194. <block type="unittest_assertequals" inline="false">
  4195. <value name="MESSAGE">
  4196. <block type="text">
  4197. <field name="TEXT">set random order list</field>
  4198. </block>
  4199. </value>
  4200. <value name="ACTUAL">
  4201. <block type="lists_length" inline="false">
  4202. <value name="VALUE">
  4203. <block type="variables_get">
  4204. <field name="VAR">list</field>
  4205. </block>
  4206. </value>
  4207. </block>
  4208. </value>
  4209. <value name="EXPECTED">
  4210. <block type="math_number">
  4211. <field name="NUM">3</field>
  4212. </block>
  4213. </value>
  4214. <next>
  4215. <block type="variables_set" inline="false">
  4216. <field name="VAR">list</field>
  4217. <value name="VALUE">
  4218. <block type="lists_create_with" inline="true">
  4219. <mutation items="3"></mutation>
  4220. <value name="ADD0">
  4221. <block type="text">
  4222. <field name="TEXT">Picard</field>
  4223. </block>
  4224. </value>
  4225. <value name="ADD1">
  4226. <block type="text">
  4227. <field name="TEXT">Riker</field>
  4228. </block>
  4229. </value>
  4230. <value name="ADD2">
  4231. <block type="text">
  4232. <field name="TEXT">Crusher</field>
  4233. </block>
  4234. </value>
  4235. </block>
  4236. </value>
  4237. <next>
  4238. <block type="lists_setIndex">
  4239. <mutation at="true"></mutation>
  4240. <field name="MODE">SET</field>
  4241. <field name="WHERE">FROM_START</field>
  4242. <value name="LIST">
  4243. <block type="variables_get">
  4244. <field name="VAR">list</field>
  4245. </block>
  4246. </value>
  4247. <value name="AT">
  4248. <block type="unittest_adjustindex">
  4249. <value name="INDEX">
  4250. <block type="math_number">
  4251. <field name="NUM">2</field>
  4252. </block>
  4253. </value>
  4254. </block>
  4255. </value>
  4256. <value name="TO">
  4257. <block type="text">
  4258. <field name="TEXT">Pulaski</field>
  4259. </block>
  4260. </value>
  4261. <next>
  4262. <block type="unittest_assertequals" inline="false">
  4263. <value name="MESSAGE">
  4264. <block type="text">
  4265. <field name="TEXT">set # list</field>
  4266. </block>
  4267. </value>
  4268. <value name="ACTUAL">
  4269. <block type="variables_get">
  4270. <field name="VAR">list</field>
  4271. </block>
  4272. </value>
  4273. <value name="EXPECTED">
  4274. <block type="lists_create_with" inline="true">
  4275. <mutation items="3"></mutation>
  4276. <value name="ADD0">
  4277. <block type="text">
  4278. <field name="TEXT">Picard</field>
  4279. </block>
  4280. </value>
  4281. <value name="ADD1">
  4282. <block type="text">
  4283. <field name="TEXT">Riker</field>
  4284. </block>
  4285. </value>
  4286. <value name="ADD2">
  4287. <block type="text">
  4288. <field name="TEXT">Pulaski</field>
  4289. </block>
  4290. </value>
  4291. </block>
  4292. </value>
  4293. <next>
  4294. <block type="variables_set" inline="false">
  4295. <field name="VAR">list</field>
  4296. <value name="VALUE">
  4297. <block type="lists_create_with" inline="true">
  4298. <mutation items="3"></mutation>
  4299. <value name="ADD0">
  4300. <block type="text">
  4301. <field name="TEXT">Picard</field>
  4302. </block>
  4303. </value>
  4304. <value name="ADD1">
  4305. <block type="text">
  4306. <field name="TEXT">Riker</field>
  4307. </block>
  4308. </value>
  4309. <value name="ADD2">
  4310. <block type="text">
  4311. <field name="TEXT">Crusher</field>
  4312. </block>
  4313. </value>
  4314. </block>
  4315. </value>
  4316. <next>
  4317. <block type="lists_setIndex">
  4318. <mutation at="true"></mutation>
  4319. <field name="MODE">SET</field>
  4320. <field name="WHERE">FROM_START</field>
  4321. <value name="LIST">
  4322. <block type="logic_ternary" inline="false">
  4323. <value name="IF">
  4324. <block type="logic_boolean">
  4325. <field name="BOOL">TRUE</field>
  4326. </block>
  4327. </value>
  4328. <value name="THEN">
  4329. <block type="variables_get">
  4330. <field name="VAR">list</field>
  4331. </block>
  4332. </value>
  4333. <value name="ELSE">
  4334. <block type="logic_null"></block>
  4335. </value>
  4336. </block>
  4337. </value>
  4338. <value name="AT">
  4339. <block type="logic_ternary" inline="false">
  4340. <value name="IF">
  4341. <block type="logic_boolean">
  4342. <field name="BOOL">TRUE</field>
  4343. </block>
  4344. </value>
  4345. <value name="THEN">
  4346. <block type="unittest_adjustindex">
  4347. <value name="INDEX">
  4348. <block type="math_number">
  4349. <field name="NUM">2</field>
  4350. </block>
  4351. </value>
  4352. </block>
  4353. </value>
  4354. <value name="ELSE">
  4355. <block type="logic_null"></block>
  4356. </value>
  4357. </block>
  4358. </value>
  4359. <value name="TO">
  4360. <block type="text">
  4361. <field name="TEXT">Pulaski</field>
  4362. </block>
  4363. </value>
  4364. <next>
  4365. <block type="unittest_assertequals" inline="false">
  4366. <value name="MESSAGE">
  4367. <block type="text">
  4368. <field name="TEXT">set # order list</field>
  4369. </block>
  4370. </value>
  4371. <value name="ACTUAL">
  4372. <block type="variables_get">
  4373. <field name="VAR">list</field>
  4374. </block>
  4375. </value>
  4376. <value name="EXPECTED">
  4377. <block type="lists_create_with" inline="true">
  4378. <mutation items="3"></mutation>
  4379. <value name="ADD0">
  4380. <block type="text">
  4381. <field name="TEXT">Picard</field>
  4382. </block>
  4383. </value>
  4384. <value name="ADD1">
  4385. <block type="text">
  4386. <field name="TEXT">Riker</field>
  4387. </block>
  4388. </value>
  4389. <value name="ADD2">
  4390. <block type="text">
  4391. <field name="TEXT">Pulaski</field>
  4392. </block>
  4393. </value>
  4394. </block>
  4395. </value>
  4396. <next>
  4397. <block type="variables_set" inline="false">
  4398. <field name="VAR">list</field>
  4399. <value name="VALUE">
  4400. <block type="lists_create_with" inline="true">
  4401. <mutation items="3"></mutation>
  4402. <value name="ADD0">
  4403. <block type="text">
  4404. <field name="TEXT">Picard</field>
  4405. </block>
  4406. </value>
  4407. <value name="ADD1">
  4408. <block type="text">
  4409. <field name="TEXT">Riker</field>
  4410. </block>
  4411. </value>
  4412. <value name="ADD2">
  4413. <block type="text">
  4414. <field name="TEXT">Crusher</field>
  4415. </block>
  4416. </value>
  4417. </block>
  4418. </value>
  4419. <next>
  4420. <block type="lists_setIndex">
  4421. <mutation at="true"></mutation>
  4422. <field name="MODE">SET</field>
  4423. <field name="WHERE">FROM_END</field>
  4424. <value name="LIST">
  4425. <block type="variables_get">
  4426. <field name="VAR">list</field>
  4427. </block>
  4428. </value>
  4429. <value name="AT">
  4430. <block type="unittest_adjustindex">
  4431. <value name="INDEX">
  4432. <block type="math_number">
  4433. <field name="NUM">0</field>
  4434. </block>
  4435. </value>
  4436. </block>
  4437. </value>
  4438. <value name="TO">
  4439. <block type="text">
  4440. <field name="TEXT">Pulaski</field>
  4441. </block>
  4442. </value>
  4443. <next>
  4444. <block type="unittest_assertequals" inline="false">
  4445. <value name="MESSAGE">
  4446. <block type="text">
  4447. <field name="TEXT">set #-end list</field>
  4448. </block>
  4449. </value>
  4450. <value name="ACTUAL">
  4451. <block type="variables_get">
  4452. <field name="VAR">list</field>
  4453. </block>
  4454. </value>
  4455. <value name="EXPECTED">
  4456. <block type="lists_create_with" inline="true">
  4457. <mutation items="3"></mutation>
  4458. <value name="ADD0">
  4459. <block type="text">
  4460. <field name="TEXT">Picard</field>
  4461. </block>
  4462. </value>
  4463. <value name="ADD1">
  4464. <block type="text">
  4465. <field name="TEXT">Riker</field>
  4466. </block>
  4467. </value>
  4468. <value name="ADD2">
  4469. <block type="text">
  4470. <field name="TEXT">Pulaski</field>
  4471. </block>
  4472. </value>
  4473. </block>
  4474. </value>
  4475. <next>
  4476. <block type="variables_set" inline="false">
  4477. <field name="VAR">list</field>
  4478. <value name="VALUE">
  4479. <block type="lists_create_with" inline="true">
  4480. <mutation items="3"></mutation>
  4481. <value name="ADD0">
  4482. <block type="text">
  4483. <field name="TEXT">Picard</field>
  4484. </block>
  4485. </value>
  4486. <value name="ADD1">
  4487. <block type="text">
  4488. <field name="TEXT">Riker</field>
  4489. </block>
  4490. </value>
  4491. <value name="ADD2">
  4492. <block type="text">
  4493. <field name="TEXT">Crusher</field>
  4494. </block>
  4495. </value>
  4496. </block>
  4497. </value>
  4498. <next>
  4499. <block type="lists_setIndex">
  4500. <mutation at="true"></mutation>
  4501. <field name="MODE">SET</field>
  4502. <field name="WHERE">FROM_END</field>
  4503. <comment pinned="false" h="88" w="258">The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index.</comment>
  4504. <value name="LIST">
  4505. <block type="logic_ternary" inline="true">
  4506. <value name="IF">
  4507. <block type="logic_boolean">
  4508. <field name="BOOL">TRUE</field>
  4509. </block>
  4510. </value>
  4511. <value name="THEN">
  4512. <block type="variables_get">
  4513. <field name="VAR">list</field>
  4514. </block>
  4515. </value>
  4516. <value name="ELSE">
  4517. <block type="logic_null"></block>
  4518. </value>
  4519. </block>
  4520. </value>
  4521. <value name="AT">
  4522. <block type="math_arithmetic">
  4523. <field name="OP">ADD</field>
  4524. <value name="A">
  4525. <block type="math_number">
  4526. <field name="NUM">0</field>
  4527. </block>
  4528. </value>
  4529. <value name="B">
  4530. <block type="unittest_adjustindex">
  4531. <value name="INDEX">
  4532. <block type="math_number">
  4533. <field name="NUM">1</field>
  4534. </block>
  4535. </value>
  4536. </block>
  4537. </value>
  4538. </block>
  4539. </value>
  4540. <value name="TO">
  4541. <block type="text">
  4542. <field name="TEXT">Pulaski</field>
  4543. </block>
  4544. </value>
  4545. <next>
  4546. <block type="unittest_assertequals" inline="false">
  4547. <value name="MESSAGE">
  4548. <block type="text">
  4549. <field name="TEXT">set #-end order list</field>
  4550. </block>
  4551. </value>
  4552. <value name="ACTUAL">
  4553. <block type="variables_get">
  4554. <field name="VAR">list</field>
  4555. </block>
  4556. </value>
  4557. <value name="EXPECTED">
  4558. <block type="lists_create_with" inline="true">
  4559. <mutation items="3"></mutation>
  4560. <value name="ADD0">
  4561. <block type="text">
  4562. <field name="TEXT">Picard</field>
  4563. </block>
  4564. </value>
  4565. <value name="ADD1">
  4566. <block type="text">
  4567. <field name="TEXT">Pulaski</field>
  4568. </block>
  4569. </value>
  4570. <value name="ADD2">
  4571. <block type="text">
  4572. <field name="TEXT">Crusher</field>
  4573. </block>
  4574. </value>
  4575. </block>
  4576. </value>
  4577. </block>
  4578. </next>
  4579. </block>
  4580. </next>
  4581. </block>
  4582. </next>
  4583. </block>
  4584. </next>
  4585. </block>
  4586. </next>
  4587. </block>
  4588. </next>
  4589. </block>
  4590. </next>
  4591. </block>
  4592. </next>
  4593. </block>
  4594. </next>
  4595. </block>
  4596. </next>
  4597. </block>
  4598. </next>
  4599. </block>
  4600. </next>
  4601. </block>
  4602. </next>
  4603. </block>
  4604. </next>
  4605. </block>
  4606. </next>
  4607. </block>
  4608. </next>
  4609. </block>
  4610. </next>
  4611. </block>
  4612. </next>
  4613. </block>
  4614. </next>
  4615. </block>
  4616. </next>
  4617. </block>
  4618. </next>
  4619. </block>
  4620. </next>
  4621. </block>
  4622. </next>
  4623. </block>
  4624. </next>
  4625. </block>
  4626. </next>
  4627. </block>
  4628. </next>
  4629. </block>
  4630. </next>
  4631. </block>
  4632. </next>
  4633. </block>
  4634. </next>
  4635. </block>
  4636. </statement>
  4637. </block>
  4638. <block type="procedures_defnoreturn" x="13" y="12538">
  4639. <field name="NAME">test insert</field>
  4640. <comment pinned="false" h="80" w="160">Tests the "insert" block.</comment>
  4641. <statement name="STACK">
  4642. <block type="variables_set" inline="false">
  4643. <field name="VAR">list</field>
  4644. <value name="VALUE">
  4645. <block type="lists_create_with" inline="true">
  4646. <mutation items="3"></mutation>
  4647. <value name="ADD0">
  4648. <block type="text">
  4649. <field name="TEXT">Picard</field>
  4650. </block>
  4651. </value>
  4652. <value name="ADD1">
  4653. <block type="text">
  4654. <field name="TEXT">Riker</field>
  4655. </block>
  4656. </value>
  4657. <value name="ADD2">
  4658. <block type="text">
  4659. <field name="TEXT">Crusher</field>
  4660. </block>
  4661. </value>
  4662. </block>
  4663. </value>
  4664. <next>
  4665. <block type="lists_setIndex">
  4666. <mutation at="false"></mutation>
  4667. <field name="MODE">INSERT</field>
  4668. <field name="WHERE">FIRST</field>
  4669. <value name="LIST">
  4670. <block type="variables_get">
  4671. <field name="VAR">list</field>
  4672. </block>
  4673. </value>
  4674. <value name="TO">
  4675. <block type="text">
  4676. <field name="TEXT">Data</field>
  4677. </block>
  4678. </value>
  4679. <next>
  4680. <block type="unittest_assertequals" inline="false">
  4681. <value name="MESSAGE">
  4682. <block type="text">
  4683. <field name="TEXT">insert first list</field>
  4684. </block>
  4685. </value>
  4686. <value name="ACTUAL">
  4687. <block type="variables_get">
  4688. <field name="VAR">list</field>
  4689. </block>
  4690. </value>
  4691. <value name="EXPECTED">
  4692. <block type="lists_create_with" inline="true">
  4693. <mutation items="4"></mutation>
  4694. <value name="ADD0">
  4695. <block type="text">
  4696. <field name="TEXT">Data</field>
  4697. </block>
  4698. </value>
  4699. <value name="ADD1">
  4700. <block type="text">
  4701. <field name="TEXT">Picard</field>
  4702. </block>
  4703. </value>
  4704. <value name="ADD2">
  4705. <block type="text">
  4706. <field name="TEXT">Riker</field>
  4707. </block>
  4708. </value>
  4709. <value name="ADD3">
  4710. <block type="text">
  4711. <field name="TEXT">Crusher</field>
  4712. </block>
  4713. </value>
  4714. </block>
  4715. </value>
  4716. <next>
  4717. <block type="variables_set" inline="false">
  4718. <field name="VAR">list</field>
  4719. <value name="VALUE">
  4720. <block type="lists_create_with" inline="true">
  4721. <mutation items="3"></mutation>
  4722. <value name="ADD0">
  4723. <block type="text">
  4724. <field name="TEXT">Picard</field>
  4725. </block>
  4726. </value>
  4727. <value name="ADD1">
  4728. <block type="text">
  4729. <field name="TEXT">Riker</field>
  4730. </block>
  4731. </value>
  4732. <value name="ADD2">
  4733. <block type="text">
  4734. <field name="TEXT">Crusher</field>
  4735. </block>
  4736. </value>
  4737. </block>
  4738. </value>
  4739. <next>
  4740. <block type="lists_setIndex">
  4741. <mutation at="false"></mutation>
  4742. <field name="MODE">INSERT</field>
  4743. <field name="WHERE">FIRST</field>
  4744. <value name="LIST">
  4745. <block type="logic_ternary" inline="true">
  4746. <value name="IF">
  4747. <block type="logic_boolean">
  4748. <field name="BOOL">TRUE</field>
  4749. </block>
  4750. </value>
  4751. <value name="THEN">
  4752. <block type="variables_get">
  4753. <field name="VAR">list</field>
  4754. </block>
  4755. </value>
  4756. <value name="ELSE">
  4757. <block type="logic_null"></block>
  4758. </value>
  4759. </block>
  4760. </value>
  4761. <value name="TO">
  4762. <block type="text">
  4763. <field name="TEXT">Data</field>
  4764. </block>
  4765. </value>
  4766. <next>
  4767. <block type="unittest_assertequals" inline="false">
  4768. <value name="MESSAGE">
  4769. <block type="text">
  4770. <field name="TEXT">insert first order list</field>
  4771. </block>
  4772. </value>
  4773. <value name="ACTUAL">
  4774. <block type="variables_get">
  4775. <field name="VAR">list</field>
  4776. </block>
  4777. </value>
  4778. <value name="EXPECTED">
  4779. <block type="lists_create_with" inline="true">
  4780. <mutation items="4"></mutation>
  4781. <value name="ADD0">
  4782. <block type="text">
  4783. <field name="TEXT">Data</field>
  4784. </block>
  4785. </value>
  4786. <value name="ADD1">
  4787. <block type="text">
  4788. <field name="TEXT">Picard</field>
  4789. </block>
  4790. </value>
  4791. <value name="ADD2">
  4792. <block type="text">
  4793. <field name="TEXT">Riker</field>
  4794. </block>
  4795. </value>
  4796. <value name="ADD3">
  4797. <block type="text">
  4798. <field name="TEXT">Crusher</field>
  4799. </block>
  4800. </value>
  4801. </block>
  4802. </value>
  4803. <next>
  4804. <block type="variables_set" inline="false">
  4805. <field name="VAR">list</field>
  4806. <value name="VALUE">
  4807. <block type="lists_create_with" inline="true">
  4808. <mutation items="3"></mutation>
  4809. <value name="ADD0">
  4810. <block type="text">
  4811. <field name="TEXT">Picard</field>
  4812. </block>
  4813. </value>
  4814. <value name="ADD1">
  4815. <block type="text">
  4816. <field name="TEXT">Riker</field>
  4817. </block>
  4818. </value>
  4819. <value name="ADD2">
  4820. <block type="text">
  4821. <field name="TEXT">Crusher</field>
  4822. </block>
  4823. </value>
  4824. </block>
  4825. </value>
  4826. <next>
  4827. <block type="lists_setIndex">
  4828. <mutation at="false"></mutation>
  4829. <field name="MODE">INSERT</field>
  4830. <field name="WHERE">LAST</field>
  4831. <value name="LIST">
  4832. <block type="variables_get">
  4833. <field name="VAR">list</field>
  4834. </block>
  4835. </value>
  4836. <value name="TO">
  4837. <block type="text">
  4838. <field name="TEXT">Data</field>
  4839. </block>
  4840. </value>
  4841. <next>
  4842. <block type="unittest_assertequals" inline="false">
  4843. <value name="MESSAGE">
  4844. <block type="text">
  4845. <field name="TEXT">insert last list</field>
  4846. </block>
  4847. </value>
  4848. <value name="ACTUAL">
  4849. <block type="variables_get">
  4850. <field name="VAR">list</field>
  4851. </block>
  4852. </value>
  4853. <value name="EXPECTED">
  4854. <block type="lists_create_with" inline="true">
  4855. <mutation items="4"></mutation>
  4856. <value name="ADD0">
  4857. <block type="text">
  4858. <field name="TEXT">Picard</field>
  4859. </block>
  4860. </value>
  4861. <value name="ADD1">
  4862. <block type="text">
  4863. <field name="TEXT">Riker</field>
  4864. </block>
  4865. </value>
  4866. <value name="ADD2">
  4867. <block type="text">
  4868. <field name="TEXT">Crusher</field>
  4869. </block>
  4870. </value>
  4871. <value name="ADD3">
  4872. <block type="text">
  4873. <field name="TEXT">Data</field>
  4874. </block>
  4875. </value>
  4876. </block>
  4877. </value>
  4878. <next>
  4879. <block type="variables_set" inline="false">
  4880. <field name="VAR">list</field>
  4881. <value name="VALUE">
  4882. <block type="lists_create_with" inline="true">
  4883. <mutation items="3"></mutation>
  4884. <value name="ADD0">
  4885. <block type="text">
  4886. <field name="TEXT">Picard</field>
  4887. </block>
  4888. </value>
  4889. <value name="ADD1">
  4890. <block type="text">
  4891. <field name="TEXT">Riker</field>
  4892. </block>
  4893. </value>
  4894. <value name="ADD2">
  4895. <block type="text">
  4896. <field name="TEXT">Crusher</field>
  4897. </block>
  4898. </value>
  4899. </block>
  4900. </value>
  4901. <next>
  4902. <block type="lists_setIndex">
  4903. <mutation at="false"></mutation>
  4904. <field name="MODE">INSERT</field>
  4905. <field name="WHERE">LAST</field>
  4906. <value name="LIST">
  4907. <block type="logic_ternary" inline="true">
  4908. <value name="IF">
  4909. <block type="logic_boolean">
  4910. <field name="BOOL">TRUE</field>
  4911. </block>
  4912. </value>
  4913. <value name="THEN">
  4914. <block type="variables_get">
  4915. <field name="VAR">list</field>
  4916. </block>
  4917. </value>
  4918. <value name="ELSE">
  4919. <block type="logic_null"></block>
  4920. </value>
  4921. </block>
  4922. </value>
  4923. <value name="TO">
  4924. <block type="text">
  4925. <field name="TEXT">Data</field>
  4926. </block>
  4927. </value>
  4928. <next>
  4929. <block type="unittest_assertequals" inline="false">
  4930. <value name="MESSAGE">
  4931. <block type="text">
  4932. <field name="TEXT">insert last order list</field>
  4933. </block>
  4934. </value>
  4935. <value name="ACTUAL">
  4936. <block type="variables_get">
  4937. <field name="VAR">list</field>
  4938. </block>
  4939. </value>
  4940. <value name="EXPECTED">
  4941. <block type="lists_create_with" inline="true">
  4942. <mutation items="4"></mutation>
  4943. <value name="ADD0">
  4944. <block type="text">
  4945. <field name="TEXT">Picard</field>
  4946. </block>
  4947. </value>
  4948. <value name="ADD1">
  4949. <block type="text">
  4950. <field name="TEXT">Riker</field>
  4951. </block>
  4952. </value>
  4953. <value name="ADD2">
  4954. <block type="text">
  4955. <field name="TEXT">Crusher</field>
  4956. </block>
  4957. </value>
  4958. <value name="ADD3">
  4959. <block type="text">
  4960. <field name="TEXT">Data</field>
  4961. </block>
  4962. </value>
  4963. </block>
  4964. </value>
  4965. <next>
  4966. <block type="variables_set" inline="false">
  4967. <field name="VAR">list</field>
  4968. <value name="VALUE">
  4969. <block type="lists_create_with" inline="true">
  4970. <mutation items="3"></mutation>
  4971. <value name="ADD0">
  4972. <block type="text">
  4973. <field name="TEXT">Picard</field>
  4974. </block>
  4975. </value>
  4976. <value name="ADD1">
  4977. <block type="text">
  4978. <field name="TEXT">Riker</field>
  4979. </block>
  4980. </value>
  4981. <value name="ADD2">
  4982. <block type="text">
  4983. <field name="TEXT">Crusher</field>
  4984. </block>
  4985. </value>
  4986. </block>
  4987. </value>
  4988. <next>
  4989. <block type="lists_setIndex">
  4990. <mutation at="false"></mutation>
  4991. <field name="MODE">INSERT</field>
  4992. <field name="WHERE">RANDOM</field>
  4993. <value name="LIST">
  4994. <block type="variables_get">
  4995. <field name="VAR">list</field>
  4996. </block>
  4997. </value>
  4998. <value name="TO">
  4999. <block type="text">
  5000. <field name="TEXT">Data</field>
  5001. </block>
  5002. </value>
  5003. <next>
  5004. <block type="unittest_assertequals" inline="false">
  5005. <value name="MESSAGE">
  5006. <block type="text">
  5007. <field name="TEXT">insert random list</field>
  5008. </block>
  5009. </value>
  5010. <value name="ACTUAL">
  5011. <block type="lists_length" inline="false">
  5012. <value name="VALUE">
  5013. <block type="variables_get">
  5014. <field name="VAR">list</field>
  5015. </block>
  5016. </value>
  5017. </block>
  5018. </value>
  5019. <value name="EXPECTED">
  5020. <block type="math_number">
  5021. <field name="NUM">4</field>
  5022. </block>
  5023. </value>
  5024. <next>
  5025. <block type="variables_set" inline="false">
  5026. <field name="VAR">list</field>
  5027. <value name="VALUE">
  5028. <block type="lists_create_with" inline="true">
  5029. <mutation items="3"></mutation>
  5030. <value name="ADD0">
  5031. <block type="text">
  5032. <field name="TEXT">Picard</field>
  5033. </block>
  5034. </value>
  5035. <value name="ADD1">
  5036. <block type="text">
  5037. <field name="TEXT">Riker</field>
  5038. </block>
  5039. </value>
  5040. <value name="ADD2">
  5041. <block type="text">
  5042. <field name="TEXT">Crusher</field>
  5043. </block>
  5044. </value>
  5045. </block>
  5046. </value>
  5047. <next>
  5048. <block type="lists_setIndex">
  5049. <mutation at="false"></mutation>
  5050. <field name="MODE">INSERT</field>
  5051. <field name="WHERE">RANDOM</field>
  5052. <value name="LIST">
  5053. <block type="logic_ternary" inline="true">
  5054. <value name="IF">
  5055. <block type="logic_boolean">
  5056. <field name="BOOL">TRUE</field>
  5057. </block>
  5058. </value>
  5059. <value name="THEN">
  5060. <block type="variables_get">
  5061. <field name="VAR">list</field>
  5062. </block>
  5063. </value>
  5064. <value name="ELSE">
  5065. <block type="logic_null"></block>
  5066. </value>
  5067. </block>
  5068. </value>
  5069. <value name="TO">
  5070. <block type="text">
  5071. <field name="TEXT">Data</field>
  5072. </block>
  5073. </value>
  5074. <next>
  5075. <block type="unittest_assertequals" inline="false">
  5076. <value name="MESSAGE">
  5077. <block type="text">
  5078. <field name="TEXT">insert random order list</field>
  5079. </block>
  5080. </value>
  5081. <value name="ACTUAL">
  5082. <block type="lists_length" inline="false">
  5083. <value name="VALUE">
  5084. <block type="variables_get">
  5085. <field name="VAR">list</field>
  5086. </block>
  5087. </value>
  5088. </block>
  5089. </value>
  5090. <value name="EXPECTED">
  5091. <block type="math_number">
  5092. <field name="NUM">4</field>
  5093. </block>
  5094. </value>
  5095. <next>
  5096. <block type="variables_set" inline="false">
  5097. <field name="VAR">list</field>
  5098. <value name="VALUE">
  5099. <block type="lists_create_with" inline="true">
  5100. <mutation items="3"></mutation>
  5101. <value name="ADD0">
  5102. <block type="text">
  5103. <field name="TEXT">Picard</field>
  5104. </block>
  5105. </value>
  5106. <value name="ADD1">
  5107. <block type="text">
  5108. <field name="TEXT">Riker</field>
  5109. </block>
  5110. </value>
  5111. <value name="ADD2">
  5112. <block type="text">
  5113. <field name="TEXT">Crusher</field>
  5114. </block>
  5115. </value>
  5116. </block>
  5117. </value>
  5118. <next>
  5119. <block type="lists_setIndex">
  5120. <mutation at="true"></mutation>
  5121. <field name="MODE">INSERT</field>
  5122. <field name="WHERE">FROM_START</field>
  5123. <value name="LIST">
  5124. <block type="variables_get">
  5125. <field name="VAR">list</field>
  5126. </block>
  5127. </value>
  5128. <value name="AT">
  5129. <block type="unittest_adjustindex">
  5130. <value name="INDEX">
  5131. <block type="math_number">
  5132. <field name="NUM">2</field>
  5133. </block>
  5134. </value>
  5135. </block>
  5136. </value>
  5137. <value name="TO">
  5138. <block type="text">
  5139. <field name="TEXT">Data</field>
  5140. </block>
  5141. </value>
  5142. <next>
  5143. <block type="unittest_assertequals" inline="false">
  5144. <value name="MESSAGE">
  5145. <block type="text">
  5146. <field name="TEXT">insert # list</field>
  5147. </block>
  5148. </value>
  5149. <value name="ACTUAL">
  5150. <block type="variables_get">
  5151. <field name="VAR">list</field>
  5152. </block>
  5153. </value>
  5154. <value name="EXPECTED">
  5155. <block type="lists_create_with" inline="true">
  5156. <mutation items="4"></mutation>
  5157. <value name="ADD0">
  5158. <block type="text">
  5159. <field name="TEXT">Picard</field>
  5160. </block>
  5161. </value>
  5162. <value name="ADD1">
  5163. <block type="text">
  5164. <field name="TEXT">Riker</field>
  5165. </block>
  5166. </value>
  5167. <value name="ADD2">
  5168. <block type="text">
  5169. <field name="TEXT">Data</field>
  5170. </block>
  5171. </value>
  5172. <value name="ADD3">
  5173. <block type="text">
  5174. <field name="TEXT">Crusher</field>
  5175. </block>
  5176. </value>
  5177. </block>
  5178. </value>
  5179. <next>
  5180. <block type="variables_set" inline="false">
  5181. <field name="VAR">list</field>
  5182. <value name="VALUE">
  5183. <block type="lists_create_with" inline="true">
  5184. <mutation items="3"></mutation>
  5185. <value name="ADD0">
  5186. <block type="text">
  5187. <field name="TEXT">Picard</field>
  5188. </block>
  5189. </value>
  5190. <value name="ADD1">
  5191. <block type="text">
  5192. <field name="TEXT">Riker</field>
  5193. </block>
  5194. </value>
  5195. <value name="ADD2">
  5196. <block type="text">
  5197. <field name="TEXT">Crusher</field>
  5198. </block>
  5199. </value>
  5200. </block>
  5201. </value>
  5202. <next>
  5203. <block type="lists_setIndex">
  5204. <mutation at="true"></mutation>
  5205. <field name="MODE">INSERT</field>
  5206. <field name="WHERE">FROM_START</field>
  5207. <value name="LIST">
  5208. <block type="logic_ternary" inline="false">
  5209. <value name="IF">
  5210. <block type="logic_boolean">
  5211. <field name="BOOL">TRUE</field>
  5212. </block>
  5213. </value>
  5214. <value name="THEN">
  5215. <block type="variables_get">
  5216. <field name="VAR">list</field>
  5217. </block>
  5218. </value>
  5219. <value name="ELSE">
  5220. <block type="logic_null"></block>
  5221. </value>
  5222. </block>
  5223. </value>
  5224. <value name="AT">
  5225. <block type="logic_ternary">
  5226. <value name="IF">
  5227. <block type="logic_boolean">
  5228. <field name="BOOL">TRUE</field>
  5229. </block>
  5230. </value>
  5231. <value name="THEN">
  5232. <block type="unittest_adjustindex">
  5233. <value name="INDEX">
  5234. <block type="math_number">
  5235. <field name="NUM">2</field>
  5236. </block>
  5237. </value>
  5238. </block>
  5239. </value>
  5240. <value name="ELSE">
  5241. <block type="logic_null"></block>
  5242. </value>
  5243. </block>
  5244. </value>
  5245. <value name="TO">
  5246. <block type="text">
  5247. <field name="TEXT">Data</field>
  5248. </block>
  5249. </value>
  5250. <next>
  5251. <block type="unittest_assertequals" inline="false">
  5252. <value name="MESSAGE">
  5253. <block type="text">
  5254. <field name="TEXT">insert # order list</field>
  5255. </block>
  5256. </value>
  5257. <value name="ACTUAL">
  5258. <block type="variables_get">
  5259. <field name="VAR">list</field>
  5260. </block>
  5261. </value>
  5262. <value name="EXPECTED">
  5263. <block type="lists_create_with" inline="true">
  5264. <mutation items="4"></mutation>
  5265. <value name="ADD0">
  5266. <block type="text">
  5267. <field name="TEXT">Picard</field>
  5268. </block>
  5269. </value>
  5270. <value name="ADD1">
  5271. <block type="text">
  5272. <field name="TEXT">Riker</field>
  5273. </block>
  5274. </value>
  5275. <value name="ADD2">
  5276. <block type="text">
  5277. <field name="TEXT">Data</field>
  5278. </block>
  5279. </value>
  5280. <value name="ADD3">
  5281. <block type="text">
  5282. <field name="TEXT">Crusher</field>
  5283. </block>
  5284. </value>
  5285. </block>
  5286. </value>
  5287. <next>
  5288. <block type="variables_set" inline="false">
  5289. <field name="VAR">list</field>
  5290. <value name="VALUE">
  5291. <block type="lists_create_with" inline="true">
  5292. <mutation items="3"></mutation>
  5293. <value name="ADD0">
  5294. <block type="text">
  5295. <field name="TEXT">Picard</field>
  5296. </block>
  5297. </value>
  5298. <value name="ADD1">
  5299. <block type="text">
  5300. <field name="TEXT">Riker</field>
  5301. </block>
  5302. </value>
  5303. <value name="ADD2">
  5304. <block type="text">
  5305. <field name="TEXT">Crusher</field>
  5306. </block>
  5307. </value>
  5308. </block>
  5309. </value>
  5310. <next>
  5311. <block type="lists_setIndex">
  5312. <mutation at="true"></mutation>
  5313. <field name="MODE">INSERT</field>
  5314. <field name="WHERE">FROM_END</field>
  5315. <value name="LIST">
  5316. <block type="variables_get">
  5317. <field name="VAR">list</field>
  5318. </block>
  5319. </value>
  5320. <value name="AT">
  5321. <block type="unittest_adjustindex">
  5322. <value name="INDEX">
  5323. <block type="math_number">
  5324. <field name="NUM">0</field>
  5325. </block>
  5326. </value>
  5327. </block>
  5328. </value>
  5329. <value name="TO">
  5330. <block type="text">
  5331. <field name="TEXT">Data</field>
  5332. </block>
  5333. </value>
  5334. <next>
  5335. <block type="unittest_assertequals" inline="false">
  5336. <value name="MESSAGE">
  5337. <block type="text">
  5338. <field name="TEXT">insert #-end list</field>
  5339. </block>
  5340. </value>
  5341. <value name="ACTUAL">
  5342. <block type="variables_get">
  5343. <field name="VAR">list</field>
  5344. </block>
  5345. </value>
  5346. <value name="EXPECTED">
  5347. <block type="lists_create_with" inline="true">
  5348. <mutation items="4"></mutation>
  5349. <value name="ADD0">
  5350. <block type="text">
  5351. <field name="TEXT">Picard</field>
  5352. </block>
  5353. </value>
  5354. <value name="ADD1">
  5355. <block type="text">
  5356. <field name="TEXT">Riker</field>
  5357. </block>
  5358. </value>
  5359. <value name="ADD2">
  5360. <block type="text">
  5361. <field name="TEXT">Data</field>
  5362. </block>
  5363. </value>
  5364. <value name="ADD3">
  5365. <block type="text">
  5366. <field name="TEXT">Crusher</field>
  5367. </block>
  5368. </value>
  5369. </block>
  5370. </value>
  5371. <next>
  5372. <block type="variables_set" inline="false">
  5373. <field name="VAR">list</field>
  5374. <value name="VALUE">
  5375. <block type="lists_create_with" inline="true">
  5376. <mutation items="3"></mutation>
  5377. <value name="ADD0">
  5378. <block type="text">
  5379. <field name="TEXT">Picard</field>
  5380. </block>
  5381. </value>
  5382. <value name="ADD1">
  5383. <block type="text">
  5384. <field name="TEXT">Riker</field>
  5385. </block>
  5386. </value>
  5387. <value name="ADD2">
  5388. <block type="text">
  5389. <field name="TEXT">Crusher</field>
  5390. </block>
  5391. </value>
  5392. </block>
  5393. </value>
  5394. <next>
  5395. <block type="lists_setIndex">
  5396. <mutation at="true"></mutation>
  5397. <field name="MODE">INSERT</field>
  5398. <field name="WHERE">FROM_END</field>
  5399. <comment pinned="false" h="77" w="263">The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index.</comment>
  5400. <value name="LIST">
  5401. <block type="logic_ternary" inline="true">
  5402. <value name="IF">
  5403. <block type="logic_boolean">
  5404. <field name="BOOL">TRUE</field>
  5405. </block>
  5406. </value>
  5407. <value name="THEN">
  5408. <block type="variables_get">
  5409. <field name="VAR">list</field>
  5410. </block>
  5411. </value>
  5412. <value name="ELSE">
  5413. <block type="logic_null"></block>
  5414. </value>
  5415. </block>
  5416. </value>
  5417. <value name="AT">
  5418. <block type="math_arithmetic">
  5419. <field name="OP">ADD</field>
  5420. <value name="A">
  5421. <block type="math_number">
  5422. <field name="NUM">0</field>
  5423. </block>
  5424. </value>
  5425. <value name="B">
  5426. <block type="unittest_adjustindex">
  5427. <value name="INDEX">
  5428. <block type="math_number">
  5429. <field name="NUM">1</field>
  5430. </block>
  5431. </value>
  5432. </block>
  5433. </value>
  5434. </block>
  5435. </value>
  5436. <value name="TO">
  5437. <block type="text">
  5438. <field name="TEXT">Data</field>
  5439. </block>
  5440. </value>
  5441. <next>
  5442. <block type="unittest_assertequals" inline="false">
  5443. <value name="MESSAGE">
  5444. <block type="text">
  5445. <field name="TEXT">insert #-end order list</field>
  5446. </block>
  5447. </value>
  5448. <value name="ACTUAL">
  5449. <block type="variables_get">
  5450. <field name="VAR">list</field>
  5451. </block>
  5452. </value>
  5453. <value name="EXPECTED">
  5454. <block type="lists_create_with" inline="true">
  5455. <mutation items="4"></mutation>
  5456. <value name="ADD0">
  5457. <block type="text">
  5458. <field name="TEXT">Picard</field>
  5459. </block>
  5460. </value>
  5461. <value name="ADD1">
  5462. <block type="text">
  5463. <field name="TEXT">Data</field>
  5464. </block>
  5465. </value>
  5466. <value name="ADD2">
  5467. <block type="text">
  5468. <field name="TEXT">Riker</field>
  5469. </block>
  5470. </value>
  5471. <value name="ADD3">
  5472. <block type="text">
  5473. <field name="TEXT">Crusher</field>
  5474. </block>
  5475. </value>
  5476. </block>
  5477. </value>
  5478. </block>
  5479. </next>
  5480. </block>
  5481. </next>
  5482. </block>
  5483. </next>
  5484. </block>
  5485. </next>
  5486. </block>
  5487. </next>
  5488. </block>
  5489. </next>
  5490. </block>
  5491. </next>
  5492. </block>
  5493. </next>
  5494. </block>
  5495. </next>
  5496. </block>
  5497. </next>
  5498. </block>
  5499. </next>
  5500. </block>
  5501. </next>
  5502. </block>
  5503. </next>
  5504. </block>
  5505. </next>
  5506. </block>
  5507. </next>
  5508. </block>
  5509. </next>
  5510. </block>
  5511. </next>
  5512. </block>
  5513. </next>
  5514. </block>
  5515. </next>
  5516. </block>
  5517. </next>
  5518. </block>
  5519. </next>
  5520. </block>
  5521. </next>
  5522. </block>
  5523. </next>
  5524. </block>
  5525. </next>
  5526. </block>
  5527. </next>
  5528. </block>
  5529. </next>
  5530. </block>
  5531. </next>
  5532. </block>
  5533. </next>
  5534. </block>
  5535. </next>
  5536. </block>
  5537. </statement>
  5538. </block>
  5539. <block type="procedures_defnoreturn" x="13" y="14363">
  5540. <field name="NAME">test sublist simple</field>
  5541. <comment pinned="false" h="80" w="160">Tests the "get sub-list" block with a variable.</comment>
  5542. <statement name="STACK">
  5543. <block type="variables_set" inline="false">
  5544. <field name="VAR">list</field>
  5545. <value name="VALUE">
  5546. <block type="lists_create_with" inline="true">
  5547. <mutation items="5"></mutation>
  5548. <value name="ADD0">
  5549. <block type="text">
  5550. <field name="TEXT">Columbia</field>
  5551. </block>
  5552. </value>
  5553. <value name="ADD1">
  5554. <block type="text">
  5555. <field name="TEXT">Challenger</field>
  5556. </block>
  5557. </value>
  5558. <value name="ADD2">
  5559. <block type="text">
  5560. <field name="TEXT">Discovery</field>
  5561. </block>
  5562. </value>
  5563. <value name="ADD3">
  5564. <block type="text">
  5565. <field name="TEXT">Atlantis</field>
  5566. </block>
  5567. </value>
  5568. <value name="ADD4">
  5569. <block type="text">
  5570. <field name="TEXT">Endeavour</field>
  5571. </block>
  5572. </value>
  5573. </block>
  5574. </value>
  5575. <next>
  5576. <block type="unittest_assertequals" inline="false">
  5577. <value name="MESSAGE">
  5578. <block type="text">
  5579. <field name="TEXT">sublist # simple</field>
  5580. </block>
  5581. </value>
  5582. <value name="ACTUAL">
  5583. <block type="lists_getSublist">
  5584. <mutation at1="true" at2="true"></mutation>
  5585. <field name="WHERE1">FROM_START</field>
  5586. <field name="WHERE2">FROM_START</field>
  5587. <value name="LIST">
  5588. <block type="variables_get">
  5589. <field name="VAR">list</field>
  5590. </block>
  5591. </value>
  5592. <value name="AT1">
  5593. <block type="unittest_adjustindex">
  5594. <value name="INDEX">
  5595. <block type="math_number">
  5596. <field name="NUM">1</field>
  5597. </block>
  5598. </value>
  5599. </block>
  5600. </value>
  5601. <value name="AT2">
  5602. <block type="unittest_adjustindex">
  5603. <value name="INDEX">
  5604. <block type="math_number">
  5605. <field name="NUM">2</field>
  5606. </block>
  5607. </value>
  5608. </block>
  5609. </value>
  5610. </block>
  5611. </value>
  5612. <value name="EXPECTED">
  5613. <block type="lists_create_with" inline="true">
  5614. <mutation items="2"></mutation>
  5615. <value name="ADD0">
  5616. <block type="text">
  5617. <field name="TEXT">Challenger</field>
  5618. </block>
  5619. </value>
  5620. <value name="ADD1">
  5621. <block type="text">
  5622. <field name="TEXT">Discovery</field>
  5623. </block>
  5624. </value>
  5625. </block>
  5626. </value>
  5627. <next>
  5628. <block type="unittest_assertequals" inline="false">
  5629. <value name="MESSAGE">
  5630. <block type="text">
  5631. <field name="TEXT">sublist # simple order</field>
  5632. </block>
  5633. </value>
  5634. <value name="ACTUAL">
  5635. <block type="lists_getSublist">
  5636. <mutation at1="true" at2="true"></mutation>
  5637. <field name="WHERE1">FROM_START</field>
  5638. <field name="WHERE2">FROM_START</field>
  5639. <value name="LIST">
  5640. <block type="variables_get">
  5641. <field name="VAR">list</field>
  5642. </block>
  5643. </value>
  5644. <value name="AT1">
  5645. <block type="logic_ternary">
  5646. <value name="IF">
  5647. <block type="logic_boolean">
  5648. <field name="BOOL">TRUE</field>
  5649. </block>
  5650. </value>
  5651. <value name="THEN">
  5652. <block type="unittest_adjustindex">
  5653. <value name="INDEX">
  5654. <block type="math_number">
  5655. <field name="NUM">1</field>
  5656. </block>
  5657. </value>
  5658. </block>
  5659. </value>
  5660. <value name="ELSE">
  5661. <block type="logic_null"></block>
  5662. </value>
  5663. </block>
  5664. </value>
  5665. <value name="AT2">
  5666. <block type="logic_ternary">
  5667. <value name="IF">
  5668. <block type="logic_boolean">
  5669. <field name="BOOL">TRUE</field>
  5670. </block>
  5671. </value>
  5672. <value name="THEN">
  5673. <block type="unittest_adjustindex">
  5674. <value name="INDEX">
  5675. <block type="math_number">
  5676. <field name="NUM">2</field>
  5677. </block>
  5678. </value>
  5679. </block>
  5680. </value>
  5681. <value name="ELSE">
  5682. <block type="logic_null"></block>
  5683. </value>
  5684. </block>
  5685. </value>
  5686. </block>
  5687. </value>
  5688. <value name="EXPECTED">
  5689. <block type="lists_create_with" inline="true">
  5690. <mutation items="2"></mutation>
  5691. <value name="ADD0">
  5692. <block type="text">
  5693. <field name="TEXT">Challenger</field>
  5694. </block>
  5695. </value>
  5696. <value name="ADD1">
  5697. <block type="text">
  5698. <field name="TEXT">Discovery</field>
  5699. </block>
  5700. </value>
  5701. </block>
  5702. </value>
  5703. <next>
  5704. <block type="unittest_assertequals" inline="false">
  5705. <value name="MESSAGE">
  5706. <block type="text">
  5707. <field name="TEXT">sublist #-end simple</field>
  5708. </block>
  5709. </value>
  5710. <value name="ACTUAL">
  5711. <block type="lists_getSublist">
  5712. <mutation at1="true" at2="true"></mutation>
  5713. <field name="WHERE1">FROM_END</field>
  5714. <field name="WHERE2">FROM_END</field>
  5715. <value name="LIST">
  5716. <block type="variables_get">
  5717. <field name="VAR">list</field>
  5718. </block>
  5719. </value>
  5720. <value name="AT1">
  5721. <block type="unittest_adjustindex">
  5722. <value name="INDEX">
  5723. <block type="math_number">
  5724. <field name="NUM">2</field>
  5725. </block>
  5726. </value>
  5727. </block>
  5728. </value>
  5729. <value name="AT2">
  5730. <block type="unittest_adjustindex">
  5731. <value name="INDEX">
  5732. <block type="math_number">
  5733. <field name="NUM">1</field>
  5734. </block>
  5735. </value>
  5736. </block>
  5737. </value>
  5738. </block>
  5739. </value>
  5740. <value name="EXPECTED">
  5741. <block type="lists_create_with" inline="true">
  5742. <mutation items="2"></mutation>
  5743. <value name="ADD0">
  5744. <block type="text">
  5745. <field name="TEXT">Discovery</field>
  5746. </block>
  5747. </value>
  5748. <value name="ADD1">
  5749. <block type="text">
  5750. <field name="TEXT">Atlantis</field>
  5751. </block>
  5752. </value>
  5753. </block>
  5754. </value>
  5755. <next>
  5756. <block type="unittest_assertequals" inline="false">
  5757. <value name="MESSAGE">
  5758. <block type="text">
  5759. <field name="TEXT">sublist #-end simple order</field>
  5760. </block>
  5761. </value>
  5762. <value name="ACTUAL">
  5763. <block type="lists_getSublist">
  5764. <mutation at1="true" at2="true"></mutation>
  5765. <field name="WHERE1">FROM_END</field>
  5766. <field name="WHERE2">FROM_END</field>
  5767. <comment pinned="false" h="80" w="265">The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index.</comment>
  5768. <value name="LIST">
  5769. <block type="variables_get">
  5770. <field name="VAR">list</field>
  5771. </block>
  5772. </value>
  5773. <value name="AT1">
  5774. <block type="math_arithmetic">
  5775. <field name="OP">ADD</field>
  5776. <value name="A">
  5777. <block type="math_number">
  5778. <field name="NUM">0</field>
  5779. </block>
  5780. </value>
  5781. <value name="B">
  5782. <block type="unittest_adjustindex">
  5783. <value name="INDEX">
  5784. <block type="math_number">
  5785. <field name="NUM">2</field>
  5786. </block>
  5787. </value>
  5788. </block>
  5789. </value>
  5790. </block>
  5791. </value>
  5792. <value name="AT2">
  5793. <block type="math_arithmetic">
  5794. <field name="OP">ADD</field>
  5795. <value name="A">
  5796. <block type="math_number">
  5797. <field name="NUM">0</field>
  5798. </block>
  5799. </value>
  5800. <value name="B">
  5801. <block type="unittest_adjustindex">
  5802. <value name="INDEX">
  5803. <block type="math_number">
  5804. <field name="NUM">1</field>
  5805. </block>
  5806. </value>
  5807. </block>
  5808. </value>
  5809. </block>
  5810. </value>
  5811. </block>
  5812. </value>
  5813. <value name="EXPECTED">
  5814. <block type="lists_create_with" inline="true">
  5815. <mutation items="2"></mutation>
  5816. <value name="ADD0">
  5817. <block type="text">
  5818. <field name="TEXT">Discovery</field>
  5819. </block>
  5820. </value>
  5821. <value name="ADD1">
  5822. <block type="text">
  5823. <field name="TEXT">Atlantis</field>
  5824. </block>
  5825. </value>
  5826. </block>
  5827. </value>
  5828. <next>
  5829. <block type="unittest_assertequals" inline="false">
  5830. <value name="MESSAGE">
  5831. <block type="text">
  5832. <field name="TEXT">sublist first-last simple</field>
  5833. </block>
  5834. </value>
  5835. <value name="ACTUAL">
  5836. <block type="lists_getSublist">
  5837. <mutation at1="false" at2="false"></mutation>
  5838. <field name="WHERE1">FIRST</field>
  5839. <field name="WHERE2">LAST</field>
  5840. <value name="LIST">
  5841. <block type="variables_get">
  5842. <field name="VAR">list</field>
  5843. </block>
  5844. </value>
  5845. </block>
  5846. </value>
  5847. <value name="EXPECTED">
  5848. <block type="variables_get">
  5849. <field name="VAR">list</field>
  5850. </block>
  5851. </value>
  5852. <next>
  5853. <block type="variables_set">
  5854. <field name="VAR">changing list</field>
  5855. <value name="VALUE">
  5856. <block type="lists_create_with" inline="true">
  5857. <mutation items="5"></mutation>
  5858. <value name="ADD0">
  5859. <block type="text">
  5860. <field name="TEXT">Columbia</field>
  5861. </block>
  5862. </value>
  5863. <value name="ADD1">
  5864. <block type="text">
  5865. <field name="TEXT">Challenger</field>
  5866. </block>
  5867. </value>
  5868. <value name="ADD2">
  5869. <block type="text">
  5870. <field name="TEXT">Discovery</field>
  5871. </block>
  5872. </value>
  5873. <value name="ADD3">
  5874. <block type="text">
  5875. <field name="TEXT">Atlantis</field>
  5876. </block>
  5877. </value>
  5878. <value name="ADD4">
  5879. <block type="text">
  5880. <field name="TEXT">Endeavour</field>
  5881. </block>
  5882. </value>
  5883. </block>
  5884. </value>
  5885. <next>
  5886. <block type="variables_set">
  5887. <field name="VAR">list copy</field>
  5888. <value name="VALUE">
  5889. <block type="lists_getSublist">
  5890. <mutation at1="false" at2="false"></mutation>
  5891. <field name="WHERE1">FIRST</field>
  5892. <field name="WHERE2">LAST</field>
  5893. <value name="LIST">
  5894. <block type="variables_get">
  5895. <field name="VAR">changing list</field>
  5896. </block>
  5897. </value>
  5898. </block>
  5899. </value>
  5900. <next>
  5901. <block type="lists_getIndex">
  5902. <mutation statement="true" at="false"></mutation>
  5903. <field name="MODE">REMOVE</field>
  5904. <field name="WHERE">RANDOM</field>
  5905. <value name="VALUE">
  5906. <block type="variables_get">
  5907. <field name="VAR">changing list</field>
  5908. </block>
  5909. </value>
  5910. <next>
  5911. <block type="unittest_assertequals" inline="false">
  5912. <value name="MESSAGE">
  5913. <block type="text">
  5914. <field name="TEXT">sublist first-last simple copy check</field>
  5915. </block>
  5916. </value>
  5917. <value name="ACTUAL">
  5918. <block type="variables_get">
  5919. <field name="VAR">list copy</field>
  5920. </block>
  5921. </value>
  5922. <value name="EXPECTED">
  5923. <block type="variables_get">
  5924. <field name="VAR">list</field>
  5925. </block>
  5926. </value>
  5927. <next>
  5928. <block type="unittest_assertequals" inline="false">
  5929. <value name="MESSAGE">
  5930. <block type="text">
  5931. <field name="TEXT">sublist # #-end simple</field>
  5932. </block>
  5933. </value>
  5934. <value name="ACTUAL">
  5935. <block type="lists_getSublist">
  5936. <mutation at1="true" at2="true"></mutation>
  5937. <field name="WHERE1">FROM_START</field>
  5938. <field name="WHERE2">FROM_END</field>
  5939. <value name="LIST">
  5940. <block type="variables_get">
  5941. <field name="VAR">list</field>
  5942. </block>
  5943. </value>
  5944. <value name="AT1">
  5945. <block type="unittest_adjustindex">
  5946. <value name="INDEX">
  5947. <block type="math_number">
  5948. <field name="NUM">1</field>
  5949. </block>
  5950. </value>
  5951. </block>
  5952. </value>
  5953. <value name="AT2">
  5954. <block type="unittest_adjustindex">
  5955. <value name="INDEX">
  5956. <block type="math_number">
  5957. <field name="NUM">1</field>
  5958. </block>
  5959. </value>
  5960. </block>
  5961. </value>
  5962. </block>
  5963. </value>
  5964. <value name="EXPECTED">
  5965. <block type="lists_create_with" inline="true">
  5966. <mutation items="3"></mutation>
  5967. <value name="ADD0">
  5968. <block type="text">
  5969. <field name="TEXT">Challenger</field>
  5970. </block>
  5971. </value>
  5972. <value name="ADD1">
  5973. <block type="text">
  5974. <field name="TEXT">Discovery</field>
  5975. </block>
  5976. </value>
  5977. <value name="ADD2">
  5978. <block type="text">
  5979. <field name="TEXT">Atlantis</field>
  5980. </block>
  5981. </value>
  5982. </block>
  5983. </value>
  5984. <next>
  5985. <block type="unittest_assertequals" inline="false">
  5986. <value name="MESSAGE">
  5987. <block type="text">
  5988. <field name="TEXT">sublist #-end # simple</field>
  5989. </block>
  5990. </value>
  5991. <value name="ACTUAL">
  5992. <block type="lists_getSublist">
  5993. <mutation at1="true" at2="true"></mutation>
  5994. <field name="WHERE1">FROM_END</field>
  5995. <field name="WHERE2">FROM_START</field>
  5996. <value name="LIST">
  5997. <block type="variables_get">
  5998. <field name="VAR">list</field>
  5999. </block>
  6000. </value>
  6001. <value name="AT1">
  6002. <block type="unittest_adjustindex">
  6003. <value name="INDEX">
  6004. <block type="math_number">
  6005. <field name="NUM">2</field>
  6006. </block>
  6007. </value>
  6008. </block>
  6009. </value>
  6010. <value name="AT2">
  6011. <block type="unittest_adjustindex">
  6012. <value name="INDEX">
  6013. <block type="math_number">
  6014. <field name="NUM">3</field>
  6015. </block>
  6016. </value>
  6017. </block>
  6018. </value>
  6019. </block>
  6020. </value>
  6021. <value name="EXPECTED">
  6022. <block type="lists_create_with" inline="true">
  6023. <mutation items="2"></mutation>
  6024. <value name="ADD0">
  6025. <block type="text">
  6026. <field name="TEXT">Discovery</field>
  6027. </block>
  6028. </value>
  6029. <value name="ADD1">
  6030. <block type="text">
  6031. <field name="TEXT">Atlantis</field>
  6032. </block>
  6033. </value>
  6034. </block>
  6035. </value>
  6036. <next>
  6037. <block type="unittest_assertequals" inline="false">
  6038. <value name="MESSAGE">
  6039. <block type="text">
  6040. <field name="TEXT">sublist first # simple</field>
  6041. </block>
  6042. </value>
  6043. <value name="ACTUAL">
  6044. <block type="lists_getSublist">
  6045. <mutation at1="false" at2="true"></mutation>
  6046. <field name="WHERE1">FIRST</field>
  6047. <field name="WHERE2">FROM_START</field>
  6048. <value name="LIST">
  6049. <block type="variables_get">
  6050. <field name="VAR">list</field>
  6051. </block>
  6052. </value>
  6053. <value name="AT2">
  6054. <block type="unittest_adjustindex">
  6055. <value name="INDEX">
  6056. <block type="math_number">
  6057. <field name="NUM">3</field>
  6058. </block>
  6059. </value>
  6060. </block>
  6061. </value>
  6062. </block>
  6063. </value>
  6064. <value name="EXPECTED">
  6065. <block type="lists_create_with" inline="true">
  6066. <mutation items="4"></mutation>
  6067. <value name="ADD0">
  6068. <block type="text">
  6069. <field name="TEXT">Columbia</field>
  6070. </block>
  6071. </value>
  6072. <value name="ADD1">
  6073. <block type="text">
  6074. <field name="TEXT">Challenger</field>
  6075. </block>
  6076. </value>
  6077. <value name="ADD2">
  6078. <block type="text">
  6079. <field name="TEXT">Discovery</field>
  6080. </block>
  6081. </value>
  6082. <value name="ADD3">
  6083. <block type="text">
  6084. <field name="TEXT">Atlantis</field>
  6085. </block>
  6086. </value>
  6087. </block>
  6088. </value>
  6089. <next>
  6090. <block type="unittest_assertequals" inline="false">
  6091. <value name="MESSAGE">
  6092. <block type="text">
  6093. <field name="TEXT">sublist first #-end simple</field>
  6094. </block>
  6095. </value>
  6096. <value name="ACTUAL">
  6097. <block type="lists_getSublist">
  6098. <mutation at1="false" at2="true"></mutation>
  6099. <field name="WHERE1">FIRST</field>
  6100. <field name="WHERE2">FROM_END</field>
  6101. <value name="LIST">
  6102. <block type="variables_get">
  6103. <field name="VAR">list</field>
  6104. </block>
  6105. </value>
  6106. <value name="AT2">
  6107. <block type="unittest_adjustindex">
  6108. <value name="INDEX">
  6109. <block type="math_number">
  6110. <field name="NUM">3</field>
  6111. </block>
  6112. </value>
  6113. </block>
  6114. </value>
  6115. </block>
  6116. </value>
  6117. <value name="EXPECTED">
  6118. <block type="lists_create_with" inline="true">
  6119. <mutation items="2"></mutation>
  6120. <value name="ADD0">
  6121. <block type="text">
  6122. <field name="TEXT">Columbia</field>
  6123. </block>
  6124. </value>
  6125. <value name="ADD1">
  6126. <block type="text">
  6127. <field name="TEXT">Challenger</field>
  6128. </block>
  6129. </value>
  6130. </block>
  6131. </value>
  6132. <next>
  6133. <block type="unittest_assertequals" inline="false">
  6134. <value name="MESSAGE">
  6135. <block type="text">
  6136. <field name="TEXT">sublist # last simple</field>
  6137. </block>
  6138. </value>
  6139. <value name="ACTUAL">
  6140. <block type="lists_getSublist">
  6141. <mutation at1="true" at2="false"></mutation>
  6142. <field name="WHERE1">FROM_START</field>
  6143. <field name="WHERE2">LAST</field>
  6144. <value name="LIST">
  6145. <block type="variables_get">
  6146. <field name="VAR">list</field>
  6147. </block>
  6148. </value>
  6149. <value name="AT1">
  6150. <block type="unittest_adjustindex">
  6151. <value name="INDEX">
  6152. <block type="math_number">
  6153. <field name="NUM">3</field>
  6154. </block>
  6155. </value>
  6156. </block>
  6157. </value>
  6158. </block>
  6159. </value>
  6160. <value name="EXPECTED">
  6161. <block type="lists_create_with" inline="true">
  6162. <mutation items="2"></mutation>
  6163. <value name="ADD0">
  6164. <block type="text">
  6165. <field name="TEXT">Atlantis</field>
  6166. </block>
  6167. </value>
  6168. <value name="ADD1">
  6169. <block type="text">
  6170. <field name="TEXT">Endeavour</field>
  6171. </block>
  6172. </value>
  6173. </block>
  6174. </value>
  6175. <next>
  6176. <block type="unittest_assertequals" inline="false">
  6177. <value name="MESSAGE">
  6178. <block type="text">
  6179. <field name="TEXT">sublist #-end last simple</field>
  6180. </block>
  6181. </value>
  6182. <value name="ACTUAL">
  6183. <block type="lists_getSublist">
  6184. <mutation at1="true" at2="false"></mutation>
  6185. <field name="WHERE1">FROM_END</field>
  6186. <field name="WHERE2">LAST</field>
  6187. <value name="LIST">
  6188. <block type="variables_get">
  6189. <field name="VAR">list</field>
  6190. </block>
  6191. </value>
  6192. <value name="AT1">
  6193. <block type="unittest_adjustindex">
  6194. <value name="INDEX">
  6195. <block type="math_number">
  6196. <field name="NUM">3</field>
  6197. </block>
  6198. </value>
  6199. </block>
  6200. </value>
  6201. </block>
  6202. </value>
  6203. <value name="EXPECTED">
  6204. <block type="lists_create_with" inline="true">
  6205. <mutation items="4"></mutation>
  6206. <value name="ADD0">
  6207. <block type="text">
  6208. <field name="TEXT">Challenger</field>
  6209. </block>
  6210. </value>
  6211. <value name="ADD1">
  6212. <block type="text">
  6213. <field name="TEXT">Discovery</field>
  6214. </block>
  6215. </value>
  6216. <value name="ADD2">
  6217. <block type="text">
  6218. <field name="TEXT">Atlantis</field>
  6219. </block>
  6220. </value>
  6221. <value name="ADD3">
  6222. <block type="text">
  6223. <field name="TEXT">Endeavour</field>
  6224. </block>
  6225. </value>
  6226. </block>
  6227. </value>
  6228. <next>
  6229. <block type="unittest_assertequals" inline="false">
  6230. <value name="MESSAGE">
  6231. <block type="text">
  6232. <field name="TEXT">sublist all with # #-end simple</field>
  6233. </block>
  6234. </value>
  6235. <value name="ACTUAL">
  6236. <block type="lists_getSublist">
  6237. <mutation at1="true" at2="true"></mutation>
  6238. <field name="WHERE1">FROM_START</field>
  6239. <field name="WHERE2">FROM_END</field>
  6240. <value name="LIST">
  6241. <block type="variables_get">
  6242. <field name="VAR">list</field>
  6243. </block>
  6244. </value>
  6245. <value name="AT1">
  6246. <block type="unittest_adjustindex">
  6247. <value name="INDEX">
  6248. <block type="math_number">
  6249. <field name="NUM">0</field>
  6250. </block>
  6251. </value>
  6252. </block>
  6253. </value>
  6254. <value name="AT2">
  6255. <block type="unittest_adjustindex">
  6256. <value name="INDEX">
  6257. <block type="math_number">
  6258. <field name="NUM">0</field>
  6259. </block>
  6260. </value>
  6261. </block>
  6262. </value>
  6263. </block>
  6264. </value>
  6265. <value name="EXPECTED">
  6266. <block type="variables_get">
  6267. <field name="VAR">list</field>
  6268. </block>
  6269. </value>
  6270. <next>
  6271. <block type="unittest_assertequals" inline="false">
  6272. <value name="MESSAGE">
  6273. <block type="text">
  6274. <field name="TEXT">sublist all with #-end # simple</field>
  6275. </block>
  6276. </value>
  6277. <value name="ACTUAL">
  6278. <block type="lists_getSublist">
  6279. <mutation at1="true" at2="true"></mutation>
  6280. <field name="WHERE1">FROM_END</field>
  6281. <field name="WHERE2">FROM_START</field>
  6282. <value name="LIST">
  6283. <block type="variables_get">
  6284. <field name="VAR">list</field>
  6285. </block>
  6286. </value>
  6287. <value name="AT1">
  6288. <block type="unittest_adjustindex">
  6289. <value name="INDEX">
  6290. <block type="math_number">
  6291. <field name="NUM">4</field>
  6292. </block>
  6293. </value>
  6294. </block>
  6295. </value>
  6296. <value name="AT2">
  6297. <block type="unittest_adjustindex">
  6298. <value name="INDEX">
  6299. <block type="math_number">
  6300. <field name="NUM">4</field>
  6301. </block>
  6302. </value>
  6303. </block>
  6304. </value>
  6305. </block>
  6306. </value>
  6307. <value name="EXPECTED">
  6308. <block type="variables_get">
  6309. <field name="VAR">list</field>
  6310. </block>
  6311. </value>
  6312. <next>
  6313. <block type="unittest_assertequals" inline="false">
  6314. <value name="MESSAGE">
  6315. <block type="text">
  6316. <field name="TEXT">sublist all with # #-end math simple</field>
  6317. </block>
  6318. </value>
  6319. <value name="ACTUAL">
  6320. <block type="lists_getSublist">
  6321. <mutation at1="true" at2="true"></mutation>
  6322. <field name="WHERE1">FROM_START</field>
  6323. <field name="WHERE2">FROM_END</field>
  6324. <comment pinned="false" h="93" w="347">Checks that the whole list is properly retrieved even if the value for start and end is not a simple number. This is especially important in generators where sublist uses [x:length - y] for # #-end.</comment>
  6325. <value name="LIST">
  6326. <block type="variables_get">
  6327. <field name="VAR">list</field>
  6328. </block>
  6329. </value>
  6330. <value name="AT1">
  6331. <block type="math_arithmetic">
  6332. <field name="OP">ADD</field>
  6333. <value name="A">
  6334. <block type="math_number">
  6335. <field name="NUM">0</field>
  6336. </block>
  6337. </value>
  6338. <value name="B">
  6339. <block type="unittest_adjustindex">
  6340. <value name="INDEX">
  6341. <block type="math_number">
  6342. <field name="NUM">0</field>
  6343. </block>
  6344. </value>
  6345. </block>
  6346. </value>
  6347. </block>
  6348. </value>
  6349. <value name="AT2">
  6350. <block type="math_arithmetic">
  6351. <field name="OP">ADD</field>
  6352. <value name="A">
  6353. <block type="math_number">
  6354. <field name="NUM">0</field>
  6355. </block>
  6356. </value>
  6357. <value name="B">
  6358. <block type="unittest_adjustindex">
  6359. <value name="INDEX">
  6360. <block type="math_number">
  6361. <field name="NUM">0</field>
  6362. </block>
  6363. </value>
  6364. </block>
  6365. </value>
  6366. </block>
  6367. </value>
  6368. </block>
  6369. </value>
  6370. <value name="EXPECTED">
  6371. <block type="variables_get">
  6372. <field name="VAR">list</field>
  6373. </block>
  6374. </value>
  6375. </block>
  6376. </next>
  6377. </block>
  6378. </next>
  6379. </block>
  6380. </next>
  6381. </block>
  6382. </next>
  6383. </block>
  6384. </next>
  6385. </block>
  6386. </next>
  6387. </block>
  6388. </next>
  6389. </block>
  6390. </next>
  6391. </block>
  6392. </next>
  6393. </block>
  6394. </next>
  6395. </block>
  6396. </next>
  6397. </block>
  6398. </next>
  6399. </block>
  6400. </next>
  6401. </block>
  6402. </next>
  6403. </block>
  6404. </next>
  6405. </block>
  6406. </next>
  6407. </block>
  6408. </next>
  6409. </block>
  6410. </next>
  6411. </block>
  6412. </statement>
  6413. </block>
  6414. <block type="procedures_defreturn" x="13" y="16238">
  6415. <field name="NAME">get space shuttles</field>
  6416. <comment pinned="false" h="80" w="160">Creates a list for use with the sublist test.</comment>
  6417. <statement name="STACK">
  6418. <block type="math_change">
  6419. <field name="VAR">number of calls</field>
  6420. <value name="DELTA">
  6421. <block type="math_number">
  6422. <field name="NUM">1</field>
  6423. </block>
  6424. </value>
  6425. </block>
  6426. </statement>
  6427. <value name="RETURN">
  6428. <block type="lists_create_with" inline="true">
  6429. <mutation items="5"></mutation>
  6430. <value name="ADD0">
  6431. <block type="text">
  6432. <field name="TEXT">Columbia</field>
  6433. </block>
  6434. </value>
  6435. <value name="ADD1">
  6436. <block type="text">
  6437. <field name="TEXT">Challenger</field>
  6438. </block>
  6439. </value>
  6440. <value name="ADD2">
  6441. <block type="text">
  6442. <field name="TEXT">Discovery</field>
  6443. </block>
  6444. </value>
  6445. <value name="ADD3">
  6446. <block type="text">
  6447. <field name="TEXT">Atlantis</field>
  6448. </block>
  6449. </value>
  6450. <value name="ADD4">
  6451. <block type="text">
  6452. <field name="TEXT">Endeavour</field>
  6453. </block>
  6454. </value>
  6455. </block>
  6456. </value>
  6457. </block>
  6458. <block type="procedures_defnoreturn" x="13" y="16363">
  6459. <field name="NAME">test sublist complex</field>
  6460. <comment pinned="false" h="80" w="160">Tests the "get sub-list" block with a function call.</comment>
  6461. <statement name="STACK">
  6462. <block type="variables_set">
  6463. <field name="VAR">number of calls</field>
  6464. <value name="VALUE">
  6465. <block type="math_number">
  6466. <field name="NUM">0</field>
  6467. </block>
  6468. </value>
  6469. <next>
  6470. <block type="unittest_assertequals" inline="false">
  6471. <value name="MESSAGE">
  6472. <block type="text">
  6473. <field name="TEXT">sublist # start complex</field>
  6474. </block>
  6475. </value>
  6476. <value name="ACTUAL">
  6477. <block type="lists_getSublist">
  6478. <mutation at1="true" at2="true"></mutation>
  6479. <field name="WHERE1">FROM_START</field>
  6480. <field name="WHERE2">FROM_START</field>
  6481. <value name="LIST">
  6482. <block type="procedures_callreturn">
  6483. <mutation name="get space shuttles"></mutation>
  6484. </block>
  6485. </value>
  6486. <value name="AT1">
  6487. <block type="unittest_adjustindex">
  6488. <value name="INDEX">
  6489. <block type="math_number">
  6490. <field name="NUM">1</field>
  6491. </block>
  6492. </value>
  6493. </block>
  6494. </value>
  6495. <value name="AT2">
  6496. <block type="unittest_adjustindex">
  6497. <value name="INDEX">
  6498. <block type="math_number">
  6499. <field name="NUM">2</field>
  6500. </block>
  6501. </value>
  6502. </block>
  6503. </value>
  6504. </block>
  6505. </value>
  6506. <value name="EXPECTED">
  6507. <block type="lists_create_with" inline="true">
  6508. <mutation items="2"></mutation>
  6509. <value name="ADD0">
  6510. <block type="text">
  6511. <field name="TEXT">Challenger</field>
  6512. </block>
  6513. </value>
  6514. <value name="ADD1">
  6515. <block type="text">
  6516. <field name="TEXT">Discovery</field>
  6517. </block>
  6518. </value>
  6519. </block>
  6520. </value>
  6521. <next>
  6522. <block type="procedures_callnoreturn" inline="true">
  6523. <mutation name="check number of calls">
  6524. <arg name="test name"></arg>
  6525. </mutation>
  6526. <value name="ARG0">
  6527. <block type="text">
  6528. <field name="TEXT">sublist # start complex</field>
  6529. </block>
  6530. </value>
  6531. <next>
  6532. <block type="variables_set">
  6533. <field name="VAR">number of calls</field>
  6534. <value name="VALUE">
  6535. <block type="math_number">
  6536. <field name="NUM">0</field>
  6537. </block>
  6538. </value>
  6539. <next>
  6540. <block type="unittest_assertequals" inline="false">
  6541. <value name="MESSAGE">
  6542. <block type="text">
  6543. <field name="TEXT">sublist # start order complex</field>
  6544. </block>
  6545. </value>
  6546. <value name="ACTUAL">
  6547. <block type="lists_getSublist">
  6548. <mutation at1="true" at2="true"></mutation>
  6549. <field name="WHERE1">FROM_START</field>
  6550. <field name="WHERE2">FROM_START</field>
  6551. <value name="LIST">
  6552. <block type="logic_ternary">
  6553. <value name="IF">
  6554. <block type="logic_boolean">
  6555. <field name="BOOL">TRUE</field>
  6556. </block>
  6557. </value>
  6558. <value name="THEN">
  6559. <block type="procedures_callreturn">
  6560. <mutation name="get space shuttles"></mutation>
  6561. </block>
  6562. </value>
  6563. <value name="ELSE">
  6564. <block type="logic_null"></block>
  6565. </value>
  6566. </block>
  6567. </value>
  6568. <value name="AT1">
  6569. <block type="logic_ternary">
  6570. <value name="IF">
  6571. <block type="logic_boolean">
  6572. <field name="BOOL">TRUE</field>
  6573. </block>
  6574. </value>
  6575. <value name="THEN">
  6576. <block type="unittest_adjustindex">
  6577. <value name="INDEX">
  6578. <block type="math_number">
  6579. <field name="NUM">1</field>
  6580. </block>
  6581. </value>
  6582. </block>
  6583. </value>
  6584. <value name="ELSE">
  6585. <block type="logic_null"></block>
  6586. </value>
  6587. </block>
  6588. </value>
  6589. <value name="AT2">
  6590. <block type="logic_ternary">
  6591. <value name="IF">
  6592. <block type="logic_boolean">
  6593. <field name="BOOL">TRUE</field>
  6594. </block>
  6595. </value>
  6596. <value name="THEN">
  6597. <block type="unittest_adjustindex">
  6598. <value name="INDEX">
  6599. <block type="math_number">
  6600. <field name="NUM">2</field>
  6601. </block>
  6602. </value>
  6603. </block>
  6604. </value>
  6605. <value name="ELSE">
  6606. <block type="logic_null"></block>
  6607. </value>
  6608. </block>
  6609. </value>
  6610. </block>
  6611. </value>
  6612. <value name="EXPECTED">
  6613. <block type="lists_create_with" inline="true">
  6614. <mutation items="2"></mutation>
  6615. <value name="ADD0">
  6616. <block type="text">
  6617. <field name="TEXT">Challenger</field>
  6618. </block>
  6619. </value>
  6620. <value name="ADD1">
  6621. <block type="text">
  6622. <field name="TEXT">Discovery</field>
  6623. </block>
  6624. </value>
  6625. </block>
  6626. </value>
  6627. <next>
  6628. <block type="procedures_callnoreturn" inline="true">
  6629. <mutation name="check number of calls">
  6630. <arg name="test name"></arg>
  6631. </mutation>
  6632. <value name="ARG0">
  6633. <block type="text">
  6634. <field name="TEXT">sublist # start order complex</field>
  6635. </block>
  6636. </value>
  6637. <next>
  6638. <block type="variables_set">
  6639. <field name="VAR">number of calls</field>
  6640. <value name="VALUE">
  6641. <block type="math_number">
  6642. <field name="NUM">0</field>
  6643. </block>
  6644. </value>
  6645. <next>
  6646. <block type="unittest_assertequals" inline="false">
  6647. <value name="MESSAGE">
  6648. <block type="text">
  6649. <field name="TEXT">sublist # end complex</field>
  6650. </block>
  6651. </value>
  6652. <value name="ACTUAL">
  6653. <block type="lists_getSublist">
  6654. <mutation at1="true" at2="true"></mutation>
  6655. <field name="WHERE1">FROM_END</field>
  6656. <field name="WHERE2">FROM_END</field>
  6657. <comment pinned="false" h="78" w="267">The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index.</comment>
  6658. <value name="LIST">
  6659. <block type="procedures_callreturn">
  6660. <mutation name="get space shuttles"></mutation>
  6661. </block>
  6662. </value>
  6663. <value name="AT1">
  6664. <block type="unittest_adjustindex">
  6665. <value name="INDEX">
  6666. <block type="math_number">
  6667. <field name="NUM">2</field>
  6668. </block>
  6669. </value>
  6670. </block>
  6671. </value>
  6672. <value name="AT2">
  6673. <block type="unittest_adjustindex">
  6674. <value name="INDEX">
  6675. <block type="math_number">
  6676. <field name="NUM">1</field>
  6677. </block>
  6678. </value>
  6679. </block>
  6680. </value>
  6681. </block>
  6682. </value>
  6683. <value name="EXPECTED">
  6684. <block type="lists_create_with" inline="true">
  6685. <mutation items="2"></mutation>
  6686. <value name="ADD0">
  6687. <block type="text">
  6688. <field name="TEXT">Discovery</field>
  6689. </block>
  6690. </value>
  6691. <value name="ADD1">
  6692. <block type="text">
  6693. <field name="TEXT">Atlantis</field>
  6694. </block>
  6695. </value>
  6696. </block>
  6697. </value>
  6698. <next>
  6699. <block type="unittest_assertequals" inline="false">
  6700. <value name="MESSAGE">
  6701. <block type="text">
  6702. <field name="TEXT">sublist # end complex number of calls</field>
  6703. </block>
  6704. </value>
  6705. <value name="ACTUAL">
  6706. <block type="variables_get">
  6707. <field name="VAR">number of calls</field>
  6708. </block>
  6709. </value>
  6710. <value name="EXPECTED">
  6711. <block type="math_number">
  6712. <field name="NUM">1</field>
  6713. </block>
  6714. </value>
  6715. <next>
  6716. <block type="variables_set">
  6717. <field name="VAR">number of calls</field>
  6718. <value name="VALUE">
  6719. <block type="math_number">
  6720. <field name="NUM">0</field>
  6721. </block>
  6722. </value>
  6723. <next>
  6724. <block type="unittest_assertequals" inline="false">
  6725. <value name="MESSAGE">
  6726. <block type="text">
  6727. <field name="TEXT">sublist # end order complex</field>
  6728. </block>
  6729. </value>
  6730. <value name="ACTUAL">
  6731. <block type="lists_getSublist">
  6732. <mutation at1="true" at2="true"></mutation>
  6733. <field name="WHERE1">FROM_END</field>
  6734. <field name="WHERE2">FROM_END</field>
  6735. <value name="LIST">
  6736. <block type="logic_ternary" inline="false">
  6737. <value name="IF">
  6738. <block type="logic_boolean">
  6739. <field name="BOOL">TRUE</field>
  6740. </block>
  6741. </value>
  6742. <value name="THEN">
  6743. <block type="procedures_callreturn">
  6744. <mutation name="get space shuttles"></mutation>
  6745. </block>
  6746. </value>
  6747. <value name="ELSE">
  6748. <block type="logic_null"></block>
  6749. </value>
  6750. </block>
  6751. </value>
  6752. <value name="AT1">
  6753. <block type="math_arithmetic">
  6754. <field name="OP">ADD</field>
  6755. <value name="A">
  6756. <block type="math_number">
  6757. <field name="NUM">0</field>
  6758. </block>
  6759. </value>
  6760. <value name="B">
  6761. <block type="unittest_adjustindex">
  6762. <value name="INDEX">
  6763. <block type="math_number">
  6764. <field name="NUM">2</field>
  6765. </block>
  6766. </value>
  6767. </block>
  6768. </value>
  6769. </block>
  6770. </value>
  6771. <value name="AT2">
  6772. <block type="math_arithmetic">
  6773. <field name="OP">ADD</field>
  6774. <value name="A">
  6775. <block type="math_number">
  6776. <field name="NUM">0</field>
  6777. </block>
  6778. </value>
  6779. <value name="B">
  6780. <block type="unittest_adjustindex">
  6781. <value name="INDEX">
  6782. <block type="math_number">
  6783. <field name="NUM">1</field>
  6784. </block>
  6785. </value>
  6786. </block>
  6787. </value>
  6788. </block>
  6789. </value>
  6790. </block>
  6791. </value>
  6792. <value name="EXPECTED">
  6793. <block type="lists_create_with" inline="true">
  6794. <mutation items="2"></mutation>
  6795. <value name="ADD0">
  6796. <block type="text">
  6797. <field name="TEXT">Discovery</field>
  6798. </block>
  6799. </value>
  6800. <value name="ADD1">
  6801. <block type="text">
  6802. <field name="TEXT">Atlantis</field>
  6803. </block>
  6804. </value>
  6805. </block>
  6806. </value>
  6807. <next>
  6808. <block type="procedures_callnoreturn" inline="true">
  6809. <mutation name="check number of calls">
  6810. <arg name="test name"></arg>
  6811. </mutation>
  6812. <value name="ARG0">
  6813. <block type="text">
  6814. <field name="TEXT">sublist # end order complex</field>
  6815. </block>
  6816. </value>
  6817. <next>
  6818. <block type="variables_set">
  6819. <field name="VAR">number of calls</field>
  6820. <value name="VALUE">
  6821. <block type="math_number">
  6822. <field name="NUM">0</field>
  6823. </block>
  6824. </value>
  6825. <next>
  6826. <block type="unittest_assertequals" inline="false">
  6827. <value name="MESSAGE">
  6828. <block type="text">
  6829. <field name="TEXT">sublist first-last complex</field>
  6830. </block>
  6831. </value>
  6832. <value name="ACTUAL">
  6833. <block type="lists_getSublist">
  6834. <mutation at1="false" at2="false"></mutation>
  6835. <field name="WHERE1">FIRST</field>
  6836. <field name="WHERE2">LAST</field>
  6837. <value name="LIST">
  6838. <block type="procedures_callreturn">
  6839. <mutation name="get space shuttles"></mutation>
  6840. </block>
  6841. </value>
  6842. </block>
  6843. </value>
  6844. <value name="EXPECTED">
  6845. <block type="variables_get">
  6846. <field name="VAR">list</field>
  6847. </block>
  6848. </value>
  6849. <next>
  6850. <block type="procedures_callnoreturn" inline="true">
  6851. <mutation name="check number of calls">
  6852. <arg name="test name"></arg>
  6853. </mutation>
  6854. <value name="ARG0">
  6855. <block type="text">
  6856. <field name="TEXT">sublist first-last complex</field>
  6857. </block>
  6858. </value>
  6859. <next>
  6860. <block type="variables_set">
  6861. <field name="VAR">number of calls</field>
  6862. <value name="VALUE">
  6863. <block type="math_number">
  6864. <field name="NUM">0</field>
  6865. </block>
  6866. </value>
  6867. <next>
  6868. <block type="unittest_assertequals" inline="false">
  6869. <value name="MESSAGE">
  6870. <block type="text">
  6871. <field name="TEXT">sublist # #-end complex</field>
  6872. </block>
  6873. </value>
  6874. <value name="ACTUAL">
  6875. <block type="lists_getSublist">
  6876. <mutation at1="true" at2="true"></mutation>
  6877. <field name="WHERE1">FROM_START</field>
  6878. <field name="WHERE2">FROM_END</field>
  6879. <value name="LIST">
  6880. <block type="procedures_callreturn">
  6881. <mutation name="get space shuttles"></mutation>
  6882. </block>
  6883. </value>
  6884. <value name="AT1">
  6885. <block type="unittest_adjustindex">
  6886. <value name="INDEX">
  6887. <block type="math_number">
  6888. <field name="NUM">1</field>
  6889. </block>
  6890. </value>
  6891. </block>
  6892. </value>
  6893. <value name="AT2">
  6894. <block type="unittest_adjustindex">
  6895. <value name="INDEX">
  6896. <block type="math_number">
  6897. <field name="NUM">1</field>
  6898. </block>
  6899. </value>
  6900. </block>
  6901. </value>
  6902. </block>
  6903. </value>
  6904. <value name="EXPECTED">
  6905. <block type="lists_create_with" inline="true">
  6906. <mutation items="3"></mutation>
  6907. <value name="ADD0">
  6908. <block type="text">
  6909. <field name="TEXT">Challenger</field>
  6910. </block>
  6911. </value>
  6912. <value name="ADD1">
  6913. <block type="text">
  6914. <field name="TEXT">Discovery</field>
  6915. </block>
  6916. </value>
  6917. <value name="ADD2">
  6918. <block type="text">
  6919. <field name="TEXT">Atlantis</field>
  6920. </block>
  6921. </value>
  6922. </block>
  6923. </value>
  6924. <next>
  6925. <block type="procedures_callnoreturn" inline="true">
  6926. <mutation name="check number of calls">
  6927. <arg name="test name"></arg>
  6928. </mutation>
  6929. <value name="ARG0">
  6930. <block type="text">
  6931. <field name="TEXT">sublist # #-end complex</field>
  6932. </block>
  6933. </value>
  6934. <next>
  6935. <block type="variables_set">
  6936. <field name="VAR">number of calls</field>
  6937. <value name="VALUE">
  6938. <block type="math_number">
  6939. <field name="NUM">0</field>
  6940. </block>
  6941. </value>
  6942. <next>
  6943. <block type="unittest_assertequals" inline="false">
  6944. <value name="MESSAGE">
  6945. <block type="text">
  6946. <field name="TEXT">sublist #-end # complex</field>
  6947. </block>
  6948. </value>
  6949. <value name="ACTUAL">
  6950. <block type="lists_getSublist">
  6951. <mutation at1="true" at2="true"></mutation>
  6952. <field name="WHERE1">FROM_END</field>
  6953. <field name="WHERE2">FROM_START</field>
  6954. <value name="LIST">
  6955. <block type="procedures_callreturn">
  6956. <mutation name="get space shuttles"></mutation>
  6957. </block>
  6958. </value>
  6959. <value name="AT1">
  6960. <block type="unittest_adjustindex">
  6961. <value name="INDEX">
  6962. <block type="math_number">
  6963. <field name="NUM">2</field>
  6964. </block>
  6965. </value>
  6966. </block>
  6967. </value>
  6968. <value name="AT2">
  6969. <block type="unittest_adjustindex">
  6970. <value name="INDEX">
  6971. <block type="math_number">
  6972. <field name="NUM">3</field>
  6973. </block>
  6974. </value>
  6975. </block>
  6976. </value>
  6977. </block>
  6978. </value>
  6979. <value name="EXPECTED">
  6980. <block type="lists_create_with" inline="true">
  6981. <mutation items="2"></mutation>
  6982. <value name="ADD0">
  6983. <block type="text">
  6984. <field name="TEXT">Discovery</field>
  6985. </block>
  6986. </value>
  6987. <value name="ADD1">
  6988. <block type="text">
  6989. <field name="TEXT">Atlantis</field>
  6990. </block>
  6991. </value>
  6992. </block>
  6993. </value>
  6994. <next>
  6995. <block type="procedures_callnoreturn" inline="true">
  6996. <mutation name="check number of calls">
  6997. <arg name="test name"></arg>
  6998. </mutation>
  6999. <value name="ARG0">
  7000. <block type="text">
  7001. <field name="TEXT">sublist #-end # complex</field>
  7002. </block>
  7003. </value>
  7004. <next>
  7005. <block type="variables_set">
  7006. <field name="VAR">number of calls</field>
  7007. <value name="VALUE">
  7008. <block type="math_number">
  7009. <field name="NUM">0</field>
  7010. </block>
  7011. </value>
  7012. <next>
  7013. <block type="unittest_assertequals" inline="false">
  7014. <value name="MESSAGE">
  7015. <block type="text">
  7016. <field name="TEXT">sublist first # complex</field>
  7017. </block>
  7018. </value>
  7019. <value name="ACTUAL">
  7020. <block type="lists_getSublist">
  7021. <mutation at1="false" at2="true"></mutation>
  7022. <field name="WHERE1">FIRST</field>
  7023. <field name="WHERE2">FROM_START</field>
  7024. <value name="LIST">
  7025. <block type="procedures_callreturn">
  7026. <mutation name="get space shuttles"></mutation>
  7027. </block>
  7028. </value>
  7029. <value name="AT2">
  7030. <block type="unittest_adjustindex">
  7031. <value name="INDEX">
  7032. <block type="math_number">
  7033. <field name="NUM">3</field>
  7034. </block>
  7035. </value>
  7036. </block>
  7037. </value>
  7038. </block>
  7039. </value>
  7040. <value name="EXPECTED">
  7041. <block type="lists_create_with" inline="true">
  7042. <mutation items="4"></mutation>
  7043. <value name="ADD0">
  7044. <block type="text">
  7045. <field name="TEXT">Columbia</field>
  7046. </block>
  7047. </value>
  7048. <value name="ADD1">
  7049. <block type="text">
  7050. <field name="TEXT">Challenger</field>
  7051. </block>
  7052. </value>
  7053. <value name="ADD2">
  7054. <block type="text">
  7055. <field name="TEXT">Discovery</field>
  7056. </block>
  7057. </value>
  7058. <value name="ADD3">
  7059. <block type="text">
  7060. <field name="TEXT">Atlantis</field>
  7061. </block>
  7062. </value>
  7063. </block>
  7064. </value>
  7065. <next>
  7066. <block type="procedures_callnoreturn" inline="true">
  7067. <mutation name="check number of calls">
  7068. <arg name="test name"></arg>
  7069. </mutation>
  7070. <value name="ARG0">
  7071. <block type="text">
  7072. <field name="TEXT">sublist first # complex</field>
  7073. </block>
  7074. </value>
  7075. <next>
  7076. <block type="variables_set">
  7077. <field name="VAR">number of calls</field>
  7078. <value name="VALUE">
  7079. <block type="math_number">
  7080. <field name="NUM">0</field>
  7081. </block>
  7082. </value>
  7083. <next>
  7084. <block type="unittest_assertequals" inline="false">
  7085. <value name="MESSAGE">
  7086. <block type="text">
  7087. <field name="TEXT">sublist first #-end complex</field>
  7088. </block>
  7089. </value>
  7090. <value name="ACTUAL">
  7091. <block type="lists_getSublist">
  7092. <mutation at1="false" at2="true"></mutation>
  7093. <field name="WHERE1">FIRST</field>
  7094. <field name="WHERE2">FROM_END</field>
  7095. <value name="LIST">
  7096. <block type="procedures_callreturn">
  7097. <mutation name="get space shuttles"></mutation>
  7098. </block>
  7099. </value>
  7100. <value name="AT2">
  7101. <block type="unittest_adjustindex">
  7102. <value name="INDEX">
  7103. <block type="math_number">
  7104. <field name="NUM">3</field>
  7105. </block>
  7106. </value>
  7107. </block>
  7108. </value>
  7109. </block>
  7110. </value>
  7111. <value name="EXPECTED">
  7112. <block type="lists_create_with" inline="true">
  7113. <mutation items="2"></mutation>
  7114. <value name="ADD0">
  7115. <block type="text">
  7116. <field name="TEXT">Columbia</field>
  7117. </block>
  7118. </value>
  7119. <value name="ADD1">
  7120. <block type="text">
  7121. <field name="TEXT">Challenger</field>
  7122. </block>
  7123. </value>
  7124. </block>
  7125. </value>
  7126. <next>
  7127. <block type="procedures_callnoreturn" inline="true">
  7128. <mutation name="check number of calls">
  7129. <arg name="test name"></arg>
  7130. </mutation>
  7131. <value name="ARG0">
  7132. <block type="text">
  7133. <field name="TEXT">sublist first #-end complex</field>
  7134. </block>
  7135. </value>
  7136. <next>
  7137. <block type="variables_set">
  7138. <field name="VAR">number of calls</field>
  7139. <value name="VALUE">
  7140. <block type="math_number">
  7141. <field name="NUM">0</field>
  7142. </block>
  7143. </value>
  7144. <next>
  7145. <block type="unittest_assertequals" inline="false">
  7146. <value name="MESSAGE">
  7147. <block type="text">
  7148. <field name="TEXT">sublist # last complex</field>
  7149. </block>
  7150. </value>
  7151. <value name="ACTUAL">
  7152. <block type="lists_getSublist">
  7153. <mutation at1="true" at2="false"></mutation>
  7154. <field name="WHERE1">FROM_START</field>
  7155. <field name="WHERE2">LAST</field>
  7156. <value name="LIST">
  7157. <block type="procedures_callreturn">
  7158. <mutation name="get space shuttles"></mutation>
  7159. </block>
  7160. </value>
  7161. <value name="AT1">
  7162. <block type="unittest_adjustindex">
  7163. <value name="INDEX">
  7164. <block type="math_number">
  7165. <field name="NUM">3</field>
  7166. </block>
  7167. </value>
  7168. </block>
  7169. </value>
  7170. </block>
  7171. </value>
  7172. <value name="EXPECTED">
  7173. <block type="lists_create_with" inline="true">
  7174. <mutation items="2"></mutation>
  7175. <value name="ADD0">
  7176. <block type="text">
  7177. <field name="TEXT">Atlantis</field>
  7178. </block>
  7179. </value>
  7180. <value name="ADD1">
  7181. <block type="text">
  7182. <field name="TEXT">Endeavour</field>
  7183. </block>
  7184. </value>
  7185. </block>
  7186. </value>
  7187. <next>
  7188. <block type="procedures_callnoreturn" inline="true">
  7189. <mutation name="check number of calls">
  7190. <arg name="test name"></arg>
  7191. </mutation>
  7192. <value name="ARG0">
  7193. <block type="text">
  7194. <field name="TEXT">sublist # last complex</field>
  7195. </block>
  7196. </value>
  7197. <next>
  7198. <block type="variables_set">
  7199. <field name="VAR">number of calls</field>
  7200. <value name="VALUE">
  7201. <block type="math_number">
  7202. <field name="NUM">0</field>
  7203. </block>
  7204. </value>
  7205. <next>
  7206. <block type="unittest_assertequals" inline="false">
  7207. <value name="MESSAGE">
  7208. <block type="text">
  7209. <field name="TEXT">sublist #-end last simple</field>
  7210. </block>
  7211. </value>
  7212. <value name="ACTUAL">
  7213. <block type="lists_getSublist">
  7214. <mutation at1="true" at2="false"></mutation>
  7215. <field name="WHERE1">FROM_END</field>
  7216. <field name="WHERE2">LAST</field>
  7217. <value name="LIST">
  7218. <block type="procedures_callreturn">
  7219. <mutation name="get space shuttles"></mutation>
  7220. </block>
  7221. </value>
  7222. <value name="AT1">
  7223. <block type="unittest_adjustindex">
  7224. <value name="INDEX">
  7225. <block type="math_number">
  7226. <field name="NUM">3</field>
  7227. </block>
  7228. </value>
  7229. </block>
  7230. </value>
  7231. </block>
  7232. </value>
  7233. <value name="EXPECTED">
  7234. <block type="lists_create_with" inline="true">
  7235. <mutation items="4"></mutation>
  7236. <value name="ADD0">
  7237. <block type="text">
  7238. <field name="TEXT">Challenger</field>
  7239. </block>
  7240. </value>
  7241. <value name="ADD1">
  7242. <block type="text">
  7243. <field name="TEXT">Discovery</field>
  7244. </block>
  7245. </value>
  7246. <value name="ADD2">
  7247. <block type="text">
  7248. <field name="TEXT">Atlantis</field>
  7249. </block>
  7250. </value>
  7251. <value name="ADD3">
  7252. <block type="text">
  7253. <field name="TEXT">Endeavour</field>
  7254. </block>
  7255. </value>
  7256. </block>
  7257. </value>
  7258. <next>
  7259. <block type="procedures_callnoreturn" inline="true">
  7260. <mutation name="check number of calls">
  7261. <arg name="test name"></arg>
  7262. </mutation>
  7263. <value name="ARG0">
  7264. <block type="text">
  7265. <field name="TEXT">sublist #-end last simple</field>
  7266. </block>
  7267. </value>
  7268. <next>
  7269. <block type="variables_set">
  7270. <field name="VAR">number of calls</field>
  7271. <value name="VALUE">
  7272. <block type="math_number">
  7273. <field name="NUM">0</field>
  7274. </block>
  7275. </value>
  7276. <next>
  7277. <block type="unittest_assertequals" inline="false">
  7278. <value name="MESSAGE">
  7279. <block type="text">
  7280. <field name="TEXT">sublist all with # #-end complex</field>
  7281. </block>
  7282. </value>
  7283. <value name="ACTUAL">
  7284. <block type="lists_getSublist">
  7285. <mutation at1="true" at2="true"></mutation>
  7286. <field name="WHERE1">FROM_START</field>
  7287. <field name="WHERE2">FROM_END</field>
  7288. <value name="LIST">
  7289. <block type="procedures_callreturn">
  7290. <mutation name="get space shuttles"></mutation>
  7291. </block>
  7292. </value>
  7293. <value name="AT1">
  7294. <block type="unittest_adjustindex">
  7295. <value name="INDEX">
  7296. <block type="math_number">
  7297. <field name="NUM">0</field>
  7298. </block>
  7299. </value>
  7300. </block>
  7301. </value>
  7302. <value name="AT2">
  7303. <block type="unittest_adjustindex">
  7304. <value name="INDEX">
  7305. <block type="math_number">
  7306. <field name="NUM">0</field>
  7307. </block>
  7308. </value>
  7309. </block>
  7310. </value>
  7311. </block>
  7312. </value>
  7313. <value name="EXPECTED">
  7314. <block type="variables_get">
  7315. <field name="VAR">list</field>
  7316. </block>
  7317. </value>
  7318. <next>
  7319. <block type="procedures_callnoreturn" inline="true">
  7320. <mutation name="check number of calls">
  7321. <arg name="test name"></arg>
  7322. </mutation>
  7323. <value name="ARG0">
  7324. <block type="text">
  7325. <field name="TEXT">sublist all with # #-end complex</field>
  7326. </block>
  7327. </value>
  7328. <next>
  7329. <block type="variables_set">
  7330. <field name="VAR">number of calls</field>
  7331. <value name="VALUE">
  7332. <block type="math_number">
  7333. <field name="NUM">0</field>
  7334. </block>
  7335. </value>
  7336. <next>
  7337. <block type="unittest_assertequals" inline="false">
  7338. <value name="MESSAGE">
  7339. <block type="text">
  7340. <field name="TEXT">sublist all with #-end # complex</field>
  7341. </block>
  7342. </value>
  7343. <value name="ACTUAL">
  7344. <block type="lists_getSublist">
  7345. <mutation at1="true" at2="true"></mutation>
  7346. <field name="WHERE1">FROM_END</field>
  7347. <field name="WHERE2">FROM_START</field>
  7348. <value name="LIST">
  7349. <block type="procedures_callreturn">
  7350. <mutation name="get space shuttles"></mutation>
  7351. </block>
  7352. </value>
  7353. <value name="AT1">
  7354. <block type="unittest_adjustindex">
  7355. <value name="INDEX">
  7356. <block type="math_number">
  7357. <field name="NUM">4</field>
  7358. </block>
  7359. </value>
  7360. </block>
  7361. </value>
  7362. <value name="AT2">
  7363. <block type="unittest_adjustindex">
  7364. <value name="INDEX">
  7365. <block type="math_number">
  7366. <field name="NUM">4</field>
  7367. </block>
  7368. </value>
  7369. </block>
  7370. </value>
  7371. </block>
  7372. </value>
  7373. <value name="EXPECTED">
  7374. <block type="variables_get">
  7375. <field name="VAR">list</field>
  7376. </block>
  7377. </value>
  7378. <next>
  7379. <block type="procedures_callnoreturn" inline="true">
  7380. <mutation name="check number of calls">
  7381. <arg name="test name"></arg>
  7382. </mutation>
  7383. <value name="ARG0">
  7384. <block type="text">
  7385. <field name="TEXT">sublist all with #-end # complex</field>
  7386. </block>
  7387. </value>
  7388. <next>
  7389. <block type="variables_set">
  7390. <field name="VAR">number of calls</field>
  7391. <value name="VALUE">
  7392. <block type="math_number">
  7393. <field name="NUM">0</field>
  7394. </block>
  7395. </value>
  7396. <next>
  7397. <block type="unittest_assertequals" inline="false">
  7398. <value name="MESSAGE">
  7399. <block type="text">
  7400. <field name="TEXT">sublist all with # #-end math complex</field>
  7401. </block>
  7402. </value>
  7403. <value name="ACTUAL">
  7404. <block type="lists_getSublist">
  7405. <mutation at1="true" at2="true"></mutation>
  7406. <field name="WHERE1">FROM_START</field>
  7407. <field name="WHERE2">FROM_END</field>
  7408. <comment pinned="false" h="96" w="315">Checks that the whole list is properly retrieved even if the value for start and end is not a simple number. This is especially important in generators where sublist uses [x:length - y] for # #-end.</comment>
  7409. <value name="LIST">
  7410. <block type="procedures_callreturn">
  7411. <mutation name="get space shuttles"></mutation>
  7412. </block>
  7413. </value>
  7414. <value name="AT1">
  7415. <block type="math_arithmetic">
  7416. <field name="OP">ADD</field>
  7417. <value name="A">
  7418. <block type="math_number">
  7419. <field name="NUM">0</field>
  7420. </block>
  7421. </value>
  7422. <value name="B">
  7423. <block type="unittest_adjustindex">
  7424. <value name="INDEX">
  7425. <block type="math_number">
  7426. <field name="NUM">0</field>
  7427. </block>
  7428. </value>
  7429. </block>
  7430. </value>
  7431. </block>
  7432. </value>
  7433. <value name="AT2">
  7434. <block type="math_arithmetic">
  7435. <field name="OP">ADD</field>
  7436. <value name="A">
  7437. <block type="math_number">
  7438. <field name="NUM">0</field>
  7439. </block>
  7440. </value>
  7441. <value name="B">
  7442. <block type="unittest_adjustindex">
  7443. <value name="INDEX">
  7444. <block type="math_number">
  7445. <field name="NUM">0</field>
  7446. </block>
  7447. </value>
  7448. </block>
  7449. </value>
  7450. </block>
  7451. </value>
  7452. </block>
  7453. </value>
  7454. <value name="EXPECTED">
  7455. <block type="variables_get">
  7456. <field name="VAR">list</field>
  7457. </block>
  7458. </value>
  7459. <next>
  7460. <block type="procedures_callnoreturn" inline="true">
  7461. <mutation name="check number of calls">
  7462. <arg name="test name"></arg>
  7463. </mutation>
  7464. <value name="ARG0">
  7465. <block type="text">
  7466. <field name="TEXT">sublist all with # #-end math complex</field>
  7467. </block>
  7468. </value>
  7469. </block>
  7470. </next>
  7471. </block>
  7472. </next>
  7473. </block>
  7474. </next>
  7475. </block>
  7476. </next>
  7477. </block>
  7478. </next>
  7479. </block>
  7480. </next>
  7481. </block>
  7482. </next>
  7483. </block>
  7484. </next>
  7485. </block>
  7486. </next>
  7487. </block>
  7488. </next>
  7489. </block>
  7490. </next>
  7491. </block>
  7492. </next>
  7493. </block>
  7494. </next>
  7495. </block>
  7496. </next>
  7497. </block>
  7498. </next>
  7499. </block>
  7500. </next>
  7501. </block>
  7502. </next>
  7503. </block>
  7504. </next>
  7505. </block>
  7506. </next>
  7507. </block>
  7508. </next>
  7509. </block>
  7510. </next>
  7511. </block>
  7512. </next>
  7513. </block>
  7514. </next>
  7515. </block>
  7516. </next>
  7517. </block>
  7518. </next>
  7519. </block>
  7520. </next>
  7521. </block>
  7522. </next>
  7523. </block>
  7524. </next>
  7525. </block>
  7526. </next>
  7527. </block>
  7528. </next>
  7529. </block>
  7530. </next>
  7531. </block>
  7532. </next>
  7533. </block>
  7534. </next>
  7535. </block>
  7536. </next>
  7537. </block>
  7538. </next>
  7539. </block>
  7540. </next>
  7541. </block>
  7542. </next>
  7543. </block>
  7544. </next>
  7545. </block>
  7546. </next>
  7547. </block>
  7548. </next>
  7549. </block>
  7550. </next>
  7551. </block>
  7552. </statement>
  7553. </block>
  7554. <block type="procedures_defnoreturn" x="13" y="18963">
  7555. <field name="NAME">test join</field>
  7556. <comment pinned="false" h="80" w="160">Tests the "join" block.</comment>
  7557. <statement name="STACK">
  7558. <block type="variables_set">
  7559. <field name="VAR">list</field>
  7560. <value name="VALUE">
  7561. <block type="lists_create_with" inline="true">
  7562. <mutation items="3"></mutation>
  7563. <value name="ADD0">
  7564. <block type="text">
  7565. <field name="TEXT">Vulcan</field>
  7566. </block>
  7567. </value>
  7568. <value name="ADD1">
  7569. <block type="text">
  7570. <field name="TEXT">Klingon</field>
  7571. </block>
  7572. </value>
  7573. <value name="ADD2">
  7574. <block type="text">
  7575. <field name="TEXT">Borg</field>
  7576. </block>
  7577. </value>
  7578. </block>
  7579. </value>
  7580. <next>
  7581. <block type="unittest_assertequals" inline="false">
  7582. <value name="MESSAGE">
  7583. <block type="text">
  7584. <field name="TEXT">join</field>
  7585. </block>
  7586. </value>
  7587. <value name="ACTUAL">
  7588. <block type="lists_split">
  7589. <mutation mode="JOIN"></mutation>
  7590. <field name="MODE">JOIN</field>
  7591. <value name="INPUT">
  7592. <block type="variables_get">
  7593. <field name="VAR">list</field>
  7594. </block>
  7595. </value>
  7596. <value name="DELIM">
  7597. <block type="text">
  7598. <field name="TEXT">,</field>
  7599. </block>
  7600. </value>
  7601. </block>
  7602. </value>
  7603. <value name="EXPECTED">
  7604. <block type="text">
  7605. <field name="TEXT">Vulcan,Klingon,Borg</field>
  7606. </block>
  7607. </value>
  7608. <next>
  7609. <block type="unittest_assertequals" inline="false">
  7610. <value name="MESSAGE">
  7611. <block type="text">
  7612. <field name="TEXT">join order</field>
  7613. </block>
  7614. </value>
  7615. <value name="ACTUAL">
  7616. <block type="lists_split">
  7617. <mutation mode="JOIN"></mutation>
  7618. <field name="MODE">JOIN</field>
  7619. <value name="INPUT">
  7620. <block type="logic_ternary" inline="true">
  7621. <value name="IF">
  7622. <block type="logic_boolean">
  7623. <field name="BOOL">TRUE</field>
  7624. </block>
  7625. </value>
  7626. <value name="THEN">
  7627. <block type="variables_get">
  7628. <field name="VAR">list</field>
  7629. </block>
  7630. </value>
  7631. <value name="ELSE">
  7632. <block type="logic_null"></block>
  7633. </value>
  7634. </block>
  7635. </value>
  7636. <value name="DELIM">
  7637. <block type="text">
  7638. <field name="TEXT">,</field>
  7639. </block>
  7640. </value>
  7641. </block>
  7642. </value>
  7643. <value name="EXPECTED">
  7644. <block type="text">
  7645. <field name="TEXT">Vulcan,Klingon,Borg</field>
  7646. </block>
  7647. </value>
  7648. </block>
  7649. </next>
  7650. </block>
  7651. </next>
  7652. </block>
  7653. </statement>
  7654. </block>
  7655. <block type="procedures_defnoreturn" x="13" y="19263">
  7656. <field name="NAME">test split</field>
  7657. <comment pinned="false" h="80" w="160">Tests the "split" block.</comment>
  7658. <statement name="STACK">
  7659. <block type="variables_set">
  7660. <field name="VAR">text</field>
  7661. <value name="VALUE">
  7662. <block type="text">
  7663. <field name="TEXT">Vulcan,Klingon,Borg</field>
  7664. </block>
  7665. </value>
  7666. <next>
  7667. <block type="unittest_assertequals" inline="false">
  7668. <value name="MESSAGE">
  7669. <block type="text">
  7670. <field name="TEXT">split</field>
  7671. </block>
  7672. </value>
  7673. <value name="ACTUAL">
  7674. <block type="lists_split">
  7675. <mutation mode="SPLIT"></mutation>
  7676. <field name="MODE">SPLIT</field>
  7677. <value name="INPUT">
  7678. <block type="variables_get">
  7679. <field name="VAR">text</field>
  7680. </block>
  7681. </value>
  7682. <value name="DELIM">
  7683. <block type="text">
  7684. <field name="TEXT">,</field>
  7685. </block>
  7686. </value>
  7687. </block>
  7688. </value>
  7689. <value name="EXPECTED">
  7690. <block type="lists_create_with" inline="true">
  7691. <mutation items="3"></mutation>
  7692. <value name="ADD0">
  7693. <block type="text">
  7694. <field name="TEXT">Vulcan</field>
  7695. </block>
  7696. </value>
  7697. <value name="ADD1">
  7698. <block type="text">
  7699. <field name="TEXT">Klingon</field>
  7700. </block>
  7701. </value>
  7702. <value name="ADD2">
  7703. <block type="text">
  7704. <field name="TEXT">Borg</field>
  7705. </block>
  7706. </value>
  7707. </block>
  7708. </value>
  7709. <next>
  7710. <block type="unittest_assertequals" inline="false">
  7711. <value name="MESSAGE">
  7712. <block type="text">
  7713. <field name="TEXT">split order</field>
  7714. </block>
  7715. </value>
  7716. <value name="ACTUAL">
  7717. <block type="lists_split">
  7718. <mutation mode="SPLIT"></mutation>
  7719. <field name="MODE">SPLIT</field>
  7720. <value name="INPUT">
  7721. <block type="logic_ternary" inline="true">
  7722. <value name="IF">
  7723. <block type="logic_boolean">
  7724. <field name="BOOL">TRUE</field>
  7725. </block>
  7726. </value>
  7727. <value name="THEN">
  7728. <block type="variables_get">
  7729. <field name="VAR">text</field>
  7730. </block>
  7731. </value>
  7732. <value name="ELSE">
  7733. <block type="logic_null"></block>
  7734. </value>
  7735. </block>
  7736. </value>
  7737. <value name="DELIM">
  7738. <block type="text">
  7739. <field name="TEXT">,</field>
  7740. </block>
  7741. </value>
  7742. </block>
  7743. </value>
  7744. <value name="EXPECTED">
  7745. <block type="lists_create_with" inline="true">
  7746. <mutation items="3"></mutation>
  7747. <value name="ADD0">
  7748. <block type="text">
  7749. <field name="TEXT">Vulcan</field>
  7750. </block>
  7751. </value>
  7752. <value name="ADD1">
  7753. <block type="text">
  7754. <field name="TEXT">Klingon</field>
  7755. </block>
  7756. </value>
  7757. <value name="ADD2">
  7758. <block type="text">
  7759. <field name="TEXT">Borg</field>
  7760. </block>
  7761. </value>
  7762. </block>
  7763. </value>
  7764. </block>
  7765. </next>
  7766. </block>
  7767. </next>
  7768. </block>
  7769. </statement>
  7770. </block>
  7771. <block type="procedures_defnoreturn" x="13" y="19563">
  7772. <field name="NAME">test sort alphabetic</field>
  7773. <comment pinned="false" h="80" w="160">Tests the "alphabetic sort" block.</comment>
  7774. <statement name="STACK">
  7775. <block type="variables_set">
  7776. <field name="VAR">list</field>
  7777. <value name="VALUE">
  7778. <block type="lists_create_with" inline="true">
  7779. <mutation items="3"></mutation>
  7780. <value name="ADD0">
  7781. <block type="text">
  7782. <field name="TEXT">Vulcan</field>
  7783. </block>
  7784. </value>
  7785. <value name="ADD1">
  7786. <block type="text">
  7787. <field name="TEXT">klingon</field>
  7788. </block>
  7789. </value>
  7790. <value name="ADD2">
  7791. <block type="text">
  7792. <field name="TEXT">Borg</field>
  7793. </block>
  7794. </value>
  7795. </block>
  7796. </value>
  7797. <next>
  7798. <block type="unittest_assertequals" inline="false">
  7799. <value name="MESSAGE">
  7800. <block type="text">
  7801. <field name="TEXT">sort alphabetic ascending</field>
  7802. </block>
  7803. </value>
  7804. <value name="ACTUAL">
  7805. <block type="lists_sort">
  7806. <field name="TYPE">TEXT</field>
  7807. <field name="DIRECTION">1</field>
  7808. <value name="LIST">
  7809. <block type="variables_get">
  7810. <field name="VAR">list</field>
  7811. </block>
  7812. </value>
  7813. </block>
  7814. </value>
  7815. <value name="EXPECTED">
  7816. <block type="lists_create_with" inline="true">
  7817. <mutation items="3"></mutation>
  7818. <value name="ADD0">
  7819. <block type="text">
  7820. <field name="TEXT">Borg</field>
  7821. </block>
  7822. </value>
  7823. <value name="ADD1">
  7824. <block type="text">
  7825. <field name="TEXT">Vulcan</field>
  7826. </block>
  7827. </value>
  7828. <value name="ADD2">
  7829. <block type="text">
  7830. <field name="TEXT">klingon</field>
  7831. </block>
  7832. </value>
  7833. </block>
  7834. </value>
  7835. <next>
  7836. <block type="unittest_assertequals" inline="false">
  7837. <value name="MESSAGE">
  7838. <block type="text">
  7839. <field name="TEXT">sort alphabetic ascending order</field>
  7840. </block>
  7841. </value>
  7842. <value name="ACTUAL">
  7843. <block type="lists_sort">
  7844. <field name="TYPE">TEXT</field>
  7845. <field name="DIRECTION">1</field>
  7846. <value name="LIST">
  7847. <block type="logic_ternary" inline="true">
  7848. <value name="IF">
  7849. <block type="logic_boolean">
  7850. <field name="BOOL">TRUE</field>
  7851. </block>
  7852. </value>
  7853. <value name="THEN">
  7854. <block type="variables_get">
  7855. <field name="VAR">list</field>
  7856. </block>
  7857. </value>
  7858. <value name="ELSE">
  7859. <block type="logic_null"></block>
  7860. </value>
  7861. </block>
  7862. </value>
  7863. </block>
  7864. </value>
  7865. <value name="EXPECTED">
  7866. <block type="lists_create_with" inline="true">
  7867. <mutation items="3"></mutation>
  7868. <value name="ADD0">
  7869. <block type="text">
  7870. <field name="TEXT">Borg</field>
  7871. </block>
  7872. </value>
  7873. <value name="ADD1">
  7874. <block type="text">
  7875. <field name="TEXT">Vulcan</field>
  7876. </block>
  7877. </value>
  7878. <value name="ADD2">
  7879. <block type="text">
  7880. <field name="TEXT">klingon</field>
  7881. </block>
  7882. </value>
  7883. </block>
  7884. </value>
  7885. </block>
  7886. </next>
  7887. </block>
  7888. </next>
  7889. </block>
  7890. </statement>
  7891. </block>
  7892. <block type="procedures_defnoreturn" x="13" y="19863">
  7893. <field name="NAME">test sort ignoreCase</field>
  7894. <comment pinned="false" h="80" w="160">Tests the "alphabetic sort ignore case" block.</comment>
  7895. <statement name="STACK">
  7896. <block type="variables_set">
  7897. <field name="VAR">list</field>
  7898. <value name="VALUE">
  7899. <block type="lists_create_with" inline="true">
  7900. <mutation items="3"></mutation>
  7901. <value name="ADD0">
  7902. <block type="text">
  7903. <field name="TEXT">Vulcan</field>
  7904. </block>
  7905. </value>
  7906. <value name="ADD1">
  7907. <block type="text">
  7908. <field name="TEXT">klingon</field>
  7909. </block>
  7910. </value>
  7911. <value name="ADD2">
  7912. <block type="text">
  7913. <field name="TEXT">Borg</field>
  7914. </block>
  7915. </value>
  7916. </block>
  7917. </value>
  7918. <next>
  7919. <block type="unittest_assertequals" inline="false">
  7920. <value name="MESSAGE">
  7921. <block type="text">
  7922. <field name="TEXT">sort ignore case ascending</field>
  7923. </block>
  7924. </value>
  7925. <value name="ACTUAL">
  7926. <block type="lists_sort">
  7927. <field name="TYPE">IGNORE_CASE</field>
  7928. <field name="DIRECTION">1</field>
  7929. <value name="LIST">
  7930. <block type="variables_get">
  7931. <field name="VAR">list</field>
  7932. </block>
  7933. </value>
  7934. </block>
  7935. </value>
  7936. <value name="EXPECTED">
  7937. <block type="lists_create_with" inline="true">
  7938. <mutation items="3"></mutation>
  7939. <value name="ADD0">
  7940. <block type="text">
  7941. <field name="TEXT">Borg</field>
  7942. </block>
  7943. </value>
  7944. <value name="ADD1">
  7945. <block type="text">
  7946. <field name="TEXT">klingon</field>
  7947. </block>
  7948. </value>
  7949. <value name="ADD2">
  7950. <block type="text">
  7951. <field name="TEXT">Vulcan</field>
  7952. </block>
  7953. </value>
  7954. </block>
  7955. </value>
  7956. <next>
  7957. <block type="unittest_assertequals" inline="false">
  7958. <value name="MESSAGE">
  7959. <block type="text">
  7960. <field name="TEXT">sort ignore case ascending order</field>
  7961. </block>
  7962. </value>
  7963. <value name="ACTUAL">
  7964. <block type="lists_sort">
  7965. <field name="TYPE">IGNORE_CASE</field>
  7966. <field name="DIRECTION">1</field>
  7967. <value name="LIST">
  7968. <block type="logic_ternary" inline="true">
  7969. <value name="IF">
  7970. <block type="logic_boolean">
  7971. <field name="BOOL">TRUE</field>
  7972. </block>
  7973. </value>
  7974. <value name="THEN">
  7975. <block type="variables_get">
  7976. <field name="VAR">list</field>
  7977. </block>
  7978. </value>
  7979. <value name="ELSE">
  7980. <block type="logic_null"></block>
  7981. </value>
  7982. </block>
  7983. </value>
  7984. </block>
  7985. </value>
  7986. <value name="EXPECTED">
  7987. <block type="lists_create_with" inline="true">
  7988. <mutation items="3"></mutation>
  7989. <value name="ADD0">
  7990. <block type="text">
  7991. <field name="TEXT">Borg</field>
  7992. </block>
  7993. </value>
  7994. <value name="ADD1">
  7995. <block type="text">
  7996. <field name="TEXT">klingon</field>
  7997. </block>
  7998. </value>
  7999. <value name="ADD2">
  8000. <block type="text">
  8001. <field name="TEXT">Vulcan</field>
  8002. </block>
  8003. </value>
  8004. </block>
  8005. </value>
  8006. </block>
  8007. </next>
  8008. </block>
  8009. </next>
  8010. </block>
  8011. </statement>
  8012. </block>
  8013. <block type="procedures_defnoreturn" x="13" y="20163">
  8014. <field name="NAME">test sort numeric</field>
  8015. <comment pinned="false" h="80" w="160">Tests the "numeric sort" block.</comment>
  8016. <statement name="STACK">
  8017. <block type="variables_set">
  8018. <field name="VAR">list</field>
  8019. <value name="VALUE">
  8020. <block type="lists_create_with" inline="true">
  8021. <mutation items="3"></mutation>
  8022. <value name="ADD0">
  8023. <block type="math_number">
  8024. <field name="NUM">8</field>
  8025. </block>
  8026. </value>
  8027. <value name="ADD1">
  8028. <block type="math_number">
  8029. <field name="NUM">18</field>
  8030. </block>
  8031. </value>
  8032. <value name="ADD2">
  8033. <block type="math_number">
  8034. <field name="NUM">-1</field>
  8035. </block>
  8036. </value>
  8037. </block>
  8038. </value>
  8039. <next>
  8040. <block type="unittest_assertequals" inline="false">
  8041. <value name="MESSAGE">
  8042. <block type="text">
  8043. <field name="TEXT">sort numeric descending</field>
  8044. </block>
  8045. </value>
  8046. <value name="ACTUAL">
  8047. <block type="lists_sort">
  8048. <field name="TYPE">NUMERIC</field>
  8049. <field name="DIRECTION">-1</field>
  8050. <value name="LIST">
  8051. <block type="variables_get">
  8052. <field name="VAR">list</field>
  8053. </block>
  8054. </value>
  8055. </block>
  8056. </value>
  8057. <value name="EXPECTED">
  8058. <block type="lists_create_with" inline="true">
  8059. <mutation items="3"></mutation>
  8060. <value name="ADD0">
  8061. <block type="math_number">
  8062. <field name="NUM">18</field>
  8063. </block>
  8064. </value>
  8065. <value name="ADD1">
  8066. <block type="math_number">
  8067. <field name="NUM">8</field>
  8068. </block>
  8069. </value>
  8070. <value name="ADD2">
  8071. <block type="math_number">
  8072. <field name="NUM">-1</field>
  8073. </block>
  8074. </value>
  8075. </block>
  8076. </value>
  8077. <next>
  8078. <block type="unittest_assertequals" inline="false">
  8079. <value name="MESSAGE">
  8080. <block type="text">
  8081. <field name="TEXT">sort numeric descending order</field>
  8082. </block>
  8083. </value>
  8084. <value name="ACTUAL">
  8085. <block type="lists_sort">
  8086. <field name="TYPE">NUMERIC</field>
  8087. <field name="DIRECTION">-1</field>
  8088. <value name="LIST">
  8089. <block type="logic_ternary" inline="true">
  8090. <value name="IF">
  8091. <block type="logic_boolean">
  8092. <field name="BOOL">TRUE</field>
  8093. </block>
  8094. </value>
  8095. <value name="THEN">
  8096. <block type="variables_get">
  8097. <field name="VAR">list</field>
  8098. </block>
  8099. </value>
  8100. <value name="ELSE">
  8101. <block type="logic_null"></block>
  8102. </value>
  8103. </block>
  8104. </value>
  8105. </block>
  8106. </value>
  8107. <value name="EXPECTED">
  8108. <block type="lists_create_with" inline="true">
  8109. <mutation items="3"></mutation>
  8110. <value name="ADD0">
  8111. <block type="math_number">
  8112. <field name="NUM">18</field>
  8113. </block>
  8114. </value>
  8115. <value name="ADD1">
  8116. <block type="math_number">
  8117. <field name="NUM">8</field>
  8118. </block>
  8119. </value>
  8120. <value name="ADD2">
  8121. <block type="math_number">
  8122. <field name="NUM">-1</field>
  8123. </block>
  8124. </value>
  8125. </block>
  8126. </value>
  8127. </block>
  8128. </next>
  8129. </block>
  8130. </next>
  8131. </block>
  8132. </statement>
  8133. </block>
  8134. </xml>