3-phase PV router
Loading...
Searching...
No Matches
test_main.cpp File Reference

Native unit tests for override_masks.h: what is forced ON, by the override pins and the scheduled boosts of the dual tariff. More...

#include <unity.h>
#include "override_masks.h"
#include "utils_override.h"
Include dependency graph for test_main.cpp:

Go to the source code of this file.

Functions

int main (int, char **)
 
void setUp (void)
 
void tearDown (void)
 
void test_a_dead_probe_lets_the_boost_run (void)
 
void test_a_pin_forces_its_remote_targets (void)
 
void test_an_active_pin_forces_its_targets (void)
 
void test_an_out_of_range_reading_stops_the_boost (void)
 
void test_boost_across_the_millis_wraparound (void)
 
void test_boost_at_the_threshold (void)
 
void test_boost_below_the_threshold (void)
 
void test_boost_window_closes_at_its_end (void)
 
void test_boost_window_opens_at_its_start (void)
 
void test_each_pin_is_read_once (void)
 
void test_first_boost_is_open_from_the_start (void)
 
void test_last_boost_lasts_until_the_meter_ends_off_peak (void)
 
void test_no_active_pin_forces_nothing (void)
 
void test_no_boost_above_the_threshold (void)
 
void test_no_boost_at_all (void)
 
void test_no_boost_between_the_windows (void)
 
void test_no_boost_outside_off_peak (void)
 
void test_only_the_boosts_of_the_count_are_read (void)
 
void test_only_the_override_pins_count (void)
 
void test_operator_or_joins_both_masks (void)
 
void test_overlapping_boosts_add_up (void)
 
void test_pins_and_boosts_add_up (void)
 
void test_pins_force_outside_off_peak_and_when_too_hot (void)
 
void test_several_active_pins_add_up (void)
 
void test_the_table_is_not_read_outside_off_peak_or_when_too_hot (void)
 

Detailed Description

Native unit tests for override_masks.h: what is forced ON, by the override pins and the scheduled boosts of the dual tariff.

The pins and boosts are built with the real OverrideTable and BoostSchedule, and the boosts resolved with DualTariff::resolve(), as dualtariff.h does at compile time. A pin is active when LOW: here, when its bit is set in a mask of active pins.

Definition in file test_main.cpp.

Function Documentation

◆ main()

int main ( int ,
char **  )

Definition at line 292 of file test_main.cpp.

Here is the call graph for this function:

◆ setUp()

void setUp ( void )

Definition at line 84 of file test_main.cpp.

◆ tearDown()

void tearDown ( void )

Definition at line 85 of file test_main.cpp.

◆ test_a_dead_probe_lets_the_boost_run()

void test_a_dead_probe_lets_the_boost_run ( void )

Definition at line 209 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_a_pin_forces_its_remote_targets()

void test_a_pin_forces_its_remote_targets ( void )

Definition at line 101 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_an_active_pin_forces_its_targets()

void test_an_active_pin_forces_its_targets ( void )

Definition at line 96 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_an_out_of_range_reading_stops_the_boost()

void test_an_out_of_range_reading_stops_the_boost ( void )

Definition at line 216 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_boost_across_the_millis_wraparound()

void test_boost_across_the_millis_wraparound ( void )

Definition at line 173 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_boost_at_the_threshold()

void test_boost_at_the_threshold ( void )

Definition at line 192 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_boost_below_the_threshold()

void test_boost_below_the_threshold ( void )

Definition at line 203 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_boost_window_closes_at_its_end()

void test_boost_window_closes_at_its_end ( void )

Definition at line 145 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_boost_window_opens_at_its_start()

void test_boost_window_opens_at_its_start ( void )

Definition at line 138 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_each_pin_is_read_once()

void test_each_pin_is_read_once ( void )

Definition at line 120 of file test_main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_first_boost_is_open_from_the_start()

void test_first_boost_is_open_from_the_start ( void )

Definition at line 154 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_last_boost_lasts_until_the_meter_ends_off_peak()

void test_last_boost_lasts_until_the_meter_ends_off_peak ( void )

Definition at line 165 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_no_active_pin_forces_nothing()

void test_no_active_pin_forces_nothing ( void )

Definition at line 91 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_no_boost_above_the_threshold()

void test_no_boost_above_the_threshold ( void )

Definition at line 197 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_no_boost_at_all()

void test_no_boost_at_all ( void )

Definition at line 247 of file test_main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_no_boost_between_the_windows()

void test_no_boost_between_the_windows ( void )

Definition at line 159 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_no_boost_outside_off_peak()

void test_no_boost_outside_off_peak ( void )

Definition at line 185 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_only_the_boosts_of_the_count_are_read()

void test_only_the_boosts_of_the_count_are_read ( void )

Definition at line 232 of file test_main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_only_the_override_pins_count()

void test_only_the_override_pins_count ( void )

Definition at line 107 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_operator_or_joins_both_masks()

void test_operator_or_joins_both_masks ( void )

Definition at line 272 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_overlapping_boosts_add_up()

void test_overlapping_boosts_add_up ( void )

Definition at line 226 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_pins_and_boosts_add_up()

void test_pins_and_boosts_add_up ( void )

Definition at line 278 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_pins_force_outside_off_peak_and_when_too_hot()

void test_pins_force_outside_off_peak_and_when_too_hot ( void )

Definition at line 286 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_several_active_pins_add_up()

void test_several_active_pins_add_up ( void )

Definition at line 113 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_the_table_is_not_read_outside_off_peak_or_when_too_hot()

void test_the_table_is_not_read_outside_off_peak_or_when_too_hot ( void )

Definition at line 257 of file test_main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: