about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2014-03-18 21:32:02 -0700
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2014-03-28 09:13:19 -0700
commite0e8e957ea3edce7104af9e972ce3a3542aeeb80 (patch)
tree1f77586a564b89c1faebf5ac9f57fb0d74dcd90c /src
parenta47d52c2f64de064d03dda853b44b116b284635e (diff)
downloadrust-e0e8e957ea3edce7104af9e972ce3a3542aeeb80.tar.gz
rust-e0e8e957ea3edce7104af9e972ce3a3542aeeb80.zip
test: remove pure test, which is now redundant with inline tests
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/non-boolean-pure-fns.rs36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/test/run-pass/non-boolean-pure-fns.rs b/src/test/run-pass/non-boolean-pure-fns.rs
deleted file mode 100644
index 70654da8932..00000000000
--- a/src/test/run-pass/non-boolean-pure-fns.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// ignore-fast
-
-// Copyright 2012-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.
-
-#[feature(managed_boxes)];
-
-extern crate collections;
-
-use collections::list::{List, Cons, Nil};
-
-fn pure_length_go<T>(ls: &List<T>, acc: uint) -> uint {
-    match *ls { Nil => { acc } Cons(_, ref tl) => { pure_length_go(&**tl, acc + 1u) } }
-}
-
-fn pure_length<T>(ls: &List<T>) -> uint { pure_length_go(ls, 0u) }
-
-fn nonempty_list<T>(ls: &List<T>) -> bool { pure_length(ls) > 0u }
-
-fn safe_head<T:Clone>(ls: &List<T>) -> T {
-    assert!(!ls.is_empty());
-    return ls.head().unwrap().clone();
-}
-
-pub fn main() {
-    let mylist = Cons(1u, ~Nil);
-    assert!((nonempty_list(&mylist)));
-    assert_eq!(safe_head(&mylist), 1u);
-}