From 829e28cfda064aeedbf22967cfe77edd699d61e9 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Thu, 1 Jul 2010 10:57:59 +0000 Subject: [PATCH] Complete unit tests coverage of freefare.c. The freefare_get_tag_friendly_name() function was not tested. Call it from both supported cards unit tests suites. --- test/test_mifare_classic.c | 8 ++++++++ test/test_mifare_ultralight.c | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/test/test_mifare_classic.c b/test/test_mifare_classic.c index e9380b7..c1ef9c2 100644 --- a/test/test_mifare_classic.c +++ b/test/test_mifare_classic.c @@ -339,3 +339,11 @@ test_mifare_classic_get_uid (void) free (uid); } +void +test_mifare_classic_get_tag_friendly_name (void) +{ + const char *name = freefare_get_tag_friendly_name (tag); + + cut_assert_not_null (name, cut_message ("freefare_get_tag_friendly_name() failed")); +} + diff --git a/test/test_mifare_ultralight.c b/test/test_mifare_ultralight.c index 3e5b3e9..e51b4fd 100644 --- a/test/test_mifare_ultralight.c +++ b/test/test_mifare_ultralight.c @@ -153,3 +153,13 @@ test_mifare_ultralight_get_uid (void) free (uid); } + +void +test_mifare_ultralight_tag_friendly_name (void) +{ + const char *name = freefare_get_tag_friendly_name (tag); + + cut_assert_not_null (name, cut_message ("freefare_get_tag_friendly_name() failed")); +} + +