Skip to content

Commit

Permalink
Add test for #[default] attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeloof committed Jan 7, 2025
1 parent 8872a54 commit 3d90a8d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions statig/tests/default.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#[cfg(test)]
mod tests {
use statig::blocking::*;

pub struct Foo;

#[state_machine(initial = "State::bar()")]
impl Foo {
#[state]
fn bar(#[default] _local: &mut usize) -> Response<State> {
Handled
}
}
}

0 comments on commit 3d90a8d

Please sign in to comment.