63 lines
2.0 KiB
C++
63 lines
2.0 KiB
C++
/*
|
|
Copyright <2018-2024> <scott.e.graves@protonmail.com>
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|
|
*/
|
|
#include "initialize.hpp"
|
|
#include "test_common.hpp"
|
|
#ifdef _WIN32
|
|
#include "utils/cli_utils.hpp"
|
|
#endif // _WIN32
|
|
|
|
using namespace repertory;
|
|
|
|
#ifdef _WIN32
|
|
std::size_t PROVIDER_INDEX{0U};
|
|
#endif // _WIN32
|
|
|
|
auto main(int argc, char **argv) -> int {
|
|
if (not repertory::project_initialize()) {
|
|
return -1;
|
|
}
|
|
|
|
#ifdef _WIN32
|
|
std::vector<const char *> args;
|
|
{
|
|
auto args_span = std::span(argv, static_cast<std::size_t>(argc));
|
|
std::copy(args_span.begin(), args_span.end(), std::back_inserter(args));
|
|
}
|
|
|
|
if (utils::cli::has_option(args, "--provider_index")) {
|
|
PROVIDER_INDEX = static_cast<std::size_t>(
|
|
utils::string::to_uint64(
|
|
utils::cli::parse_option(args, "--provider_index", 1U)[0U]) +
|
|
1U);
|
|
}
|
|
#endif // _WIN32
|
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
auto ret = RUN_ALL_TESTS();
|
|
|
|
delete_generated_files();
|
|
|
|
repertory::project_cleanup();
|
|
|
|
return ret;
|
|
}
|