about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2011-07-14Add tests for unsuperviseBrian Anderson-5/+17
2011-07-14Add a flag to run ignored tests. Issue #428Brian Anderson-0/+40
2011-07-14Add head and tail functions to std::ivecBrian Anderson-0/+18
They even have typestate preconditions
2011-07-14Add is_empty, is_not_empty preds to std::ivecBrian Anderson-0/+23
2011-07-14Add a facility for ignoring tests. Issue #428Brian Anderson-0/+37
Adding the #[ignore] attribute will cause the test not to be run, though it will still show up in the list of tests.
2011-07-14Revert "Allow main to return int"Brian Anderson-3/+0
This reverts commit 8c94d8fd54ba864e6a603ba6d90d41ccfaa62f53. There's no mechanism to actually return the value from main, so all this does is allow main -> int to compile. Per #688, the program returns non-zero on failure, so it's not obvious that this change is appropriate at this time.
2011-07-14XFAIL some tests in stage 0Brian Anderson-0/+14
2011-07-13Allow main to return intBrian Anderson-0/+3
2011-07-13Make resolve and the typechecker check for a main fn of theTim Chevalier-0/+12
correct type This means if a non-library program leaves out the main program, the error gets caught earlier than link. Closes #626.
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-139/+139
2011-07-13Add test case from issue #675. The previous fix actually fixes this too.Tim Chevalier-0/+5
2011-07-13Parse nullary ret correctlyTim Chevalier-0/+6
ret is similar to fail: if not followed by an expression, it should be parsed as a ret without an argument. The old version would fail if ret was followed by a close paren (for example). Fixed it. Closes #676.
2011-07-13Add box patternsMarijn Haverbeke-0/+12
An @ can now be prepended to a pattern to unbox something during pattern matching. Closes #661
2011-07-12Fix fast-check target by disabling code snippet printing on warnings (broken ↵Graydon Hoare-0/+1
on .rc files) and adding an xfail-fast flag for global-scope.rs.
2011-07-12Fix type inference of fn tail expressions. Closes #680Brian Anderson-0/+9
2011-07-12Updating and unXFAILing somet communication tests.Eric Holk-105/+80
2011-07-12test: Switch lib-either over to interior vectors. Puts out burning tinderbox.Patrick Walton-26/+26
2011-07-12Make resolve check for type-variable name-shadowingTim Chevalier-5/+8
Capturing a type argument in the enclosing scope should be an error -- this commit implements that check in resolve, avoiding a potential assertion failure in trans. Closes #648.
2011-07-12Change typestate to use visit instead of walkTim Chevalier-0/+8
Typestate was failing to check some code because if it saw an item, it would quit immediately. This was to avoid checking nested items in the same context as the lexically enclosing item, but it was having the wrong effect: not checking the code after the item at all. Fixed by switching to visit and skipping over items in a proper nested fashion. Closes #668.
2011-07-11Change "etc" syntax for record patterns from `{a:b ...}` to `{a:b, _}`.Paul Stansifer-1/+1
2011-07-11Move macro expansion to a separate phase, change macro syntax, and add ↵Paul Stansifer-6/+6
parse_sess to session.
2011-07-11Visit the type argument in a port expressionTim Chevalier-0/+16
This closes #664.
2011-07-11In typeck, check for dynamically sized by-value arguments to thunksTim Chevalier-0/+28
A check in trans didn't have a corresponding check in typeck, causing some programs (to wit, compile-fail/chan-parameterized-args.rs - part of this commit) to fail with an assertion failure in trans instead of a type error. Fixed it. In short, arguments that are future thunk arguments (any spawn arguments, and _ arguments in bind) need to either not contain type params or type vars, or be by-reference. Closes #665.
2011-07-11rustc: Implement explicit global scope resolution via leading "::"; add a ↵Patrick Walton-0/+14
test case
2011-07-11Unify the rhs and lhs types in a sendTim Chevalier-0/+10
Closes #662. One-line fixes are always the best :-D
2011-07-11rustc: Implement pointer dereference; add a test casePatrick Walton-0/+23
2011-07-11Fix comparisons of the nil type to do something sensible.Michael Sullivan-5/+3
Closes #576.
2011-07-11Started working on MapReduce.Eric Holk-0/+220
Currently it's only sequential, but it can do word frequency counting. In an ideal world it would all be polymorphic, but that pushes the limits of our type system right now. We can generalize it later.
2011-07-11Fix autoderef of function calls when the function is not an lval.Michael Sullivan-0/+12
As it turns out, the correct way to handle this is much simpler than what I did originally. Also add more tests.
2011-07-11Add a test that exercises these cases in bind.Michael Sullivan-0/+20
2011-07-11Implement record patternsMarijn Haverbeke-0/+29
Closes #469.
2011-07-11Implement or-patterns in case clausesMarijn Haverbeke-0/+30
You can now say expr_move(?dst, ?src) | expr_assign(?dst, ?src) { ... } to match both expr_move and expr_assign. The names, types, and number of bound names have to match in all the patterns. Closes #449.
2011-07-10rt: Remove the _2 prefix from intrinsics; all rust-intrinsics now use ↵Patrick Walton-11/+11
explicit return pointers
2011-07-09rustc: Make rust-intrinsics take an explicit return pointerPatrick Walton-11/+11
2011-07-09Add sha1 and int tests to stdtest. Issue #428Brian Anderson-0/+110
2011-07-09Begin running the test for int::powBrian Anderson-2/+5
Somehow this has been disabled forever
2011-07-08Tests for constraint propagationTim Chevalier-0/+70
2011-07-08Improve the error message for import glob collisions. Closes #482Brian Anderson-0/+14
Instead of noting where the imported things were defined, note where they were imported. This is more useful and avoids issue #482.
2011-07-08Add test case for issue #333. Closes #333Brian Anderson-0/+12
This has been fixed by a mystery hacker.
2011-07-08Adding more support for working with u64s.Eric Holk-7/+14
2011-07-08rustc: Do dynamic size calculations properly when concatenating interior ↵Patrick Walton-0/+16
vectors. Closes #640.
2011-07-08Ignore current scope when resolving self-shadowing importsMarijn Haverbeke-0/+16
That is, for example, import x::y::x, which defines a local x, and thus wouldn't be able to find x::y anymore. Closes issue #624
2011-07-08Auto-bind generic functions when their value is taken in non-call contextMarijn Haverbeke-0/+13
trans::trans_lval will now autobind if the given expression was the name of a generic functions. Those callees (trans_call and trans_bind) that are interested in the generics information call trans_lval_gen now.
2011-07-07Added a stress test mode to pfib.Eric Holk-13/+57
2011-07-07Un-xfail a test.Lindsey Kuper-1/+0
2011-07-07Fix a bug that was interfering with method overriding. Issue #543.Lindsey Kuper-12/+2
Previously, we were creating both a normal vtable entry and a forwarding function for overriding methods, when they should have just gotten a vtable entry. This patch fixes that.
2011-07-07Make moving of temporaries do the right thing, use it to optimizeMarijn Haverbeke-0/+1
This adds support for dropping cleanups for temporary values when they are moved somewhere else. It then adds wraps most copy operations (return, put in data structure, box, etc) in a way that will fall back to a move when it is safe. This saves a lot of taking/dropping, shaving over a megabyte off the stage2/rustc binary size. In some cases, most notably function returns, we could detect that the returned value is a local variable, and can thus be safely moved even though it is not a temporary. This will require putting some more information in lvals. I did not yet handle function arguments, since the logic for passing them looked too convoluted to touch. I'll probably try that in the near future, since it's bound to be a big win.
2011-07-06Tie the knot for self-calls inside extended objects. Closes #539.Lindsey Kuper-6/+1
2011-07-06Add a stdtest crate to hold the standard library testsBrian Anderson-0/+10
This will link to std and compile with the --test flag. Eventually the run-pass/lib* tests will move here. We could also put the std tests directly into the library and compile both a library version and a test version, but I think this way will make for faster builds. Issue #428
2011-07-06Swap the expected/actual for typechecking fields of updated recordsBrian Anderson-0/+9
In 'rec(a = b with c)', if a exists in c then the expected type for b is the type of c.