Skip to content

Commit 55c8324

Browse files
committed
---
yaml --- r: 89819 b: refs/heads/master c: 1bfa45c h: refs/heads/master i: 89817: bf25a12 89815: 7afd1eb v: v3
1 parent 24fd239 commit 55c8324

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 65aacd083a1a8a5e2ae1e5ffab4bb1b032854327
2+
refs/heads/master: 1bfa45cfd9d7c8b2dcc0ea7a42396624e8b5a31b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/src/test/bench/shootout-ackermann.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
extern mod extra;
1212

13-
use std::int;
1413
use std::os;
1514

1615
fn ack(m: int, n: int) -> int {

trunk/src/test/bench/shootout-chameneos-redux.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use std::comm::{stream, SharedChan};
1717
use std::option;
1818
use std::os;
1919
use std::task;
20-
use std::uint;
2120

2221
fn print_complements() {
2322
let all = [Blue, Red, Yellow];

trunk/src/test/bench/shootout-fibo.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
extern mod extra;
1212

13-
use std::int;
1413
use std::os;
1514

1615
fn fib(n: int) -> int {

trunk/src/test/bench/shootout-nbody.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// xfail-test reading from os::args()[1] - bogus!
2-
3-
use std::from_str::FromStr;
41
use std::os;
52

63
static PI: f64 = 3.141592653589793;
@@ -139,13 +136,23 @@ fn offset_momentum(bodies: &mut [Planet, ..N_BODIES]) {
139136
}
140137

141138
fn main() {
142-
let n: i32 = FromStr::from_str(os::args()[1]).unwrap();
139+
let args = os::args();
140+
let args = if os::getenv("RUST_BENCH").is_some() {
141+
~[~"", ~"1000"]
142+
} else if args.len() <= 1u {
143+
~[~"", ~"1000"]
144+
} else {
145+
args
146+
};
147+
148+
let n: i32 = from_str::<i32>(args[1]).unwrap();
143149
let mut bodies = BODIES;
144150

145151
offset_momentum(&mut bodies);
146-
println!("{:.9f}", energy(&bodies) as float);
152+
println!("{:.9f}", energy(&bodies) as f64);
147153

148154
advance(&mut bodies, 0.01, n);
149155

150-
println!("{:.9f}", energy(&bodies) as float);
156+
println!("{:.9f}", energy(&bodies) as f64);
151157
}
158+

0 commit comments

Comments
 (0)