projects
/
framework
/
connectivity
/
neard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f4220b
)
unit: URI NDEF test should check for the field length
author
Samuel Ortiz
<sameo@linux.intel.com>
Wed, 9 Jan 2013 10:36:20 +0000
(11:36 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Wed, 9 Jan 2013 10:36:20 +0000
(11:36 +0100)
unit/test-ndef.c
patch
|
blob
|
history
diff --git
a/unit/test-ndef.c
b/unit/test-ndef.c
index
f44179e
..
ae57519
100644
(file)
--- 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);