Add forgotten regression test for mifare_classic_trailer_block().
This commit is contained in:
parent
f9c2b6e9e3
commit
253d49eef8
1 changed files with 19 additions and 0 deletions
19
test/test_create_trailer_block.c
Normal file
19
test/test_create_trailer_block.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "test.h"
|
||||
|
||||
#include "mifare_classic.h"
|
||||
|
||||
DEFINE_TEST(create_trailer_block)
|
||||
{
|
||||
do {
|
||||
MifareClassicBlock data;
|
||||
|
||||
MifareClassicKey key_a = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
MifareClassicKey key_b = { 0xde, 0xad, 0xbe, 0xef, 0xff, 0xff };
|
||||
|
||||
mifare_classic_trailer_block (&data, key_a, 0, 0, 0, 4, 0x42, key_b);
|
||||
|
||||
assertEqualMem (data, "\xff\xff\xff\xff\xff\xff\xff\x07\x80\x42\xde\xad\xbe\xef\xff\xff", sizeof (data));
|
||||
|
||||
} while (0);
|
||||
}
|
||||
|
Loading…
Reference in a new issue