From ab53819a2cbbfbc2df7a3aea4e9a0b52dfb830dc Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 30 Aug 2012 12:25:48 -0700 Subject: libstd: Fix another std test --- src/libstd/test.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libstd') 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, -- cgit 1.4.1-3-g733a5