Skip to content

Commit

Permalink
Fixed goto_local_var_def_tests
Browse files Browse the repository at this point in the history
Signed-off-by: Wck-iipi <[email protected]>
  • Loading branch information
Wck-iipi committed May 31, 2024
1 parent 0eb3d99 commit 7aed02d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kclvm/tools/src/LSP/src/goto_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,21 +242,21 @@ mod tests {

goto_def_test_snapshot!(
goto_local_var_def_test1,
"src/test_data/goto_def_test/goto_local_var_def/goto_local_var_def.k",
"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k",
7,
11
);

goto_def_test_snapshot!(
goto_local_var_def_test2,
"src/test_data/goto_def_test/goto_local_var_def/goto_local_var_def.k",
"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k",
9,
11
);

goto_def_test_snapshot!(
goto_local_var_def_test3,
"src/test_data/goto_def_test/goto_local_var_def/goto_local_var_def.k",
"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k",
11,
11
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tools/src/LSP/src/goto_def.rs
expression: "format!(\"{:?}\",\n {\n let (file, _program, _, gs) =\n compile_test_file(\"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\");\n let pos = KCLPos\n { filename : file.clone(), line : 7, column : Some(11), }; let res =\n goto_def(& pos, & gs); fmt_resp(& res)\n })"
---
"path: \"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\", range: Range { start: Position { line: 4, character: 4 }, end: Position { line: 4, character: 9 } }"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tools/src/LSP/src/goto_def.rs
expression: "format!(\"{:?}\",\n {\n let (file, _program, _, gs) =\n compile_test_file(\"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\");\n let pos = KCLPos\n { filename : file.clone(), line : 9, column : Some(11), }; let res =\n goto_def(& pos, & gs); fmt_resp(& res)\n })"
---
"path: \"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\", range: Range { start: Position { line: 4, character: 4 }, end: Position { line: 4, character: 9 } }"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tools/src/LSP/src/goto_def.rs
expression: "format!(\"{:?}\",\n {\n let (file, _program, _, gs) =\n compile_test_file(\"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\");\n let pos = KCLPos\n { filename : file.clone(), line : 11, column : Some(11), }; let res =\n goto_def(& pos, & gs); fmt_resp(& res)\n })"
---
"path: \"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\", range: Range { start: Position { line: 4, character: 4 }, end: Position { line: 4, character: 9 } }"

0 comments on commit 7aed02d

Please sign in to comment.