1
Fork 0

Reformat source tree (minus a couple tests that are still grumpy).

This commit is contained in:
Graydon Hoare 2011-06-15 11:19:50 -07:00
parent 8d381823e2
commit ce72993488
379 changed files with 13643 additions and 18907 deletions

View file

@ -1,34 +1,18 @@
// -*- rust -*-
// Tests for alt as expressions resulting in structural types
fn test_rec() {
auto res = alt (true) {
case (true) {
rec(i = 100)
}
};
assert (res == rec(i = 100));
auto res = alt (true) { case (true) { rec(i=100) } };
assert (res == rec(i=100));
}
fn test_tag() {
tag mood {
happy;
sad;
}
auto res = alt (true) {
case (true) {
happy
}
case (false) {
sad
}
};
assert (res == happy);
tag mood { happy; sad; }
auto res = alt (true) { case (true) { happy } case (false) { sad } };
assert (res == happy);
}
fn main() {
test_rec();
test_tag();
}
fn main() { test_rec(); test_tag(); }