aboutsummaryrefslogtreecommitdiff
path: root/src/test/bench/99-bottles
diff options
context:
space:
mode:
authorMarijn Haverbeke <[email protected]>2011-05-06 22:13:13 +0200
committerMarijn Haverbeke <[email protected]>2011-05-06 22:51:19 +0200
commita3ec0b1f643d00b9418e4884bd7caa07bf052201 (patch)
tree82000510ac9c9cf3f0c7cf4ae5f3c6b123b559cb /src/test/bench/99-bottles
parentRegister new snapshots. (diff)
downloadrust-a3ec0b1f643d00b9418e4884bd7caa07bf052201.tar.xz
rust-a3ec0b1f643d00b9418e4884bd7caa07bf052201.zip
Rename std modules to be camelcased
(Have fun mergining your stuff with this.)
Diffstat (limited to 'src/test/bench/99-bottles')
-rw-r--r--src/test/bench/99-bottles/99bob-iter.rs10
-rw-r--r--src/test/bench/99-bottles/99bob-pattern.rs8
-rw-r--r--src/test/bench/99-bottles/99bob-simple.rs10
-rw-r--r--src/test/bench/99-bottles/99bob-tail.rs8
4 files changed, 18 insertions, 18 deletions
diff --git a/src/test/bench/99-bottles/99bob-iter.rs b/src/test/bench/99-bottles/99bob-iter.rs
index 09638941..e8cc4b4b 100644
--- a/src/test/bench/99-bottles/99bob-iter.rs
+++ b/src/test/bench/99-bottles/99bob-iter.rs
@@ -3,8 +3,8 @@
* http://99-bottles-of-beer.net/
*/
use std;
-import std._int;
-import std._str;
+import std.Int;
+import std.Str;
fn b1() -> str {
ret "# of beer on the wall, # of beer.";
@@ -32,15 +32,15 @@ case (1) {
ns = "1 bottle";
}
case (_) {
- ns = _int.to_str(n, 10u) + " bottles";
+ ns = Int.to_str(n, 10u) + " bottles";
}
}
- while (i < _str.byte_len(t)) {
+ while (i < Str.byte_len(t)) {
if (t.(i) == ('#' as u8)) {
b += ns;
}
else {
- _str.push_byte(b, t.(i));
+ Str.push_byte(b, t.(i));
}
i += 1u;
}
diff --git a/src/test/bench/99-bottles/99bob-pattern.rs b/src/test/bench/99-bottles/99bob-pattern.rs
index 58d2d2c3..fc9ddddb 100644
--- a/src/test/bench/99-bottles/99bob-pattern.rs
+++ b/src/test/bench/99-bottles/99bob-pattern.rs
@@ -3,8 +3,8 @@
* http://99-bottles-of-beer.net/
*/
use std;
-import std._int;
-import std._str;
+import std.Int;
+import std.Str;
tag bottle { none; dual; single; multiple(int);}
@@ -25,8 +25,8 @@ fn show(bottle b) {
log "Take one down and pass it around, 1 bottle of beer on the wall.";
}
case (multiple(?n)) {
- let str nb = _int.to_str(n, 10u);
- let str mb = _int.to_str(n - 1, 10u);
+ let str nb = Int.to_str(n, 10u);
+ let str mb = Int.to_str(n - 1, 10u);
log nb + " bottles of beer on the wall, " + nb + " bottles of beer,";
log "Take one down and pass it around, "
+ mb + " bottles of beer on the wall.";
diff --git a/src/test/bench/99-bottles/99bob-simple.rs b/src/test/bench/99-bottles/99bob-simple.rs
index 3c426f51..5c0f0824 100644
--- a/src/test/bench/99-bottles/99bob-simple.rs
+++ b/src/test/bench/99-bottles/99bob-simple.rs
@@ -3,8 +3,8 @@
* http://99-bottles-of-beer.net/
*/
use std;
-import std._int;
-import std._str;
+import std.Int;
+import std.Str;
fn b1() -> str {
ret "# of beer on the wall, # of beer.";
@@ -31,15 +31,15 @@ case (1) {
ns = "1 bottle";
}
case (_) {
- ns = _int.to_str(n, 10u) + " bottles";
+ ns = Int.to_str(n, 10u) + " bottles";
}
}
- while (i < _str.byte_len(t)) {
+ while (i < Str.byte_len(t)) {
if (t.(i) == ('#' as u8)) {
b += ns;
}
else {
- _str.push_byte(b, t.(i));
+ Str.push_byte(b, t.(i));
}
i += 1u;
}
diff --git a/src/test/bench/99-bottles/99bob-tail.rs b/src/test/bench/99-bottles/99bob-tail.rs
index 16e66d33..985d9b4b 100644
--- a/src/test/bench/99-bottles/99bob-tail.rs
+++ b/src/test/bench/99-bottles/99bob-tail.rs
@@ -3,13 +3,13 @@
* http://99-bottles-of-beer.net/
*/
use std;
-import std._int;
-import std._str;
+import std.Int;
+import std.Str;
fn main() {
fn multiple(int n) {
- let str nb = _int.to_str(n, 10u);
- let str mb = _int.to_str(n - 1, 10u);
+ let str nb = Int.to_str(n, 10u);
+ let str mb = Int.to_str(n - 1, 10u);
log nb + " bottles of beer on the wall, " + nb + " bottles of beer,";
log "Take one down and pass it around, "
+ mb + " bottles of beer on the wall.";