Add clear methods to the tests that make maps.

This commit is contained in:
Michael Sullivan 2012-07-09 14:06:29 -07:00
parent b7a418e194
commit 5c914e4a9d
2 changed files with 2 additions and 0 deletions

View file

@ -60,6 +60,7 @@ class cat : map<int, bool> {
fn each_value(&&f: fn(&&bool) -> bool) {
for self.each |_k, v| { if !f(v) { break; } cont;};
}
fn clear() { }
}
fn main() {

View file

@ -82,6 +82,7 @@ class cat<T: copy> : map<int, T> {
fn each_value(&&f: fn(&&T) -> bool) {
for self.each |_k, v| { if !f(v) { break; } cont;};
}
fn clear() { }
}