test: Resolve some FIXMEs

This commit is contained in:
Brian Anderson 2012-02-05 16:50:54 -08:00
parent 67b1034989
commit 34aa956e68
4 changed files with 27 additions and 25 deletions

View File

@ -81,9 +81,19 @@ fn test_chan() {
assert (ch1 == ch2); assert (ch1 == ch2);
} }
fn test_ptr() { fn test_ptr() unsafe {
// FIXME: Don't know what binops apply to pointers. Don't know how let p1: *u8 = unsafe::reinterpret_cast(0);
// to make or use pointers let p2: *u8 = unsafe::reinterpret_cast(0);
let p3: *u8 = unsafe::reinterpret_cast(1);
assert p1 == p2;
assert p1 != p3;
assert p1 < p3;
assert p1 <= p3;
assert p3 > p1;
assert p3 >= p3;
assert p1 <= p2;
assert p1 >= p2;
} }
fn test_task() { fn test_task() {
@ -121,13 +131,12 @@ fn test_fn() {
#[nolink] #[nolink]
native mod test { native mod test {
fn unsupervise(); fn unsupervise();
fn get_task_id();
} }
// FIXME (#1058): comparison of native fns
fn test_native_fn() { fn test_native_fn() {
/* assert test::unsupervise != test::get_task_id;
assert (native_mod::last_os_error != native_mod::unsupervise); assert test::unsupervise == test::unsupervise;
*/
} }
fn main() { fn main() {

View File

@ -7,9 +7,7 @@ fn target() {
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
fn target() { fn target() {
// FIXME (974) Can't lex this as a single integer assert (-1000 >> 3 == 2305843009213693827);
assert (-1000 >> 3 == 23058430 * 1000000000 * 100
+ 92 * 100000000 + 13693827);
} }
fn general() { fn general() {

View File

@ -62,8 +62,7 @@ fn test_box_rec() {
fn main() { fn main() {
test_box(); test_box();
test_rec(); test_rec();
// FIXME: enum constructors don't optimize their arguments into moves test_tag();
// test_tag();
test_tup(); test_tup();
test_unique(); test_unique();
test_box_rec(); test_box_rec();

View File

@ -34,19 +34,15 @@ fn test_vec() {
} }
fn test_str() { fn test_str() {
// FIXME: re-enable this once strings are unique and sendable let po = port();
/* let ch = chan(po);
let po = comm::mk_port(); let s0 = "test";
let ch = po.mk_chan(); send(ch, s0);
let s0: str = "test"; let s1 = recv(po);
send(ch, s0); assert (s1[0] == 't' as u8);
let s1: str; assert (s1[1] == 'e' as u8);
s1 = po.recv(); assert (s1[2] == 's' as u8);
assert (s1.(0) as u8 == 't' as u8); assert (s1[3] == 't' as u8);
assert (s1.(1) as u8 == 'e' as u8);
assert (s1.(2) as u8 == 's' as u8);
assert (s1.(3) as u8 == 't' as u8);
*/
} }
fn test_tag() { fn test_tag() {