aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_proc_macro_srv/src/tests/mod.rs
diff options
context:
space:
mode:
authorZac Pullar-Strecker <[email protected]>2020-08-24 10:19:53 +0100
committerZac Pullar-Strecker <[email protected]>2020-08-24 10:20:13 +0100
commit7bbca7a1b3f9293d2f5cc5745199bc5f8396f2f0 (patch)
treebdb47765991cb973b2cd5481a088fac636bd326c /crates/ra_proc_macro_srv/src/tests/mod.rs
parentca464650eeaca6195891199a93f4f76cf3e7e697 (diff)
parente65d48d1fb3d4d91d9dc1148a7a836ff5c9a3c87 (diff)
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
Diffstat (limited to 'crates/ra_proc_macro_srv/src/tests/mod.rs')
-rw-r--r--crates/ra_proc_macro_srv/src/tests/mod.rs45
1 files changed, 0 insertions, 45 deletions
diff --git a/crates/ra_proc_macro_srv/src/tests/mod.rs b/crates/ra_proc_macro_srv/src/tests/mod.rs
deleted file mode 100644
index 8e6f28abd..000000000
--- a/crates/ra_proc_macro_srv/src/tests/mod.rs
+++ /dev/null
@@ -1,45 +0,0 @@
1//! proc-macro tests
2
3#[macro_use]
4mod utils;
5use test_utils::assert_eq_text;
6use utils::*;
7
8#[test]
9fn test_derive_serialize_proc_macro() {
10 assert_expand(
11 "serde_derive",
12 "Serialize",
13 "1.0",
14 r"struct Foo {}",
15 include_str!("fixtures/test_serialize_proc_macro.txt"),
16 );
17}
18
19#[test]
20fn test_derive_serialize_proc_macro_failed() {
21 assert_expand(
22 "serde_derive",
23 "Serialize",
24 "1.0",
25 r"struct {}",
26 r##"
27SUBTREE $
28 IDENT compile_error 4294967295
29 PUNCH ! [alone] 4294967295
30 SUBTREE {} 4294967295
31 LITERAL "expected identifier" 4294967295
32"##,
33 );
34}
35
36#[test]
37fn test_derive_proc_macro_list() {
38 let res = list("serde_derive", "1.0").join("\n");
39
40 assert_eq_text!(
41 &res,
42 r#"Serialize [CustomDerive]
43Deserialize [CustomDerive]"#
44 );
45}