Crates.io | gba_test_macros |
lib.rs | gba_test_macros |
version | 0.1.1 |
source | src |
created_at | 2024-06-06 20:29:37.48076 |
updated_at | 2024-06-06 21:05:22.373038 |
description | #[test] attribute for writing tests to be run on the Game Boy Advance. |
homepage | |
repository | https://github.com/Anders429/gba_test |
max_upload_size | |
id | 1264057 |
size | 21,954 |
Provides the #[test]
attribute for annotating tests that should be run on the Game Boy Advance.
This crate is meant to be used with the gba_test
crate. In most cases, it is easiest to
simply use gba_test
with the macros
feature enabled by specifying the following in your
Cargo.toml
:
[dependencies]
gba_test = {version = "0.1.0", features = ["macros"]}
gba_test
's macros
feature is enabled by default.
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_runner::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.
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.