Skip to content

Commit

Permalink
Alter/remove tests that include/concern ternary
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Paul Woolcock authored and marijnh committed Jan 30, 2012
1 parent 86d473a commit e1f15a7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 52 deletions.
2 changes: 1 addition & 1 deletion src/test/pretty/block-disambig.rs
Expand Up @@ -24,7 +24,7 @@ fn test7() -> uint {
(*regs < 2) as uint
}

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

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

Expand Down
6 changes: 0 additions & 6 deletions src/test/run-pass/block-arg-in-ternary.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/run-pass/operator-overloading.rs
Expand Up @@ -11,7 +11,7 @@ impl point_ops for point {
{x: -self.x, y: -self.y}
}
fn [](x: bool) -> int {
x ? self.x : self.y
if x { self.x } else { self.y }
}
}

Expand Down
43 changes: 0 additions & 43 deletions src/test/run-pass/ternary.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/run-pass/weird-exprs.rs
Expand Up @@ -19,7 +19,7 @@ fn zombiejesus() {
do {
while (ret) {
if (ret) {
alt (ret) { _ { ret ? ret : ret } };
alt (ret) { _ { if ret { ret } else { ret } } };
} else if (ret) {
ret;
}
Expand Down

0 comments on commit e1f15a7

Please sign in to comment.