Skip to content

Commit

Permalink
Use exit_code in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasKalbertodt committed Apr 9, 2024
1 parent f3ffa44 commit 56034d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/simple.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
extern crate libtest_mimic;

use std::{thread, time};
use std::{process::ExitCode, thread, time};
use libtest_mimic::{Arguments, Trial, Failed};


fn main() {
fn main() -> ExitCode {
let args = Arguments::from_args();

let tests = vec![
Expand All @@ -15,7 +15,7 @@ fn main() {
Trial::test("check_katara", check_katara),
];

libtest_mimic::run(&args, tests).exit();
libtest_mimic::run(&args, tests).exit_code()
}


Expand Down
6 changes: 3 additions & 3 deletions examples/tidy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ use std::{
error::Error,
ffi::OsStr,
fs,
path::Path,
path::Path, process::ExitCode,
};


fn main() -> Result<(), Box<dyn Error>> {
fn main() -> Result<ExitCode, Box<dyn Error>> {
let args = Arguments::from_args();
let tests = collect_tests()?;
libtest_mimic::run(&args, tests).exit();
Ok(libtest_mimic::run(&args, tests).exit_code())
}

/// Creates one test for each `.rs` file in the current directory or
Expand Down

0 comments on commit 56034d2

Please sign in to comment.