1
0
mirror of https://github.com/falk-werner/webfused synced 2024-10-27 20:44:08 +00:00
falk-werner_webfused/test/log/stderr_logger.cc

33 lines
763 B
C++
Raw Normal View History

2020-03-18 16:33:31 +00:00
#include "webfused/log/stderr_logger.h"
#include "webfused/log/manager.h"
#include "webfused/log/logger.h"
#include "webfused/log/log.h"
#include <gtest/gtest.h>
#include <stddef.h>
TEST(stderr_logger, init)
{
ASSERT_TRUE(wfd_stderr_logger_init(WFD_LOGLEVEL_ALL, NULL));
wfd_logger_close();
}
TEST(stderr_logger, init_via_manager)
{
ASSERT_TRUE(wfd_log_manager_set_logger("stderr", WFD_LOGLEVEL_ALL, NULL));
wfd_logger_close();
}
TEST(stderr_logger, log)
{
ASSERT_TRUE(wfd_stderr_logger_init(WFD_LOGLEVEL_ALL, NULL));
2020-03-19 20:53:49 +00:00
WFD_FATAL("webfused test");
WFD_ERROR("webfused test");
WFD_WARN ("webfused test");
WFD_INFO ("webfused test");
WFD_DEBUG("webfused test");
wfd_log(-1, "webfused test");
2020-03-18 16:33:31 +00:00
wfd_logger_close();
}