about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2011-08-11Update and un-XFAIL run-pass/many.rsBrian Anderson-11/+8
2011-08-11rustc: Lowercase "main function not found" errorBrian Anderson-1/+1
2011-08-11Lowercase the "wrong type in main fn" errorBrian Anderson-3/+3
2011-08-11Fix the error-pattern in compile-fail/bad-main.rs. Un-XFAILBrian Anderson-4/+1
This is also tested by compile-fail/main-wrong-type.rs but the type signatures are slightly different, so I guess it's worth holding on to.
2011-08-10Use actual type, not declared type, when zeroing move argumentsTim Chevalier-0/+16
trans was failing with a bounds check error because the caller was using the declared type (an out-of-scope ty param) and not the actual type in a list of argument types to zero. Closes #811
2011-08-10Test case for issue #812.Lindsey Kuper-0/+19
2011-08-10Begin valgrinding run-fail testsBrian Anderson-19/+40
Introduce a temporary no-valgrind directive for the few that aren't clean
2011-08-09Actually perform handoff from caller to callee on move-mode args.Graydon Hoare-0/+12
2011-08-09test: XFAIL binops.rs for now due to mysterious tinderbox failure on LinuxPatrick Walton-0/+5
2011-08-09test: Update binops.rs with the new equality semanticsPatrick Walton-11/+7
2011-08-09Port the fuzzer and tests to ivec type [T] syntax.Erick Tryzelaar-21/+13
2011-08-09Move along; nothing to see here...Lindsey Kuper-0/+54
2011-08-09Un-XFAIL a test. Issue #435.Lindsey Kuper-4/+0
2011-08-09Update comments on sio-ctx testBrian Anderson-1/+1
2011-08-09Test case for issue #758.Lindsey Kuper-0/+11
2011-08-09XFAIL sio-ctxBrian Anderson-0/+5
Reportedly fails sometimes, probably when RUST_THREADS > 1
2011-08-09The self-stack stuff (from #702) also closes issue #718.Lindsey Kuper-4/+5
2011-08-09Change the ivec type syntax to [T].Erick Tryzelaar-36/+54
This preserves the old syntax for now.
2011-08-09Thread "self" through the stack. Backwarding! Closes #702.Lindsey Kuper-51/+5
2011-08-08Implement typestate checking for move-mode args. Un-XFAIL ↵Graydon Hoare-4/+0
compile-fail/move-arg.rs.
2011-08-08Introduced task handles.unknown-11/+6
This is the new way to refer to tasks in rust-land. Currently all they do is serve as a key to look up the old rust_task structure. Ideally they won't be ref counted, but baby steps.
2011-08-08Add new arg-passing mode 'move' denoted with '-T'. Translate as ↵Graydon Hoare-0/+22
pass-by-value, doesn't deinit source yet nor get proper analysis in typestate, alias passes.
2011-08-08Using unsafe chan pointer idiom to make task-comm-16.rs pass again.Eric Holk-5/+5
2011-08-08Temporarily disabling chan test to put out linux fire.Eric Holk-1/+8
2011-08-08Converted the rest of the task-comm-* tests over. Also fixed someEric Holk-134/+167
channel lifecycle bugs.
2011-08-08Added an unsafe way to pass libchans over spawn and chans, and converted ↵Eric Holk-8/+17
task-comm-0 to use libcomm.
2011-08-05XFAIL sio-srvBrian Anderson-1/+5
Needs to run on loopback so it doesn't trigger windows firewall, but seems to be hanging. Giving up for now.
2011-08-05Another test for the occurs check, this one from issue 778Tim Chevalier-0/+4
2011-08-05Rewrote receive to return a value. This lets us initialize variables by ↵Eric Holk-4/+3
receiving them.
2011-08-05Initialize all constraints to FalseTim Chevalier-0/+17
Previously, typestate was initializing the init constraint for a declared-but-not-initialized variable (like x in "let x;") to False, but other constraints to Don't-know. This led to over-lenient results when a variable was used before declaration (see the included test case). Now, everything gets initialized to False in the prestate/poststate- finding phase, and Don't-know should only be used in pre/postconditions. This aspect of the algorithm really needs formalization (just on paper), but for now, this closes #700
2011-08-05Un-XFAIL sio-ctx, sio-srvBrian Anderson-8/+0
Seem to work consistently
2011-08-05XFAIL all the sio testsBrian Anderson-0/+20
They have random failures still, sadly.
2011-08-05Basic async IO module using libuvRob Arnold-0/+100
2011-08-05(Almost) Always unify a function tail expr with the function result typeTim Chevalier-0/+11
typeck::check_fn had an exception for the case where the tail expr was compatible with type nil -- in that case, it doesn't unify the tail expr's type with the enclosing function's result type. This seems wrong to me. There are several test cases in Issue #719 that illustrate why. If the tail expr has type T, for some type variable T that isn't resolved when this check happens, then T never gets unified with anything, which is incorrect -- T should be unified with the result type of the enclosing function. (The bug was occurring because an unconstrained type variable is compatible with type nil.) Instead, I removed the check for type nil and added a check that the function isn't an iterator -- if it's an iterator, I don't check the tail expr's type against the function result type, as that wouldn't make sense. However, this broke two test cases, and after discussion with brson, I understood that the purpose of the check was to allow semicolons to be omitted in some cases. The whole thing seems rather ad hoc. But I came up with a hacky compromise solution: instead of checking whether the tailexpr type is *compatible* with nil, we now just check whether it *is* nil. This also necessitates calling resolve_type_vars_if_possible before the check happens, which worries me. But, this fixes the bug from Issue #719 without requiring changes to any test cases. Closes #719 but I didn't try every variation -- so reopen the bug if one of the variations still doesn't work.
2011-08-04Prohibit assignment to upvars in lambdas. Closes #805.Michael Sullivan-0/+31
2011-08-04Add a cleanup for copying closures. Closes #804.Michael Sullivan-0/+7
2011-08-04Don't force resolution of type variables until there is no enclosing ↵Michael Sullivan-0/+7
function scope. Closes #803.
2011-08-04Handle alt on a _|_ - typed valueTim Chevalier-0/+3
Return the result of the discriminant from trans_alt, rather than nil, in the _|_ case. This was breaking the enclosed test case (alt-bot-2) when optimization was disabled. Closes #769
2011-08-04Implement the occurs checkTim Chevalier-0/+9
In the writeback phase, the typechecker now checks that it isn't replacing a type variable T with a type that contains T. It also does an occurs check in do_autoderef in order to avoid getting into an infinite chain of derefs. I'm a bit worried that there are more places where the occurs check needs to happen where I'm not doing it now, though. Closes #768
2011-08-03Fix the pretty print tests to handle terminal newlines. Sorry!Michael Sullivan-3/+3
2011-08-03Remove an obsolete FIXME in stdtest/deque.rs. Closes #140.Michael Sullivan-6/+2
2011-08-03Whitespace cleanupBrian Anderson-5/+5
2011-08-03Convert line endings when doing exact pretty-print testingBrian Anderson-0/+8
For the benefit of windows
2011-08-03Add some hacks to get stdin piping working more correctly in windowsBrian Anderson-1/+50
The way pipes work in windows is not the same as unix, though I'm not entirely clear on the differences. This patch changes the windows pipe method to return non-inheritable fds, and the windows rust_run_program method to duplicate them before spawning the new process. This allows make-check-pretty to work on windows.
2011-08-03Revert "Revert "Handle conditionals on _|_ - typed values correctly""Tim Chevalier-0/+3
This reverts commit ea81c03960264bf590cd99ed2b662243e3db7a7c. Changed the case in trans_if where the conditional is _|_ - typed but the block is terminated to return the result of the cond, instead of nil. This passes "make check" with optimization disabled as well as enabled.
2011-08-03Add #concat_idents[] and #ident_to_str[]Paul Stansifer-0/+8
2011-08-03Actually un-xfail the test for put in fns.Michael Sullivan-3/+0
2011-08-03Reject programs that do a put outside of iterators.Michael Sullivan-2/+2
Closes #774.
2011-08-03Do a bunch more typechecking for iters and for each loops.Michael Sullivan-0/+8
Closes #771. Closes #772. Closes #796.
2011-08-03Remove the last remaining xfail-boot directiveBrian Anderson-4/+0