rust/src/test/run-pass/test-should-fail-good-message.rs
Manish Goregaokar fad4c380e8 Rollup merge of #23385 - tamird:cleanup-whitespace, r=alexcrichton
r? @alexcrichton

Conflicts:
	src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs
2015-03-17 15:21:22 +05:30

25 lines
731 B
Rust

// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: --test
// ignore-pretty: does not work well with `--test`
#[test]
#[should_panic(expected = "foo")]
pub fn test_foo() {
panic!("foo bar")
}
#[test]
#[should_panic(expected = "foo")]
pub fn test_foo_dynamic() {
panic!("{} bar", "foo")
}