mos-test 0.0.1

custom test runner for rust-mos
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::TestOutcome;
use ufmt_stdio::*;

pub fn check_outcome<T: TestOutcome>(outcome: T, should_error: bool) {
    if outcome.is_success() == should_error {
        let note = if should_error {
            "`#[should_error]` "
        } else {
            ""
        };

        println!("{}test failed with outcome: {}", note, outcome);
        panic!();
    }
}