Boost.Log -> spdlog - test

This commit is contained in:
Dan Paulat 2022-04-19 16:05:31 -05:00
parent c6281d799f
commit 7734fcabab
6 changed files with 10 additions and 21 deletions

View file

@ -2,14 +2,12 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <boost/log/trivial.hpp>
namespace scwx namespace scwx
{ {
namespace awips namespace awips
{ {
static const std::string logPrefix_ = "[scwx::awips::coded_location.test] "; static const std::string logPrefix_ = "scwx::awips::coded_location.test";
TEST(CodedLocation, WFO100W) TEST(CodedLocation, WFO100W)
{ {

View file

@ -2,15 +2,13 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <boost/log/trivial.hpp>
namespace scwx namespace scwx
{ {
namespace awips namespace awips
{ {
static const std::string logPrefix_ = static const std::string logPrefix_ =
"[scwx::awips::coded_time_motion_location.test] "; "scwx::awips::coded_time_motion_location.test";
TEST(CodedTimeMotionLocation, LeadingZeroes) TEST(CodedTimeMotionLocation, LeadingZeroes)
{ {

View file

@ -2,14 +2,12 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <boost/log/trivial.hpp>
namespace scwx namespace scwx
{ {
namespace awips namespace awips
{ {
static const std::string logPrefix_ = "[scwx::awips::pvtec.test] "; static const std::string logPrefix_ = "scwx::awips::pvtec.test";
std::pair<std::chrono::year_month_day, std::pair<std::chrono::year_month_day,
std::chrono::hh_mm_ss<std::chrono::minutes>> std::chrono::hh_mm_ss<std::chrono::minutes>>

View file

@ -2,14 +2,12 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <boost/log/trivial.hpp>
namespace scwx namespace scwx
{ {
namespace awips namespace awips
{ {
static const std::string logPrefix_ = "[scwx::awips::text_product_file.test] "; static const std::string logPrefix_ = "scwx::awips::text_product_file.test";
class TextProductValidFileTest : public testing::TestWithParam<std::string> class TextProductValidFileTest : public testing::TestWithParam<std::string>
{ {

View file

@ -4,15 +4,12 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <boost/log/trivial.hpp>
namespace scwx namespace scwx
{ {
namespace wsr88d namespace wsr88d
{ {
static const std::string logPrefix_ = static const std::string logPrefix_ = "scwx::wsr88d::nexrad_file_factory.test";
"[scwx::wsr88d::nexrad_file_factory.test] ";
TEST(NexradFileFactory, Level2V06) TEST(NexradFileFactory, Level2V06)
{ {

View file

@ -1,12 +1,12 @@
#include <gtest/gtest.h> #include <scwx/util/logger.hpp>
#include <boost/log/expressions.hpp> #include <gtest/gtest.h>
#include <boost/log/trivial.hpp> #include <spdlog/spdlog.h>
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
boost::log::core::get()->set_filter(boost::log::trivial::severity >= scwx::util::Logger::Initialize();
boost::log::trivial::debug); spdlog::set_level(spdlog::level::debug);
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();