Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1//
2// Created by denzel on 10/12/2025.
3//
5#include "hellfire/core/Application.h"
6
7
8int main(int argc, char** argv) {
9 bool exit_on_completion = false;
10
11 for (int i = 1; i < argc; ++i) {
12 if (std::string(argv[i]) == "--exit-on-completion") {
13 exit_on_completion = true;
14 }
15 }
16
18 auto test_harness = std::make_unique<hellfire::tests::UITestHarness>();
19 auto* harness = test_harness.get(); // Get raw pointer before move
20 app.register_plugin(std::move(test_harness));
21
22 if (exit_on_completion) {
23 app.set_exit_condition([harness]() {
24 return harness->is_complete();
25 });
26 }
27
29 app.run();
30
31 int result = harness->get_exit_code();
32
33 std::cout << "\n========================================\n";
34 std::cout << "UI Tests " << (result == 0 ? "PASSED" : "FAILED") << "\n";
35 std::cout << "========================================\n";
36
37 return result;
38}
void set_exit_condition(std::function< bool()> condition)
int main(int argc, char **argv)
Definition main.cpp:8