]> git.lizzy.rs Git - rust.git/commitdiff
Remove unit tests
authorSeiichi Uchida <seuchida@gmail.com>
Sat, 17 Mar 2018 16:08:10 +0000 (01:08 +0900)
committertopecongiro <seuchida@gmail.com>
Sun, 18 Mar 2018 23:23:53 +0000 (08:23 +0900)
src/macros.rs

index 030988e5195f92c67824ec392e844e701d792c7c..1b26c61a820b6e7232f7741f9be5b783094607af 100644 (file)
@@ -957,50 +957,3 @@ fn format_lazy_static(context: &RewriteContext, shape: Shape, ts: &TokenStream)
 
     Some(result)
 }
-
-#[cfg(test)]
-mod test {
-    use super::*;
-    use syntax;
-    use syntax::parse::{parse_stream_from_source_str, ParseSess};
-    use syntax::codemap::{FileName, FilePathMapping};
-
-    fn format_macro_args_str(s: &str) -> String {
-        let mut result = String::new();
-        syntax::with_globals(|| {
-            let input = parse_stream_from_source_str(
-                FileName::Custom("stdin".to_owned()),
-                s.to_owned(),
-                &ParseSess::new(FilePathMapping::empty()),
-                None,
-            );
-            let shape = Shape {
-                width: 100,
-                indent: Indent::empty(),
-                offset: 0,
-            };
-            result = format_macro_args(input.into(), shape).unwrap();
-        });
-        result
-    }
-
-    #[test]
-    fn test_format_macro_args() {
-        assert_eq!(format_macro_args_str(""), "".to_owned());
-        assert_eq!(format_macro_args_str("$ x : ident"), "$x: ident".to_owned());
-        assert_eq!(
-            format_macro_args_str("$ m1 : ident , $ m2 : ident , $ x : ident"),
-            "$m1: ident, $m2: ident, $x: ident".to_owned()
-        );
-        assert_eq!(
-            format_macro_args_str("$($beginning:ident),*;$middle:ident;$($end:ident),*"),
-            "$($beginning: ident),*; $middle: ident; $($end: ident),*".to_owned()
-        );
-        assert_eq!(
-            format_macro_args_str(
-                "$ name : ident ( $ ( $ dol : tt $ var : ident ) * ) $ ( $ body : tt ) *"
-            ),
-            "$name: ident($($dol: tt $var: ident)*) $($body: tt)*".to_owned()
-        );
-    }
-}