eeze: remove warning and add a bit more test.
authorGustavo Sverzut Barbieri <barbieri@gmail.com>
Thu, 17 Jan 2013 20:31:06 +0000 (20:31 +0000)
committerGustavo Sverzut Barbieri <barbieri@gmail.com>
Thu, 17 Jan 2013 20:31:06 +0000 (20:31 +0000)
it's basically not testing anything, just calling the API :-( Added
some tests that check if the listed type is of that type (mouse,
touchpad, joystick).

SVN revision: 82949

src/tests/eeze/eeze_suite.c

index 191f30b6689c9873e91cb2464cc6f271fb4daad7..3e30d1dba641acaf322656a133d6362809f09c8b 100644 (file)
@@ -102,7 +102,8 @@ END_TEST
 START_TEST(eeze_test_udev_syspath)
 {
    Eina_List *type, *l;
-   const char *name, *check;
+   const char *name;
+   Eina_Bool r;
 
    eeze_init();
 
@@ -110,7 +111,7 @@ START_TEST(eeze_test_udev_syspath)
    type = eeze_udev_find_unlisted_similar(type);
    EINA_LIST_FOREACH(type, l, name)
      {
-         check = eeze_udev_syspath_get_devpath(name);
+         eeze_udev_syspath_get_devpath(name);
          eeze_udev_find_similar_from_syspath(name);
          eeze_udev_find_similar_from_syspath(NULL);
          eeze_udev_syspath_get_parent(name);
@@ -138,23 +139,27 @@ START_TEST(eeze_test_udev_syspath)
    type = eeze_udev_find_unlisted_similar(type);
    EINA_LIST_FOREACH(type, l, name)
      {
-         eeze_udev_syspath_is_mouse(name);
-         eeze_udev_syspath_is_touchpad(name);
-         eeze_udev_syspath_is_joystick(name);
+        r = eeze_udev_syspath_is_mouse(name);
+        fail_unless(r);
+
+        eeze_udev_syspath_is_touchpad(name);
+        eeze_udev_syspath_is_joystick(name);
      }
 
    type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_TOUCHPAD, NULL);
    type = eeze_udev_find_unlisted_similar(type);
    EINA_LIST_FOREACH(type, l, name)
      {
-         eeze_udev_syspath_is_touchpad(name);
+        r = eeze_udev_syspath_is_touchpad(name);
+        fail_unless(r);
      }
 
    type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_JOYSTICK, NULL);
    type = eeze_udev_find_unlisted_similar(type);
    EINA_LIST_FOREACH(type, l, name)
      {
-         eeze_udev_syspath_is_joystick(name);
+        r = eeze_udev_syspath_is_joystick(name);
+        fail_unless(r);
      }
 
    eeze_udev_devpath_get_syspath("/dev/null");