6#if defined( ENGINE_TESTS )
14#if defined(PLATFORM_TESTS)
15 const char* TARGET_NAME_STR =
"Platform";
16#elif defined(ENGINE_TESTS)
17 const char* TARGET_NAME_STR =
"Engine";
19#error "Unknow UT build target!";
31 std::cout << Util::StringFormat(
"[ {} ]: Init platform code for unit test run\n", TARGET_NAME_STR );
32 const char* data[] = {
"--disableCopyright" };
35 if ( err != ErrorCode::NO_ERR )
37 std::cout << Util::StringFormat(
"[ {} ]: Platform init error! [ {} ]", TARGET_NAME_STR, TypeUtil::ErrorCodeToString( err ) );
40#if defined( ENGINE_TESTS )
57 std::cout << Util::StringFormat(
"[ {} ]: Running unit tests.\n", TARGET_NAME_STR );
68 std::cout << Util::StringFormat(
"[ {} ]: Finished running UTs in [ {:5.2f} ] ms. \n", TARGET_NAME_STR, Divide::Time::MicrosecondsToMilliseconds<float>(
Divide::Time::QUERY_TIMER( *
_testTimer ) ) );
74#if defined( ENGINE_TESTS )
80 std::cout << Util::StringFormat(
"[ {} ]: Platform close error!\n", TARGET_NAME_STR );
84 std::cout << Util::StringFormat(
"[ {} ]: Shuting down ...\n", TARGET_NAME_STR );
void REMOVE_TIMER(ProfileTimer *&timer)
U64 QUERY_TIMER(const ProfileTimer &timer) noexcept
void START_TIMER(ProfileTimer &timer) noexcept
ProfileTimer & ADD_TIMER(const char *timerName)
void STOP_TIMER(ProfileTimer &timer) noexcept
Handle console commands that start with a forward slash.
ErrorCode PlatformInit(int argc, char **argv)