From 3aa92a91c90ac2b46a705f6cae6e9803aa956a74 Mon Sep 17 00:00:00 2001 From: Jeff Olson Date: Fri, 8 Mar 2013 16:06:05 -0800 Subject: [PATCH] core: convert asserts to fail_unless! --- src/libcore/os.rs | 2 +- src/libcore/ptr.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libcore/os.rs b/src/libcore/os.rs index a6e95af45ea..aa4a6feb76f 100644 --- a/src/libcore/os.rs +++ b/src/libcore/os.rs @@ -222,7 +222,7 @@ pub fn env() -> ~[(~str,~str)] { log(debug, fmt!("splitting: len: %u", vs.len())); - assert vs.len() == 2; + fail_unless!(vs.len() == 2); pairs.push((copy vs[0], copy vs[1])); } pairs diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 9f8ddc92a77..e622b0c4ca3 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -463,11 +463,11 @@ pub mod ptr_tests { log(debug, fmt!("test_ptr_array_each e: %s, a: %s", expected, actual)); - assert actual == expected; + fail_unless!(actual == expected); ctr += 1; iteration_count += 1; }); - assert iteration_count == 3u; + fail_unless!(iteration_count == 3u); } } #[test] @@ -495,11 +495,11 @@ pub mod ptr_tests { log(debug, fmt!("test_ptr_array_each e: %s, a: %s", expected, actual)); - assert actual == expected; + fail_unless!(actual == expected); ctr += 1; iteration_count += 1; }); - assert iteration_count == 3; + fail_unless!(iteration_count == 3); } } #[test]