# assert_not!
A simple Rust macro that works like the inverse of `assert!`:
**Passes if the condition is false, panics if the condition is true.**
## Overview
`assert_not!` is a macro for Rust that helps you verify that a condition **does not hold**.
If the given expression evaluates to `false`, the test passes.
If it evaluates to `true`, the macro panics with an optional error message.
## Motivation
While Rust provides the standard `assert!` macro for asserting that a condition is true,
sometimes you need to ensure a condition is *not* true.
`assert_not!` fills this gap with clear intent and easy usage.
## Usage
```rust
use assert_not::assert_not;
let expression = false;
let value = 42;
assert_not!(expression);
assert_not!(expression, "Custom error: {}", value);
```
### Examples
```rust
use assert_not::assert_not;
let value = 5;
assert_not!(value == 10); // Passes unless value is 10
let foo: Option<i32> = None;
assert_not!(foo.is_some()); // Passes unless foo is Some
let x = 3;
assert_not!(x > 5, "x is too large: {}", x); // Passes unless x > 5, with custom message
```
## Behavior
- If `expression` is `false`: Nothing happens, test passes.
- If `expression` is `true`: Panics, error message displayed (with optional formatting).
## Implementation Notes
- Follows the standard `assert!` macro's API style.
- Can be extended for debug-only variants (e.g. `debug_assert_not!`).
## License
MIT or Apache-2.0
---
*Feel free to contribute or open issues!*