diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-21 13:08:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 08:09:56 -0700 |
| commit | daf5f5a4d10513ff42e79fa7ef8819b170f3a13d (patch) | |
| tree | 7a07a79c43e02debcc6bbb33d90a5e41b70119e6 /src/test/bench | |
| parent | 15a6bdebab4e7b811b9a902e3f8ed225c59af06e (diff) | |
| download | rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.tar.gz rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.zip | |
Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
Diffstat (limited to 'src/test/bench')
| -rw-r--r-- | src/test/bench/core-std.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/core-uint-to-str.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/msgsend-pipes-shared.rs | 12 | ||||
| -rw-r--r-- | src/test/bench/msgsend-pipes.rs | 12 | ||||
| -rw-r--r-- | src/test/bench/shootout-chameneos-redux.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/shootout-pfib.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/shootout-threadring.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/sudoku.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/task-perf-alloc-unwind.rs | 8 | ||||
| -rw-r--r-- | src/test/bench/task-perf-jargon-metal-smoke.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/task-perf-linked-failure.rs | 12 |
11 files changed, 32 insertions, 32 deletions
diff --git a/src/test/bench/core-std.rs b/src/test/bench/core-std.rs index 6ce289620fb..f549f747ef7 100644 --- a/src/test/bench/core-std.rs +++ b/src/test/bench/core-std.rs @@ -138,7 +138,7 @@ fn is_utf8_ascii() { for _ in range(0u, 20000) { v.push('b' as u8); if !str::is_utf8(v) { - fail2!("is_utf8 failed"); + fail!("is_utf8 failed"); } } } @@ -149,7 +149,7 @@ fn is_utf8_multibyte() { for _ in range(0u, 5000) { v.push_all(s.as_bytes()); if !str::is_utf8(v) { - fail2!("is_utf8 failed"); + fail!("is_utf8 failed"); } } } diff --git a/src/test/bench/core-uint-to-str.rs b/src/test/bench/core-uint-to-str.rs index ef6610cd93a..aec0bfb1e65 100644 --- a/src/test/bench/core-uint-to-str.rs +++ b/src/test/bench/core-uint-to-str.rs @@ -25,6 +25,6 @@ fn main() { for i in range(0u, n) { let x = i.to_str(); - info2!("{}", x); + info!("{}", x); } } diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs index ff2eb575ec5..97479fc133a 100644 --- a/src/test/bench/msgsend-pipes-shared.rs +++ b/src/test/bench/msgsend-pipes-shared.rs @@ -42,7 +42,7 @@ fn server(requests: &Port<request>, responses: &Chan<uint>) { match requests.try_recv() { Some(get_count) => { responses.send(count.clone()); } Some(bytes(b)) => { - //error2!("server: received {:?} bytes", b); + //error!("server: received {:?} bytes", b); count += b; } None => { done = true; } @@ -50,7 +50,7 @@ fn server(requests: &Port<request>, responses: &Chan<uint>) { } } responses.send(count); - //error2!("server exiting"); + //error!("server exiting"); } fn run(args: &[~str]) { @@ -70,10 +70,10 @@ fn run(args: &[~str]) { worker_results.push(builder.future_result()); do builder.spawn { for _ in range(0u, size / workers) { - //error2!("worker {:?}: sending {:?} bytes", i, num_bytes); + //error!("worker {:?}: sending {:?} bytes", i, num_bytes); to_child.send(bytes(num_bytes)); } - //error2!("worker {:?} exiting", i); + //error!("worker {:?} exiting", i); } } do task::spawn || { @@ -84,7 +84,7 @@ fn run(args: &[~str]) { r.recv(); } - //error2!("sending stop message"); + //error!("sending stop message"); to_child.send(stop); move_out(to_child); let result = from_child.recv(); @@ -107,6 +107,6 @@ fn main() { args.clone() }; - info2!("{:?}", args); + info!("{:?}", args); run(args); } diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs index 4ce9fb493eb..584a8b8befc 100644 --- a/src/test/bench/msgsend-pipes.rs +++ b/src/test/bench/msgsend-pipes.rs @@ -37,7 +37,7 @@ fn server(requests: &Port<request>, responses: &Chan<uint>) { match requests.try_recv() { Some(get_count) => { responses.send(count.clone()); } Some(bytes(b)) => { - //error2!("server: received {:?} bytes", b); + //error!("server: received {:?} bytes", b); count += b; } None => { done = true; } @@ -45,7 +45,7 @@ fn server(requests: &Port<request>, responses: &Chan<uint>) { } } responses.send(count); - //error2!("server exiting"); + //error!("server exiting"); } fn run(args: &[~str]) { @@ -64,10 +64,10 @@ fn run(args: &[~str]) { worker_results.push(builder.future_result()); do builder.spawn { for _ in range(0u, size / workers) { - //error2!("worker {:?}: sending {:?} bytes", i, num_bytes); + //error!("worker {:?}: sending {:?} bytes", i, num_bytes); to_child.send(bytes(num_bytes)); } - //error2!("worker {:?} exiting", i); + //error!("worker {:?} exiting", i); }; } do task::spawn || { @@ -78,7 +78,7 @@ fn run(args: &[~str]) { r.recv(); } - //error2!("sending stop message"); + //error!("sending stop message"); to_child.send(stop); move_out(to_child); let result = from_child.recv(); @@ -101,6 +101,6 @@ fn main() { args.clone() }; - info2!("{:?}", args); + info!("{:?}", args); run(args); } diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs index 1fa48755663..96e87788b70 100644 --- a/src/test/bench/shootout-chameneos-redux.rs +++ b/src/test/bench/shootout-chameneos-redux.rs @@ -66,7 +66,7 @@ fn show_digit(nn: uint) -> ~str { 7 => {~"seven"} 8 => {~"eight"} 9 => {~"nine"} - _ => {fail2!("expected digits from 0 to 9...")} + _ => {fail!("expected digits from 0 to 9...")} } } diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs index b4f6e7e4b71..88b3cfdff42 100644 --- a/src/test/bench/shootout-pfib.rs +++ b/src/test/bench/shootout-pfib.rs @@ -66,7 +66,7 @@ fn parse_opts(argv: ~[~str]) -> Config { Ok(ref m) => { return Config {stress: m.opt_present("stress")} } - Err(_) => { fail2!(); } + Err(_) => { fail!(); } } } @@ -76,7 +76,7 @@ fn stress_task(id: int) { let n = 15; assert_eq!(fib(n), fib(n)); i += 1; - error2!("{}: Completed {} iterations", id, i); + error!("{}: Completed {} iterations", id, i); } } diff --git a/src/test/bench/shootout-threadring.rs b/src/test/bench/shootout-threadring.rs index 0c0c5226dce..5e096816306 100644 --- a/src/test/bench/shootout-threadring.rs +++ b/src/test/bench/shootout-threadring.rs @@ -44,7 +44,7 @@ fn roundtrip(id: int, n_tasks: int, p: &Port<int>, ch: &Chan<int>) { return; } token => { - info2!("thread: {} got token: {}", id, token); + info!("thread: {} got token: {}", id, token); ch.send(token - 1); if token <= n_tasks { return; diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs index 91d9c9656af..a4e32b4c074 100644 --- a/src/test/bench/sudoku.rs +++ b/src/test/bench/sudoku.rs @@ -79,7 +79,7 @@ impl Sudoku { g[row][col] = from_str::<uint>(comps[2]).unwrap() as u8; } else { - fail2!("Invalid sudoku file"); + fail!("Invalid sudoku file"); } } return Sudoku::new(g) @@ -117,7 +117,7 @@ impl Sudoku { ptr = ptr + 1u; } else { // no: redo this field aft recoloring pred; unless there is none - if ptr == 0u { fail2!("No solution found for this sudoku"); } + if ptr == 0u { fail!("No solution found for this sudoku"); } ptr = ptr - 1u; } } diff --git a/src/test/bench/task-perf-alloc-unwind.rs b/src/test/bench/task-perf-alloc-unwind.rs index 639cbd05cbf..7ee0c3e13ce 100644 --- a/src/test/bench/task-perf-alloc-unwind.rs +++ b/src/test/bench/task-perf-alloc-unwind.rs @@ -31,11 +31,11 @@ fn main() { fn run(repeat: int, depth: int) { for _ in range(0, repeat) { - info2!("starting {:.4f}", precise_time_s()); + info!("starting {:.4f}", precise_time_s()); do task::try { recurse_or_fail(depth, None) }; - info2!("stopping {:.4f}", precise_time_s()); + info!("stopping {:.4f}", precise_time_s()); } } @@ -68,8 +68,8 @@ fn r(l: @nillist) -> r { fn recurse_or_fail(depth: int, st: Option<State>) { if depth == 0 { - info2!("unwinding {:.4f}", precise_time_s()); - fail2!(); + info!("unwinding {:.4f}", precise_time_s()); + fail!(); } else { let depth = depth - 1; diff --git a/src/test/bench/task-perf-jargon-metal-smoke.rs b/src/test/bench/task-perf-jargon-metal-smoke.rs index ac028686f08..0827f7d3447 100644 --- a/src/test/bench/task-perf-jargon-metal-smoke.rs +++ b/src/test/bench/task-perf-jargon-metal-smoke.rs @@ -54,6 +54,6 @@ fn main() { let (p,c) = comm::stream(); child_generation(from_str::<uint>(args[1]).unwrap(), c); if p.try_recv().is_none() { - fail2!("it happened when we slumbered"); + fail!("it happened when we slumbered"); } } diff --git a/src/test/bench/task-perf-linked-failure.rs b/src/test/bench/task-perf-linked-failure.rs index 3b64cb38c7e..5484a3965b3 100644 --- a/src/test/bench/task-perf-linked-failure.rs +++ b/src/test/bench/task-perf-linked-failure.rs @@ -43,13 +43,13 @@ fn grandchild_group(num_tasks: uint) { p.recv(); // block forever } } - error2!("Grandchild group getting started"); + error!("Grandchild group getting started"); for _ in range(0, num_tasks) { // Make sure all above children are fully spawned; i.e., enlisted in // their ancestor groups. po.recv(); } - error2!("Grandchild group ready to go."); + error!("Grandchild group ready to go."); // Master grandchild task exits early. } @@ -58,7 +58,7 @@ fn spawn_supervised_blocking(myname: &str, f: ~fn()) { let res = builder.future_result(); builder.supervised(); builder.spawn(f); - error2!("{} group waiting", myname); + error!("{} group waiting", myname); let x = res.recv(); assert_eq!(x, task::Success); } @@ -84,11 +84,11 @@ fn main() { grandchild_group(num_tasks); } // When grandchild group is ready to go, make the middle group exit. - error2!("Middle group wakes up and exits"); + error!("Middle group wakes up and exits"); } // Grandparent group waits for middle group to be gone, then fails - error2!("Grandparent group wakes up and fails"); - fail2!(); + error!("Grandparent group wakes up and fails"); + fail!(); }; assert!(x.is_err()); } |
