X-Git-Url: https://robinkrens.nl/gitweb/?a=blobdiff_plain;f=tests%2Ftest_parse.py;fp=tests%2Ftest_parse.py;h=d83e629f89efa4992b46c7d19a234920fcb09a79;hb=5a926ba21f47182057a38e3a62d44cec22e9d373;hp=0000000000000000000000000000000000000000;hpb=275d988eccd1d8b3408ecf8aa39687c17d9278a5;p=renesas-ra-flasher diff --git a/tests/test_parse.py b/tests/test_parse.py new file mode 100644 index 0000000..d83e629 --- /dev/null +++ b/tests/test_parse.py @@ -0,0 +1,8 @@ +from flasher.flasher import calc_sum +import pytest + +def test_calc_sum(): + assert calc_sum(0x12, ['0x00']) == (0, 0x2, 0xEC) + assert calc_sum(0x34, ['0x00']) == (0, 0x2, 0xCA) + assert calc_sum(0x00, ['0x00']) == (0, 0x02, 0xFE) +