Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
imaqtkatt committed Mar 7, 2024
1 parent 52c64b7 commit 482403a
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions tests/golden_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ use std::{
use stdext::function_name;
use walkdir::WalkDir;

fn format_output(output: std::process::Output) -> String {
format!("{}\n{}", String::from_utf8_lossy(&output.stderr), String::from_utf8_lossy(&output.stdout))
}

fn do_parse_term(code: &str) -> Result<Term, String> {
parse_term(code).map_err(|errs| errs.into_iter().map(|e| e.to_string()).join("\n"))
}
Expand Down Expand Up @@ -147,25 +151,15 @@ fn run_file() {
.output()
.expect("Run process");

Ok(format!("{}\n{}", String::from_utf8_lossy(&output.stderr), String::from_utf8_lossy(&output.stdout)))
// let book = do_parse_book(code, path)?;
// // 1 million nodes for the test runtime. Smaller doesn't seem to make it any faster
// let (res, info) =
// run_book(book, 1 << 24, RunOpts::lazy(), WarningOpts::deny_all(), CompileOpts::heavy(), None)?;
// Ok(format!("{}{}", display_readback_errors(&info.readback_errors), res))
Ok(format_output(output))
}),
(&|_code, path| {
let output = std::process::Command::new(env!("CARGO_BIN_EXE_hvml"))
.args(["run", path.to_str().unwrap(), "-Dall", "-Oall"])

Check warning on line 158 in tests/golden_tests.rs

View workflow job for this annotation

GitHub Actions / cspell

Unknown word (Dall)
.output()
.expect("Run process");

Ok(format!("{}\n{}", String::from_utf8_lossy(&output.stderr), String::from_utf8_lossy(&output.stdout)))
// let book = do_parse_book(code, path)?;
// // 1 million nodes for the test runtime. Smaller doesn't seem to make it any faster
// let (res, info) =
// run_book(book, 1 << 24, RunOpts::default(), WarningOpts::deny_all(), CompileOpts::heavy(), None)?;
// Ok(format!("{}{}", display_readback_errors(&info.readback_errors), res))
Ok(format_output(output))
}),
])
}
Expand Down Expand Up @@ -333,6 +327,6 @@ fn cli() {
let output =
std::process::Command::new(env!("CARGO_BIN_EXE_hvml")).args(args).output().expect("Run command");

Ok(format!("{}\n{}", String::from_utf8_lossy(&output.stderr), String::from_utf8_lossy(&output.stdout)))
Ok(format_output(output))
})
}

0 comments on commit 482403a

Please sign in to comment.