rust-testing
Installation
SKILL.md
Rust Testing
Unit Tests
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_add() { assert_eq!(add(2, 3), 5); }
#[test]
fn test_error() {
let result = parse("invalid");
assert!(result.is_err());
}