Skip to content

Commit fa53ac6

Browse files
formatting, and try to compile tests
1 parent 6e9b99e commit fa53ac6

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

Src/HALAL/Services/Time/Scheduler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void Scheduler_start(void) {
5959
)]] = Scheduler_global_timer_callback;
6060

6161
uint16_t prescaler =
62-
(uint16_t)(ST_LIB::TimerDomain::get_timer_frequency(Scheduler_global_timer) /
62+
(uint16_t)(ST_LIB::TimerDomain::get_timer_frequency(Scheduler_global_timer) /
6363
Scheduler::FREQUENCY);
6464
Scheduler_global_timer->PSC = prescaler;
6565
Scheduler_global_timer->ARR = 0;

Tests/Time/common_tests.cpp

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ void ErrorHandlerModel::ErrorHandlerTrigger(string format, ...) {
3434

3535
void ErrorHandlerModel::ErrorHandlerUpdate() {}
3636

37+
std::string InfoWarning::line;
38+
std::string InfoWarning::func;
39+
std::string InfoWarning::file;
40+
41+
namespace ST_LIB::TestInfoWarning {
42+
bool fail_on_error = false;
43+
int call_count = 0;
44+
45+
void reset() {
46+
fail_on_error = false;
47+
call_count = 0;
48+
}
49+
50+
void set_fail_on_error(bool enabled) { fail_on_error = enabled; }
51+
};
3752

3853
void InfoWarning::SetMetaData(int line, const char* func, const char* file) {
3954
InfoWarning::line = to_string(line);
@@ -43,8 +58,8 @@ void InfoWarning::SetMetaData(int line, const char* func, const char* file) {
4358

4459
void InfoWarning::InfoWarningTrigger(string format, ...) {
4560
(void)format;
46-
ST_LIB::TestErrorHandler::call_count++;
47-
if (ST_LIB::TestErrorHandler::fail_on_error) {
61+
ST_LIB::TestInfoWarning::call_count++;
62+
if (ST_LIB::TestInfoWarning::fail_on_error) {
4863
EXPECT_EQ(1, 0);
4964
}
50-
}
65+
}

0 commit comments

Comments
 (0)