aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp-test/zenhttp-test.cpp
blob: 0a6980462780b3166b728ff67fbf6e9fea6987fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright Epic Games, Inc. All Rights Reserved.

#include <zencore/testing.h>
#include <zenhttp/httpclient.h>
#include <zenhttp/zenhttp.h>

#include <zencore/memory/newdelete.h>

int
main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
{
#if ZEN_WITH_TESTS
	using namespace std::literals;
	for (int i = 1; i < argc; ++i)
	{
		std::string_view Arg(argv[i]);
		if (Arg.starts_with("--httpclient="sv))
		{
			std::string_view Value = Arg.substr(13);
			zen::SetDefaultHttpClientBackend(Value);
		}
	}

	return zen::testing::RunTestMain(argc, argv, "zenhttp-test", zen::zenhttp_forcelinktests);
#else
	return 0;
#endif
}