ref: e6811668a36f0bfaa6abe113bc25ed99473f8973
dir: /test/tests/
# Format: # [B|F] testname [E|P] result # [B|F]: Compiler outcome. # B: Expect that this test will build. # F: Expect that this test will not build. # testname: Test case # The test that will run. If testname contains # no '/', we will try to compile 'testname.myr' # to 'testname', and then execute it, verifying the # result. If the testname is of form a/b/c/.../y/z, # we will try to mbld target z located in subdir # a/b/c/.../y and execute, again verifying. # [E|P|C]: Result type # E tells us that the result is an exit status # P tells us that the result is on stdout, # and should be compared to the value on the # line # C tells us that the result is on stdout, # and should be compared to the contents of # the file passed on the line. # D # result: Result value # What we compare with. This should be self- # evident. B main E 0 B splitline E 3 B add E 53 B mul E 42 B mul8 E 18 B div E 42 B mod E 6 B bsr E 5 B chartest E 0 B trunccast E 15 B zwidencast E 99 B swidencast E 99 B derefassign E 123 B ptrpreinc E 9 B postinc-ret P '1' B incret E 1 B outparam E 42 B outparam-sl E 2 B struct1 E 12 B struct E 42 B align C B structptr E 42 B structasn E 42 B structarray E 42 B structret E 42 B constslice P 2312345678 B constunion P '`std.Some thing' B exportmain E 42 B slalloc E 123 B neststruct E 3 B array E 7 B arrayaddr E 42 B global-arrayvar E 7 B arraylen E 12 B slice E 10 B slicelen E 5 B call E 42 B doublecall P 42,33 B voidcall E 12 B voidarg P 3 B voidassign P ok B callbig E 42 B nestfn E 42 B foldidx P 123,456 B closure P 111555333666 B nestclosure P 1 B closurerec E 21 B fncast P ok B loop P 0123401236789 B subrangefor P 12 B patiter P 23512 B custiter P 67891011 B condiftrue E 7 B condiffalse E 9 B condifrel E 7 B ptrcmp E 0 B overlappingif E 2 #B bigcondarg C ## BUGGERED B fib E 21 B basicfloat E 84 B sqrt E 4 B mandelbrot C B log-and E 0 B log-or E 1 B str E 102 B multistr E 0 B generic E 42 B genericval E 42 B trait-builtin E 42 B pkgtrait E 42 B gtrait P '`std.Before' B emptytrait E 123 B traitimpl P 246,44,meee #B compoundimpl P intptr,charptr B nestucon P asdf B mkunion E 0 B uconinit P 'A B C 123' B genericcall E 42 B generictype E 0 B genericret E 42 B genericmatch E 15 B genericrec E 0 B genericimpl P 'int string @a @a[:]' B recgeneric P 'built' B bigtyblob P '`U100' B genericchain P 'val = 123' B genericmake P 'val = 123' B genericuret E 42 B sizeof E 4 B gsizeof E 5 B matchint E 84 B matchconst E 88 B matchnsconst P 'matched badchar' B matchunion E 84 B matchtup E 42 B matchstruct E 42 B matcharray E 42 B matchargunion E 69 B matchvoid P 'ok' B matchexhaust P worked B matchargstr C B matchunion_sl P foo B matchbind E 8 B matchptr P 'worked' B matchnest P 'abcdef' F matchmixed F matchoverlap B matchctup P 'l = [0, 1, 2, 3] n = 5' B matchor E 0 B bigliteral P 34359738368 B fltabs P '42.0' B arraylit-ni E 2 B arraypack P '(1, foo)(2, bar)(3, baz)' B arraypass P 1 B livearraylit E 21 B arraylit E 3 B structlit E 42 B livestructlit E 21 B tuple E 42 B tupleaccess P 'a: 0, b: 5, c: 2' B slgrow E 42 B slprint P '1 [2]' B tyrec E 42 B infer-named E 99 B exportcycle E 0 B import-type E 0 B helloworld P Hello-世界 B encodechar P 1世界äa B strtab C B catfile C B strstrip C B strsplit C B strfind C B strjoin C B exporttrait E 0 B local-labels E 10 B empty-struct E 21 F declmismatch F infermismatch F usedef F occur F tyoccur F union-extraarg F union-missingarg F match-badtypes F generic-in-const F aritylow F arityhigh F badop B voideffect P pass B foroptexpr P pass #B bounds D 134 B rvaldotlen P pass B destructuretup E 0 B nestedgoto E 0 B initializer E 0 B fmtalign E 0 B fmtnest P _.f2_2,_.f3__3,_4.4__ B implexpr P 12,z,hello B implexpr-concrete P zigzag B abi/001-return-tuple E 0 B abi/002-arg-alignment E 0 B abi/003-ret-alignment E 0 B abi/004-torture-1 E 0 B abi/005-torture-2 E 0 B abi/006-torture-3 E 0