diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-09 11:36:20 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-09 11:36:20 +0100 |
commit | dd8f428f98b56440723a77d92452def512198d30 (patch) | |
tree | 6836e9d428e8aebe9825f5148d6bf50433dc0719 /unit | |
parent | 0f4220bbb93d06c0f3bb929bce65527eeb7c51e1 (diff) | |
download | neard-dd8f428f98b56440723a77d92452def512198d30.tar.gz neard-dd8f428f98b56440723a77d92452def512198d30.tar.bz2 neard-dd8f428f98b56440723a77d92452def512198d30.zip |
unit: URI NDEF test should check for the field length
Diffstat (limited to 'unit')
-rw-r--r-- | unit/test-ndef.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unit/test-ndef.c b/unit/test-ndef.c index f44179e..ae57519 100644 --- a/unit/test-ndef.c +++ b/unit/test-ndef.c @@ -149,7 +149,9 @@ static void test_ndef_uri(void) g_assert(record->header->me == 1); g_assert(record->uri); - g_assert(strcmp((char *)record->uri->field, "intel.com") == 0); + g_assert(record->uri->field_length == strlen("intel.com")); + g_assert(strncmp((char *) record->uri->field, "intel.com", + record->uri->field_length) == 0); g_print("NDEF URI field: %s\n", record->uri->field); |