about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/stdtest/list.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/test/stdtest/list.rs b/src/test/stdtest/list.rs
index d88e669378a..b96bc9cd16a 100644
--- a/src/test/stdtest/list.rs
+++ b/src/test/stdtest/list.rs
@@ -2,10 +2,25 @@ import core::*;
 
 use std;
 import std::list;
-import std::list::{from_vec, head, is_not_empty, tail};
+import std::list::{from_vec, head, is_empty, is_not_empty, tail};
 import option;
 
 #[test]
+fn test_is_empty() {
+    let empty : list::list<int> = from_vec([]);
+    let full1 = from_vec([1]);
+    let full2 = from_vec(['r', 'u']);
+
+    assert is_empty(empty);
+    assert !is_empty(full1);
+    assert !is_empty(full2);
+
+    assert !is_not_empty(empty);
+    assert is_not_empty(full1);
+    assert is_not_empty(full2);
+}
+
+#[test]
 fn test_from_vec() {
     let l = from_vec([0, 1, 2]);