about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2014-12-06 15:16:38 -0800
committerSteven Fackler <sfackler@gmail.com>2014-12-06 15:16:38 -0800
commit3246d4f36979658c61c9e2bcfe524b1d45b3257a (patch)
tree463d18f8ea566a7fce6bee4a5b5cb3f2e537544a
parent616af6eb83630b76bb3a9bde57a00f5ebe5dbd6c (diff)
downloadrust-3246d4f36979658c61c9e2bcfe524b1d45b3257a.tar.gz
rust-3246d4f36979658c61c9e2bcfe524b1d45b3257a.zip
Change from message to expected
-rw-r--r--src/libsyntax/test.rs2
-rw-r--r--src/libtest/lib.rs2
-rw-r--r--src/test/run-fail/test-should-fail-bad-message.rs2
-rw-r--r--src/test/run-pass/test-should-fail-good-message.rs4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs
index 3d2cb988434..ca2f190ce76 100644
--- a/src/libsyntax/test.rs
+++ b/src/libsyntax/test.rs
@@ -369,7 +369,7 @@ fn should_fail(i: &ast::Item) -> ShouldFail {
     match i.attrs.iter().find(|attr| attr.check_name("should_fail")) {
         Some(attr) => {
             let msg = attr.meta_item_list()
-                .and_then(|list| list.iter().find(|mi| mi.check_name("message")))
+                .and_then(|list| list.iter().find(|mi| mi.check_name("expected")))
                 .and_then(|mi| mi.value_str());
             ShouldFail::Yes(msg)
         }
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 5cdd346f981..0c71dcee2e5 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -374,7 +374,7 @@ Test Attributes:
     #[should_fail] - This function (also labeled with #[test]) will only pass if
                      the code causes a failure (an assertion failure or panic!)
                      A message may be provided, which the failure string must
-                     contain: #[should_fail(message = "foo")].
+                     contain: #[should_fail(expected = "foo")].
     #[ignore]      - When applied to a function which is already attributed as a
                      test, then the test runner will ignore these tests during
                      normal test runs. Running with --ignored will run these
diff --git a/src/test/run-fail/test-should-fail-bad-message.rs b/src/test/run-fail/test-should-fail-bad-message.rs
index dc703de489c..76a5022e3be 100644
--- a/src/test/run-fail/test-should-fail-bad-message.rs
+++ b/src/test/run-fail/test-should-fail-bad-message.rs
@@ -14,7 +14,7 @@
 // ignore-pretty: does not work well with `--test`
 
 #[test]
-#[should_fail(message = "foobar")]
+#[should_fail(expected = "foobar")]
 fn test_foo() {
     panic!("blah")
 }
diff --git a/src/test/run-pass/test-should-fail-good-message.rs b/src/test/run-pass/test-should-fail-good-message.rs
index 9d422700fbf..dcb2fe6dfc0 100644
--- a/src/test/run-pass/test-should-fail-good-message.rs
+++ b/src/test/run-pass/test-should-fail-good-message.rs
@@ -12,13 +12,13 @@
 // ignore-pretty: does not work well with `--test`
 
 #[test]
-#[should_fail(message = "foo")]
+#[should_fail(expected = "foo")]
 fn test_foo() {
     panic!("foo bar")
 }
 
 #[test]
-#[should_fail(message = "foo")]
+#[should_fail(expected = "foo")]
 fn test_foo_dynamic() {
     panic!("{} bar", "foo")
 }