don't write to (temp) file in solve tests

This commit is contained in:
Folkert 2022-04-10 16:22:35 +02:00
parent a4c8ebd55e
commit 52b58ecdf3
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 28 additions and 6 deletions

View file

@ -48,13 +48,10 @@ mod solve_expr {
let dir = tempdir()?;
let filename = PathBuf::from("Test.roc");
let file_path = dir.path().join(filename);
let full_file_path = file_path.clone();
let mut file = File::create(file_path)?;
writeln!(file, "{}", module_src)?;
drop(file);
let result = roc_load::load_and_typecheck(
let result = roc_load::load_and_typecheck_str(
arena,
full_file_path,
file_path,
module_src,
dir.path(),
exposed_types,
roc_target::TargetInfo::default_x86_64(),