Skip to content

Commit ab53819

Browse files
committed
libstd: Fix another std test
1 parent 5c721bd commit ab53819

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/test.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// simplest interface possible for representing and running tests
66
// while providing a base that other test frameworks may build off of.
77

8+
import core::cmp::Eq;
89
import either::Either;
910
import result::{Ok, Err};
1011
import io::WriterUtil;
@@ -91,6 +92,12 @@ fn parse_opts(args: ~[~str]) -> opt_res {
9192

9293
enum test_result { tr_ok, tr_failed, tr_ignored, }
9394

95+
impl test_result : Eq {
96+
pure fn eq(&&other: test_result) -> bool {
97+
(self as uint) == (other as uint)
98+
}
99+
}
100+
94101
type console_test_state =
95102
@{out: io::Writer,
96103
log_out: Option<io::Writer>,

0 commit comments

Comments
 (0)