提交 ec79d368 编写于 作者: A Alex Crichton

Test fixes from the rollup

Closes #16097 (fix variable name in tutorial)
Closes #16100 (More defailbloating)
Closes #16104 (Fix deprecation commment on `core::cmp::lexical_ordering`)
Closes #16105 (fix formatting in pointer guide table)
Closes #16107 (remove serialize::ebml, add librbml)
Closes #16108 (Fix heading levels in pointer guide)
Closes #16109 (rustrt: Don't conditionally init the at_exit QUEUE)
Closes #16111 (hexfloat: Deprecate to move out of the repo)
Closes #16113 (Add examples for GenericPath methods.)
Closes #16115 (Byte literals!)
Closes #16116 (Add a non-regression test for issue #8372)
Closes #16120 (Deprecate semver)
Closes #16124 (Deprecate uuid)
Closes #16126 (Deprecate fourcc)
Closes #16127 (Remove incorrect example)
Closes #16129 (Add note about production deployments.)
Closes #16131 (librustc: Don't ICE when trying to subst regions in destructor call.)
Closes #16133 (librustc: Don't ICE with struct exprs where the name is not a valid struct.)
Closes #16136 (Implement slice::Vector for Option<T> and CVec<T>)
Closes #16137 (alloc, arena, test, url, uuid: Elide lifetimes.)
上级 f8618486
......@@ -649,7 +649,7 @@ struct List {
#[should_fail]
fn test_begin_unwind() {
use std::rt::unwind::begin_unwind;
begin_unwind("cause", file!(), line!())
begin_unwind("cause", &(file!(), line!()))
}
#[test]
......
......@@ -29,6 +29,8 @@
To create a new random (V4) UUID and print it out in hexadecimal form:
```rust
# #![allow(deprecated)]
# extern crate uuid;
use uuid::Uuid;
fn main() {
......
......@@ -12,7 +12,7 @@
#![feature(lang_items)]
#[lang="fail_"]
fn fail(_: &'static str, _: &'static str, _: uint) -> ! { loop {} }
fn fail(_: &(&'static str, &'static str, uint)) -> ! { loop {} }
#[lang = "stack_exhausted"]
extern fn stack_exhausted() {}
......
......@@ -24,7 +24,10 @@ fn start(argc: int, argv: *const *const u8) -> int {
#[inline(never)]
fn foo() {
fail!()
let _v = vec![1i, 2, 3];
if os::getenv("IS_TEST").is_some() {
fail!()
}
}
#[inline(never)]
......@@ -37,8 +40,11 @@ fn double() {
}
fn runtest(me: &str) {
let mut template = Command::new(me);
template.env("IS_TEST", "1");
// Make sure that the stack trace is printed
let mut p = Command::new(me).arg("fail").env("RUST_BACKTRACE", "1").spawn().unwrap();
let p = template.clone().arg("fail").env("RUST_BACKTRACE", "1").spawn().unwrap();
let out = p.wait_with_output().unwrap();
assert!(!out.status.success());
let s = str::from_utf8(out.error.as_slice()).unwrap();
......@@ -46,7 +52,7 @@ fn runtest(me: &str) {
"bad output: {}", s);
// Make sure the stack trace is *not* printed
let mut p = Command::new(me).arg("fail").spawn().unwrap();
let p = template.clone().arg("fail").spawn().unwrap();
let out = p.wait_with_output().unwrap();
assert!(!out.status.success());
let s = str::from_utf8(out.error.as_slice()).unwrap();
......@@ -54,7 +60,7 @@ fn runtest(me: &str) {
"bad output2: {}", s);
// Make sure a stack trace is printed
let mut p = Command::new(me).arg("double-fail").spawn().unwrap();
let p = template.clone().arg("double-fail").spawn().unwrap();
let out = p.wait_with_output().unwrap();
assert!(!out.status.success());
let s = str::from_utf8(out.error.as_slice()).unwrap();
......@@ -62,7 +68,7 @@ fn runtest(me: &str) {
"bad output3: {}", s);
// Make sure a stack trace isn't printed too many times
let mut p = Command::new(me).arg("double-fail")
let p = template.clone().arg("double-fail")
.env("RUST_BACKTRACE", "1").spawn().unwrap();
let out = p.wait_with_output().unwrap();
assert!(!out.status.success());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册