summaryrefslogtreecommitdiffhomepage
path: root/test/main.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-10-11 10:35:06 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-10-11 13:35:27 +0200
commitca4544f04cc67c296e58170e76203bc11519d988 (patch)
tree2dcbe936be206c4e7f95a28525fafff6f7340e5e /test/main.cpp
parent018755dab3d2a5bb0ead627b6ecad6735a9f0114 (diff)
add benchmark executable
Diffstat (limited to 'test/main.cpp')
-rw-r--r--test/main.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/test/main.cpp b/test/main.cpp
new file mode 100644
index 00000000..c6ef7557
--- /dev/null
+++ b/test/main.cpp
@@ -0,0 +1,55 @@
+#include "app.hpp"
+#include "compat/assert.hpp"
+#include "loader/loader.hpp"
+#include <stdlib.h>
+#include <cstdlib>
+
+namespace floormat {
+
+test_app::test_app(const Arguments& arguments):
+ Application {
+ arguments,
+ Configuration{}
+ }
+{
+}
+
+test_app::~test_app()
+{
+ loader_::destroy();
+}
+
+int test_app::exec()
+{
+ test_coords();
+ test_json();
+ test_tile_iter();
+ test_magnum_math();
+ test_entity();
+ test_loader();
+ test_bitmask();
+ test_serializer_1();
+ test_serializer_2();
+ test_path_search();
+ test_math();
+ test_hash();
+ test_path_search_node_pool();
+ zzz_test_misc();
+
+ return 0;
+}
+
+} // namespace floormat
+
+int main(int argc, char** argv)
+{
+#ifdef _WIN32
+ // NOLINTNEXTLINE(concurrency-mt-unsafe)
+ if (const auto* s = std::getenv("MAGNUM_LOG"); !s || !*s)
+ _putenv("MAGNUM_LOG=quiet");
+#else
+ setenv("MAGNUM_LOG", "quiet", 0);
+#endif
+ floormat::test_app application{{argc, argv}};
+ return application.exec();
+}