Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
casavaca committed Jan 17, 2024
1 parent 7d842a6 commit 7fdafa5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ int main(int argc, char** argv) {

#if defined(DEBUG) || defined(COVERAGE)
// raylib event record and replay, testing only.
// To get better coverage,
// --record is only enabled on DEBUG, while
// --replay is enabled on both DEBUG and COVERAGE
vector<AutomationEvent> raylibEvents;
AutomationEventList raylibEventList;
if (app.count("--replay")) {
raylibEventList = LoadAutomationEventList(raylibEventFile.c_str());
}
#endif
#if defined(DEBUG)
if (app.count("--record")) {
raylibEvents.resize(16384);
raylibEventList.events = raylibEvents.data();
Expand All @@ -55,9 +63,6 @@ int main(int argc, char** argv) {
SetAutomationEventList(&raylibEventList);
StartAutomationEventRecording();
}
if (app.count("--replay")) {
raylibEventList = LoadAutomationEventList(raylibEventFile.c_str());
}
#endif

// Main game loop
Expand Down

0 comments on commit 7fdafa5

Please sign in to comment.