Skip to content

Commit

Permalink
add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbrown committed Dec 23, 2024
1 parent f1dd596 commit cb123b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/iocraft/src/hooks/use_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,5 +405,12 @@ mod tests {

assert!(state.try_read().is_none());
assert!(state.try_write().is_none());

// these should be no-ops
state.set(43);
state += 1;
state -= 1;
state *= 2;
state /= 2;
}
}

0 comments on commit cb123b8

Please sign in to comment.