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

18 lines
406 B
C++

// Luanti
// SPDX-License-Identifier: LGPL-2.1-or-later
// Copyright (C) 2022 Minetest Authors
#include "benchmark/benchmark.h"
#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;
}