|
3-phase PV router
|
Native unit tests for utils_dualtariff.h: the scheduled boosts of the dual tariff. More...

Go to the source code of this file.
Native unit tests for utils_dualtariff.h: the scheduled boosts of the dual tariff.
Each boost has a window (FIRST, LAST, FROM_START/BEFORE_END with or without FOR, in HOURS() or MINUTES()) and its targets. The firmware resolves each window at compile time, in ms from the start of the off-peak period, and forces the targets while millis() - start is in it. No config.h, no stubs: the real code.
Definition in file test_main.cpp.
| int main | ( | void | ) |
| void setUp | ( | void | ) |
Definition at line 23 of file test_main.cpp.
| void tearDown | ( | void | ) |
Definition at line 24 of file test_main.cpp.
| void test_a_boost_of_zero_minutes_has_no_length | ( | void | ) |
Definition at line 126 of file test_main.cpp.


| void test_a_start_before_the_period_wraps_to_a_large_value | ( | void | ) |
Definition at line 242 of file test_main.cpp.


| void test_a_target_may_be_in_several_boosts | ( | void | ) |
| void test_an_empty_list | ( | void | ) |
| void test_before_end_for | ( | void | ) |
Definition at line 56 of file test_main.cpp.


| void test_before_end_from_3_to_12_hours | ( | void | ) |
Definition at line 79 of file test_main.cpp.


| void test_boost_window_across_the_millis_wraparound | ( | void | ) |
Definition at line 152 of file test_main.cpp.


| void test_boost_window_includes_its_start_and_excludes_its_end | ( | void | ) |
Definition at line 139 of file test_main.cpp.


| void test_boost_windows_are_computed_at_compile_time | ( | void | ) |
Definition at line 133 of file test_main.cpp.


| void test_boosts_from_the_settings | ( | void | ) |
Definition at line 211 of file test_main.cpp.


| void test_ends_within_off_peak | ( | void | ) |
Definition at line 113 of file test_main.cpp.


| void test_first_starts_at_the_start_and_lasts_its_duration | ( | void | ) |
Definition at line 37 of file test_main.cpp.


| void test_for_the_largest_minutes_is_not_until_the_end | ( | void | ) |
Definition at line 96 of file test_main.cpp.


| void test_from_start_for | ( | void | ) |
Definition at line 49 of file test_main.cpp.


| void test_hours_and_minutes | ( | void | ) |
| void test_last_starts_back_from_the_end_and_has_no_end | ( | void | ) |
Definition at line 43 of file test_main.cpp.


| void test_no_boost_in_the_settings | ( | void | ) |
Definition at line 231 of file test_main.cpp.


| void test_resolve | ( | void | ) |
| void test_starts_within_off_peak | ( | void | ) |
Definition at line 103 of file test_main.cpp.


| void test_targets_become_masks | ( | void | ) |
| void test_twelve_hours | ( | void | ) |
Definition at line 70 of file test_main.cpp.


| void test_until_the_end_has_no_end | ( | void | ) |
Definition at line 63 of file test_main.cpp.


| void test_without_for_lasts_until_the_end | ( | void | ) |