Put default thread name in a const
This commit is contained in:
parent
bfef7254d8
commit
f586c56a0b
@ -104,17 +104,18 @@ fn start_thread_execution() {
|
||||
mod test {
|
||||
|
||||
use super::{Thread, ThreadContext, NUM_INT_REGS, NUM_FP_REGS, ObjectType};
|
||||
const DEFAULT_THREAD_NAME: &str = "test_thread";
|
||||
|
||||
macro_rules! get_new_thread {
|
||||
() => { Thread::new("test_thread") };
|
||||
() => { Thread::new(DEFAULT_THREAD_NAME) };
|
||||
($a:literal) => {
|
||||
Thread::new(&$a.to_string())
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! expected_initial_state {
|
||||
() => { expected_initial_state!("test_thread") };
|
||||
($a:literal) => { {
|
||||
() => { expected_initial_state!(DEFAULT_THREAD_NAME) };
|
||||
($a:expr) => { {
|
||||
let mut x = Thread::new($a);
|
||||
x.name = $a.to_string();
|
||||
x.process = Option::None;
|
||||
|
Loading…
Reference in New Issue
Block a user