blob: 010f2407267a753d2399111558dd5d5a774be38b [file] [log] [blame]
David Browndd2b1182017-11-02 15:39:21 -06001//! Core tests
2//!
3//! Run the existing testsuite as a Rust unit test.
4
5extern crate bootsim;
6
7use bootsim::{ALL_DEVICES, RunStatus};
David Brownca7b5d32017-11-03 08:37:38 -06008use bootsim::testlog;
David Browndd2b1182017-11-02 15:39:21 -06009
10#[test]
11fn core_tests() {
David Brownca7b5d32017-11-03 08:37:38 -060012 testlog::setup();
13
David Browndd2b1182017-11-02 15:39:21 -060014 let mut status = RunStatus::new();
15
16 for &dev in ALL_DEVICES {
17 for &align in &[1, 2, 4, 8] {
18 status.run_single(dev, align);
19 }
20 }
21
22 assert!(status.failures() == 0);
23}