about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2021-12-30 14:26:59 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2022-01-01 18:58:30 +0300
commit58fa7ce782d40714298df29a68e468205fc13657 (patch)
treec9e4fc3a6a073b5da2ed85905eeb3d89ed45737a
parent5ca83a5fb3a2f092a63e452e1bf808f1ad445b05 (diff)
downloadrust-58fa7ce782d40714298df29a68e468205fc13657.tar.gz
rust-58fa7ce782d40714298df29a68e468205fc13657.zip
tests for ty
-rw-r--r--crates/parser/src/tests/entries.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/parser/src/tests/entries.rs b/crates/parser/src/tests/entries.rs
index 18d9ece2a2c..a8abe6daf53 100644
--- a/crates/parser/src/tests/entries.rs
+++ b/crates/parser/src/tests/entries.rs
@@ -37,6 +37,13 @@ fn pat() {
     check_prefix(PrefixEntryPoint::Pat, ".. ..", ".. ..");
 }
 
+#[test]
+fn ty() {
+    check_prefix(PrefixEntryPoint::Ty, "fn() foo", "fn()");
+    check_prefix(PrefixEntryPoint::Ty, "Clone + Copy + fn", "Clone + Copy +");
+    check_prefix(PrefixEntryPoint::Ty, "struct f", "struct");
+}
+
 fn check_prefix(entry: PrefixEntryPoint, input: &str, prefix: &str) {
     let lexed = LexedStr::new(input);
     let input = lexed.to_input();