about summary refs log tree commit diff
path: root/src/test/run-fail
AgeCommit message (Collapse)AuthorLines
2016-01-06Add testsSimonas Kazlauskas-0/+277
2015-12-23Implement custom panic handlersSteven Fackler-0/+64
2015-12-08add tests for ensuring const indexing does not cause compile-time errors in ↵Oliver Schneider-0/+37
runtime code
2015-10-28Move test file to run-fail, since it does an unwrapNiko Matsakis-0/+28
2015-10-13implement RFC 1229Oliver Schneider-39/+20
const eval errors outside of true constant enviroments are not reported anymore, but instead forwarded to a lint.
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-1/+1
2015-09-13Add test for overflowing powPeter Reid-0/+16
This would catch regressions of issue #28012.
2015-08-17Fix existing tests for new `#[repr(simd)]`.Huon Wilson-236/+0
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-92/+0
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-06-20Support checked Shl/Shr on SIMD typesDavid Stygstra-0/+236
2015-06-14Auto merge of #26071 - petrochenkov:assert1, r=alexcrichtonbors-1/+1
`assert_eq!` has better diagnostics than `assert!` and is more helpful when something actually breaks, but the diagnostics has it's price - `assert_eq!` generate some formatting code which is slower to compile and possibly run. [My measurements](https://internals.rust-lang.org/t/assert-a-b-or-assert-eq-a-b/1367/12?u=petrochenkov) show that presence of this formatting code doesn't affect compilation + execution time of the test suite significantly, so `assert_eq!` can be used instead of `assert!` consistently. (Some tests doesn't reside in src/test, they are not affected by these changes, I'll probably open a separate PR for them later)
2015-06-13Auto merge of #26249 - steveklabnik:remove_extern_panic, r=alexcrichtonbors-52/+0
This test has an interesting history, because of fail -> panic. It was originally called extern-fail.rs: https://github.com/rust-lang/rust/commits/master/src/test/run-fail/extern-fail.rs It lived for a while, but was disabled in August 2013: https://github.com/rust-lang/rust/commit/ce95b01014391f29a655d165d9e6d31449ceb835 As you can see, that failure was not specific to this test, however, this code does stuff with the runtime, which was removed. Given that it hasn't even been able to compile in a long time, we should just remove it. r? @brson
2015-06-13Use `assert_eq!` instead of `assert!` in testspetrochenkov-1/+1
2015-06-13Auto merge of #26253 - steveklabnik:remove_old_ignored_tests, r=brsonbors-114/+0
Two commits here: one which removes a bunch of tests, and re-enables a few that work. Second updates the syntax of one of the failing tests. It still doesn't pass, but at least it compiles.
2015-06-12ignore-test cleanupSteve Klabnik-114/+0
Most of these are old, but some specific messages for specific tests: * trait-contravariant-self.rs: failed due to a soundess hole: https://github.com/rust-lang/rust/commit/05e3248a7974f55b64f75a2483b37ff8c001a4ff * process-detatch: https://github.com/rust-lang/rust/commit/15966c3c1f99810ac81053769651776a67181dae says "this test is being ignored until signals are implemented" That's not happening for a long time, and when it is, we'll write tests for it. * deep-vector{,2}.rs: "too big for our poor macro infrastructure", and has been ignored over a year. * borrowck-nested-calls.rs's FIXME #6268 was closed in favor of rust-lang/rfcs#811 * issue-15167.rs works properly now * issue-9737.rs works properly now * match-var-hygiene.rs works properly now Addresses a chunk of #3965
2015-06-12Remove old runtime panic testSteve Klabnik-52/+0
This test has an interesting history, because of fail -> panic. It was originally called extern-fail.rs: https://github.com/rust-lang/rust/commits/master/src/test/run-fail/extern-fail.rs It lived for a while, but was disabled in August 2013: https://github.com/rust-lang/rust/commit/ce95b01014391f29a655d165d9e6d31449ceb835 As you can see, that failure was not specific to this test, however, this code does stuff with the runtime, which was removed. Given that it hasn't even been able to compile in a long time, we should just remove it.
2015-06-12Remove ignored test for #2061Steve Klabnik-26/+0
This test was added on Nov 1, 2012: https://github.com/rust-lang/rust/commit/0069bd2f4612b744ab3731b4c1db13c2f3202185#diff-b516ff69faf8886c48e6f5e833c2548c and then ignored on the same day: https://github.com/rust-lang/rust/commit/a90020fe8dd8be8615df82e6294408bfed82a767#diff-b516ff69faf8886c48e6f5e833c2548c and never unignored again.
2015-05-09Fix the tests broken by replacing `task` with `thread`Barosl Lee-1/+1
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-5/+5
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-04-26Move qquote.rs from run-fail to run-fail-fulldepsRyan Prichard-44/+0
2015-04-26Remove FakeExtCtxt from qquote tests.Geoffry Song-28/+15
Instead create an ExtCtxt structure.
2015-04-25`qquote-2.rs` -> `run-fail/qquote.rs`Tamir Duberstein-0/+57
Re-enables the test.
2015-04-17unit test for checked overflow during signed negation.Felix S. Klock II-0/+19
2015-04-14Fallout: move from scoped to spawnAaron Turon-3/+3
2015-04-06Fix diverging closuresSeo Sanghyeon-0/+18
2015-03-31rollup merge of #23288: alexcrichton/issue-19470Alex Crichton-1/+1
This is a deprecated attribute that is slated for removal, and it also affects all implementors of the trait. This commit removes the attribute and fixes up implementors accordingly. The primary implementation which was lost was the ability to compare `&[T]` and `Vec<T>` (in that order). This change also modifies the `assert_eq!` macro to not consider both directions of equality, only the one given in the left/right forms to the macro. This modification is motivated due to the fact that `&[T] == Vec<T>` no longer compiles, causing hundreds of errors in unit tests in the standard library (and likely throughout the community as well). Closes #19470 [breaking-change]
2015-03-31std: Clean out #[deprecated] APIsAlex Crichton-9/+9
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
2015-03-31std: Remove #[old_orphan_check] from PartialEqAlex Crichton-1/+1
This is a deprecated attribute that is slated for removal, and it also affects all implementors of the trait. This commit removes the attribute and fixes up implementors accordingly. The primary implementation which was lost was the ability to compare `&[T]` and `Vec<T>` (in that order). This change also modifies the `assert_eq!` macro to not consider both directions of equality, only the one given in the left/right forms to the macro. This modification is motivated due to the fact that `&[T] == Vec<T>` no longer compiles, causing hundreds of errors in unit tests in the standard library (and likely throughout the community as well). cc #19470 [breaking-change]
2015-03-30Fallout in tests: largely changes to error messages.Niko Matsakis-1/+16
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-37/+37
Now that support has been removed, all lingering use cases are renamed.
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-0/+7
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/librustc_back/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/libtest/lib.rs src/test/run-make/rustdoc-default-impl/foo.rs src/test/run-pass/env-home-dir.rs
2015-03-23rollup merge of #23536: pnkfelix/arith-oflo-shiftsAlex Crichton-0/+182
overflow-checking for rhs of shift operators Subtask of #22020 ([RFC 560](https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md))
2015-03-23Require feature attributes, and add them where necessaryBrian Anderson-0/+7
2015-03-22placate check-pretty and pretty-printer bug; see also issue 23623.Felix S. Klock II-2/+4
2015-03-20Auto merge of #23267 - alexcrichton:issue-20012, r=aturonbors-1/+1
This reverts commit aec67c2. Closes #20012 This is temporarily rebased on #23245 as it would otherwise conflict, the last commit is the only one relevant to this PR though.
2015-03-20Revert "Revert "std: Re-enable at_exit()""Alex Crichton-1/+1
This reverts commit aec67c2ee0f673ea7b0e21c2fe7e0f26a523d823.
2015-03-20Test suite for overflowing shift operators.Felix S. Klock II-0/+180
Note the tests have been revised to match new semantics for 8- and 16-bit values.
2015-03-19RUST_TEST_TASKS -> RUST_TEST_THREADSSteve Klabnik-2/+2
We don't use 'task' anymore, these are now threads. Because this changes the name of a compiler option, this is [breaking-change]
2015-03-14Fix broken codegen for [expr; n] where "expr" divergesBjörn Steinbrink-0/+17
2015-03-14Always evaluate the expression in [expr; n]Björn Steinbrink-0/+16
In case that there is a destination for the array, like in "let x = [expr; n]", we currently don't evaluate the given expression if n is zero. That's inconsistent with all other cases, including "[expr; 0]" without a destination. Fixes #23354
2015-03-09Rename #[should_fail] to #[should_panic]Steven Fackler-1/+1
2015-03-06Rollup merge of #22980 - alexcrichton:debug-assertions, r=pnkfelixManish Goregaokar-0/+3
This commit is an implementation of [RFC 563][rfc] which adds a new `cfg(debug_assertions)` directive which is specially recognized and calculated by the compiler. The flag is turned off at any optimization level greater than 1 and may also be explicitly controlled through the `-C debug-assertions` flag. [rfc]: https://github.com/rust-lang/rfcs/pull/563 The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of the `ndebug` variable and `ndebug` no longer holds any meaning to the standard library. Code which was previously relying on `not(ndebug)` to gate expensive code should be updated to rely on `debug_assertions` instead. Closes #22492 [breaking-change]
2015-03-05rustc: Add a debug_assertions #[cfg] directiveAlex Crichton-0/+3
This commit is an implementation of [RFC 563][rfc] which adds a new `cfg(debug_assertions)` directive which is specially recognized and calculated by the compiler. The flag is turned off at any optimization level greater than 1 and may also be explicitly controlled through the `-C debug-assertions` flag. [rfc]: https://github.com/rust-lang/rfcs/pull/563 The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of the `ndebug` variable and `ndebug` no longer holds any meaning to the standard library. Code which was previously relying on `not(ndebug)` to gate expensive code should be updated to rely on `debug_assertions` instead. Closes #22492 [breaking-change]
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-7/+7
2015-03-03Switched to Box::new in many places.Felix S. Klock II-12/+3
Many of the modifications putting in `Box::new` calls also include a pointer to Issue 22405, which tracks going back to `box <expr>` if possible in the future. (Still tried to use `Box<_>` where it sufficed; thus some tests still have `box_syntax` enabled, as they use a mix of `box` and `Box::new`.) Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-03-03Fix the overflowing tests in run-fail.Felix S. Klock II-6/+15
* The error patterns had a typo. * Our current constant evaluation would silently allow the overflow (filed as Issue 22531). * The overflowing-mul test was accidentally doing addition instead of multiplication.
2015-03-03rustc: implement arithmetic overflow checkingCorey Richardson-0/+45
Adds overflow checking to integer addition, multiplication, and subtraction when `-Z force-overflow-checks` is true, or if `--cfg ndebug` is not passed to the compiler. On overflow, it panics with `arithmetic operation overflowed`. Also adds `overflowing_add`, `overflowing_sub`, and `overflowing_mul` intrinsics for doing unchecked arithmetic. [breaking-change]
2015-03-01Remove int/uint from libstd/lib.rsGuillaume Gomez-4/+4
2015-02-18rollup merge of #22286: nikomatsakis/variance-4bAlex Crichton-0/+4
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
2015-02-18Fallout: tests. As tests frequently elide things, lots of changesNiko Matsakis-0/+4
here. Some of this may have been poorly rebased, though I tried to be careful and preserve the spirit of the test.