summaryrefslogtreecommitdiff
path: root/android/tester-hidhost.c
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2014-07-17 10:29:50 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-07-18 09:49:12 +0200
commit103aa3250a330336ca632df24bf66f6b90e9d72d (patch)
tree9c5dc6d04fa678766d6b8c31211ac5c790d9db3d /android/tester-hidhost.c
parent3f93ade5723934e33c421bfd683a6466ab400e72 (diff)
downloadbluez-103aa3250a330336ca632df24bf66f6b90e9d72d.tar.gz
android/tester-ng: Use array of statics instead of case pointers
This is yet another macro that hides the test implementation details and shortens the amount of code that needs to be written for each test case.
Diffstat (limited to 'android/tester-hidhost.c')
-rw-r--r--android/tester-hidhost.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/android/tester-hidhost.c b/android/tester-hidhost.c
index 626082588..b00a4e965 100644
--- a/android/tester-hidhost.c
+++ b/android/tester-hidhost.c
@@ -19,13 +19,10 @@
static struct queue *list; /* List of hidhost test cases */
-TEST_CASE(hidhost_init,
- "Hidhost Init",
- ACTION_SUCCESS(dummy_action, NULL),
-);
-
-static struct test_case *test_cases[] = {
- &hidhost_init,
+static struct test_case test_cases[] = {
+ TEST_CASE("Hidhost Init",
+ ACTION_SUCCESS(dummy_action, NULL),
+ ),
};
struct queue *get_hidhost_tests(void)
@@ -35,7 +32,7 @@ struct queue *get_hidhost_tests(void)
list = queue_new();
for (; i < sizeof(test_cases) / sizeof(test_cases[0]); ++i)
- if (!queue_push_tail(list, test_cases[i]))
+ if (!queue_push_tail(list, &test_cases[i]))
return NULL;
return list;