Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/app-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#![no_std]
// See the comment in `crates/test-utils/src/lib.rs` for the meaning of these attributes.
#![cfg_attr(test, no_main)]
#![feature(custom_test_frameworks)]
#![test_runner(ledger_device_sdk::testing::sdk_test_runner)]
#![reexport_test_harness_main = "test_main"]
#![cfg_attr(test, feature(custom_test_frameworks))]
#![cfg_attr(test, test_runner(ledger_device_sdk::testing::sdk_test_runner))]
#![cfg_attr(test, reexport_test_harness_main = "test_main")]

#[cfg(test)]
test_utils::impl_panic_handler!();
Expand Down
6 changes: 3 additions & 3 deletions crates/messages/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#![no_std]
// See the comment in `crates/test-utils/src/lib.rs` for the meaning of these attributes.
#![cfg_attr(test, no_main)]
#![feature(custom_test_frameworks)]
#![test_runner(ledger_device_sdk::testing::sdk_test_runner)]
#![reexport_test_harness_main = "test_main"]
#![cfg_attr(test, feature(custom_test_frameworks))]
#![cfg_attr(test, test_runner(ledger_device_sdk::testing::sdk_test_runner))]
#![cfg_attr(test, reexport_test_harness_main = "test_main")]

#[cfg(test)]
test_utils::impl_panic_handler!();
Expand Down
6 changes: 3 additions & 3 deletions crates/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
//! 2. "custom_test_frameworks" must be enabled to be able to specify the custom runner and use
//! the `#[test_case]` attribute (used internally by `testmacro::test_item`).
//!
//! #![feature(custom_test_frameworks)]
//! #![cfg_attr(test, feature(custom_test_frameworks))]
//!
//! 3. Specify the custom test runner. All test cases collected by `#[test_case]` will be passed
//! to this function. In particular, `sdk_test_runner` will loop over the array of test cases
//! and:
//! a) fix references stored inside the test case via pic_rs/pic;
//! b) invoke the closure associated with the test case.
//!
//! #![test_runner(ledger_device_sdk::testing::sdk_test_runner)]
//! #![cfg_attr(test, test_runner(ledger_device_sdk::testing::sdk_test_runner))]
//!
//!
//! 4. The following will put `fn test_main` at the test crate's root, which will call the runner
//! that we've specified above. The crate's `sample_main` will have to call `test_main`.
//!
//! #![reexport_test_harness_main = "test_main"]
//! #![cfg_attr(test, reexport_test_harness_main = "test_main")]
//! 3. Under `#[cfg(test)]` call:
//! 1. test_utils::impl_panic_handler!();
//! 2. test_utils::impl_main!();
Expand Down
Loading