Fix Option camel case in xfailed/ignored tests

This commit is contained in:
Tyler Bindon 2013-01-25 12:31:45 -07:00
parent 3a5d2cdbf3
commit edc94f5c23
9 changed files with 23 additions and 23 deletions

View File

@ -255,7 +255,7 @@ mod test {
};
match recv_timeout(hl_loop, 10u, test_po) {
some(val) => {
Some(val) => {
assert val == expected;
successes += 1;
}

View File

@ -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() {

View File

@ -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(_)");
}

View File

@ -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
}
}

View File

@ -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 {

View File

@ -23,7 +23,7 @@ trait noisy {
}
trait scratchy {
fn scratch() -> option<furniture>;
fn scratch() -> Option<furniture>;
}
trait bitey {
@ -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 {

View File

@ -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) }
}

View File

@ -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() {}

View File

@ -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
}
}
}