about summary refs log tree commit diff
path: root/src/test/run-fail
AgeCommit message (Collapse)AuthorLines
2011-08-02 In trans, don't assume both sides of a binop have the same typeTim Chevalier-0/+6
This was at least partially responsible for Issue 777. The only solution I can think of is for trans to just not generate code for a comparison if one or both sides has type _|_. Since that means evaluating that subexpression diverges, it should be ok to never do the comparison. Actually generating code for the comparison would trip an LLVM assertion failure.
2011-08-02Pretty-print test the rfail tests. Issue #789Brian Anderson-0/+2
2011-07-27Fix damage done by the pretty-printerMarijn Haverbeke-8/+40
2011-07-27Reformat for new syntaxMarijn Haverbeke-145/+57
2011-07-22Add xfail-stage3 directives to testsBrian Anderson-0/+2
The new test runners run stage 3
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-6/+6
2011-07-11Visit the type argument in a port expressionTim Chevalier-0/+16
This closes #664.
2011-07-05Handle fail inside a for-each loop properlyTim Chevalier-0/+16
2011-07-03Un-XFAIL fail-argTim Chevalier-4/+2
2011-07-03Handle fail as an argument; parse fail expressions unambiguouslyTim Chevalier-0/+9
An expression like: foo(1, fail, 2) was failing to parse, because the parser was interpreting the comma as the start of an expression that was an argument to fail, rather than recognizing that the fail here has no arguments Fixed this by using can_begin_expr to determine whether the next token after a fail token suggests that this is a nullary fail or a unary fail. In addition, when translating calls, check before translating each argument that the block still isn't terminated. This has the effect that if an argument list includes fail, the back-end won't keep trying to generate code for successive arguments and trip the !*terminated assertion.
2011-07-03Manipulate contexts correctly in trans_fail_exprTim Chevalier-0/+9
This fixes Issue #617
2011-07-03XFAILing the new test case...Tim Chevalier-0/+2
...because the parsing of fail got changed out from under me. Will fix shortly.
2011-07-02Generate code properly for calls with _|_ - typed argumentsTim Chevalier-0/+9
The code for translating a fail (for example) would call Unreachable(), which terminates the block; if a fail appeared as an argument, this would cause an LLVM assertion failure. Changed trans_call to handle this situation correctly.
2011-07-02Allow any string expression to be used with fail.Josh Matthews-3/+8
2011-06-29Add a runtime flag to enable/disable claims en masseTim Chevalier-0/+1
Now, if the environment variable CHECK_CLAIMS is set, then all claims turn into checks. Otherwise, claims are no-ops.
2011-06-28Implement "claim"Tim Chevalier-0/+16
Implement "claim" (issue #14), which is a version of "check" that doesn't really do the check at runtime. It's an unsafe feature. The new flag --check-claims turns claims into checks automatically -- but it's off by default, so by default, the assertion in a claim doesn't execute at runtime.
2011-06-25Remove variable name 'res' from test suiteMarijn Haverbeke-1/+1
2011-06-22test: Enable more testsBrian Anderson-3/+0
2011-06-21Serialize constraints in types (literal arguments still not supported)Tim Chevalier-0/+11
This involved, in part, changing the ast::def type so that a def_fn has a "purity" field. This lets the typechecker determine whether functions defined in other crates are pure. It also required updating some error messages in tests. As a test for cross-crate constrained functions, I added a safe_slice function to std::str (slice(), with one of the asserts replaced with a function precondition) and some test cases (various versions of fn-constraint.rs) that call it. Also, I changed "fn" to "pred" for some of the boolean functions in std::uint.
2011-06-17test: Fix mismatched types in prep for typechecker fixesBrian Anderson-3/+3
Issue #500
2011-06-16Bring back if-checkTim Chevalier-0/+26
Add "if check" (expr_if_check), a variation on check that executes an "else" clause rather than failing if the check doesn't hold.
2011-06-15Reformat source tree (minus a couple tests that are still grumpy).Graydon Hoare-133/+99
2011-06-14Un-xfail test/run-fail/pred.rsTim Chevalier-6/+3
2011-06-14Un-xfail working test casesTim Chevalier-6/+2
2011-06-14Add xfail-stage0 to some tests (not sure if it matters...)Tim Chevalier-0/+1
2011-06-11test: Add tests for issue #452Brian Anderson-0/+35
2011-06-10Use RHS type when translating assignmentsTim Chevalier-0/+9
In code like "auto foo = fail", a type gets inferred for foo depending on how it's used. However, fail still has type _|_ and still should be treated that way: particularly, its value shouldn't be copied. Fixed trans to reflect that.
2011-06-08Add optional message to fail.Josh Matthews-0/+5
2011-05-31rustc: Teach rustc to use block results as fn return values. Closes #372Brian Anderson-0/+8
2011-05-27Change the syntax for RECV from "var <- port" to "port |> var".Michael Sullivan-4/+4
2011-05-27Remove parser support for recv as an initializer in preparation for changing ↵Michael Sullivan-1/+1
the recv syntax.
2011-05-26Make _|_ unify with anythingTim Chevalier-0/+21
The typechecker had a number of special cases for unifying types with _|_ (as with checking if and alt). But, a value of type _|_ should be usable in any context, as such a value always diverges, and will never be used by its immediate context. Changed unify accordingly, removed special cases.
2011-05-24test: Fix run-fail testing and bring tests up to dateBrian Anderson-20/+2
A typo in the Makefile was causing these to not run. Happily, a lot of these tests pass, so un-xfailed.
2011-05-21rustc: Allow if expressions to failBrian Anderson-0/+12
2011-05-21rustc: Allow alt expressions to failBrian Anderson-0/+13
2011-05-20XFAIL two tests for stage0Tim Chevalier-0/+1
2011-05-20Added a couple of test cases for sending messages. One works as expected, ↵Eric Holk-0/+14
the other succeeds unexpectedly.
2011-05-16Rewrite everything to use [] instead of vec() in value position.Graydon Hoare-2/+2
2011-05-14Remove xfail-boot lines from testsBrian Anderson-1/+0
2011-05-12Fix mistaken replacements in error-pattern comments in testsMarijn Haverbeke-8/+8
2011-05-12Downcase std modules again, move to :: for module dereferencingMarijn Haverbeke-8/+8
This should be a snapshot transition.
2011-05-03Assume xfail-stage0 implies stage1 and stage2 in tests, for now.Graydon Hoare-0/+18
2011-05-02Un-revert "Use different syntax for checks that matter to typestate", fixing ↵Patrick Walton-8/+8
the problem. This reverts commit d08b443fffb1181d8d45ae5d061412f202dd4118.
2011-05-02Revert "Use different syntax for checks that matter to typestate"Graydon Hoare-8/+8
This reverts commit aa25f22f197682de3b18fc4c8ba068d1feda220f. It broke stage2, not sure why yet.
2011-05-02Use different syntax for checks that matter to typestateTim Chevalier-8/+8
This giant commit changes the syntax of Rust to use "assert" for "check" expressions that didn't mean anything to the typestate system, and continue using "check" for checks that are used as part of typestate checking. Most of the changes are just replacing "check" with "assert" in test cases and rustc.
2011-04-19Remove effect system from src.Graydon Hoare-1/+1
2011-03-25Switch xfail system to use comments embedded in source files.Graydon Hoare-0/+10
2010-12-02Add test for non-exhaustive match failure.Graydon Hoare-0/+15
2010-11-02First pass on splitting stratum and opacity off of effects. WIP.Graydon Hoare-1/+1
2010-09-07Small updates to test cases.Michael Bebenita-0/+3