about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2011-05-22test: Un-xfail alias-uninit-value.rs. Closes #374.Brian Anderson-4/+0
This started working correctly at some point.
2011-05-21test: Use more sensible cases in expr-alt-fail-all.Brian Anderson-1/+1
Thanks for the review, Jesse.
2011-05-21test: Adda test that all arms of an alt may result in failBrian Anderson-0/+20
2011-05-21test: Add a test for mismatched types of if branchesBrian Anderson-0/+9
2011-05-21rustc: If all if branches are _|_, then the entire if is _|_Brian Anderson-0/+16
2011-05-21rustc: Allow if expressions to failBrian Anderson-0/+48
2011-05-21rustc: Allow alt expressions to failBrian Anderson-0/+43
2011-05-20Some tests for ! annotationsTim Chevalier-0/+58
2011-05-20Un-XFAIL some tests that now pass.Tim Chevalier-11/+0
2011-05-20XFAIL two tests for stage0Tim Chevalier-1/+2
2011-05-20Merge remote-tracking branch 'graydon/master' into typestate_4Tim Chevalier-0/+29
2011-05-20un-XFAIL forgot-ret and update error patternTim Chevalier-5/+1
2011-05-20More work on anonymous objects.Lindsey Kuper-0/+29
2011-05-20Added a couple of test cases for sending messages. One works as expected, ↵Eric Holk-0/+29
the other succeeds unexpectedly.
2011-05-19rustc: Translate else if blocks the same as other blocks. Closes #388Brian Anderson-2/+4
2011-05-19rustc: Find the correct outer scope in trans_blockBrian Anderson-0/+18
2011-05-19Added two version of reverse and a swap function to the standard library.Eric Holk-0/+29
2011-05-19Finish name collision testing.Marijn Haverbeke-0/+8
And fix a the single screw-up in the source code it caught.
2011-05-19xfail vector-no-ann.rs.Graydon Hoare-0/+5
2011-05-19Checking to make sure we know what 'self' is in nested objects.Lindsey Kuper-0/+45
2011-05-19Make trans use span_err for the dreaded "ty_var in trans::type_of" errorTim Chevalier-0/+10
This required quite a bit of tiresome plumbing about of spans. On the bright side, now other errors can be converted to span_err too. Includes test cases.
2011-05-17rustc: Run block cleanups on else if blocksBrian Anderson-0/+17
With the scheme used to translate 'else if' currently the if expression is translated in a new (else) scope context. If that if expression wants to result in a value that requires refcounting then it will need to drop the refcount in the cleanups of the else block.
2011-05-17Finally rename std::_xxx to std::xxxMarijn Haverbeke-268/+268
Except for _task, which is still a keyword.
2011-05-17Parser fix: 'fail' was eating the next token that came after it.Paul Stansifer-0/+14
2011-05-17Return a better result from blocks. Closes issue #377Brian Anderson-0/+19
Blocks return in a copy of the result of their ending expression, not the direct result of the ending expression, as that may be a local variable which gets zeroed by drop_slot.
2011-05-16Update a couple tests that slipped through.Graydon Hoare-2/+2
2011-05-16Merge remote branch 'origin/master' into HEADGraydon Hoare-0/+123
Conflicts: src/comp/middle/trans.rs
2011-05-16Rewrite everything to use [] instead of vec() in value position.Graydon Hoare-177/+177
2011-05-16Two tests that the typechecker correctly unifies type arguments in patterns ↵Tim Chevalier-0/+52
with their expected tag types
2011-05-16Started adding support for return checking and non-returning function ↵Tim Chevalier-0/+71
annotations * Reorganized typestate into several modules. * Made typestate check that any function with a non-nil return type returns a value. For now, the check is a warning and not an error (see next item). * Added a "bot" type (prettyprinted as _|_), for constructs like be, ret, break, cont, and fail that don't locally return a value that can be inspected. "bot" is distinct from "nil". There is no concrete syntax for _|_, while the concrete syntax for the nil type is (). * Added support to the parser for a ! annotation on functions whose result type is _|_. Such a function is required to have either a fail or a call to another ! function that is reached in all control flow paths. The point of this annotation is to mark functions like unimpl() and span_err(), so that an alt with a call to err() in one case isn't a false positive for the return-value checker. I haven't actually annotated anything with it yet. * Random bugfixes: * * Fixed bug in trans::trans_binary that was throwing away the cleanups for nested subexpressions of an and or or (tests: box-inside-if and box-inside-if2). ** In typeck, unify the expected type arguments of a tag with the actual specified arguments.
2011-05-14Remove xfail-boot lines from testsBrian Anderson-97/+0
2011-05-14Add a regression test for issue #374 (XFAILed)Brian Anderson-4/+10
2011-05-14WIPBrian Anderson-0/+21
2011-05-13'with' no longer a token; whitespace police.Lindsey Kuper-0/+1
Plus renaming the anonymous objects test to a more descriptive name, and XFAILing it because it doesn't work yet.
2011-05-13Bug fixes.Lindsey Kuper-1/+1
Fixed infinite loop on anonymous objects in parser; added expr_anon_obj to walk.rs; fixed syntax of test case.
2011-05-13More progress on anonymous objects.Lindsey Kuper-2/+8
Still segfaulting on the method-overriding.rs test, though.
2011-05-13Starting on support for anonymous objects. Just syntax so far.Lindsey Kuper-0/+26
2011-05-13Remove reserved word tests (since reserved words were removed)Marijn Haverbeke-35/+0
Ping me if you disagree, but I think that in a language that's as in-flux as rust currently is, it is silly to try and enforce a single future-compatibility. The reserved words didn't work well with the parser refactor, so I dropped them for the time being. We can, eventually, bring them back as type-only reserved words.
2011-05-13Implement module namespacesMarijn Haverbeke-3/+6
Module names no longer clash with type and value names. The tokenizer/parser still needs to be taught to be more careful in identifying keywords, so that we can use 'str' and 'vec' and so as module names.
2011-05-13Make module indices hold a list of itemsMarijn Haverbeke-0/+13
This way, they can support having both a type and a value of the same name.
2011-05-13Move capture checking into resolve.rsMarijn Haverbeke-1/+25
Drops capture.rs. The new algorithm also checks for captures function arguments and obj fields.
2011-05-12Fix mistaken replacements in error-pattern comments in testsMarijn Haverbeke-25/+25
2011-05-12Downcase std modules again, move to :: for module dereferencingMarijn Haverbeke-606/+606
This should be a snapshot transition.
2011-05-11Add a missed xfail-stage0Marijn Haverbeke-0/+1
2011-05-11Rewrite comp/middle/resolve.rsMarijn Haverbeke-3/+4
* Cleans up the algorithm * Move first pass to walk (second still folds) * Support part of a type/value namespace split (crate metadata and module indices still need to be taught about this) * Remove a few blatant inefficiencies (import tables being recreated for every lookup, most importantly)
2011-05-11Reuse a single work buffer every time the SHA1 message block is processed.Brian Anderson-6/+4
This finally allows the full lib-sha1 test to run in a reasonable amount of time. Was 30s, now 3s. Trims a second or two from stage2/rustc. XFAIL lib-sha1 in stage0 since it will be very slow until the next snapshot.
2011-05-11Introduce str_slice runtime functionBrian Anderson-0/+34
This reduces the time to execute the new lib-str tests from 1:40ish to a few seconds and will eventually allow the full lib-sha1 test to run in a reasonable amount of time. XFAIL lib-str in stage0 - it will run very slowly until the next snapshot.
2011-05-10Un-XFAIL syntax-extension-fmt.rsBrian Anderson-3/+0
2011-05-10Un-XFAIL compile-fail export tests for stage0Brian Anderson-6/+0
2011-05-09rustc: Alias fix part 2 -- Check that the aliasness of function parameters ↵Patrick Walton-0/+15
matches. Add a test case.