Expand description
Provides the #[test]
attribute for annotating tests that should be run on the Game Boy
Advance.
§Usage
You can use the provided #[test]
attribute to write tests in the same way you would normally
write tests in Rust:
#![feature(custom_test_frameworks)]
#[cfg(test)]
mod tests {
use gba_test_macros::test;
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}
Note that you should use the #[test]
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.