1
Fork 0
leetcode/tests/contains_duplicate.rs

10 lines
299 B
Rust

use leetcode::contains_duplicate::contains_duplicate;
use test_case::test_case;
#[test_case(&[1, 2, 3, 1], true; "example 1")]
#[test_case(&[1, 2, 3, 4], false; "example 2")]
fn test_contains_duplicate(input: &[i32], expected: bool) {
assert_eq!(contains_duplicate(input.to_vec()), expected);
}