added comments to macros

This commit is contained in:
François Autin 2023-03-09 14:03:35 +01:00
parent f586c56a0b
commit ecff299b28
No known key found for this signature in database
GPG Key ID: 343F5D382E1DD77C

View File

@ -106,6 +106,7 @@ mod test {
use super::{Thread, ThreadContext, NUM_INT_REGS, NUM_FP_REGS, ObjectType};
const DEFAULT_THREAD_NAME: &str = "test_thread";
/// Polymorphic macro to get thread without passing a name by default
macro_rules! get_new_thread {
() => { Thread::new(DEFAULT_THREAD_NAME) };
($a:literal) => {
@ -113,6 +114,9 @@ mod test {
};
}
/// This macro allows for getting a Thread for which we've ensured proper initial state
/// in case a commit further down the line changes the initial state of threads generated
/// from Thread::new
macro_rules! expected_initial_state {
() => { expected_initial_state!(DEFAULT_THREAD_NAME) };
($a:expr) => { {