]> git.lizzy.rs Git - rust.git/commitdiff
add playbot jokes to run-pass test
authorAlex Burka <durka42+github@gmail.com>
Fri, 26 May 2017 15:44:18 +0000 (11:44 -0400)
committerGitHub <noreply@github.com>
Fri, 26 May 2017 15:44:18 +0000 (11:44 -0400)
src/test/run-pass/weird-exprs.rs

index b28760e6c91fb2977f1dd2e1be697d49a842411f..5ec44a370b98f45fb2d813631f28144169303f0a 100644 (file)
@@ -77,6 +77,34 @@ fn angrydome() {
 
 fn evil_lincoln() { let _evil = println!("lincoln"); }
 
+fn dots() {
+    assert_eq!(String::from(".................................................."),
+               format!("{:?}", .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..));
+}
+
+fn you_eight() {
+    assert_eq!(8, {
+        macro_rules! u8 {
+            (u8) => {
+                mod u8 {
+                    pub fn u8<'u8>(u8: &'u8 u8) -> &'u8 u8 {
+                        "u8";
+                        u8
+                    }
+                }
+            };
+        }
+        
+        u8!(u8);
+        let &u8: &u8 = u8::u8(&8u8);
+        u8
+    });
+}
+
+fn fishy() {
+    assert_eq!(String::from("><>"), String::<>::from::<>("><>").chars::<>().rev::<>().collect::<String>());
+}
+
 pub fn main() {
     strange();
     funny();
@@ -86,4 +114,7 @@ pub fn main() {
     canttouchthis();
     angrydome();
     evil_lincoln();
+    dots();
+    you_eight();
+    fishy();
 }