Fix completion tests

This commit is contained in:
Aleksey Kladov 2020-03-12 19:02:55 +01:00
parent fab40db8bd
commit a6bb4cd0ec
3 changed files with 12 additions and 0 deletions

View file

@ -42,6 +42,7 @@ mod tests {
kind: Function,
lookup: "quux",
detail: "fn quux(x: i32)",
trigger_call_info: true,
},
CompletionItem {
label: "x",
@ -844,6 +845,7 @@ mod tests {
kind: Function,
lookup: "quux",
detail: "fn quux(x: i32)",
trigger_call_info: true,
},
CompletionItem {
label: "x",

View file

@ -80,6 +80,9 @@ impl fmt::Debug for CompletionItem {
if self.deprecated {
s.field("deprecated", &true);
}
if self.trigger_call_info {
s.field("trigger_call_info", &true);
}
s.finish()
}
}

View file

@ -510,6 +510,7 @@ mod tests {
kind: Function,
lookup: "with_args",
detail: "fn with_args(x: i32, y: String)",
trigger_call_info: true,
},
]
"###
@ -566,6 +567,7 @@ mod tests {
kind: Method,
lookup: "foo",
detail: "fn foo(&self, x: i32)",
trigger_call_info: true,
},
]
"###
@ -600,6 +602,7 @@ mod tests {
kind: Method,
lookup: "foo",
detail: "fn foo(&self, x: i32)",
trigger_call_info: true,
},
]
"###
@ -718,6 +721,7 @@ mod tests {
kind: Function,
lookup: "foo",
detail: "fn foo(xs: Ve)",
trigger_call_info: true,
},
]
"###
@ -747,6 +751,7 @@ mod tests {
kind: Function,
lookup: "foo",
detail: "fn foo(xs: Ve)",
trigger_call_info: true,
},
]
"###
@ -775,6 +780,7 @@ mod tests {
kind: Function,
lookup: "foo",
detail: "fn foo(xs: Ve)",
trigger_call_info: true,
},
]
"###
@ -803,6 +809,7 @@ mod tests {
kind: Function,
lookup: "foo",
detail: "fn foo(xs: Ve<i128>)",
trigger_call_info: true,
},
]
"###