mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
somewhat decent formatting
This commit is contained in:
parent
12027ee338
commit
8b39cc444e
1 changed files with 20 additions and 3 deletions
|
@ -405,14 +405,31 @@ pub fn test(matches: &ArgMatches, triple: Triple) -> io::Result<i32> {
|
|||
|
||||
use roc_gen_llvm::run_jit_function;
|
||||
|
||||
let mut failures = 0;
|
||||
let passed = expects.len();
|
||||
|
||||
for expect in expects {
|
||||
println!("running: {}", expect);
|
||||
print!("test {expect}... ");
|
||||
let result = run_jit_function!(lib, expect, bool, |v: bool| v);
|
||||
|
||||
dbg!(result);
|
||||
match result {
|
||||
true => println!("ok"),
|
||||
false => {
|
||||
failures += 1;
|
||||
println!("failed")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(0)
|
||||
println!();
|
||||
|
||||
if failures > 0 {
|
||||
println!("test result: failed. {passed} passed; {failures} failed;");
|
||||
Ok(1)
|
||||
} else {
|
||||
println!("test result: ok. {passed} passed; {failures} failed;");
|
||||
Ok(0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn build(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue