Skip to content

Commit e1f15a7

Browse files
Paul Woolcockmarijnh
authored andcommitted
Alter/remove tests that include/concern ternary
3 tests, pretty/block-disambig.rs, run-pass/operator-overloading.rs, and run-pass/weird-exprs.rs, all included the ternary operator. These were changed to use the if-then-else construct instead. 2 tests, run-pass/block-arg-in-ternary.rs and run-pass/ternary.rs, were only there because of the ternary operator, and were removed.
1 parent 86d473a commit e1f15a7

File tree

5 files changed

+3
-52
lines changed

5 files changed

+3
-52
lines changed

src/test/pretty/block-disambig.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn test7() -> uint {
2424
(*regs < 2) as uint
2525
}
2626

27-
fn test8() -> int { let val = @0; alt true { true { } } *val < 1 ? 0 : 1 }
27+
fn test8() -> int { let val = @0; alt true { true { } } if *val < 1 { 0 } else { 1 } }
2828

2929
fn test9() { let regs = @mutable 0; alt true { true { } } *regs += 1; }
3030

src/test/run-pass/block-arg-in-ternary.rs

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

src/test/run-pass/operator-overloading.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl point_ops for point {
1111
{x: -self.x, y: -self.y}
1212
}
1313
fn [](x: bool) -> int {
14-
x ? self.x : self.y
14+
if x { self.x } else { self.y }
1515
}
1616
}
1717

src/test/run-pass/ternary.rs

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

src/test/run-pass/weird-exprs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn zombiejesus() {
1919
do {
2020
while (ret) {
2121
if (ret) {
22-
alt (ret) { _ { ret ? ret : ret } };
22+
alt (ret) { _ { if ret { ret } else { ret } } };
2323
} else if (ret) {
2424
ret;
2525
}

0 commit comments

Comments
 (0)