1
Fork 0

Replace most invocations of fail keyword with die! macro

This commit is contained in:
Nick Desaulniers 2013-01-31 17:51:01 -08:00 committed by Brian Anderson
parent 2db3175c76
commit aee7929469
331 changed files with 914 additions and 908 deletions

View file

@ -2990,7 +2990,7 @@ mod tests {
#[should_fail]
fn test_as_bytes_fail() {
// Don't double free
as_bytes::<()>(&~"", |_bytes| fail );
as_bytes::<()>(&~"", |_bytes| die!() );
}
#[test]
@ -3090,12 +3090,12 @@ mod tests {
0 => assert ch == 'x',
1 => assert ch == '\u03c0',
2 => assert ch == 'y',
_ => fail ~"test_chars_each failed"
_ => die!(~"test_chars_each failed")
}
i += 1;
}
chars_each(~"", |_ch| fail ); // should not fail
chars_each(~"", |_ch| die!() ); // should not fail
}
#[test]
@ -3107,7 +3107,7 @@ mod tests {
0 => assert bb == 'x' as u8,
1 => assert bb == 'y' as u8,
2 => assert bb == 'z' as u8,
_ => fail ~"test_bytes_each failed"
_ => die!(~"test_bytes_each failed")
}
i += 1;
}
@ -3169,7 +3169,7 @@ mod tests {
ii += 1;
}
words_each(~"", |_x| fail); // should not fail
words_each(~"", |_x| die!()); // should not fail
}
#[test]