about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorSrinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>2016-06-11 22:28:17 +0530
committerSrinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>2016-06-11 22:31:24 +0530
commitfa91c14bc075139d9d04dc3560910375f0671ac2 (patch)
treea192ab9d5c5c9dea0bb576bacfd0a6b89a7ee4f4 /src/librustc_data_structures
parent7d8e6dd3bfdec0b0a6f47b10966673f88a9242f5 (diff)
downloadrust-fa91c14bc075139d9d04dc3560910375f0671ac2.tar.gz
rust-fa91c14bc075139d9d04dc3560910375f0671ac2.zip
Add additional test cases to test all arities of tuple; And remove type suffix - i32 on integers
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/tuple_slice.rs26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/librustc_data_structures/tuple_slice.rs b/src/librustc_data_structures/tuple_slice.rs
index 9a90ab8c09d..b7c71dd3664 100644
--- a/src/librustc_data_structures/tuple_slice.rs
+++ b/src/librustc_data_structures/tuple_slice.rs
@@ -46,15 +46,25 @@ impl_tuple_slice!((T, T, T, T, T, T, T, T), 8);
 
 #[test]
 fn test_sliced_tuples() {
-    let t2 = (100i32, 101i32);
-    assert_eq!(t2.as_slice(), &[100i32, 101i32]);
+    let t2 = (100, 101);
+    assert_eq!(t2.as_slice(), &[100, 101]);
 
-    let t3 = (102i32, 103i32, 104i32);
-    assert_eq!(t3.as_slice(), &[102i32, 103i32, 104i32]);
+    let t3 = (102, 103, 104);
+    assert_eq!(t3.as_slice(), &[102, 103, 104]);
 
-    let t4 = (105i32, 106i32, 107i32, 108i32);
-    assert_eq!(t4.as_slice(), &[105i32, 106i32, 107i32, 108i32]);
+    let t4 = (105, 106, 107, 108);
+    assert_eq!(t4.as_slice(), &[105, 106, 107, 108]);
+
+    let t5 = (109, 110, 111, 112, 113);
+    assert_eq!(t5.as_slice(), &[109, 110, 111, 112, 113]);
+
+    let t6 = (114, 115, 116, 117, 118, 119);
+    assert_eq!(t6.as_slice(), &[114, 115, 116, 117, 118, 119]);
+
+    let t7 = (120, 121, 122, 123, 124, 125, 126);
+    assert_eq!(t7.as_slice(), &[120, 121, 122, 123, 124, 125, 126]);
+
+    let t8 = (127, 128, 129, 130, 131, 132, 133, 134);
+    assert_eq!(t8.as_slice(), &[127, 128, 129, 130, 131, 132, 133, 134]);
 
-    let t5 = (109i32, 110i32, 111i32, 112i32, 113i32);
-    assert_eq!(t5.as_slice(), &[109i32, 110i32, 111i32, 112i32, 113i32]);
 }