aboutsummaryrefslogtreecommitdiff
path: root/crates/proc_macro_srv/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/proc_macro_srv/src')
-rw-r--r--crates/proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt8
-rw-r--r--crates/proc_macro_srv/src/tests/mod.rs8
-rw-r--r--crates/proc_macro_srv/src/tests/utils.rs2
3 files changed, 9 insertions, 9 deletions
diff --git a/crates/proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt b/crates/proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt
index e6fd21610..ea34e688f 100644
--- a/crates/proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt
+++ b/crates/proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt
@@ -59,7 +59,7 @@ SUBTREE $
59 IDENT _serde 4294967295 59 IDENT _serde 4294967295
60 PUNCH : [joint] 4294967295 60 PUNCH : [joint] 4294967295
61 PUNCH : [alone] 4294967295 61 PUNCH : [alone] 4294967295
62 IDENT export 4294967295 62 IDENT __private 4294967295
63 PUNCH : [joint] 4294967295 63 PUNCH : [joint] 4294967295
64 PUNCH : [alone] 4294967295 64 PUNCH : [alone] 4294967295
65 IDENT Ok 4294967295 65 IDENT Ok 4294967295
@@ -72,7 +72,7 @@ SUBTREE $
72 IDENT _serde 4294967295 72 IDENT _serde 4294967295
73 PUNCH : [joint] 4294967295 73 PUNCH : [joint] 4294967295
74 PUNCH : [alone] 4294967295 74 PUNCH : [alone] 4294967295
75 IDENT export 4294967295 75 IDENT __private 4294967295
76 PUNCH : [joint] 4294967295 76 PUNCH : [joint] 4294967295
77 PUNCH : [alone] 4294967295 77 PUNCH : [alone] 4294967295
78 IDENT Err 4294967295 78 IDENT Err 4294967295
@@ -85,7 +85,7 @@ SUBTREE $
85 IDENT _serde 4294967295 85 IDENT _serde 4294967295
86 PUNCH : [joint] 4294967295 86 PUNCH : [joint] 4294967295
87 PUNCH : [alone] 4294967295 87 PUNCH : [alone] 4294967295
88 IDENT export 4294967295 88 IDENT __private 4294967295
89 PUNCH : [joint] 4294967295 89 PUNCH : [joint] 4294967295
90 PUNCH : [alone] 4294967295 90 PUNCH : [alone] 4294967295
91 IDENT Err 4294967295 91 IDENT Err 4294967295
@@ -120,7 +120,7 @@ SUBTREE $
120 IDENT _serde 4294967295 120 IDENT _serde 4294967295
121 PUNCH : [joint] 4294967295 121 PUNCH : [joint] 4294967295
122 PUNCH : [alone] 4294967295 122 PUNCH : [alone] 4294967295
123 IDENT export 4294967295 123 IDENT __private 4294967295
124 PUNCH : [joint] 4294967295 124 PUNCH : [joint] 4294967295
125 PUNCH : [alone] 4294967295 125 PUNCH : [alone] 4294967295
126 IDENT Result 4294967295 126 IDENT Result 4294967295
diff --git a/crates/proc_macro_srv/src/tests/mod.rs b/crates/proc_macro_srv/src/tests/mod.rs
index 1a827cbd7..fd54f8dfd 100644
--- a/crates/proc_macro_srv/src/tests/mod.rs
+++ b/crates/proc_macro_srv/src/tests/mod.rs
@@ -38,9 +38,9 @@ fn test_derive_proc_macro_list() {
38 let res = list("serde_derive", "1").join("\n"); 38 let res = list("serde_derive", "1").join("\n");
39 39
40 assert_eq_text!( 40 assert_eq_text!(
41 &res,
42 r#"Serialize [CustomDerive] 41 r#"Serialize [CustomDerive]
43Deserialize [CustomDerive]"# 42Deserialize [CustomDerive]"#,
43 &res
44 ); 44 );
45} 45}
46 46
@@ -50,9 +50,9 @@ fn list_test_macros() {
50 let res = list("proc_macro_test", "0.0.0").join("\n"); 50 let res = list("proc_macro_test", "0.0.0").join("\n");
51 51
52 assert_eq_text!( 52 assert_eq_text!(
53 &res,
54 r#"function_like_macro [FuncLike] 53 r#"function_like_macro [FuncLike]
55attribute_macro [Attr] 54attribute_macro [Attr]
56DummyTrait [CustomDerive]"# 55DummyTrait [CustomDerive]"#,
56 &res
57 ); 57 );
58} 58}
diff --git a/crates/proc_macro_srv/src/tests/utils.rs b/crates/proc_macro_srv/src/tests/utils.rs
index 36942147d..196abb8fc 100644
--- a/crates/proc_macro_srv/src/tests/utils.rs
+++ b/crates/proc_macro_srv/src/tests/utils.rs
@@ -52,7 +52,7 @@ pub fn assert_expand(
52 let fixture = parse_string(ra_fixture).unwrap(); 52 let fixture = parse_string(ra_fixture).unwrap();
53 53
54 let res = expander.expand(macro_name, &fixture.subtree, None).unwrap(); 54 let res = expander.expand(macro_name, &fixture.subtree, None).unwrap();
55 assert_eq_text!(&format!("{:?}", res), &expect.trim()); 55 assert_eq_text!(&expect.trim(), &format!("{:?}", res));
56} 56}
57 57
58pub fn list(crate_name: &str, version: &str) -> Vec<String> { 58pub fn list(crate_name: &str, version: &str) -> Vec<String> {