From 1df8a543f12b489b9cbd53fb72e768a68ff690d7 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Tue, 21 May 2013 13:12:31 -0700 Subject: [PATCH] testsuite: Add xfailed test cases --- src/test/run-pass/issue-3290.rs | 16 ++++++++++++++++ src/test/run-pass/issue-3796.rs | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 src/test/run-pass/issue-3290.rs create mode 100644 src/test/run-pass/issue-3796.rs diff --git a/src/test/run-pass/issue-3290.rs b/src/test/run-pass/issue-3290.rs new file mode 100644 index 000000000000..3f8ce032d0d9 --- /dev/null +++ b/src/test/run-pass/issue-3290.rs @@ -0,0 +1,16 @@ +// Copyright 2013 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// xfail-test +fn main() { + let mut x = ~3; + x = x; + assert_eq!(*x, 3); +} diff --git a/src/test/run-pass/issue-3796.rs b/src/test/run-pass/issue-3796.rs new file mode 100644 index 000000000000..0091c0962558 --- /dev/null +++ b/src/test/run-pass/issue-3796.rs @@ -0,0 +1,19 @@ +// Copyright 2013 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// xfail-test +#[deny(dead_assignment)]; +fn main() { + let mut x = 1; + let f: &fn() -> int = || { x + 20 }; + assert_eq!(f(), 21); + x += 1; + assert_eq!(f(), 22); +}