about summary refs log tree commit diff
path: root/src/test/run-fail
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-fail')
-rw-r--r--src/test/run-fail/alt-bot-fail.rs6
-rw-r--r--src/test/run-fail/alt-disc-bot.rs2
-rw-r--r--src/test/run-fail/args-fail.rs2
-rw-r--r--src/test/run-fail/bug-811.rs11
-rw-r--r--src/test/run-fail/do-while-body-fails.rs4
-rw-r--r--src/test/run-fail/explicit-fail-msg.rs2
-rw-r--r--src/test/run-fail/explicit-fail.rs2
-rw-r--r--src/test/run-fail/expr-alt-fail-fn.rs2
-rw-r--r--src/test/run-fail/expr-alt-fail.rs2
-rw-r--r--src/test/run-fail/expr-fn-fail.rs2
-rw-r--r--src/test/run-fail/expr-if-fail-fn.rs2
-rw-r--r--src/test/run-fail/expr-if-fail.rs2
-rw-r--r--src/test/run-fail/fail-arg.rs2
-rw-r--r--src/test/run-fail/fail-main.rs2
-rw-r--r--src/test/run-fail/fail.rs2
-rw-r--r--src/test/run-fail/fmt-fail.rs2
-rw-r--r--src/test/run-fail/fn-constraint-claim.rs7
-rw-r--r--src/test/run-fail/fn-constraint.rs2
-rw-r--r--src/test/run-fail/if-check-fail.rs4
-rw-r--r--src/test/run-fail/non-exhaustive-match.rs2
-rw-r--r--src/test/run-fail/pred.rs2
-rw-r--r--src/test/run-fail/rhs-type.rs2
-rw-r--r--src/test/run-fail/str-overrun.rs6
-rw-r--r--src/test/run-fail/vec-overrun.rs6
-rw-r--r--src/test/run-fail/vec-underrun.rs6
25 files changed, 35 insertions, 49 deletions
diff --git a/src/test/run-fail/alt-bot-fail.rs b/src/test/run-fail/alt-bot-fail.rs
index 7a414b3ca6a..355892d5a13 100644
--- a/src/test/run-fail/alt-bot-fail.rs
+++ b/src/test/run-fail/alt-bot-fail.rs
@@ -7,9 +7,7 @@ import std::option::*;
 fn foo(s: str) { }
 
 fn main() {
-    let i = alt some::<int>(3) {
-        none::<int>. { fail }
-        some::<int>(_) { fail }
-    };
+    let i =
+        alt some::<int>(3) { none::<int>. { fail } some::<int>(_) { fail } };
     foo(i);
 }
diff --git a/src/test/run-fail/alt-disc-bot.rs b/src/test/run-fail/alt-disc-bot.rs
index 8b4d30ef6ac..2ac519e6419 100644
--- a/src/test/run-fail/alt-disc-bot.rs
+++ b/src/test/run-fail/alt-disc-bot.rs
@@ -1,4 +1,4 @@
 // error-pattern:quux
 fn f() -> ! { fail "quux" }
-fn g() -> int { alt f() { true { 1 } false { 0 } }; }
+fn g() -> int { alt f() { true { 1 } false { 0 } } }
 fn main() { g(); }
diff --git a/src/test/run-fail/args-fail.rs b/src/test/run-fail/args-fail.rs
index 9dc6ecc7413..afdaa553ba6 100644
--- a/src/test/run-fail/args-fail.rs
+++ b/src/test/run-fail/args-fail.rs
@@ -1,4 +1,4 @@
 // error-pattern:meep
 fn f(a: int, b: int, c: @int) { fail "moop"; }
 
-fn main() { f(1, fail "meep", @42); }
\ No newline at end of file
+fn main() { f(1, fail "meep", @42); }
diff --git a/src/test/run-fail/bug-811.rs b/src/test/run-fail/bug-811.rs
index 176b95343eb..aa4d829a100 100644
--- a/src/test/run-fail/bug-811.rs
+++ b/src/test/run-fail/bug-811.rs
@@ -1,16 +1,11 @@
 // error-pattern:quux
-fn test00_start(ch: chan_t<int>, message: int) {
-    send(ch, message);
-}
+fn test00_start(ch: chan_t<int>, message: int) { send(ch, message); }
 
 type task_id = int;
 type port_id = int;
 
