Skip to content

Commit

Permalink
Fix Option camel case in xfailed/ignored tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martica committed Jan 26, 2013
1 parent 3a5d2cd commit edc94f5
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/libstd/timer.rs
Expand Up @@ -255,7 +255,7 @@ mod test {
};

match recv_timeout(hl_loop, 10u, test_po) {
some(val) => {
Some(val) => {
assert val == expected;
successes += 1;
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/compile-fail/issue-2354.rs
Expand Up @@ -15,9 +15,9 @@
xfailed for now (see Issue #2354)
*/
fn foo() { //~ ERROR this open brace is not closed
match some(x) {
some(y) { fail; }
none { fail; }
match Some(x) {
Some(y) { fail; }
None { fail; }
}

fn bar() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/run-pass-fulldeps/qquote.rs
Expand Up @@ -69,8 +69,8 @@ fn main() {
let stmt = quote_stmt!(let x = 20;);
check_pp(ext_cx, *stmt, pprust::print_stmt, ~"let x = 20;");
let pat = quote_pat!(some(_));
check_pp(ext_cx, pat, pprust::print_refutable_pat, ~"some(_)");
let pat = quote_pat!(Some(_));
check_pp(ext_cx, pat, pprust::print_refutable_pat, ~"Some(_)");

}

Expand Down
6 changes: 3 additions & 3 deletions src/test/run-pass/bind-by-move.rs
Expand Up @@ -16,9 +16,9 @@ fn dispose(+_x: arc::ARC<bool>) unsafe { }

fn main() {
let p = arc::arc(true);
let x = some(p);
let x = Some(p);
match move x {
some(move z) => { dispose(z); },
none => fail
Some(move z) => { dispose(z); },
None => fail
}
}
4 changes: 2 additions & 2 deletions src/test/run-pass/class-impl-parameterized-trait.rs
Expand Up @@ -55,8 +55,8 @@ class cat : map<int, bool> {
fn contains_key(&&k: int) -> bool { k <= self.meows }
fn get(&&k:int) -> bool { k <= self.meows }
fn [](&&k:int) -> bool { k <= self.meows }
fn find(&&k:int) -> option<bool> { some(self.get(k)) }
fn remove(&&k:int) -> option<bool> { self.meows -= k; some(true) }
fn find(&&k:int) -> Option<bool> { Some(self.get(k)) }
fn remove(&&k:int) -> Option<bool> { self.meows -= k; Some(true) }
fn each(f: fn(&&int, &&bool) -> bool) {
let mut n = int::abs(self.meows);
while n > 0 {
Expand Down
8 changes: 4 additions & 4 deletions src/test/run-pass/class-implements-multiple-traits.rs
Expand Up @@ -23,7 +23,7 @@ trait noisy {
}

trait scratchy {
fn scratch() -> option<furniture>;
fn scratch() -> Option<furniture>;
}

trait bitey {
Expand Down Expand Up @@ -72,13 +72,13 @@ class cat : noisy, scratchy, bitey {

fn speak() -> int { self.meow() as int }
fn meow_count() -> uint { *self.meows }
fn scratch() -> option<furniture> {
fn scratch() -> Option<furniture> {
let all = ~[chair, couch, bed];
log(error, self.scratched);
let mut rslt = none;
let mut rslt = None;
for each(all) |thing| { if !self.scratched.contains(thing) {
self.scratched.push(thing);
return some(thing); }}
return Some(thing); }}
rslt
}
fn bite() -> body_part {
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/class-trait-bounded-param.rs
Expand Up @@ -23,7 +23,7 @@ class keys<K: Copy, V: Copy, M: Copy map<K,V>>
}

fn each(blk: fn(K) -> bool) { self.map.each(|k, _v| blk(k) ) }
fn size_hint() -> option<uint> { some(self.map.size()) }
fn size_hint() -> Option<uint> { Some(self.map.size()) }
fn eachi(blk: fn(uint, K) -> bool) { iter::eachi(self, blk) }
}

Expand Down
8 changes: 4 additions & 4 deletions src/test/run-pass/issue-2869.rs
Expand Up @@ -9,16 +9,16 @@
// except according to those terms.

// xfail-test
enum pat { pat_ident(option<uint>) }
enum pat { pat_ident(Option<uint>) }

fn f(pat: pat) -> bool { true }

fn num_bindings(pat: pat) -> uint {
match pat {
pat_ident(_) if f(pat) { 0 }
pat_ident(none) { 1 }
pat_ident(some(sub)) { sub }
pat_ident(None) { 1 }
pat_ident(Some(sub)) { sub }
}
}

fn main() {}
fn main() {}
6 changes: 3 additions & 3 deletions src/test/run-pass/region-return-interior-of-option-in-self.rs
Expand Up @@ -15,14 +15,14 @@ struct cell<T> {
}

struct cells<T> {
vals: ~[option<cell<T>>];
vals: ~[Option<cell<T>>];
}

impl<T> &cells<T> {
fn get(idx: uint) -> &self/T {
match self.vals[idx] {
some(ref v) => &v.value,
none => fail
Some(ref v) => &v.value,
None => fail
}
}
}
Expand Down

0 comments on commit edc94f5

Please sign in to comment.