Permalink
Browse files

Fix compilation with --test

  • Loading branch information...
1 parent f357230 commit 735821516f496690424c4381cc46f7642a5c2f60 @bnoordhuis committed Jan 29, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 errno.rs
View
@@ -20,6 +20,8 @@
vers = "1.0",
author = "Ben Noordhuis <info@bnoordhuis.nl>")];
+use std; // required by the tests
+
import size_t = ctypes::size_t;
import c_int = ctypes::c_int;
import sbuf = str::sbuf;
@@ -53,12 +55,12 @@ fn strerror(errnum: int) -> str {
#[test]
fn test() {
// FIXME chokes on localized messages
- assert errno::strerror(22) == "Invalid argument";
- assert errno::strerror(0) == "Success";
+ assert strerror(22) == "Invalid argument";
+ assert strerror(0) == "Success";
}
#[should_fail]
#[test]
fn test2() {
- errno::strerror(-1);
+ strerror(-1);
}

0 comments on commit 7358215

Please sign in to comment.