summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2012-12-18 16:04:39 +0000
committerStefan Schmidt <stefan@datenfreihafen.org>2012-12-18 16:04:39 +0000
commit4ee990a0a45c12deb1ec26dc24acb25f4253201f (patch)
treed9dfca12a6c872666c0465c4c0f10904a3f1c0f7
parent38a9dd3acaa6c0b6a9b62cb502e3392e19925b0a (diff)
PROTO/elocation: Add tests for address and position objects
SVN revision: 81270
-rw-r--r--src/tests/elocation_suite.c58
1 files changed, 51 insertions, 7 deletions
diff --git a/src/tests/elocation_suite.c b/src/tests/elocation_suite.c
index 73299d1..517fe33 100644
--- a/src/tests/elocation_suite.c
+++ b/src/tests/elocation_suite.c
@@ -28,6 +28,52 @@ START_TEST(elocation_test_init)
28} 28}
29END_TEST 29END_TEST
30 30
31START_TEST(elocation_test_address_object)
32{
33 Eina_Bool ret;
34 Elocation_Address *address = NULL;
35
36 ret = ecore_init();
37 fail_if(ret != EINA_TRUE);
38 ret = edbus_init();
39 fail_if(ret != EINA_TRUE);
40 ret = elocation_init();
41 fail_if(ret != EINA_TRUE);
42
43 address = elocation_address_new();
44 fail_if(address == NULL);
45
46 elocation_address_free(address);
47
48 elocation_shutdown();
49 edbus_shutdown();
50 ecore_shutdown();
51}
52END_TEST
53
54START_TEST(elocation_test_position_object)
55{
56 Eina_Bool ret;
57 Elocation_Position *position = NULL;
58
59 ret = ecore_init();
60 fail_if(ret != EINA_TRUE);
61 ret = edbus_init();
62 fail_if(ret != EINA_TRUE);
63 ret = elocation_init();
64 fail_if(ret != EINA_TRUE);
65
66 position = elocation_position_new();
67 fail_if(position == NULL);
68
69 elocation_position_free(position);
70
71 elocation_shutdown();
72 edbus_shutdown();
73 ecore_shutdown();
74}
75END_TEST
76
31Suite * 77Suite *
32elocation_suite(void) 78elocation_suite(void)
33{ 79{
@@ -39,14 +85,12 @@ elocation_suite(void)
39 tc = tcase_create("Elocation_Init"); 85 tc = tcase_create("Elocation_Init");
40 tcase_add_test(tc, elocation_test_init); 86 tcase_add_test(tc, elocation_test_init);
41 suite_add_tcase(s, tc); 87 suite_add_tcase(s, tc);
42/* 88
43 tc = tcase_create("Eeze_Udev"); 89 tc = tcase_create("Elocation_Objects");
44 tcase_add_test(tc, eeze_test_udev_types); 90 tcase_add_test(tc, elocation_test_address_object);
45 tcase_add_test(tc, eeze_test_udev_watch); 91 tcase_add_test(tc, elocation_test_position_object);
46 tcase_add_test(tc, eeze_test_udev_syspath);
47 tcase_add_test(tc, eeze_test_udev_attr);
48 suite_add_tcase(s, tc); 92 suite_add_tcase(s, tc);
49*/ 93
50 return s; 94 return s;
51} 95}
52 96