Commit graph

899 commits

Author SHA1 Message Date
Brian Anderson
44c93b5fb2 Remove task-comm-chan-chan test
This issue has a smaller test case in chan-leak.rs
2011-08-02 17:49:11 -07:00
Brian Anderson
a6cb0c2843 Enable more tests that pretty-print correctly now 2011-08-02 17:49:11 -07:00
Brian Anderson
2911156820 Pretty-print fn constraints more correctish 2011-08-02 17:49:11 -07:00
Brian Anderson
637037f68c Un-xfail run-pass/claim-nonterm
Seems to work
2011-08-02 17:49:11 -07:00
Brian Anderson
25b16ba9a2 Un-xfail run-fail/fn-constraint-claim
Seems to work
2011-08-02 17:49:11 -07:00
Brian Anderson
3eef9993af Don't pp extra lines after block open when preserving whitespace. Closes #759 2011-08-02 17:49:11 -07:00
Tim Chevalier
731797d075 In trans, don't assume both sides of a binop have the same type
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-02 17:36:41 -07:00
Paul Stansifer
ab4764520c Allow patterns of the form `[a, b, c ...] to be matched and transcribed. 2011-08-02 14:46:02 -07:00
Brian Anderson
ea2a968146 Include benchmarks in pretty-print tests 2011-08-02 14:37:03 -07:00
Brian Anderson
35e9e02066 Use ioivec::read_whole_file_str in a few places 2011-08-02 10:39:14 -07:00
Brian Anderson
77be30fa73 Typecheck pretty-printing test results as libraries. Issue #789
After running source files through the pretty printer, we sanity check them by
running the results through the compiler with the --no-trans flag. Now also
use the --lib flag so that pretty-printer tests don't have to include a main
function.
2011-08-02 10:39:14 -07:00
Brian Anderson
0fbb6782bb Add dedicated pretty-printer tests with new pp-exact directive
Add a new src/test/pretty directory to hold just source files for testing the
pretty-printer.

Add a new pp-exact directive. When this directive is followed by a file name
it specifies a file containing the output that the pretty-printer should
generate. When pp-exact is not followed by a filename it says that the file
should pretty-print as written.
2011-08-02 10:39:13 -07:00
Brian Anderson
e13390a199 Pretty-print test the rfail tests. Issue #789 2011-08-02 10:39:13 -07:00
Brian Anderson
0a6e3362c6 Add xfail-pretty directives to tests that don't pretty-print correctly
Issue #789
2011-08-02 10:39:13 -07:00
Brian Anderson
166c73546a Remove test/run-pass/simple-qsort
This is part of stdtest now
2011-08-02 10:39:13 -07:00
Brian Anderson
1702b8507d Add xfail-pretty test directive. Issue #789
Indicates that this test should not be used to test the pretty-printer
2011-08-02 10:39:13 -07:00
Brian Anderson
a601eb169e Run pretty-printed sources through the compiler again for sanity
Just go as far as typechecking for speed sake.

Issue #789
2011-08-02 10:39:13 -07:00
Brian Anderson
1653f3f1a9 Implement test that pretty-printed code converges. Issue #789 2011-08-02 10:39:13 -07:00
Brian Anderson
4828d8f73f Remove unused procsrv::clone function from compiletest 2011-08-02 10:39:12 -07:00
Brian Anderson
291c43af31 Fix comment typo in compiletest 2011-08-02 10:39:12 -07:00
Brian Anderson
39d3b93a38 Pretty-print tests only run on .rs files. Issue #789
The pretty-printer can't handle .rc files currently
2011-08-02 10:39:12 -07:00
Brian Anderson
4e8ab8b3a8 Introduce pretty-print testing mode to compiletest. Issue #789 2011-08-02 10:39:12 -07:00
Brian Anderson
af2eecdabe Replace an open-coded conversion with ivec::from_vec 2011-08-02 10:39:12 -07:00
Brian Anderson
a8af13e784 Move compiletest modules into separate files 2011-08-02 10:39:12 -07:00
Marijn Haverbeke
f8fa574864 Copy locals created by destructuring on the content of a box
This is required so that assigning to these locals doesn't clobber
the content of the box.

(A possible optimization would be to only do this copying for
locals that actually are assigned to.)
2011-08-02 12:09:15 +02:00
Marijn Haverbeke
043d95a2bd Move ppaux::ty_to_str to new record syntax 2011-08-02 12:09:15 +02:00
Tim Chevalier
5cf5f5024d Handle bang functions correctly in typestate
The logic for how the "returns" constraint was handled was always
dodgy, for reasons explained in the comments I added to
auxiliary::fn_info in this commit. Fixed it by adding distinct
"returns" and "diverges" constraints for each function, which
are both handled positively (that is: for a ! function, the
"diverges" constraint must be true on every exit path; for
any other function, the "returns" constraint must be true
on every exit path).

Closes #779
2011-08-01 20:58:16 -07:00
Brian Anderson
c9b16ac4c2 Add std::str::is_whitespace 2011-08-01 18:55:51 -07:00
Brian Anderson
1ad68eafd2 Add std::str::trim/trim_left/trim_right 2011-08-01 18:55:51 -07:00
Brian Anderson
598e25e091 Add std::char_slice 2011-08-01 18:55:51 -07:00
Brian Anderson
2f7ed33517 Ignore whitespace in argument lists in compiletest
Makes testing work with DEBUG=1
2011-08-01 16:41:20 -07:00
Eric Holk
939bca0d84 Added send and receive to comm library. 2011-08-01 15:58:39 -07:00
Eric Holk
b3d9d9b73c Objectified library chans and ports. 2011-08-01 15:58:30 -07:00
Eric Holk
5a673cc2c9 Started working on a library-based comm system. Creating and deleting ports work. 2011-08-01 15:58:30 -07:00
Marijn Haverbeke
4837a57df5 Add tests for destructuring locals 2011-08-01 17:52:43 +02:00
Brian Anderson
ec46f07e6e Add a task spawning benchmark
This is the kind of workload that the test runner generates - lots of tiny
little tasks - and currently it leaves the CPU underutilized.
2011-07-29 22:45:01 -07:00
Graydon Hoare
0c9b749d20 Enable kind checking on typarams, fix kind constraints in library and comp. 2011-07-29 18:48:15 -07:00
Lindsey Kuper
6ba4e34959 Reduced test case for current backwarding bug.
Still working on getting backwarding to play nicely with self and
overriding.  Currently can't fix issue #702 without breaking how self
and overriding interact.
2011-07-29 18:30:27 -07:00
Tim Chevalier
766e939857 Test case for previous commit 2011-07-29 18:00:10 -07:00
Brian Anderson
57e4efb894 Fix long lines 2011-07-29 15:20:24 -07:00
Brian Anderson
d4616725ad Add issue numbers to FIXMEs in compiletest 2011-07-29 15:11:14 -07:00
Brian Anderson
d03af073b4 Close pipes under failure scenario in compiletest 2011-07-29 14:37:00 -07:00
Brian Anderson
b306a0d714 Get compile tests to run in parallel
Takes a lot of workarounds. The biggest problem is that boxes still don't seem
to be moved across channels and bad things happen when the receiver destroys
them. So there's all sorts of defensive cloning and scoping going on here to
make the box lifetimes come out right.
2011-07-29 14:36:56 -07:00
Lindsey Kuper
3595f1f966 Disallow overloading a method with one of different type. Closes #703. 2011-07-29 13:44:34 -07:00
Graydon Hoare
f3c05b9fae Turn on kind propagation for typarams. Annotate a bunch of typarams in rustc and libstd. 2011-07-29 12:58:52 -07:00
Marijn Haverbeke
b1d2a00b4a Remove support for obj dtors 2011-07-29 14:03:24 +02:00
Marijn Haverbeke
30d2e358be Replace obj dtors with resources in stdlib and rustc 2011-07-29 14:03:24 +02:00
Marijn Haverbeke
5adf87a2c6 Fix iter_structural_ty_full for resource types
The compiler would blow up when compiling a structural type
containing a resource.
2011-07-29 11:44:29 +02:00
Brian Anderson
3896524750 Drop the previous reference when receiving. Closes #763 2011-07-28 18:22:15 -07:00
Brian Anderson
021bfb4b9b Reenable expr-scope test. Disable under check-fast 2011-07-28 14:14:29 -07:00