aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lib-sha1.rs
diff options
context:
space:
mode:
authorMarijn Haverbeke <[email protected]>2011-05-12 17:24:54 +0200
committerMarijn Haverbeke <[email protected]>2011-05-12 21:30:44 +0200
commit3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2 (patch)
tree508982ed2f789aedd89eebd529343d9dc88b8e01 /src/test/run-pass/lib-sha1.rs
parentTransitional change to make extfmt output lowercase module name (diff)
downloadrust-3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2.tar.xz
rust-3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2.zip
Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
Diffstat (limited to 'src/test/run-pass/lib-sha1.rs')
-rw-r--r--src/test/run-pass/lib-sha1.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/run-pass/lib-sha1.rs b/src/test/run-pass/lib-sha1.rs
index c89eca59..18ea4f38 100644
--- a/src/test/run-pass/lib-sha1.rs
+++ b/src/test/run-pass/lib-sha1.rs
@@ -5,9 +5,9 @@
use std;
-import std.SHA1;
-import std.Vec;
-import std.Str;
+import std::sha1;
+import std::_vec;
+import std::_str;
fn main() {
@@ -67,8 +67,8 @@ fn main() {
auto tests = fips_180_1_tests + wikipedia_tests;
fn check_vec_eq(vec[u8] v0, vec[u8] v1) {
- assert (Vec.len[u8](v0) == Vec.len[u8](v1));
- auto len = Vec.len[u8](v0);
+ assert (_vec::len[u8](v0) == _vec::len[u8](v1));
+ auto len = _vec::len[u8](v0);
auto i = 0u;
while (i < len) {
auto a = v0.(i);
@@ -79,7 +79,7 @@ fn main() {
}
// Test that it works when accepting the message all at once
- auto sh = SHA1.mk_sha1();
+ auto sh = sha1::mk_sha1();
for (test t in tests) {
sh.input_str(t.input);
auto out = sh.result();
@@ -89,11 +89,11 @@ fn main() {
// Test that it works when accepting the message in pieces
for (test t in tests) {
- auto len = Str.byte_len(t.input);
+ auto len = _str::byte_len(t.input);
auto left = len;
while (left > 0u) {
auto take = (left + 1u) / 2u;
- sh.input_str(Str.substr(t.input, len - left, take));
+ sh.input_str(_str::substr(t.input, len - left, take));
left = left - take;
}
auto out = sh.result();