aboutsummaryrefslogtreecommitdiff
path: root/syn/tests/test_expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'syn/tests/test_expr.rs')
-rw-r--r--syn/tests/test_expr.rs37
1 files changed, 0 insertions, 37 deletions
diff --git a/syn/tests/test_expr.rs b/syn/tests/test_expr.rs
deleted file mode 100644
index 0edf6ce..0000000
--- a/syn/tests/test_expr.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-#[macro_use]
-mod macros;
-
-use std::str::FromStr;
-
-use proc_macro2::TokenStream;
-use syn::{Expr, ExprRange};
-
-#[test]
-fn test_expr_parse() {
- let code = "..100u32";
- let tt = TokenStream::from_str(code).unwrap();
- let expr: Expr = syn::parse2(tt.clone()).unwrap();
- let expr_range: ExprRange = syn::parse2(tt).unwrap();
- assert_eq!(expr, Expr::Range(expr_range));
-}
-
-#[test]
-fn test_await() {
- // Must not parse as Expr::Field.
- let expr = syn::parse_str::<Expr>("fut.await").unwrap();
-
- snapshot!(expr, @r###"
- Expr::Await {
- base: Expr::Path {
- path: Path {
- segments: [
- PathSegment {
- ident: "fut",
- arguments: None,
- },
- ],
- },
- },
- }
- "###);
-}