test_check_delay
This commit is contained in:
@@ -21,6 +21,7 @@ int main() {
|
||||
(TestCase){"test_disable_all", test_disable_all},
|
||||
(TestCase){"test_calc_totals", test_calc_totals},
|
||||
(TestCase){"test_check_timeout", test_check_timeout},
|
||||
(TestCase){"test_check_delay", test_check_delay},
|
||||
(TestCase){"test_evse_read", test_evse_read},
|
||||
(TestCase){"test_check_start_condition", test_check_start_condition},
|
||||
(TestCase){"test_check_voltage", test_check_voltage},
|
||||
|
||||
Binary file not shown.
@@ -52,6 +52,29 @@ void test_check_timeout()
|
||||
assert(res);
|
||||
}
|
||||
|
||||
void test_check_delay()
|
||||
{
|
||||
bool res;
|
||||
startTime = 11;
|
||||
|
||||
//after delay
|
||||
Param::SetInt(Param::test_time, 14 * 60);
|
||||
Param::SetInt(Param::timedly, 13);
|
||||
res = CheckDelay();
|
||||
assert(res);
|
||||
|
||||
//before delay
|
||||
Param::SetInt(Param::test_time, 12 * 60);
|
||||
res = CheckDelay();
|
||||
assert(!res);
|
||||
|
||||
//start time changes result
|
||||
startTime = 1100;
|
||||
res = CheckDelay();
|
||||
assert(res);
|
||||
}
|
||||
|
||||
|
||||
void test_evse_read()
|
||||
{
|
||||
// INP_MANUAL
|
||||
|
||||
Reference in New Issue
Block a user