1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00
luanti/src/benchmark/benchmark.cpp

19 lines
406 B
C++
Raw Normal View History

// Luanti
// SPDX-License-Identifier: LGPL-2.1-or-later
// Copyright (C) 2022 Minetest Authors
#include "benchmark/benchmark.h"
2024-06-07 17:58:36 +02:00
#define CATCH_CONFIG_ENABLE_BENCHMARKING
#include "catch.h"
bool run_benchmarks(const char *arg)
{
const char *const argv[] = {
"MinetestBenchmark", arg, nullptr
};
const int argc = arg ? 2 : 1;
int errCount = Catch::Session().run(argc, argv);
return errCount == 0;
}