Skip to content

Commit

Permalink
fix: fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ascandone committed Jan 14, 2025
1 parent 31ffbb4 commit f0a6273
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler-core/src/language_server/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,14 +528,14 @@ impl<'a> TestProject<'a> {
engine
}

fn build_path() -> TextDocumentIdentifier {
pub fn build_path() -> TextDocumentIdentifier {
let path = Utf8PathBuf::from(if cfg!(target_family = "windows") {
r"\\?\C:\src\app.gleam"
} else {
"/src/app.gleam"
});

let url = Url::from_file_path(path).expect("valid path");
let url = Url::from_file_path(path).unwrap();

TextDocumentIdentifier::new(url)
}
Expand Down
3 changes: 2 additions & 1 deletion compiler-core/src/language_server/tests/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ pub opaque type Wibble {
let _ = engine.compile_please();
// update src to the one we want to test
_ = io.src_module("app", src);
let param = tester.build_path(position);

let param = TextDocumentPositionParams::new(TestProject::build_path(), position);
let response = engine.completion(param, src.into());

let mut completions = response.result.unwrap().unwrap_or_default();
Expand Down
4 changes: 2 additions & 2 deletions compiler-core/src/language_server/tests/inlay_hints.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::language_server::{
configuration::{Configuration, InlayHintsConfig},
tests::{setup_engine, LanguageServerTestIO},
tests::{setup_engine, LanguageServerTestIO, TestProject},
};
use lsp_types::{InlayHintParams, Position, Range};

Expand Down Expand Up @@ -186,7 +186,7 @@ fn inlay_hints_for_config(src: &str, user_config: Configuration) -> String {
assert!(response.result.is_ok());

let params = InlayHintParams {
text_document: super::TestProject::build_path(),
text_document: TestProject::build_path(),
work_done_progress_params: Default::default(),
range: Range::new(
Position::new(0, 0),
Expand Down

0 comments on commit f0a6273

Please sign in to comment.