check number of calls Checks that the number of calls is one in order to confirm that a function was only called once. test name number of calls test name number of calls 1 test create Tests the "create list with" and "create empty list" blocks. create empty create items TRUE love TRUE love create repeated Eject 3 Eject Eject Eject create repeated order Eject ADD 0 3 Eject Eject Eject get empty list Creates an empty list for use with the empty test. test empty Tests the "is empty" block. FALSE not empty 0 TRUE empty TRUE empty complex TRUE empty order TRUE test length Tests the "length" block. zero length 0 one length cat 1 three length cat TRUE 3 two length order TRUE cat TRUE 2 test find simple Tests the "find" block with a variable. list Alice Eve Bob Eve find first simple FIRST list Eve 1 find last simple LAST list Eve 3 find none simple FIRST list Dave -1 get names Creates a list for use with the find test. number of calls 1 Alice Eve Bob Eve test find complex Tests the "find" block with a function call. number of calls 0 find first complex FIRST Eve 1 find first complex number of calls 0 find first order complex FIRST TRUE Eve 1 find first order complex number of calls 0 find last complex LAST Eve 3 find last complex number of calls 0 find last order complex LAST TRUE Eve 3 find last order complex number of calls 0 find none complex FIRST Dave -1 find none complex number of calls 0 find none order complex FIRST TRUE Dave -1 find none order complex test get simple Tests the "get" block with a variable. list Kirk Spock McCoy get first simple GET FIRST list Kirk get last simple GET LAST list McCoy TRUE get random simple GT FIRST list GET RANDOM list -1 get # simple GET FROM_START list 1 Spock get # order simple GET FROM_START list TRUE 1 Spock get #-end simple GET FROM_END list 2 Kirk get #-end order simple GET FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. list ADD 0 2 Kirk get star wars Creates a list for use with the get test. number of calls 1 Kirk Spock McCoy test get complex Tests the "get" block with a function call. list Kirk Spock McCoy number of calls 0 get first complex GET FIRST Kirk get first complex number of calls 0 get first order complex GET FIRST TRUE Kirk get first order complex number of calls 0 get last complex GET LAST McCoy get last complex number of calls 0 get last order complex GET LAST TRUE McCoy get last order complex number of calls 0 TRUE get random complex GT FIRST list GET RANDOM -1 get random complex number of calls 0 TRUE get random order complex GT FIRST list GET RANDOM TRUE -1 get random order complex number of calls 0 get # complex GET FROM_START 1 Spock get # complex number of calls 0 get # order complex GET FROM_START TRUE TRUE 1 Spock get # order complex number of calls 0 get #-end complex GET FROM_END 2 Kirk get #-end complex number of calls 0 get #-end order complex GET FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. TRUE ADD 0 2 Kirk get #-end order complex test getRemove Tests the "get and remove" block. list Kirk Spock McCoy getremove first GET_REMOVE FIRST list Kirk getremove first list list Spock McCoy list Kirk Spock McCoy getremove first order GET_REMOVE FIRST TRUE list Kirk getremove first order list list Spock McCoy list Kirk Spock McCoy getremove last GET_REMOVE LAST list McCoy getremove last list list Kirk Spock list Kirk Spock McCoy getremove last order GET_REMOVE LAST TRUE list McCoy getremove last order list list Kirk Spock list Kirk Spock McCoy TRUE getremove random EQ FIRST list GET_REMOVE RANDOM list -1 getremove random list list 2 list Kirk Spock McCoy TRUE getremove random order EQ FIRST list GET_REMOVE RANDOM TRUE list -1 getremove random order list list 2 list Kirk Spock McCoy getremove # GET_REMOVE FROM_START list 1 Spock getremove # list list Kirk McCoy list Kirk Spock McCoy getremove # order GET_REMOVE FROM_START TRUE list TRUE 1 Spock getremove # order list list Kirk McCoy list Kirk Spock McCoy getremove #-end GET_REMOVE FROM_END list 2 Kirk getremove #-end list list Spock McCoy list Kirk Spock McCoy getremove #-end order GET_REMOVE FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. TRUE list ADD 0 2 Kirk getremove #-end order list list Spock McCoy test remove Tests the "remove" block. list Kirk Spock McCoy REMOVE FIRST list remove first list list Spock McCoy list Kirk Spock McCoy REMOVE FIRST TRUE list remove first order list list Spock McCoy list Kirk Spock McCoy REMOVE LAST list remove last list list Kirk Spock list Kirk Spock McCoy REMOVE LAST TRUE list remove last order list list Kirk Spock list Kirk Spock McCoy REMOVE RANDOM list remove random list list 2 list Kirk Spock McCoy REMOVE RANDOM TRUE list remove random order list list 2 list Kirk Spock McCoy REMOVE FROM_START list 1 remove # list list Kirk McCoy list Kirk Spock McCoy REMOVE FROM_START TRUE list TRUE 1 remove # order list list Kirk McCoy list Kirk Spock McCoy REMOVE FROM_END list 2 remove #-end list list Spock McCoy list Kirk Spock McCoy REMOVE FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. TRUE list ADD 0 2 remove #-end order list list Spock McCoy test set Tests the "set" block. list Picard Riker Crusher SET FIRST list Jean-Luc set first list list Jean-Luc Riker Crusher list Picard Riker Crusher SET FIRST TRUE list Jean-Luc set first order list list Jean-Luc Riker Crusher list Picard Riker Crusher SET LAST list Beverly set last list list Picard Riker Beverly list Picard Riker Crusher SET LAST TRUE list Beverly set last order list list Picard Riker Beverly list Picard Riker Crusher SET RANDOM list Data set random list list 3 list Picard Riker Crusher SET RANDOM TRUE list Data set random order list list 3 list Picard Riker Crusher SET FROM_START list 2 Pulaski set # list list Picard Riker Pulaski list Picard Riker Crusher SET FROM_START TRUE list TRUE 2 Pulaski set # order list list Picard Riker Pulaski list Picard Riker Crusher SET FROM_END list 0 Pulaski set #-end list list Picard Riker Pulaski list Picard Riker Crusher SET FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. TRUE list ADD 0 1 Pulaski set #-end order list list Picard Pulaski Crusher test insert Tests the "insert" block. list Picard Riker Crusher INSERT FIRST list Data insert first list list Data Picard Riker Crusher list Picard Riker Crusher INSERT FIRST TRUE list Data insert first order list list Data Picard Riker Crusher list Picard Riker Crusher INSERT LAST list Data insert last list list Picard Riker Crusher Data list Picard Riker Crusher INSERT LAST TRUE list Data insert last order list list Picard Riker Crusher Data list Picard Riker Crusher INSERT RANDOM list Data insert random list list 4 list Picard Riker Crusher INSERT RANDOM TRUE list Data insert random order list list 4 list Picard Riker Crusher INSERT FROM_START list 2 Data insert # list list Picard Riker Data Crusher list Picard Riker Crusher INSERT FROM_START TRUE list TRUE 2 Data insert # order list list Picard Riker Data Crusher list Picard Riker Crusher INSERT FROM_END list 0 Data insert #-end list list Picard Riker Data Crusher list Picard Riker Crusher INSERT FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. TRUE list ADD 0 1 Data insert #-end order list list Picard Data Riker Crusher test sublist simple Tests the "get sub-list" block with a variable. list Columbia Challenger Discovery Atlantis Endeavour sublist # simple FROM_START FROM_START list 1 2 Challenger Discovery sublist # simple order FROM_START FROM_START list TRUE 1 TRUE 2 Challenger Discovery sublist #-end simple FROM_END FROM_END list 2 1 Discovery Atlantis sublist #-end simple order FROM_END FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. list ADD 0 2 ADD 0 1 Discovery Atlantis sublist first-last simple FIRST LAST list list changing list Columbia Challenger Discovery Atlantis Endeavour list copy FIRST LAST changing list REMOVE RANDOM changing list sublist first-last simple copy check list copy list sublist # #-end simple FROM_START FROM_END list 1 1 Challenger Discovery Atlantis sublist #-end # simple FROM_END FROM_START list 2 3 Discovery Atlantis sublist first # simple FIRST FROM_START list 3 Columbia Challenger Discovery Atlantis sublist first #-end simple FIRST FROM_END list 3 Columbia Challenger sublist # last simple FROM_START LAST list 3 Atlantis Endeavour sublist #-end last simple FROM_END LAST list 3 Challenger Discovery Atlantis Endeavour sublist all with # #-end simple FROM_START FROM_END list 0 0 list sublist all with #-end # simple FROM_END FROM_START list 4 4 list sublist all with # #-end math simple FROM_START FROM_END 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. list ADD 0 0 ADD 0 0 list get space shuttles Creates a list for use with the sublist test. number of calls 1 Columbia Challenger Discovery Atlantis Endeavour test sublist complex Tests the "get sub-list" block with a function call. number of calls 0 sublist # start complex FROM_START FROM_START 1 2 Challenger Discovery sublist # start complex number of calls 0 sublist # start order complex FROM_START FROM_START TRUE TRUE 1 TRUE 2 Challenger Discovery sublist # start order complex number of calls 0 sublist # end complex FROM_END FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. 2 1 Discovery Atlantis sublist # end complex number of calls number of calls 1 number of calls 0 sublist # end order complex FROM_END FROM_END TRUE ADD 0 2 ADD 0 1 Discovery Atlantis sublist # end order complex number of calls 0 sublist first-last complex FIRST LAST list sublist first-last complex number of calls 0 sublist # #-end complex FROM_START FROM_END 1 1 Challenger Discovery Atlantis sublist # #-end complex number of calls 0 sublist #-end # complex FROM_END FROM_START 2 3 Discovery Atlantis sublist #-end # complex number of calls 0 sublist first # complex FIRST FROM_START 3 Columbia Challenger Discovery Atlantis sublist first # complex number of calls 0 sublist first #-end complex FIRST FROM_END 3 Columbia Challenger sublist first #-end complex number of calls 0 sublist # last complex FROM_START LAST 3 Atlantis Endeavour sublist # last complex number of calls 0 sublist #-end last simple FROM_END LAST 3 Challenger Discovery Atlantis Endeavour sublist #-end last simple number of calls 0 sublist all with # #-end complex FROM_START FROM_END 0 0 list sublist all with # #-end complex number of calls 0 sublist all with #-end # complex FROM_END FROM_START 4 4 list sublist all with #-end # complex number of calls 0 sublist all with # #-end math complex FROM_START FROM_END 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. ADD 0 0 ADD 0 0 list sublist all with # #-end math complex test join Tests the "join" block. list Vulcan Klingon Borg join JOIN list , Vulcan,Klingon,Borg join order JOIN TRUE list , Vulcan,Klingon,Borg test split Tests the "split" block. text Vulcan,Klingon,Borg split SPLIT text , Vulcan Klingon Borg split order SPLIT TRUE text , Vulcan Klingon Borg test sort alphabetic Tests the "alphabetic sort" block. list Vulcan klingon Borg sort alphabetic ascending TEXT 1 list Borg Vulcan klingon sort alphabetic ascending order TEXT 1 TRUE list Borg Vulcan klingon test sort ignoreCase Tests the "alphabetic sort ignore case" block. list Vulcan klingon Borg sort ignore case ascending IGNORE_CASE 1 list Borg klingon Vulcan sort ignore case ascending order IGNORE_CASE 1 TRUE list Borg klingon Vulcan test sort numeric Tests the "numeric sort" block. list 8 18 -1 sort numeric descending NUMERIC -1 list 18 8 -1 sort numeric descending order NUMERIC -1 TRUE list 18 8 -1