-type chan_t<~T> = {
-    task : task_id,
-    port : port_id
-};
+type chan_t<~T> = {task: task_id, port: port_id};
 
-fn send<~T>(ch : chan_t<T>, data : -T) { fail; }
+fn send<~T>(ch: chan_t<T>, data: -T) { fail; }
 
 fn main() { fail "quux"; }
diff --git a/src/test/run-fail/do-while-body-fails.rs b/src/test/run-fail/do-while-body-fails.rs
index 1a6cac5fabc..3ab257de397 100644
--- a/src/test/run-fail/do-while-body-fails.rs
+++ b/src/test/run-fail/do-while-body-fails.rs
@@ -1,4 +1,2 @@
 // error-pattern:quux
-fn main() {
-    let x: int = do { fail "quux" } while (true);
-}
+fn main() { let x: int = do  { fail "quux" } while true; }
diff --git a/src/test/run-fail/explicit-fail-msg.rs b/src/test/run-fail/explicit-fail-msg.rs
index f238d226b34..b45e443759c 100644
--- a/src/test/run-fail/explicit-fail-msg.rs
+++ b/src/test/run-fail/explicit-fail-msg.rs
@@ -1,3 +1,3 @@
 // error-pattern:wooooo
 // no-valgrind
-fn main() { let a = 1; if 1 == 1 { a = 2; } fail "woooo" + "o"; }
\ No newline at end of file
+fn main() { let a = 1; if 1 == 1 { a = 2; } fail "woooo" + "o"; }
diff --git a/src/test/run-fail/explicit-fail.rs b/src/test/run-fail/explicit-fail.rs
index a74cf4b36e3..396f12d5caf 100644
--- a/src/test/run-fail/explicit-fail.rs
+++ b/src/test/run-fail/explicit-fail.rs
@@ -2,4 +2,4 @@
 
 
 // error-pattern:explicit
-fn main() { fail; }
\ No newline at end of file
+fn main() { fail; }
diff --git a/src/test/run-fail/expr-alt-fail-fn.rs b/src/test/run-fail/expr-alt-fail-fn.rs
index e9754643ccd..bf6898ed297 100644
--- a/src/test/run-fail/expr-alt-fail-fn.rs
+++ b/src/test/run-fail/expr-alt-fail-fn.rs
@@ -6,4 +6,4 @@ fn f() -> ! { fail }
 
 fn g() -> int { let x = alt true { true { f() } false { 10 } }; ret x; }
 
-fn main() { g(); }
\ No newline at end of file
+fn main() { g(); }
diff --git a/src/test/run-fail/expr-alt-fail.rs b/src/test/run-fail/expr-alt-fail.rs
index 50154890bc3..230497135cd 100644
--- a/src/test/run-fail/expr-alt-fail.rs
+++ b/src/test/run-fail/expr-alt-fail.rs
@@ -2,4 +2,4 @@
 
 
 // error-pattern:explicit failure
-fn main() { let x = alt true { false { 0 } true { fail } }; }
\ No newline at end of file
+fn main() { let x = alt true { false { 0 } true { fail } }; }
diff --git a/src/test/run-fail/expr-fn-fail.rs b/src/test/run-fail/expr-fn-fail.rs
index fc716fc1c60..24d0fa4c4aa 100644
--- a/src/test/run-fail/expr-fn-fail.rs
+++ b/src/test/run-fail/expr-fn-fail.rs
@@ -4,4 +4,4 @@
 // error-pattern:explicit failure
 fn f() -> ! { fail }
 
-fn main() { f(); }
\ No newline at end of file
+fn main() { f(); }
diff --git a/src/test/run-fail/expr-if-fail-fn.rs b/src/test/run-fail/expr-if-fail-fn.rs
index 6b7b6d64b45..406302532fa 100644
--- a/src/test/run-fail/expr-if-fail-fn.rs
+++ b/src/test/run-fail/expr-if-fail-fn.rs
@@ -6,4 +6,4 @@ fn f() -> ! { fail }
 
 fn g() -> int { let x = if true { f() } else { 10 }; ret x; }
 
