From cf2def46c120d8d6ef8a98571a39bef478c8c2a9 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Mon, 15 Aug 2011 16:54:02 -0700 Subject: 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. --- src/test/stdtest/net.rs | 12 ++++++++++++ src/test/stdtest/stdtest.rc | 1 + src/test/stdtest/task.rs | 8 -------- 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 src/test/stdtest/net.rs (limited to 'src/test/stdtest') 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 @@ -25,14 +25,6 @@ fn test_join() { assert (task::join_id(failtask) == task::tr_failure); } -#[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!"; } -- cgit 1.4.1-3-g733a5