diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-08-15 16:54:02 -0700 |
|---|---|---|
| committer | Eric Holk <eholk@mozilla.com> | 2011-08-16 09:36:29 -0700 |
| commit | cf2def46c120d8d6ef8a98571a39bef478c8c2a9 (patch) | |
| tree | 902078db51847e2c3badb941dcbceeb5216d866f /src/test/stdtest | |
| parent | e33af7e0b505de6d7c754d2ead26c9ee2bc8974e (diff) | |
| download | rust-cf2def46c120d8d6ef8a98571a39bef478c8c2a9.tar.gz rust-cf2def46c120d8d6ef8a98571a39bef478c8c2a9.zip | |
Removed trans_comm.rs from the compiler. Updating aio/sio to work with the new chan and port system, started on a networking module for the standard library.
Diffstat (limited to 'src/test/stdtest')
| -rw-r--r-- | src/test/stdtest/net.rs | 12 | ||||
| -rw-r--r-- | src/test/stdtest/stdtest.rc | 1 | ||||
| -rw-r--r-- | src/test/stdtest/task.rs | 8 |
3 files changed, 13 insertions, 8 deletions
diff --git a/src/test/stdtest/net.rs b/src/test/stdtest/net.rs new file mode 100644 index 00000000000..c1a26cb747d --- /dev/null +++ b/src/test/stdtest/net.rs @@ -0,0 +1,12 @@ +use std; +import std::net; + +#[test] +fn test_format_ip() { + assert(net::format_addr(net::ipv4(127u8,0u8,0u8,1u8)) == "127.0.0.1") +} + +#[test] +fn test_parse_ip() { + assert(net::parse_addr("127.0.0.1") == net::ipv4(127u8,0u8,0u8,1u8)); +} diff --git a/src/test/stdtest/stdtest.rc b/src/test/stdtest/stdtest.rc index 401587ed36e..cda3b939eb3 100644 --- a/src/test/stdtest/stdtest.rc +++ b/src/test/stdtest/stdtest.rc @@ -12,6 +12,7 @@ mod io; mod ivec; mod list; mod map; +mod net; mod option; mod os; mod path; diff --git a/src/test/stdtest/task.rs b/src/test/stdtest/task.rs index 4d689bcb36a..56b555232a9 100644 --- a/src/test/stdtest/task.rs +++ b/src/test/stdtest/task.rs @@ -26,14 +26,6 @@ fn test_join() { } #[test] -fn test_send_recv() { - let p = port[int](); - let c = chan(p); - task::send(c, 10); - assert (task::recv(p) == 10); -} - -#[test] fn test_lib_spawn() { fn foo() { log_err "Hello, World!"; } task::_spawn(foo); |
