Skip to content

Commit

Permalink
fmt check
Browse files Browse the repository at this point in the history
Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
  • Loading branch information
shruti2522 committed May 17, 2024
1 parent bff2ede commit d360af1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions kclvm/tools/src/LSP/src/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,13 @@ mod tests {
let got = hover(&program, &pos, &gs).unwrap();

let expect_content = vec![
MarkedString::String("__main__\n\n```kcl\nschema Data1[m: {str:str}](Data)\n```".to_string()),
MarkedString::String("```kcl\nAttributes:\n```\n\n```kcl\nname: str\n```\n\n```kcl\nage: int\n```".to_string()),
MarkedString::String(
"__main__\n\n```kcl\nschema Data1[m: {str:str}](Data)\n```".to_string(),
),
MarkedString::String(
"```kcl\nAttributes:\n```\n\n```kcl\nname: str\n```\n\n```kcl\nage: int\n```"
.to_string(),
),
];

match got.contents {
Expand Down
9 changes: 7 additions & 2 deletions kclvm/tools/src/LSP/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,10 @@ fn hover_test() {
contents: HoverContents::Array(vec![
MarkedString::String("__main__\n\n```kcl\nschema Person\n```".to_string()),
MarkedString::String("hover doc test".to_string()),
MarkedString::String("```kcl\nAttributes:\n```\n\n```kcl\nname: str\n```\n\n```kcl\nage?: int\n```".to_string()),
MarkedString::String(
"```kcl\nAttributes:\n```\n\n```kcl\nname: str\n```\n\n```kcl\nage?: int\n```"
.to_string()
),
]),
range: None
})
Expand Down Expand Up @@ -1225,7 +1228,9 @@ fn hover_assign_in_lambda_test() {
assert_eq!(
res.result.unwrap(),
to_json(Hover {
contents: HoverContents::Scalar(MarkedString::String("```kcl\nimages: [str]\n```".to_string()),),
contents: HoverContents::Scalar(MarkedString::String(
"```kcl\nimages: [str]\n```".to_string()
),),
range: None
})
.unwrap()
Expand Down

0 comments on commit d360af1

Please sign in to comment.