Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jul 17, 2024
1 parent 28a265a commit f6aece7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tooling/lsp/src/requests/inlay_hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,12 @@ mod inlay_hints_tests {
panic!("Expected InlayHintLabel::LabelParts, got {:?}", inlay_hint.label);
}
}

#[test]
async fn test_do_not_panic_when_given_line_is_too_big() {
let inlay_hints = get_inlay_hints(0, 100000).await;
assert!(!inlay_hints.is_empty());
}
}

// These functions are copied from the codespan_lsp crate, except that they never panic
Expand Down

0 comments on commit f6aece7

Please sign in to comment.