changeset 468:cce0842a316d

wip fix tests
author Louis Opter <kalessin@kalessin.fr>
date Mon, 13 Jun 2016 23:58:33 -0700
parents 3fbd5051e31a
children 35cc7e8a16a5
files add_power_transition.patch
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/add_power_transition.patch	Mon Jun 13 23:12:02 2016 -0700
+++ b/add_power_transition.patch	Mon Jun 13 23:58:33 2016 -0700
@@ -844,23 +844,22 @@
  -----------------
  
 -.. function:: power_off(target)
--
--   Power off the given bulb(s).
 +.. function:: power_off(target[, transition])
  
--.. function:: power_on(target)
+-   Power off the given bulb(s).
 +   Power off the given bulb(s) with an optional transition.
  
--   Power on the given bulb(s).
+-.. function:: power_on(target)
 +   :param int transition: Optional time in ms it will take for the bulb to turn
 +                          off.
  
--.. function:: power_toggle(target)
+-   Power on the given bulb(s).
 +.. function:: power_on(target[, transition])
  
--   Power on (if they are off) or power off (if they are on) the given bulb(s).
+-.. function:: power_toggle(target)
 +   Power on the given bulb(s) with an optional transition.
-+
+ 
+-   Power on (if they are off) or power off (if they are on) the given bulb(s).
 +   :param int transition: Optional time in ms it will take for the bulb to turn
 +                          on.
 +
@@ -2662,7 +2661,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/tests/effects/power_transition/test_power_transition_clear_target_list.c
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,29 @@
 +#include "effects/power_transition.c"
 +
 +#include "core/mock_effect.h"
@@ -2678,6 +2677,7 @@
 +        2, sizeof(*targets)
 +    );
 +    struct lgtd_effect_power_transition_target_list list;
++    memset(&list, 0, sizeof(list));
 +    for (int i = 0; i != LGTD_ARRAY_SIZE(targets); i++) {
 +        SLIST_INSERT_HEAD(&list, &targets[i], link);
 +    }