use rstest::rstest;
use osom_lib_hashes::fxhash::FxHash;
use osom_lib_hashes::traits::HashFunction;
#[rstest]
#[case("", &[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])]
#[case(" ", &[0xa0, 0x52, 0x41, 0xe4, 0xe4, 0x36, 0x98, 0x2f])]
#[case("a", &[0x75, 0x02, 0xe6, 0xd3, 0x65, 0x66, 0x45, 0xe0])]
#[case("A", &[0xd5, 0xaf, 0xa4, 0xef, 0x80, 0x2f, 0xad, 0xb0])]
#[case("ab", &[0x75, 0x0c, 0xf3, 0xdb, 0x60, 0x83, 0x6d, 0xa2])]
#[case("aB", &[0x75, 0x6c, 0xa0, 0x9a, 0x7c, 0x9e, 0x36, 0x0a])]
#[case("Ab", &[0xd5, 0xb9, 0xb1, 0xf7, 0x7b, 0x4c, 0xd5, 0x72])]
#[case("AB", &[0xd5, 0x19, 0x5f, 0xb6, 0x97, 0x67, 0x9e, 0xda])]
fn test_fxhash(#[case] input: &str, #[case] expected: &[u8]) {
let mut fxhash = FxHash::new();
fxhash.update(input);
let result = fxhash.result();
assert_eq!(result.as_ref(), expected);
}