diff options
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/completions/attribute/derive.rs | 49 |
1 files changed, 6 insertions, 43 deletions
diff --git a/crates/ide_completion/src/completions/attribute/derive.rs b/crates/ide_completion/src/completions/attribute/derive.rs index d526824fb..7b3133e53 100644 --- a/crates/ide_completion/src/completions/attribute/derive.rs +++ b/crates/ide_completion/src/completions/attribute/derive.rs | |||
@@ -93,57 +93,20 @@ mod tests { | |||
93 | } | 93 | } |
94 | 94 | ||
95 | #[test] | 95 | #[test] |
96 | #[ignore] // FIXME: Fixtures cant test proc-macros/derives yet as we cant specify them in fixtures | ||
97 | fn empty_derive() { | 96 | fn empty_derive() { |
98 | check( | 97 | // FIXME: Add build-in derives to fixture. |
99 | r#"#[derive($0)] struct Test;"#, | 98 | check(r#"#[derive($0)] struct Test;"#, expect![[r#""#]]); |
100 | expect![[r#" | ||
101 | at Clone | ||
102 | at Clone, Copy | ||
103 | at Debug | ||
104 | at Default | ||
105 | at Hash | ||
106 | at PartialEq | ||
107 | at PartialEq, Eq | ||
108 | at PartialEq, PartialOrd | ||
109 | at PartialEq, Eq, PartialOrd, Ord | ||
110 | "#]], | ||
111 | ); | ||
112 | } | 99 | } |
113 | 100 | ||
114 | #[test] | 101 | #[test] |
115 | #[ignore] // FIXME: Fixtures cant test proc-macros/derives yet as we cant specify them in fixtures | ||
116 | fn derive_with_input() { | 102 | fn derive_with_input() { |
117 | check( | 103 | // FIXME: Add build-in derives to fixture. |
118 | r#"#[derive(serde::Serialize, PartialEq, $0)] struct Test;"#, | 104 | check(r#"#[derive(serde::Serialize, PartialEq, $0)] struct Test;"#, expect![[r#""#]]) |
119 | expect![[r#" | ||
120 | at Clone | ||
121 | at Clone, Copy | ||
122 | at Debug | ||
123 | at Default | ||
124 | at Hash | ||
125 | at Eq | ||
126 | at PartialOrd | ||
127 | at Eq, PartialOrd, Ord | ||
128 | "#]], | ||
129 | ) | ||
130 | } | 105 | } |
131 | 106 | ||
132 | #[test] | 107 | #[test] |
133 | #[ignore] // FIXME: Fixtures cant test proc-macros/derives yet as we cant specify them in fixtures | ||
134 | fn derive_with_input2() { | 108 | fn derive_with_input2() { |
135 | check( | 109 | // FIXME: Add build-in derives to fixture. |
136 | r#"#[derive($0 serde::Serialize, PartialEq)] struct Test;"#, | 110 | check(r#"#[derive($0 serde::Serialize, PartialEq)] struct Test;"#, expect![[r#""#]]) |
137 | expect![[r#" | ||
138 | at Clone | ||
139 | at Clone, Copy | ||
140 | at Debug | ||
141 | at Default | ||
142 | at Hash | ||
143 | at Eq | ||
144 | at PartialOrd | ||
145 | at Eq, PartialOrd, Ord | ||
146 | "#]], | ||
147 | ) | ||
148 | } | 111 | } |
149 | } | 112 | } |