Expand description
Unstable support for running tests using agb.
In order to use this, you need to enable the unstable custom_test_framework feature and copy-paste
the following into the top of your application:
ⓘ
#![cfg_attr(test, feature(custom_test_frameworks))]
#![cfg_attr(test, reexport_test_harness_main = "test_main")]
#![cfg_attr(test, test_runner(agb::test_runner::test_runner))]With this support, you will be able to write tests which you can run using mgba-test-runner.
Tests are written using #[test_case] rather than #[test].
ⓘ
#[test_case]
fn dummy_test(_gba: &mut Gba) {
assert_eq!(1, 1);
}You can run the tests using cargo test, but it will work better through mgba-test-runner by
running something along the lines of CARGO_TARGET_THUMBV4T_NONE_EABI_RUNNER=mgba-test-runner cargo test.
Functions§
- assert_
image_ output - Asserts that the current screen matches the provided image