summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
11 daysConvert lib/test/fmt.myr to use testrS. Gilles
2019-10-30Fix build on 9front.Ori Bernstein
2019-10-23Add missing file.Ori Bernstein
2019-10-22Add tests for matching semi-complicated tuplessgilles@math.umd.edu
2019-07-13Oops, mangled something with git9.Ori Bernstein
2019-07-14Fix memory leak in bigparse. (Thanks, Mike)Ori Bernstein
2019-04-28Add test for previous issue.Ori Bernstein
2019-01-29Add test for previous failure.Ori Bernstein
2019-01-07Change indexed array literal syntax.Ori Bernstein
2018-10-28Respect outdir and use it for tests.Ori Bernstein
This makes our gitignore nicer.
2018-08-17Revert "Fix overlapping match statements (thanks Mako)"Ori Bernstein
This reverts commit beab0276a94c684f938ae5ea3d2c29c3dc331386.
2018-08-03Record the closure into all nested funcs.Ori Bernstein
Funcs can go inside funcs.
2018-07-19Support direct tuple access operators "tuple.N"Quentin Carbonneaux
This patch adds tuple access expressions. If t is a tuple, its N-th component can be retrieved with the syntax t.N. Of course, the components are zero indexed. I believe the code also works if 't' is a pointer to a tuple (but I have not checked this).
2018-07-08Enable a few more tests that we fixed.Ori Bernstein
2018-07-08Fix overlapping match statements (thanks Mako)Ori Bernstein
We were overly aggressive in unifying wildcards.
2018-06-09Fix test:wqsOri Bernstein
2018-06-03Add test for recursive closure.Ori Bernstein
2018-04-18Merge remote-tracking branch 'ori/master' into HEADS. Gilles
2018-03-24Clean up and remove edge cases in strfind.Ori Bernstein
2018-03-13Merge branch 'autoexpr' into libmathS. Gilles
2018-01-31Fix missing condition in runtest.shMura Li
2018-01-30Support running single testMura Li
2018-01-26New auto operator.Quentin Carbonneaux
Summary: -------- During the Myrcon in September Ori suggested an 'auto' operator that would evaluate what it applies to, store the result in a temporary t, and call __dispose__(t) when the current block exits. This patch implements this idea under the form of a unary operator. This, for instance, allows to have: impl disposable regex# = __dispose__ = {r; regex.free(r)} ;; regex.exec(auto std.try(regex.compile("f..bar")), "foobar") Like before, it is guaranteed that __dispose__ is called in reverse order of auto appearance. Backward compatibility: ----------------------- Nope. Auto variables are now gone. This should not be a problem, simply rewrite: var auto x = foo() into: var x = auto foo() Implementation: --------------- It largely reuses the code I had written for 'auto' variables but needs a little finer grain tracking because we don't always want to call __dispose__ for *all* auto expression results when leaving a block (some might not be evaluated yet). For example: auto 1 if b -> void ;; auto 2 Only __dispose__(1) must be called when '-> void' is executed. If the block falls through, __dispose__(2) and __dispose__(1) will be called in sequence. TODO: ----- - Err when goto jumps in/out of a block that has auto expressions. - Support auto in patterns. match ... | `std.Some (auto x): ... is essentially rewritten to: match ... | `std.Some (auto x): auto x ... - Test edge cases (e.g., auto in loop condition) Actually, test. Cheers,
2018-01-11Move to new trait syntax.Ori Bernstein
2017-12-06Make the tests file polyglot again.Ori Bernstein
2017-12-05Shift the match frontier correctly.Ori Bernstein
Fixes #159
2017-11-28Format bodyless union without trailing space.snocl
Also fix some whitespace.
2017-11-27Do not leave out *.o and *.use after 'make -C test/ clean'Mura Li
2017-11-18Point mbld to the right libraries for running tests.Ori Bernstein
Thanks to https://github.com/Earnestly
2017-10-17Fix outdated comment in a test.Kartik Agaram
Outdated since 26fef326df.
2017-09-29Use the right variables to point to the compiler.Ori Bernstein
2017-09-23Remove obsolete assert.Ori Bernstein
2017-09-22Fix trait lookup for nested pointers.Ori Bernstein
2017-08-13If a trait is specialized over a generic, it's generic too.Ori Bernstein
2017-07-29Finally do a by-scope comparison of generic types.Ori Bernstein
This should clear the way for better deduplication.
2017-07-25Fix running tests.Ori Bernstein
2017-07-23Implement waitany() on 9front.Ori Bernstein
2017-07-23Preparing for the new mbld.Ori Bernstein
It's a tad stricter about a couple of things.
2017-07-17Convert from `in` to `:`.Ori Bernstein
The winds of change are a-blowin.
2017-07-08Allow matching of empty structs and arraysS. Gilles
2017-07-03Specialize impl declarations on impl type in addition to decl typeMichael Forney
This allows multiple specializations of a declarations with a concrete type, which can be selected with the new impl expression if it can't be deduced by its type alone. For example trait hasname @t = Name: byte[:] ;; impl hasname void = Name = "somename" ;; impl hasname bool = Name = "othername" ;; const boolname = impl(Name, void) To do this, pass the param type through to genericname and specializedcl. Since we now need the type parameter to look up trait decls, make sure n->expr.param gets the necessary treatment in typesub, specializenode, pickle, and unpickle. We also need to tag the param types for export.
2017-07-03Add impl(type, name) to retrieve a particular implementation of a trait declMichael Forney
This avoids having to create a temporary variable when you know what implementation your want for a generic constant or function with generic return value. Re-use the impl keyword for this expression to avoid invalidating existing programs.
2017-06-30Support union constantsMichael Forney
2017-02-14Add test for array alignment bug.Ori Bernstein
2017-02-04Ucons are now prefix expressions.Ori Bernstein
It's just what it looks like. This cleans up taking the address of union literals.
2016-10-28merge consecutive string literalsandrewc
2016-10-09Fix bug with postinc returns.Ori Bernstein
We were draining the postinc queue before the rval. Oops.
2016-09-23Use the first dot as the suffix.Ori Bernstein
Support for .glue.c; maybe we can do better.
2016-09-11Let's not pollute /env with crud.Ori Bernstein
2016-09-11Don't strip spaces from test output.Ori Bernstein
This was breaking one of the test cases.