Update test_eventlog.cpp

This commit is contained in:
Gabi Melman 2020-03-28 13:59:59 +03:00 committed by GitHub
parent 1ccdc225af
commit f57378d8ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ static void test_single_print(std::function<void(std::string const &)> do_log, s
REQUIRE(record->NumStrings == 1);
REQUIRE(record->EventType == expected_ev_type);
REQUIRE(record->TimeGenerated == expected_time_generated);
REQUIRE((expected_time_generated - record->TimeGenerated) <= 3u);
std::string message_in_log(((char *)record + record->StringOffset));
REQUIRE(message_in_log == expected_contents + spdlog::details::os::default_eol);
@ -68,4 +68,4 @@ TEST_CASE("eventlog", "[eventlog]")
test_single_print([&test_logger](std::string const &msg) { test_logger.critical(msg); }, "my critical message", EVENTLOG_ERROR_TYPE);
}
#endif //_WIN32
#endif //_WIN32