Skip to content

Commit

Permalink
fix: cargo fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Akash <[email protected]>
  • Loading branch information
SkySingh04 committed Dec 24, 2024
1 parent 07a6b26 commit 48a349e
Showing 1 changed file with 43 additions and 47 deletions.
90 changes: 43 additions & 47 deletions kclvm/tools/src/LSP/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -969,16 +969,12 @@ fn unimport_schemas(
#[cfg(test)]
mod tests {
use crate::{
completion::{
completion, func_ty_complete_label,
},
completion::{completion, func_ty_complete_label},
tests::{compile_test_file, compile_test_file_and_metadata},
};
use kclvm_driver::toolchain;
use kclvm_error::Position as KCLPos;
use kclvm_sema::builtin::{
BUILTIN_FUNCTIONS, STANDARD_SYSTEM_MODULES,
};
use kclvm_sema::builtin::{BUILTIN_FUNCTIONS, STANDARD_SYSTEM_MODULES};
use lsp_types::CompletionResponse;
#[macro_export]
macro_rules! completion_label_test_snapshot {
Expand Down Expand Up @@ -1097,71 +1093,71 @@ mod tests {
1,
None
);

completion_label_test_snapshot!(
schema_attr_completion_labels,
"src/test_data/completion_test/dot/completion/completion.k",
24,
4,
None
);

completion_label_test_snapshot!(
dot_schema_attr_completion,
"src/test_data/completion_test/dot/completion/completion.k",
12,
7,
Some('.')
);

completion_label_test_snapshot!(
dot_str_builtin_func_completion,
"src/test_data/completion_test/dot/completion/completion.k",
14,
12,
Some('.')
);

completion_label_test_snapshot!(
import_pkg_path_completion,
"src/test_data/completion_test/dot/completion/completion.k",
1,
12,
Some('.')
);

completion_label_test_snapshot!(
import_pkg_schema_completion,
"src/test_data/completion_test/dot/completion/completion.k",
16,
12,
Some('.')
);

completion_label_test_snapshot!(
math_func_completion,
"src/test_data/completion_test/dot/completion/completion.k",
19,
5,
Some('.')
);

completion_label_test_snapshot!(
literal_str_builtin_func_completion,
"src/test_data/completion_test/dot/completion/completion.k",
21,
4,
Some('.')
);

completion_label_test_snapshot!(
single_schema_attr_completion,
"src/test_data/completion_test/dot/completion/completion.k",
30,
11,
Some('.')
);

completion_label_test_snapshot!(
string_union_type_completion,
"src/test_data/completion_test/dot/completion/completion.k",
Expand All @@ -1171,21 +1167,21 @@ mod tests {
);

completion_label_without_builtin_func_test_snapshot!(
var_completion_labels_without_dot,
"src/test_data/completion_test/without_dot/completion.k",
26,
1,
None
);
var_completion_labels_without_dot,
"src/test_data/completion_test/without_dot/completion.k",
26,
1,
None
);

completion_label_without_system_pkg_test_snapshot!(
system_pkg_labels,
"src/test_data/completion_test/without_dot/completion.k",
36,
5,
Some('.')
);

completion_label_test_snapshot!(
basic_completion_labels,
"src/test_data/completion_test/without_dot/completion.k",
Expand All @@ -1209,47 +1205,47 @@ mod tests {
6,
Some(':')
);

completion_label_test_snapshot!(
attr_value_completion_strings,
"src/test_data/completion_test/assign/completion.k",
16,
6,
Some(':')
);

completion_label_test_snapshot!(
attr_value_completion_list,
"src/test_data/completion_test/assign/completion.k",
18,
6,
Some(':')
);

completion_label_test_snapshot!(
attr_value_completion_integer,
"src/test_data/completion_test/assign/completion.k",
20,
6,
Some(':')
);

completion_label_test_snapshot!(
attr_value_completion_boolean,
"src/test_data/completion_test/assign/completion.k",
22,
6,
Some(':')
);

completion_label_test_snapshot!(
attr_value_completion_dict,
"src/test_data/completion_test/assign/completion.k",
24,
6,
Some(':')
);

completion_label_test_snapshot!(
attr_value_completion_schema,
"src/test_data/completion_test/assign/completion.k",
Expand All @@ -1265,7 +1261,7 @@ mod tests {
5,
None
);

completion_label_test_snapshot!(
schema_docstring_newline_test,
"src/test_data/completion_test/newline/docstring_newline.k",
Expand All @@ -1281,39 +1277,39 @@ mod tests {
10,
Some('.')
);

completion_label_test_snapshot!(
str_dot_completion_test_second_line_end,
"src/test_data/completion_test/dot/lit_str/lit_str.k",
2,
6,
Some('.')
);

completion_label_test_snapshot!(
str_dot_completion_test_inside_literal_1,
"src/test_data/completion_test/dot/lit_str/lit_str.k",
2,
5,
Some('.')
);

completion_label_test_snapshot!(
str_dot_completion_test_inside_literal_2,
"src/test_data/completion_test/dot/lit_str/lit_str.k",
1,
8,
Some('.')
);

completion_label_test_snapshot!(
str_dot_completion_test_third_line,
"src/test_data/completion_test/dot/lit_str/lit_str.k",
3,
2,
Some('.')
);

completion_label_test_snapshot!(
schema_ty_attr_complete_test,
"src/test_data/completion_test/dot/schema_ty_attr/schema_ty_attr.k",
Expand All @@ -1329,31 +1325,31 @@ mod tests {
16,
None
);

completion_label_test_snapshot!(
comment_completion_test,
"src/test_data/completion_test/dot/lit_str/lit_str.k",
4,
4,
Some('.')
);

completion_label_test_snapshot!(
missing_expr_completion_test,
"src/test_data/completion_test/dot/missing_expr/missing_expr.k",
10,
16,
Some('.')
);

completion_label_test_snapshot!(
check_scope_completion_test_part1,
"src/test_data/completion_test/check/check.k",
4,
10,
Some(':')
);

completion_label_test_snapshot!(
check_scope_completion_test_part2,
"src/test_data/completion_test/check/check.k",
Expand All @@ -1369,23 +1365,23 @@ mod tests {
28,
Some('.')
);

completion_label_test_snapshot!(
join_str_inner_completion_test_part2,
"src/test_data/completion_test/dot/lit_str/lit_str.k",
7,
27,
Some('.')
);

completion_label_test_snapshot!(
schema_type_attr_completion_test_part1,
"src/test_data/completion_test/schema/schema/schema.k",
18,
15,
None
);

completion_label_test_snapshot!(
schema_type_attr_completion_test_part2,
"src/test_data/completion_test/schema/schema/schema.k",
Expand All @@ -1401,31 +1397,31 @@ mod tests {
9,
None
);

completion_label_test_snapshot!(
nested_2_test,
"src/test_data/completion_test/dot/nested/nested_2/nested_2.k",
9,
9,
None
);

completion_label_test_snapshot!(
nested_3_test,
"src/test_data/completion_test/dot/nested/nested_3/nested_3.k",
10,
13,
None
);

completion_label_test_snapshot!(
nested_4_test,
"src/test_data/completion_test/dot/nested/nested_4/nested_4.k",
9,
9,
None
);

completion_label_without_builtin_func_test_snapshot!(
lambda_1,
"src/test_data/completion_test/lambda/lambda_1/lambda_1.k",
Expand Down Expand Up @@ -1601,4 +1597,4 @@ mod tests {
1,
None
);
}
}

0 comments on commit 48a349e

Please sign in to comment.