aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-04-04 16:06:22 +0100
committerVille Penttinen <[email protected]>2019-04-09 12:45:04 +0100
commit84fde47d00bb3ccba3876ad2b2e46c5c59cd07c4 (patch)
tree1c5109cf9abd2a881e38486279e93b01245e9a7a /crates/ra_ide_api
parent751b4544426509b6b9a072c54604fa0ca4438e64 (diff)
Move test specific things
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/call_info.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs
index a65119315..3c53bd11a 100644
--- a/crates/ra_ide_api/src/call_info.rs
+++ b/crates/ra_ide_api/src/call_info.rs
@@ -118,16 +118,6 @@ impl CallInfo {
118 fn parameters(&self) -> &[String] { 118 fn parameters(&self) -> &[String] {
119 &self.signature.parameters 119 &self.signature.parameters
120 } 120 }
121
122 #[cfg(test)]
123 fn doc(&self) -> Option<&hir::Documentation> {
124 self.signature.doc.as_ref()
125 }
126
127 #[cfg(test)]
128 fn label(&self) -> String {
129 self.signature.to_string()
130 }
131} 121}
132 122
133#[cfg(test)] 123#[cfg(test)]
@@ -138,6 +128,17 @@ mod tests {
138 128
139 use super::*; 129 use super::*;
140 130
131 // These are only used when testing
132 impl CallInfo {
133 fn doc(&self) -> Option<hir::Documentation> {
134 self.signature.doc.clone()
135 }
136
137 fn label(&self) -> String {
138 self.signature.to_string()
139 }
140 }
141
141 fn call_info(text: &str) -> CallInfo { 142 fn call_info(text: &str) -> CallInfo {
142 let (analysis, position) = single_file_with_position(text); 143 let (analysis, position) = single_file_with_position(text);
143 analysis.call_info(position).unwrap().unwrap() 144 analysis.call_info(position).unwrap().unwrap()