diff options
| author | Alfie John <alfiej@fastmail.fm> | 2015-02-03 13:50:52 +0000 |
|---|---|---|
| committer | Alfie John <alfiej@fastmail.fm> | 2015-02-10 22:56:31 +0000 |
| commit | bffbcb5729a2b4cb2ab924e5f0d9ddebe470eebc (patch) | |
| tree | b7cbcf92c12fbf3bdef3491f0542ddea4476667d /src/libcoretest/any.rs | |
| parent | bc87efef2cceaec99d30e809cac2b8d22b9e25fc (diff) | |
| download | rust-bffbcb5729a2b4cb2ab924e5f0d9ddebe470eebc.tar.gz rust-bffbcb5729a2b4cb2ab924e5f0d9ddebe470eebc.zip | |
Deprecating i/u suffixes in libcoretest
Diffstat (limited to 'src/libcoretest/any.rs')
| -rw-r--r-- | src/libcoretest/any.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libcoretest/any.rs b/src/libcoretest/any.rs index 5ad3833a5ef..2156a99c332 100644 --- a/src/libcoretest/any.rs +++ b/src/libcoretest/any.rs @@ -18,11 +18,11 @@ static TEST: &'static str = "Test"; #[test] fn any_referenced() { - let (a, b, c) = (&5u as &Any, &TEST as &Any, &Test as &Any); + let (a, b, c) = (&5 as &Any, &TEST as &Any, &Test as &Any); - assert!(a.is::<uint>()); - assert!(!b.is::<uint>()); - assert!(!c.is::<uint>()); + assert!(a.is::<i32>()); + assert!(!b.is::<i32>()); + assert!(!c.is::<i32>()); assert!(!a.is::<&'static str>()); assert!(b.is::<&'static str>()); @@ -35,7 +35,7 @@ fn any_referenced() { #[test] fn any_owning() { - let (a, b, c) = (box 5u as Box<Any>, box TEST as Box<Any>, box Test as Box<Any>); + let (a, b, c) = (box 5us as Box<Any>, box TEST as Box<Any>, box Test as Box<Any>); assert!(a.is::<uint>()); assert!(!b.is::<uint>()); @@ -52,7 +52,7 @@ fn any_owning() { #[test] fn any_downcast_ref() { - let a = &5u as &Any; + let a = &5us as &Any; match a.downcast_ref::<uint>() { Some(&5) => {} @@ -67,8 +67,8 @@ fn any_downcast_ref() { #[test] fn any_downcast_mut() { - let mut a = 5u; - let mut b = box 7u; + let mut a = 5us; + let mut b = box 7us; let a_r = &mut a as &mut Any; let tmp: &mut uint = &mut *b; @@ -76,7 +76,7 @@ fn any_downcast_mut() { match a_r.downcast_mut::<uint>() { Some(x) => { - assert_eq!(*x, 5u); + assert_eq!(*x, 5); *x = 612; } x => panic!("Unexpected value {:?}", x) @@ -84,7 +84,7 @@ fn any_downcast_mut() { match b_r.downcast_mut::<uint>() { Some(x) => { - assert_eq!(*x, 7u); + assert_eq!(*x, 7); *x = 413; } x => panic!("Unexpected value {:?}", x) @@ -113,7 +113,7 @@ fn any_downcast_mut() { #[test] fn any_fixed_vec() { - let test = [0u; 8]; + let test = [0us; 8]; let test = &test as &Any; assert!(test.is::<[uint; 8]>()); assert!(!test.is::<[uint; 10]>()); |
