about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/test.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index 2c67ae8b262..dff9cbc1559 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -5,6 +5,7 @@
 // simplest interface possible for representing and running tests
 // while providing a base that other test frameworks may build off of.
 
+import core::cmp::Eq;
 import either::Either;
 import result::{Ok, Err};
 import io::WriterUtil;
@@ -91,6 +92,12 @@ fn parse_opts(args: ~[~str]) -> opt_res {
 
 enum test_result { tr_ok, tr_failed, tr_ignored, }
 
+impl test_result : Eq {
+    pure fn eq(&&other: test_result) -> bool {
+        (self as uint) == (other as uint)
+    }
+}
+
 type console_test_state =
     @{out: io::Writer,
       log_out: Option<io::Writer>,