-fn main() { g(); }
\ No newline at end of file
+fn main() { g(); }
diff --git a/src/test/run-fail/expr-if-fail.rs b/src/test/run-fail/expr-if-fail.rs
index a738bfc7f1e..24cd815c244 100644
--- a/src/test/run-fail/expr-if-fail.rs
+++ b/src/test/run-fail/expr-if-fail.rs
@@ -2,4 +2,4 @@
 
 
 // error-pattern:explicit failure
-fn main() { let x = if false { 0 } else if (true) { fail } else { 10 }; }
\ No newline at end of file
+fn main() { let x = if false { 0 } else if true { fail } else { 10 }; }
diff --git a/src/test/run-fail/fail-arg.rs b/src/test/run-fail/fail-arg.rs
index ef43fea8694..e657bf7d9a6 100644
--- a/src/test/run-fail/fail-arg.rs
+++ b/src/test/run-fail/fail-arg.rs
@@ -1,4 +1,4 @@
 // error-pattern:woe
 fn f(a: int) { log a; }
 
-fn main() { f(fail "woe"); }
\ No newline at end of file
+fn main() { f(fail "woe"); }
diff --git a/src/test/run-fail/fail-main.rs b/src/test/run-fail/fail-main.rs
index 0ac56613439..a8e51009352 100644
--- a/src/test/run-fail/fail-main.rs
+++ b/src/test/run-fail/fail-main.rs
@@ -1,4 +1,4 @@
 // error-pattern:moop
 use std;
 import std::uint;
-fn main() { fail "moop"; }
\ No newline at end of file
+fn main() { fail "moop"; }
diff --git a/src/test/run-fail/fail.rs b/src/test/run-fail/fail.rs
index a0520c288a4..75e6f7e886e 100644
--- a/src/test/run-fail/fail.rs
+++ b/src/test/run-fail/fail.rs
@@ -2,4 +2,4 @@
 
 
 // error-pattern:1 == 2
-fn main() { assert (1 == 2); }
\ No newline at end of file
+fn main() { assert (1 == 2); }
diff --git a/src/test/run-fail/fmt-fail.rs b/src/test/run-fail/fmt-fail.rs
index d4eb12292a6..2d3e35b41af 100644
--- a/src/test/run-fail/fmt-fail.rs
+++ b/src/test/run-fail/fmt-fail.rs
@@ -3,4 +3,4 @@
 use std;
 import std::str;
 
-fn main() { let str_var: str = "meh"; fail #fmt("%s", str_var); }
\ No newline at end of file
+fn main() { let str_var: str = "meh"; fail #fmt["%s", str_var]; }
diff --git a/src/test/run-fail/fn-constraint-claim.rs b/src/test/run-fail/fn-constraint-claim.rs
index ca243210647..a5309b61627 100644
--- a/src/test/run-fail/fn-constraint-claim.rs
+++ b/src/test/run-fail/fn-constraint-claim.rs
@@ -5,9 +5,4 @@ import std::uint::*;
 
 fn nop(a: uint, b: uint) : le(a, b) { fail "quux"; }
 
-fn main() {
-    let a: uint = 5u;
-    let b: uint = 4u;
-    claim (le(a, b));
-    nop(a, b);
-}
+fn main() { let a: uint = 5u; let b: uint = 4u; claim (le(a, b)); nop(a, b); }
diff --git a/src/test/run-fail/fn-constraint.rs b/src/test/run-fail/fn-constraint.rs
index 65bcc413498..3499d44ceff 100644
--- a/src/test/run-fail/fn-constraint.rs
+++ b/src/test/run-fail/fn-constraint.rs
@@ -8,4 +8,4 @@ fn main() {
     let b: uint = 1u;
     check (le(a, b));
     log_err safe_slice("kitties", a, b);
-}
\ No newline at end of file
+}
diff --git a/src/test/run-fail/if-check-fail.rs b/src/test/run-fail/if-check-fail.rs
index 677240d0763..885c92deab8 100644
--- a/src/test/run-fail/if-check-fail.rs
+++ b/src/test/run-fail/if-check-fail.rs
@@ -2,9 +2,9 @@
 pred even(x: uint) -> bool {
     if x < 2u {
         ret false;
-    } else if (x == 2u) { ret true; } else { ret even(x - 2u); }
+    } else if x == 2u { ret true; } else { ret even(x - 2u); }
 }
 
 fn foo(x: uint) { if check even(x) { log x; } else { fail "Number is odd"; } }
 
