about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-08-30 12:25:48 -0700
committerPatrick Walton <pcwalton@mimiga.net>2012-08-30 12:25:48 -0700
commitab53819a2cbbfbc2df7a3aea4e9a0b52dfb830dc (patch)
tree58fe244383e4123aa91af83df16ad7c52b1f06a5 /src
parent5c721bd8108476fb40bf3510002eba8e6eea4c91 (diff)
downloadrust-ab53819a2cbbfbc2df7a3aea4e9a0b52dfb830dc.tar.gz
rust-ab53819a2cbbfbc2df7a3aea4e9a0b52dfb830dc.zip
libstd: Fix another std test
Diffstat (limited to 'src')
-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>,