diff --git a/crates/support/src/atomic_str.rs b/crates/support/src/atomic_str.rs index 0dd0249..ebe5636 100644 --- a/crates/support/src/atomic_str.rs +++ b/crates/support/src/atomic_str.rs @@ -48,3 +48,18 @@ impl fmt::Display for AtomicStr { f.write_str(&self.as_str()) } } + +#[cfg(test)] +mod tests { + use super::*; + + fn test_str(s: &str) { + assert_eq!(s, "hello"); + } + + #[test] + fn test_atomic_str() { + let s = AtomicStr::from("hello"); + test_str(&s.as_str()); + } +}