1use std::os::raw::{c_uint, c_ulong};
4
5extern "C" {
6 pub fn crc32(crc: c_ulong, buf: *const u8, len: c_uint) -> c_ulong;
7}
8
9#[test]
10fn test_crc32() {
11 let s = "hello";
12 unsafe {
13 assert_eq!(crc32(0, s.as_ptr(), s.len() as c_uint), 0x3610a686);
14 }
15}