Skip to content

Commit 43924f1

Browse files
committed
fix some of the broken tests (the ones that were doing the right thing)
1 parent a544b83 commit 43924f1

File tree

7 files changed

+15
-18
lines changed

7 files changed

+15
-18
lines changed

src/test/run-pass/fixed_length_vec_glue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ fn main() {
22
let arr = [1,2,3]/3;
33
let struc = {a: 13u8, b: arr, c: 42};
44
let s = sys::log_str(struc);
5-
assert(s == ~"(13, [1, 2, 3]/3, 42)");
5+
assert(s == ~"{ a: 13, b: [ 1, 2, 3 ], c: 42 }");
66
}

src/test/run-pass/log-knows-the-names-of-variants-in-std.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ fn check_log<T>(exp: ~str, v: T) {
1313
fn main() {
1414
let x = list::from_vec(~[a(22u), b(~"hi")]);
1515
let exp = ~"@Cons(a(22), @Cons(b(~\"hi\"), @Nil))";
16-
assert fmt!("%?", x) == exp;
16+
let act = fmt!("%?", x);
17+
assert act == exp;
1718
check_log(exp, x);
1819
}

src/test/run-pass/log-str.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
fn main() {
2-
assert ~"~[1, 2, 3]" == sys::log_str(~[1, 2, 3]);
3-
assert fmt!("%?/%6?", ~[1, 2, 3], ~"hi") == ~"~[1, 2, 3]/ ~\"hi\"";
2+
let act = sys::log_str(~[1, 2, 3]);
3+
assert ~"~[ 1, 2, 3 ]" == act;
4+
5+
let act = fmt!("%?/%6?", ~[1, 2, 3], ~"hi");
6+
assert act == ~"~[ 1, 2, 3 ]/ ~\"hi\"";
47
}

src/test/run-pass/rec-align-u32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ fn main() {
5050
// because `inner`s alignment was 4.
5151
assert sys::size_of::<outer>() == m::size();
5252

53-
assert y == ~"(22, (44))";
53+
assert y == ~"{ c8: 22, t: { c64: 44 } }";
5454
}

src/test/run-pass/rec-align-u64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ fn main() {
6464
// because `inner`s alignment was 4.
6565
assert sys::size_of::<outer>() == m::m::size();
6666

67-
assert y == ~"(22, (44))";
67+
assert y == ~"{ c8: 22, t: { c64: 44 } }";
6868
}

src/test/run-pass/tag-auto-disr-val-shape.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/test/run-pass/tag-disr-val-shape.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ enum color {
77
}
88

99
fn main() {
10-
assert uint::to_str(red as uint, 10u) == fmt!("%?", red);
11-
assert uint::to_str(green as uint, 10u) == fmt!("%?", green);
12-
assert uint::to_str(white as uint, 10u) == fmt!("%?", white);
10+
let act = fmt!("%?", red);
11+
io::println(act);
12+
assert ~"red" == act;
13+
assert ~"green" == fmt!("%?", green);
14+
assert ~"white" == fmt!("%?", white);
1315
}
1416

0 commit comments

Comments
 (0)