-fn main() { foo(3u); }
\ No newline at end of file
+fn main() { foo(3u); }
diff --git a/src/test/run-fail/non-exhaustive-match.rs b/src/test/run-fail/non-exhaustive-match.rs
index e62d0692d4f..4afd83c1b97 100644
--- a/src/test/run-fail/non-exhaustive-match.rs
+++ b/src/test/run-fail/non-exhaustive-match.rs
@@ -6,4 +6,4 @@
 // error-pattern:non-exhaustive match failure
 tag t { a; b; }
 
-fn main() { let x = a; alt x { b. { } } }
\ No newline at end of file
+fn main() { let x = a; alt x { b. { } } }
diff --git a/src/test/run-fail/pred.rs b/src/test/run-fail/pred.rs
index 14e46976113..a2f9420825c 100644
--- a/src/test/run-fail/pred.rs
+++ b/src/test/run-fail/pred.rs
@@ -4,4 +4,4 @@ fn f(a: int, b: int) { }
 
 pred lt(a: int, b: int) -> bool { ret a < b; }
 
-fn main() { let a: int = 10; let b: int = 23; check (lt(b, a)); f(b, a); }
\ No newline at end of file
+fn main() { let a: int = 10; let b: int = 23; check (lt(b, a)); f(b, a); }
diff --git a/src/test/run-fail/rhs-type.rs b/src/test/run-fail/rhs-type.rs
index 0277d83d393..461b2c65b44 100644
--- a/src/test/run-fail/rhs-type.rs
+++ b/src/test/run-fail/rhs-type.rs
@@ -1,4 +1,4 @@
 // Tests that trans treats the rhs of pth's decl
 // as a _|_-typed thing, not a str-typed thing
 // error-pattern:bye
-fn main() { let pth = fail "bye"; let rs: {t: str} = {t: pth}; }
\ No newline at end of file
+fn main() { let pth = fail "bye"; let rs: {t: str} = {t: pth}; }
diff --git a/src/test/run-fail/str-overrun.rs b/src/test/run-fail/str-overrun.rs
index 1ac862f2405..3d12bce20c9 100644
--- a/src/test/run-fail/str-overrun.rs
+++ b/src/test/run-fail/str-overrun.rs
@@ -7,12 +7,12 @@
 fn main() {
     let s: str = "hello";
     let x: int = 0;
-    assert (s.(x) == 0x68 as u8);
+    assert (s[x] == 0x68 as u8);
     // NB: at the moment a string always has a trailing NULL,
     // so the largest index value on the string above is 5, not
     // 4. Possibly change this.
 
     // Bounds-check failure.
 
-    assert (s.(x + 6) == 0x0 as u8);
-}
\ No newline at end of file
+    assert (s[x + 6] == 0x0 as u8);
+}
diff --git a/src/test/run-fail/vec-overrun.rs b/src/test/run-fail/vec-overrun.rs
index 28349f27a50..54329ca63b5 100644
--- a/src/test/run-fail/vec-overrun.rs
+++ b/src/test/run-fail/vec-overrun.rs
@@ -3,10 +3,10 @@
 // error-pattern:bounds check
 // no-valgrind
 fn main() {
-    let v: [int] = ~[10];
+    let v: [int] = [10];
     let x: int = 0;
-    assert (v.(x) == 10);
+    assert (v[x] == 10);
     // Bounds-check failure.
 
-    assert (v.(x + 2) == 20);
+    assert (v[x + 2] == 20);
 }
diff --git a/src/test/run-fail/vec-underrun.rs b/src/test/run-fail/vec-underrun.rs
index 41eb94ca739..87c8295840e 100644
--- a/src/test/run-fail/vec-underrun.rs
+++ b/src/test/run-fail/vec-underrun.rs
@@ -3,10 +3,10 @@
 // error-pattern:bounds check
 // no-valgrind
 fn main() {
-    let v: [int] = ~[10, 20];
+    let v: [int] = [10, 20];
     let x: int = 0;
-    assert (v.(x) == 10);
+    assert (v[x] == 10);
     // Bounds-check failure.
 
-    assert (v.(x - 1) == 20);
+    assert (v[x - 1] == 20);
 }