Skip to content

Commit

Permalink
add and fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <[email protected]>
  • Loading branch information
He1pa committed Aug 12, 2024
1 parent 39163df commit dcf8d4c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 6 deletions.
14 changes: 11 additions & 3 deletions kclvm/tools/src/LSP/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2066,26 +2066,34 @@ mod tests {
);

completion_label_test_snapshot!(
schema_arg_1,
schema_def_1,
"src/test_data/completion_test/schema_def/schema_def.k",
10,
22,
None
);

completion_label_test_snapshot!(
schema_arg_2,
schema_def_2,
"src/test_data/completion_test/schema_def/schema_def.k",
12,
5,
None
);

completion_label_test_snapshot!(
schema_arg_3,
schema_def_3,
"src/test_data/completion_test/schema_def/schema_def.k",
13,
8,
None
);

completion_label_test_snapshot!(
schema_def_4,
"src/test_data/completion_test/schema_def/schema_def.k",
3,
12,
None
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tools/src/LSP/src/completion.rs
expression: "format!(\"{:?}\", got_labels)"
---
["Config", "Config{}", "Container", "Container{}", "Server", "Server(inputConfig){}", "name", "name1"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: tools/src/LSP/src/goto_def.rs
assertion_line: 494
expression: "format!(\"{:?}\", { fmt_resp(& res) })"
---
"path: \"src/test_data/goto_def_test/goto_attr_in_schema_def/goto_attr_in_schema_def.k\", range: Range { start: Position { line: 14, character: 4 }, end: Position { line: 14, character: 5 } }"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
schema Container:
name: str

name1:

schema Config:
mainContainer: Container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ schema Nested:
b: {:} = {
if a:
aa: "aa"
}
}

0 comments on commit dcf8d4c

Please sign in to comment.