summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2014-01-07'borrowed pointer' -> 'reference'Brian Anderson-5/+5
2014-01-07auto merge of #11353 : alexcrichton/rust/improve-logging, r=brsonbors-0/+46
This will allow capturing of common things like logging messages, stdout prints (using stdio println), and failure messages (printed to stderr). Any new prints added to libstd should be funneled through these task handles to allow capture as well. Additionally, this commit redirects logging back through a `Logger` trait so the log level can be usefully consumed by an arbitrary logger. This commit also introduces methods to set the task-local stdout handles: * std::io::stdio::set_stdout * std::io::stdio::set_stderr * std::io::logging::set_logger These methods all return the previous logger just in case it needs to be used for inspection. I plan on using this infrastructure for extra::test soon, but we don't quite have the primitives that I'd like to use for it, so it doesn't migrate extra::test at this time. Closes #6369
2014-01-06Support arbitrary stdout/stderr/logger handlesAlex Crichton-0/+46
This will allow capturing of common things like logging messages, stdout prints (using stdio println), and failure messages (printed to stderr). Any new prints added to libstd should be funneled through these task handles to allow capture as well. Additionally, this commit redirects logging back through a `Logger` trait so the log level can be usefully consumed by an arbitrary logger. This commit also introduces methods to set the task-local stdout handles: * std::io::stdio::set_stdout * std::io::stdio::set_stderr * std::io::logging::set_logger These methods all return the previous logger just in case it needs to be used for inspection. I plan on using this infrastructure for extra::test soon, but we don't quite have the primitives that I'd like to use for it, so it doesn't migrate extra::test at this time. Closes #6369
2014-01-06auto merge of #11333 : cmr/rust/triage2, r=alexcrichtonbors-2/+6
2014-01-06auto merge of #11315 : alexcrichton/rust/issue-11309, r=huonwbors-0/+28
There was a scheduling race where a child may not increment the global task count before the parent exits, and the parent would then think that there are no more tasks left. Closes #11039
2014-01-05Guarantee that native tasks wait for childrenAlex Crichton-0/+28
There was a scheduling race where a child may not increment the global task count before the parent exits, and the parent would then think that there are no more tasks left.
2014-01-05Fix some warningsCorey Richardson-1/+1
2014-01-05Remove a fixmeCorey Richardson-1/+5
pcwalton says this is right, and it looks right to me too. Closes #4731
2014-01-06Revert "std: adjust requested stack size for thread-local storage."Huon Wilson-22/+0
This reverts commit f1b5f59287106fc511d29c425255bd343608065c. Using a private function of a library is a bad idea: several people (on Linux) were meeting with linking errors because of it (different/older versions of glibc).
2014-01-04auto merge of #11188 : brson/rust/noderef, r=brsonbors-223/+130
This removes the feature where newtype structs can be dereferenced like pointers, and likewise where certain enums can be dereferenced (which I imagine nobody realized still existed). This ad-hoc behavior is to be replaced by a more general overloadable dereference trait in the future. I've been nursing this patch for two months and think it's about rebased up to master. @nikomatsakis this makes a bunch of your type checking code noticeably uglier.
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-222/+127
2014-01-04auto merge of #11284 : huonw/rust/issue-6233, r=alexcrichtonbors-0/+22
If there is a lot of data in thread-local storage some implementations of pthreads (e.g. glibc) fail if you don't request a stack large enough -- by adjusting for the minimum size we guarantee that our stacks are always large enough. Issue #6233.
2014-01-04Don't allow single-variant enums to be dereferenced. #6246Brian Anderson-1/+3
I'm not sure if this was even intentional at this point.
2014-01-04std: adjust requested stack size for thread-local storage.Huon Wilson-0/+22
If there is a lot of data in thread-local storage some implementations of pthreads (e.g. glibc) fail if you don't request a stack large enough -- by adjusting for the minimum size we guarantee that our stacks are always large enough. Issue #6233.
2014-01-03test: Make all the run-pass tests use `pub fn main`Patrick Walton-73/+73
2014-01-03test: De-`@mut` the test suitePatrick Walton-724/+290
2014-01-03test: Get rid of some `@mut`s in borrow check testsPatrick Walton-2/+2
2014-01-03test: Make `borrowck-assign-to-subfield` into a run-pass test, now thatPatrick Walton-0/+30
it no longer has boxes in it
2014-01-03test: Remove all borrow check write guard testsPatrick Walton-111/+0
2014-01-03auto merge of #11149 : alexcrichton/rust/remove-either, r=brsonbors-0/+5
Had to change some stuff in typeck to bootstrap (getting methods in fmt off of Either), but other than that not so painful. Closes #9157
2014-01-03Remove std::eitherAlex Crichton-0/+5
2014-01-03auto merge of #11276 : brson/rust/0.9, r=pcwaltonbors-1/+1
2014-01-02auto merge of #11093 : alexcrichton/rust/issue-11085, r=pcwaltonbors-0/+55
Closes #11085
2014-01-02Bump version to 0.9Brian Anderson-1/+1
2014-01-02auto merge of #10696 : fhahn/rust/issue9543-remove-extern-mod-foo, r=pcwaltonbors-3/+2
This patch for #9543 throws an `obsolete syntax` error for `extern mod foo (name="bar")` . I was wondering if [this](https://github.com/fhahn/rust/compare/mozilla:master...fhahn:issue9543-remove-extern-mod-foo?expand=1#diff-da9d34ca1d0f6beee2838cf02e07345cR4444) is the correct place to do this? I think the wording of the error message could probably be improved as well. If this approach is OK, I'm going to run the whole test suite tomorrow and update the old syntax to the new one.
2014-01-01auto merge of #11245 : alexcrichton/rust/issue-11225, r=pcwaltonbors-0/+52
Commit messages are a little more descriptive.
2014-01-01Remove `extern mod foo (name="bar")` syntax, closes #9543Florian Hahn-3/+2
2013-12-31Conservatively export all trait methods and implsAlex Crichton-0/+52
The comments have more information as to why this is done, but the basic idea is that finding an exported trait is actually a fairly difficult problem. The true answer lies in whether a trait is ever referenced from another exported method, and right now this kind of analysis doesn't exist, so the conservative answer of "yes" is always returned to answer whether a trait is exported. Closes #11224 Closes #11225
2013-12-30Revert "Embed Windows application manifest."Vadim Chugunov-19/+0
2013-12-28auto merge of #11159 : alexcrichton/rust/native-io, r=pcwaltonbors-178/+0
The old `rtio-processes` run-pass test is now moved into libstd's `io::process` module, and all process and TCP tests are now run with `iotest!` (both a native and a green version are tested). All TCP networking on windows is provided by `ws2_32` which is apparently very similar to unix networking (hurray!).
2013-12-27Bring native process bindings up to dateAlex Crichton-178/+0
Move the tests into libstd, use the `iotest!` macro to test both native and uv bindings, and use the cloexec trick to figure out when the child process fails in exec.
2013-12-27Add tests for trait object coercion.Luqman Aden-0/+84
2013-12-25Test fixes and rebase conflictsAlex Crichton-1/+1
* vec::raw::to_ptr is gone * Pausible => Pausable * Removing @ * Calling the main task "<main>" * Removing unused imports * Removing unused mut * Bringing some libextra tests up to date * Allowing compiletest to work at stage0 * Fixing the bootstrap-from-c rmake tests * assert => rtassert in a few cases * printing to stderr instead of stdout in fail!()
2013-12-24rustc: Strip struct fields and enum variantsAlex Crichton-0/+55
Closes #11085
2013-12-24Test fixes and rebase problemsAlex Crichton-86/+4
Note that this removes a number of run-pass tests which are exercising behavior of the old runtime. This functionality no longer exists and is thoroughly tested inside of libgreen and libnative. There isn't really the notion of "starting the runtime" any more. The major notion now is "bootstrapping the initial task".
2013-12-23rustc: Add a lint for the obsolete crate-level link attributeBrian Anderson-8/+0
2013-12-22auto merge of #11064 : huonw/rust/vec-sort, r=alexcrichtonbors-0/+89
This uses quite a bit of unsafe code for speed and failure safety, and allocates `2*n` temporary storage. [Performance](https://gist.github.com/huonw/5547f2478380288a28c2): | n | new | priority_queue | quick3 | |-------:|---------:|---------------:|---------:| | 5 | 200 | 155 | 106 | | 100 | 6490 | 8750 | 5810 | | 10000 | 1300000 | 1790000 | 1060000 | | 100000 | 16700000 | 23600000 | 12700000 | | sorted | 520000 | 1380000 | 53900000 | | trend | 1310000 | 1690000 | 1100000 | (The times are in nanoseconds, having subtracted the set-up time (i.e. the `just_generate` bench target).) I imagine that there is still significant room for improvement, particularly because both priority_queue and quick3 are doing a static call via `Ord` or `TotalOrd` for the comparisons, while this is using a (boxed) closure. Also, this code does not `clone`, unlike `quick_sort3`; and is stable, unlike both of the others.
2013-12-22fix check-fast tests.Huon Wilson-1/+2
2013-12-22std::vec: make the sorting closure use `Ordering` rather than just beingHuon Wilson-3/+3
(implicitly) less_eq.
2013-12-21std::vec: add a sugary .sort() method for plain Ord sorting.Huon Wilson-2/+2
This moves the custom sorting to `.sort_by`.
2013-12-20auto merge of #11075 : alexcrichton/rust/issue-10392, r=brsonbors-0/+37
We decided in the 12/10/13 weekly meeting that trailing commas should be accepted pretty much anywhere. They are currently not allowed in struct patterns, and this commit adds support for that. Closes #10392
2013-12-20std::vec: implement a stable merge sort, deferring to insertion sort forHuon Wilson-0/+88
very small runs. This uses a lot of unsafe code for speed, otherwise we would be having to sort by sorting lists of indices and then do a pile of swaps to put everything in the correct place. Fixes #9819.
2013-12-19auto merge of #11057 : alexcrichton/rust/no-at-in-ebml, r=pcwaltonbors-6/+10
Now that the metadata is an owned value with a lifetime of a borrowed byte slice, it's possible to have future optimizations where the metadata doesn't need to be copied around (very expensive operation).
2013-12-19Purge @-boxes from the reading half of EBMLAlex Crichton-6/+10
Now that the metadata is an owned value with a lifetime of a borrowed byte slice, it's possible to have future optimizations where the metadata doesn't need to be copied around (very expensive operation).
2013-12-19librustc: Add missing case for the `Pod` bound in `tydecode`.Patrick Walton-0/+19
2013-12-19Accept trailing commas in struct patternsAlex Crichton-0/+37
We decided in the 12/10/13 weekly meeting that trailing commas should be accepted pretty much anywhere. They are currently not allowed in struct patterns, and this commit adds support for that. Closes #10392
2013-12-19Rename pkgid to crate_idCorey Richardson-4/+4
Closes #11035
2013-12-18auto merge of #11012 : alexcrichton/rust/needstest, r=alexcrichtonbors-0/+150
Closes #5806 Closes #8259 Closes #8578 Closes #8851 Closes #10412
2013-12-18Adding tests for closed issuesAlex Crichton-0/+150
Closes #5806 Closes #5950 Closes #7178 Closes #8259 Closes #8578 Closes #8851 Closes #9129 Closes #10412
2013-12-18rustc: Allow `return` to return from a closure.Huon Wilson-0/+41
With the old `for` gone, this behaviour is no longer conflicting with that use of `return` in closures, and this allows shortcircuiting in a closure.