Test runner, fixed decoder

This commit is contained in:
famfo 2022-02-13 13:14:46 +01:00
parent f7ef75afb5
commit afff299dfa
2 changed files with 9 additions and 1 deletions

View file

@ -134,7 +134,7 @@ fn unfuck_cif_number(number: &str) -> Result<u32> {
};
return Ok(u32::from(*thousands) * 1000 + u32::from(*remainder))
}
Ok((*nummap::U16_NUMMAP.get(&buf).ok_or_else(|| GrammarError(number.to_string()))?).into())
Ok((*nummap::U16_NUMMAP.get(number).ok_or_else(|| GrammarError(number.to_string()))?).into())
}
fn unfuck_cif_number_fast(number: &str) -> Result<u8> {

8
test_runner.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/sh
for image in ../cif-tests/valid/*.cif; do
echo "Running test on $image"
./zardzewialy-dekoder-cif $image aaa.png
echo ""
done