repo.or.cz
/
liba.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
remove script/cargo.py
[liba.git]
/
tests
/
crc8.rs
blob
23a1343f04b7ce0845ed419abb87deb795189ec8
1
#[test]
2
fn crc8() {
3
{
4
let ctx = liba::crc8::new_msb(0x07);
5
assert_eq!(ctx.eval(b"0123456789", 0), 0x45);
6
}
7
{
8
let ctx = liba::crc8::new_lsb(0x31);
9
assert_eq!(ctx.eval(b"0123456789", 0), 0x75);
10
}
11
}