(third_party deps) fix #177, update bundled spdlog to 1.6.0
This commit is contained in:
11
third_party/spdlog/tests/test_errors.cpp
vendored
11
third_party/spdlog/tests/test_errors.cpp
vendored
@ -7,10 +7,6 @@
|
||||
|
||||
class failing_sink : public spdlog::sinks::base_sink<std::mutex>
|
||||
{
|
||||
public:
|
||||
failing_sink() = default;
|
||||
~failing_sink() final = default;
|
||||
|
||||
protected:
|
||||
void sink_it_(const spdlog::details::log_msg &) final
|
||||
{
|
||||
@ -34,7 +30,8 @@ TEST_CASE("default_error_handler", "[errors]]")
|
||||
logger->info("Test message {}", 2);
|
||||
logger->flush();
|
||||
|
||||
REQUIRE(file_contents(filename) == std::string("Test message 2\n"));
|
||||
using spdlog::details::os::default_eol;
|
||||
REQUIRE(file_contents(filename) == fmt::format("Test message 2{}", default_eol));
|
||||
REQUIRE(count_lines(filename) == 1);
|
||||
}
|
||||
|
||||
@ -51,7 +48,7 @@ TEST_CASE("custom_error_handler", "[errors]]")
|
||||
|
||||
REQUIRE_THROWS_AS(logger->info("Bad format msg {} {}", "xxx"), custom_ex);
|
||||
logger->info("Good message #2");
|
||||
REQUIRE(count_lines(filename) == 2);
|
||||
require_message_count(filename, 2);
|
||||
}
|
||||
|
||||
TEST_CASE("default_error_handler2", "[errors]]")
|
||||
@ -93,7 +90,7 @@ TEST_CASE("async_error_handler", "[errors]]")
|
||||
spdlog::drop("logger"); // force logger to drain the queue and shutdown
|
||||
}
|
||||
spdlog::init_thread_pool(128, 1);
|
||||
REQUIRE(count_lines(filename) == 2);
|
||||
require_message_count(filename, 2);
|
||||
REQUIRE(file_contents("test_logs/custom_err.txt") == err_msg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user