test reset values

This commit is contained in:
Janosch
2022-10-11 13:38:50 +01:00
parent 8e61ddd188
commit b45c29f89e
7 changed files with 26 additions and 11 deletions
+1
View File
@@ -25,6 +25,7 @@ int main() {
(TestCase){"test_evse_read", test_evse_read},
(TestCase){"test_check_start_condition", test_check_start_condition},
(TestCase){"test_check_voltage", test_check_voltage},
(TestCase){"test_reset_values_in_off_mode", test_reset_values_in_off_mode},
// Example:
//(TestCase){"Your tests name", function_name_without_brackets}
//...
BIN
View File
Binary file not shown.
+13
View File
@@ -168,3 +168,16 @@ void test_check_voltage(){
}
assert(res);
}
void test_reset_values_in_off_mode(){
Param::SetInt(Param::c1flag, 1);
Param::SetInt(Param::c2tmp2, 15);
Param::SetInt(Param::c3stt, 15);
Param::SetInt(Param::c3uac, 239);
assert(1 == Param::GetInt(Param::c1flag));
ResetValuesInOffMode();
assert(0 == Param::GetInt(Param::c1flag));
assert(0 == Param::GetInt(Param::c2tmp2));
assert(0 == Param::GetInt(Param::c3stt));
assert(0 == Param::GetInt(Param::c3uac));
}