summaryrefslogtreecommitdiff
path: root/android/tester-socket.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-socket.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-socket.c')
-rw-r--r--android/tester-socket.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/android/tester-socket.c b/android/tester-socket.c
index ba283fa54..254b53928 100644
--- a/android/tester-socket.c
+++ b/android/tester-socket.c
@@ -19,13 +19,10 @@
static struct queue *list; /* List of socket test cases */
-TEST_CASE(socket_init,
- "Socket Init",
- ACTION_SUCCESS(dummy_action, NULL),
-);
-
-static struct test_case *test_cases[] = {
- &socket_init,
+static struct test_case test_cases[] = {
+ TEST_CASE("Socket Init",
+ ACTION_SUCCESS(dummy_action, NULL),
+ ),
};
struct queue *get_socket_tests(void)
@@ -35,7 +32,7 @@ struct queue *get_socket_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;