about summary refs log tree commit diff
path: root/src/compiletest/compiletest.rs
AgeCommit message (Collapse)AuthorLines
2015-01-19Remove unsupported test features from libtest.Ahmed Charles-7/+0
Removes test-shard, ratchet-metrics, boxplot, stats and save-metrics from Config in libtest/lib.rs.
2015-01-19Remove unsupported test features from compiletest.Ahmed Charles-20/+4
Removes test-shard, ratchet-metrics and save-metrics from Config in compiletest/common.rs.
2015-01-17Set allow(unstable) in crates that use unstable featuresBrian Anderson-0/+1
Lets them build with the -dev, -nightly, or snapshot compiler
2015-01-08Remove warning from the libraries.Huon Wilson-0/+1
This adds the int_uint feature to *every* library, whether or not it needs it.
2015-01-08allow box_syntax and unknown features in compiletest driver.Felix S. Klock II-0/+2
2015-01-06More test fixesAlex Crichton-1/+1
2015-01-06Register new snapshotsAlex Crichton-6/+0
Conflicts: src/librbml/lib.rs src/libserialize/json_stage0.rs src/libserialize/serialize_stage0.rs src/libsyntax/ast.rs src/libsyntax/ext/deriving/generic/mod.rs src/libsyntax/parse/token.rs
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-13/+13
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-1/+8
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]Keegan McAllister-1/+8
2015-01-05compiletest: remove boxed closuresJorge Aparicio-2/+3
2015-01-03Remove deprecated functionalityAlex Crichton-1/+1
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
2015-01-02std: Stabilize the prelude moduleAlex Crichton-2/+2
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2014-12-21Fallout of std::str stabilizationAlex Crichton-4/+2
2014-12-17rollup merge of #19818: emk/regex_at_name_optAlex Crichton-2/+2
Hello! This is my first Rust patch, and I fear that I've probably skipped at least 7 critical steps. I'd appreciate your feedback and advice about how to contribute to Rust. This patch is based on a discussion with @BurntSushi in #14602 a while back. I'm happy to revise it as needed to fit into the modern world. :-) As discussed in that issue, the existing `at` and `name` functions represent two different results with the empty string: 1. Matched the empty string. 2. Did not match anything. Consider the following example. This regex has two named matched groups, `key` and `value`. `value` is optional: ```rust // Matches "foo", "foo;v=bar" and "foo;v=". regex!(r"(?P<key>[a-z]+)(;v=(?P<value>[a-z]*))?"); ``` We can access `value` using `caps.name("value")`, but there's no way for us to distinguish between the `"foo"` and `"foo;v="` cases. Early this year, @BurntSushi recommended modifying the existing `at` and `name` functions to return `Option`, instead of adding new functions to the API. This is a [breaking-change], but the fix is easy: - `refs.at(1)` becomes `refs.at(1).unwrap_or("")`. - `refs.name(name)` becomes `refs.name(name).unwrap_or("")`.
2014-12-14Modify `regex::Captures::{at,name}` to return `Option`Eric Kidd-2/+2
Closes #14602. As discussed in that issue, the existing `at` and `name` functions represent two different results with the empty string: 1. Matched the empty string. 2. Did not match anything. Consider the following example. This regex has two named matched groups, `key` and `value`. `value` is optional: ```rust // Matches "foo", "foo;v=bar" and "foo;v=". regex!(r"(?P<key>[a-z]+)(;v=(?P<value>[a-z]*))?"); ``` We can access `value` using `caps.name("value")`, but there's no way for us to distinguish between the `"foo"` and `"foo;v="` cases. Early this year, @BurntSushi recommended modifying the existing `at` and `name` functions to return `Option`, instead of adding new functions to the API. This is a [breaking-change], but the fix is easy: - `refs.at(1)` becomes `refs.at(1).unwrap_or("")`. - `refs.name(name)` becomes `refs.name(name).unwrap_or("")`.
2014-12-14Mostly rote conversion of `proc()` to `move||` (and occasionally `Thunk::new`)Niko Matsakis-4/+5
2014-12-06Allow message specification for should_failSteven Fackler-1/+1
The test harness will make sure that the panic message contains the specified string. This is useful to help make `#[should_fail]` tests a bit less brittle by decreasing the chance that the test isn't "accidentally" passing due to a panic occurring earlier than expected. The behavior is in some ways similar to JUnit's `expected` feature: `@Test(expected=NullPointerException.class)`. Without the message assertion, this test would pass even though it's not actually reaching the intended part of the code: ```rust #[test] #[should_fail(message = "out of bounds")] fn test_oob_array_access() { let idx: uint = from_str("13o").unwrap(); // oops, this will panic [1i32, 2, 3][idx]; } ```
2014-12-05test: expose boxplot and the extra stats test keeps track ofErick Tryzelaar-0/+3
[breaking-change]
2014-11-17Switch to purely namespaced enumsSteven Fackler-1/+1
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-16Move FromStr to core::strBrendan Zabarauskas-1/+1
2014-10-29Rename fail! to panic!Steve Klabnik-6/+6
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-26debuginfo: Set RUST_TEST_TASKS to 1 again for LLDB testsMichael Woerister-1/+11
2014-10-23Error if we should be able to Valgrind but can'tNick Cameron-2/+9
2014-10-23Add run-pass-valgrind testsNick Cameron-1/+3
Closes #16914
2014-10-22debuginfo: Let LLDB tests run in parallel again since our min-supported ↵Michael Woerister-11/+1
version has no problems with that.
2014-10-08debuginfo: Add LLDB version handling to test infrastructure.Michael Woerister-1/+37
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-1/+1
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-1/+1
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02Put slicing syntax behind a feature gate.Nick Cameron-1/+1
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-01Remove all use of librustuvAaron Turon-10/+0
2014-09-16Fallout from renamingAaron Turon-2/+2
2014-08-27debuginfo: Improve GDB version handling in compiletest toolMichael Woerister-5/+11
2014-08-27debuginfo: Emit different autotest debugger scripts depending on GDB version.Michael Woerister-0/+19
2014-07-17deprecate Vec::getNick Cameron-3/+3
2014-07-16debuginfo: Make sure that only one LLDB test task is run at a time.Michael Woerister-1/+11
Some older versions of LLDB have problems with multiple instances running in parallel. This commit makes sure we don't do that.
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-1/+1
[breaking-change]
2014-06-28Rename all raw pointers as necessaryAlex Crichton-1/+1
2014-06-25compiletest: Remove superfluous to_string callsPiotr Jawniak-29/+16
2014-06-14Register new snapshotsAlex Crichton-8/+1
2014-06-14getopts: format failure messages with `Show`.Huon Wilson-1/+1
This obsoletes the old `to_err_msg` method. Replace println!("Error: {}", failure.to_err_msg()) let string = failure.to_err_msg(); with println!("Error: {}", failure) let string = failure.to_str(); [breaking-change]
2014-06-09Add a --color flag to test binariesSteven Fackler-0/+1
It uses the same behavior as rustc's.
2014-06-09Use phase(plugin) in bootstrap cratesKeegan McAllister-2/+8
Do this to avoid warnings on post-stage0 builds.
2014-05-28std: Remove format_strbuf!()Alex Crichton-36/+34
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-21/+21
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-3/+3
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-4/+4
[breaking-change]
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-2/+6
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-2/+2
2014-05-20compiletest: Refactor compile-fail to regex.Kevin Butler-1/+3