|
3-phase PV router
|
Native unit tests for relay_engine.h: the decisions of the relay diversion. More...

Go to the source code of this file.
Native unit tests for relay_engine.h: the decisions of the relay diversion.
The real code, no stubs: RelayLogic::Relay on an output that records each switch (pin, new state) instead of driving a pin, and RelayLogic::Engine on those relays. As in loop(), the engine gets inc_duration() then proceed_relays() once per second. The average is negative on a surplus, positive on an import.
Each relay pin differs from its index, so that a test tells an override bit read by index from one read by pin.
Definition in file test_main.cpp.
| int main | ( | void | ) |
| void setUp | ( | void | ) |
Definition at line 128 of file test_main.cpp.
| void tearDown | ( | void | ) |
Definition at line 133 of file test_main.cpp.
| void test_a_change_of_any_relay_holds_every_relay_for_a_minute | ( | void | ) |
| void test_a_forced_relay_comes_in_during_an_import | ( | void | ) |
| void test_a_forced_relay_is_not_turned_off_by_an_import | ( | void | ) |
| void test_a_forced_relay_stays_on_while_the_others_go_out | ( | void | ) |
| void test_a_forced_relay_turns_on_whatever_the_power | ( | void | ) |
| void test_a_forced_relay_waits_its_minimum_off_time | ( | void | ) |
| void test_a_minimum_time_beyond_1092_minutes_is_marked_for_validation | ( | void | ) |
| void test_a_negative_import_threshold_turns_off_on_a_small_surplus | ( | void | ) |
| void test_a_new_relay_waits_its_minimum_off_time | ( | void | ) |
| void test_a_relay_held_by_its_minimum_off_time_lets_the_next_one_in | ( | void | ) |
| void test_a_relay_held_by_its_minimum_on_time_lets_the_previous_one_out | ( | void | ) |
| void test_a_released_relay_is_left_to_the_engine | ( | void | ) |
| void test_battery_relays_go_out_by_decreasing_index_on_a_small_surplus | ( | void | ) |
| void test_between_the_thresholds_nothing_changes | ( | void | ) |
| void test_diversion_off_ignores_the_surplus_and_forces_on | ( | void | ) |
| void test_diversion_off_keeps_the_minimum_times_and_the_settle_time | ( | void | ) |
| void test_diversion_off_turns_every_unforced_relay_off_in_one_go | ( | void | ) |
| void test_each_relay_comes_in_at_its_own_threshold | ( | void | ) |
| void test_exactly_the_import_threshold_does_not_turn_off | ( | void | ) |
| void test_exactly_the_surplus_threshold_does_not_turn_on | ( | void | ) |
| void test_forced_only_turns_an_unforced_relay_off_after_its_minimum_on_time | ( | void | ) |
| void test_no_change_starts_no_settle_time | ( | void | ) |
| void test_nothing_switches_during_the_first_minute | ( | void | ) |
| void test_on_a_surplus_the_relays_come_in_one_at_a_time_by_increasing_index | ( | void | ) |
| void test_on_an_import_the_relays_go_out_one_at_a_time_by_decreasing_index | ( | void | ) |
| void test_the_defaults | ( | void | ) |
| void test_the_duration_stops_at_its_maximum_instead_of_wrapping | ( | void | ) |
| void test_the_engine_decides_on_the_average_not_on_the_last_value | ( | void | ) |
| void test_the_engine_decides_on_the_triple_ema | ( | void | ) |
| void test_the_minimum_off_time_restarts_at_each_switch_off | ( | void | ) |
| void test_the_minimum_on_time_ends_after_exactly_min_on_seconds | ( | void | ) |
| void test_the_minimum_times_are_given_in_minutes_and_kept_in_seconds | ( | void | ) |
| void test_the_settle_time_holds_a_switch_off_after_a_switch_on | ( | void | ) |
| void test_the_surplus_threshold_is_positive_whatever_its_sign_in_the_config | ( | void | ) |