Skip to content

Commit

Permalink
update ut
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <18012015693@163.com>
  • Loading branch information
He1pa committed Jun 26, 2024
1 parent 4a0fcb2 commit 3e38f52
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
5 changes: 3 additions & 2 deletions kclvm/tools/src/LSP/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1844,9 +1844,10 @@ mod tests {

match &mut got {
CompletionResponse::Array(arr) => {
let labels: Vec<String> =
let mut labels: Vec<String> =
arr.iter().map(|item| item.label.clone()).collect();
insta::assert_snapshot!(format!("{:?}", labels));
labels.sort();
labels
}
CompletionResponse::List(_) => panic!("test failed"),
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tools/src/LSP/src/completion.rs
expression: "format!(\"{:?}\", labels)"
---
["abs(…)", "all_true(…)", "any_true(…)", "bin(…)", "bool(…)", "case", "cases", "dict(…)", "float(…)", "func1", "hex(…)", "int(…)", "isunique(…)", "len(…)", "list(…)", "max(…)", "min(…)", "multiplyof(…)", "oct(…)", "option(…)", "ord(…)", "pow(…)", "print(…)", "range(…)", "round(…)", "sorted(…)", "str(…)", "sum(…)", "typeof(…)", "zip(…)"]

This file was deleted.

0 comments on commit 3e38f52

Please sign in to comment.