summary refs log tree commit diff
path: root/src/test/run-fail
AgeCommit message (Collapse)AuthorLines
2014-03-31vec: convert `append` and `append_one` to methodsDaniel Micay-1/+1
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-27Fix fallout of removing default boundsAlex Crichton-2/+2
This is all purely fallout of getting the previous commit to compile.
2014-03-21rustc: Switch defaults from libgreen to libnativeAlex Crichton-2/+0
The compiler will no longer inject libgreen as the default runtime for rust programs, this commit switches it over to libnative by default. Now that libnative has baked for some time, it is ready enough to start getting more serious usage as the default runtime for rustc generated binaries. We've found that there isn't really a correct decision in choosing a 1:1 or M:N runtime as a default for all applications, but it seems that a larger number of programs today would work more reasonable with a native default rather than a green default. With this commit come a number of bugfixes: * The main native task is now named "<main>" * The main native task has the stack bounds set up properly * #[no_uv] was renamed to #[no_start] * The core-run-destroy test was rewritten for both libnative and libgreen and one of the tests was modified to be more robust. * The process-detach test was locked to libgreen because it uses signal handling
2014-03-22Remove outdated and unnecessary std::vec_ng::Vec imports.Huon Wilson-11/+1
(And fix some tests.)
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-6/+28
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-21test: Automatically remove all `~[T]` from tests.Patrick Walton-27/+27
2014-03-15log: Introduce liblog, the old std::loggingAlex Crichton-26/+32
This commit moves all logging out of the standard library into an external crate. This crate is the new crate which is responsible for all logging macros and logging implementation. A few reasons for this change are: * The crate map has always been a bit of a code smell among rust programs. It has difficulty being loaded on almost all platforms, and it's used almost exclusively for logging and only logging. Removing the crate map is one of the end goals of this movement. * The compiler has a fair bit of special support for logging. It has the __log_level() expression as well as generating a global word per module specifying the log level. This is unfairly favoring the built-in logging system, and is much better done purely in libraries instead of the compiler itself. * Initialization of logging is much easier to do if there is no reliance on a magical crate map being available to set module log levels. * If the logging library can be written outside of the standard library, there's no reason that it shouldn't be. It's likely that we're not going to build the highest quality logging library of all time, so third-party libraries should be able to provide just as high-quality logging systems as the default one provided in the rust distribution. With a migration such as this, the change does not come for free. There are some subtle changes in the behavior of liblog vs the previous logging macros: * The core change of this migration is that there is no longer a physical log-level per module. This concept is still emulated (it is quite useful), but there is now only a global log level, not a local one. This global log level is a reflection of the maximum of all log levels specified. The previously generated logging code looked like: if specified_level <= __module_log_level() { println!(...) } The newly generated code looks like: if specified_level <= ::log::LOG_LEVEL { if ::log::module_enabled(module_path!()) { println!(...) } } Notably, the first layer of checking is still intended to be "super fast" in that it's just a load of a global word and a compare. The second layer of checking is executed to determine if the current module does indeed have logging turned on. This means that if any module has a debug log level turned on, all modules with debug log levels get a little bit slower (they all do more expensive dynamic checks to determine if they're turned on or not). Semantically, this migration brings no change in this respect, but runtime-wise, this will have a perf impact on some code. * A `RUST_LOG=::help` directive will no longer print out a list of all modules that can be logged. This is because the crate map will no longer specify the log levels of all modules, so the list of modules is not known. Additionally, warnings can no longer be provided if a malformed logging directive was supplied. The new "hello world" for logging looks like: #[phase(syntax, link)] extern crate log; fn main() { debug!("Hello, world!"); }
2014-03-14extra: Put the nail in the coffin, delete libextraAlex Crichton-11/+0
This commit shreds all remnants of libextra from the compiler and standard distribution. Two modules, c_vec/tempfile, were moved into libstd after some cleanup, and the other modules were moved to separate crates as seen fit. Closes #8784 Closes #12413 Closes #12576
2014-03-06fix typos with with repeated words, just like this sentence.Kang Seonghoon-1/+1
2014-03-04Cleaned up `std::any`Marvin Löbel-1/+1
- Added `TraitObject` representation to `std::raw`. - Added doc to `std::raw`. - Removed `Any::as_void_ptr()` and `Any::as_mut_void_ptr()` methods as they are uneccessary now after the removal of headers on owned boxes. This reduces the number of virtual calls needed. - Made the `..Ext` implementations work directly with the repr of a trait object. - Removed `Any`-related traits from the prelude. - Added bench for `Any`
2014-02-25test: Clean out the test suite a bitAlex Crichton-166/+1
This updates a number of ignore-test tests, and removes a few completely outdated tests due to the feature being tested no longer being supported. This brings a number of bench/shootout tests up to date so they're compiling again. I make no claims to the performance of these benchmarks, it's just nice to not have bitrotted code. Closes #2604 Closes #9407
2014-02-23Move std::{trie, hashmap} to libcollectionsAlex Crichton-1/+3
These two containers are indeed collections, so their place is in libcollections, not in libstd. There will always be a hash map as part of the standard distribution of Rust, but by moving it out of the standard library it makes libstd that much more portable to more platforms and environments. This conveniently also removes the stuttering of 'std::hashmap::HashMap', although 'collections::HashMap' is only one character shorter.
2014-02-16Update clients of the TaskBuilder APIKevin Ballard-9/+3
2014-02-14extern mod => extern crateAlex Crichton-11/+11
This was previously implemented, and it just needed a snapshot to go through
2014-02-14extra: Capture stdout/stderr of tests by defaultAlex Crichton-0/+2
When tests fail, their stdout and stderr is printed as part of the summary, but this helps suppress failure messages from #[should_fail] tests and generally clean up the output of the test runner.
2014-02-12Reenable some ignored test casesFlorian Hahn-0/+0
* src/test/run-pass/issue-3559.rs was fixed in #4726 * src/test/compile-fail/borrowck-call-sendfn.rs was fixed in #2978 * update src/test/compile-fail/issue-5500-1.rs to work with current Rust * removed src/test/compile-fail/issue-5500.rs because it is tested in src/test/run-fail/issue-5500.rs * src/test/compile-fail/view-items-at-top.rs fixed * #897 fixed * compile-fail/issue-6762.rs issue was closed as dup of #6801 * deleted compile-fail/issue-2074.rs because it became irelevant and is irrelevant #2074, a test covering this was added in 4f92f452bd701fb39156d66d4756cc48cc396a8a
2014-02-11Change `xfail` directives in compiletests to `ignore`, closes #11363Florian Hahn-34/+34
2014-02-08auto merge of #12090 : bjz/rust/unimplemented, r=cmrbors-0/+24
Adds a standardised placeholder for marking unfinished code.
2014-02-07Delete send_str, rewrite clients on top of MaybeOwned<'static>Kevin Ballard-1/+1
Declare a `type SendStr = MaybeOwned<'static>` to ease readibility of types that needed the old SendStr behavior. Implement all the traits for MaybeOwned that SendStr used to implement.
2014-02-07Added tests to make tidyDerek Guenther-0/+50
2014-02-08Add missing test for unreachable! macroBrendan Zabarauskas-0/+12
2014-02-08Add unimplemented! macroBrendan Zabarauskas-0/+12
2014-02-07Removed @self and @Trait.Eduard Burtescu-31/+0
2014-02-05move concurrent stuff from libextra to libsyncJeremyLetang-3/+3
2014-01-30Remove Times traitBrendan Zabarauskas-2/+2
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
2014-01-29Remove do keyword from test/Scott Lawrence-22/+22
2014-01-25Uppercase numeric constantsChris Wong-7/+7
The following are renamed: * `min_value` => `MIN` * `max_value` => `MAX` * `bits` => `BITS` * `bytes` => `BYTES` Fixes #10010.
2014-01-13xfail another native test on android (#11419)Brian Anderson-0/+1
2014-01-09Remove ApproxEq and assert_approx_eq!Brendan Zabarauskas-28/+0
This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases.
2014-01-05Don't abort the process in native::startAlex Crichton-0/+22
If the main closure failed, then the `exit_code` variable would still be `None`, and the `unwrap()` was failing (triggering a process abort). This changes the `unwrap()` to an `unwrap_or()` in order to prevent process abort and detect when the native task failed.
2014-01-03test: De-`@mut` the test suitePatrick Walton-1/+1
2014-01-03test: Remove all borrow check write guard testsPatrick Walton-252/+0
2013-12-19std::vec: remove .as_imm_buf, replaced by .as_ptr & .len.Huon Wilson-11/+10
There's no need for the restrictions of a closure with the above methods.
2013-12-12Gate literal box expressions in addition to typesAlex Crichton-0/+49
Closes #10920
2013-12-11Make 'self lifetime illegal.Erik Price-4/+4
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-06Made Results API more composableMarvin Löbel-1/+1
2013-11-26librustc: Make `||` lambdas not infer to `proc`sPatrick Walton-1/+1
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-2/+2
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-1/+1
2013-11-26test: Remove most uses of `&fn()` from the tests.Patrick Walton-4/+4
2013-11-24Remove linked failure from the runtimeAlex Crichton-10/+17
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-18librustc: Convert `~fn()` to `proc()` everywhere.Patrick Walton-1/+1
2013-11-01auto merge of #10204 : alexcrichton/rust/better-names, r=brsonbors-0/+33
Tests now have the same name as the test that they're running (to allow for easier diagnosing of failure sources), and the main task is now specially named `<main>` instead of `<unnamed>`. Closes #10195 Closes #10073
2013-11-01Give test and main tasks better namesAlex Crichton-0/+33
Tests now have the same name as the test that they're running (to allow for easier diagnosing of failure sources), and the main task is now specially named <main> instead of <unnamed>. Closes #10195 Closes #10073
2013-11-01Reordered the methods in std::Option and std::ResultMarvin Löbel-2/+2
Cleaned up the source in a few places Renamed `map_move` to `map`, removed other `map` methods Added `as_ref` and `as_mut` adapters to `Result` Added `fmt::Default` impl
2013-10-30Prepared `std::sys` for removal, and made `begin_unwind` simplerMarvin Löbel-15/+0
- `begin_unwind` is now generic over any `T: Any + Send`. - Every value you fail with gets boxed as an `~Any`. - Because of implementation details, `&'static str` and `~str` are still handled specially behind the scenes. - Changed the big macro source string in libsyntax to a raw string literal, and enabled doc comments there.
2013-10-28Allow fail messages to be caught, and introduce the Any traitMarvin Löbel-0/+45
Some code cleanup, sorting of import blocks Removed std::unstable::UnsafeArc's use of Either Added run-fail tests for the new FailWithCause impls Changed future_result and try to return Result<(), ~Any>. - Internally, there is an enum of possible fail messages passend around. - In case of linked failure or a string message, the ~Any gets lazyly allocated in future_results recv method. - For that, future result now returns a wrapper around a Port. - Moved and renamed task::TaskResult into rt::task::UnwindResult and made it an internal enum. - Introduced a replacement typedef `type TaskResult = Result<(), ~Any>`.
2013-10-26auto merge of #10072 : brson/rust/modelines, r=thestingerbors-6/+0
These are relics that serve no purpose.
2013-10-25Remove ancient emacs mode lines from test casesBrian Anderson-6/+0
These are relics that serve no purpose.
2013-10-25auto merge of #10067 : sanxiyn/rust/addr-of-bot, r=thestingerbors-0/+15
Fix #5500.