diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2014-07-17 10:29:50 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-07-18 09:49:12 +0200 |
commit | 103aa3250a330336ca632df24bf66f6b90e9d72d (patch) | |
tree | 9c5dc6d04fa678766d6b8c31211ac5c790d9db3d /android/tester-hidhost.c | |
parent | 3f93ade5723934e33c421bfd683a6466ab400e72 (diff) | |
download | bluez-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.c | 13 |
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; |