Expand description
Full credit to: https://github.com/Anders429/gba_test/blob/master/gba_test_macros/src/lib.rs for the original source of this code, which has been changed for our purposes.
Provides the #[ktest] attribute for annotating tests that should be run on the Game Boy
Advance.
§Usage
You can use the provided #[ktest] attribute to write tests in the same way you would normally
write tests in Rust:
#![feature(custom_test_frameworks)]
#[cfg(test)]
mod tests {
use ktest_macros::test;
#[ktest]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}Note that you should use the #[ktest] attribute provided by this crate, not the default
#[test] attribute.
Also note that use of this macro currently depends on the
custom_test_frameworks
unstable Rust feature. As such, you will need to enable it in any crate that writes tests using
this crate.
Attribute Macros§
- test
- Defines a test to be executed on a Game Boy Advance.