mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Added wchar api tests to windows
This commit is contained in:
parent
4da95066a0
commit
3806a9c320
@ -26,7 +26,7 @@ build_script:
|
|||||||
|
|
||||||
set PATH=C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
|
set PATH=C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
|
||||||
|
|
||||||
cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_BUILD_EXAMPLE=ON -DSPDLOG_BUILD_EXAMPLE_HO=ON -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=OFF
|
cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_WCHAR_SUPPORT=ON -DSPDLOG_BUILD_EXAMPLE=ON -DSPDLOG_BUILD_EXAMPLE_HO=ON -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=OFF
|
||||||
|
|
||||||
cmake --build . --config %BUILD_TYPE%
|
cmake --build . --config %BUILD_TYPE%
|
||||||
|
|
||||||
|
@ -78,3 +78,21 @@ TEST_CASE("stderr_color_mt", "[stderr]")
|
|||||||
l->critical("Test stderr_color_mt");
|
l->critical("Test stderr_color_mt");
|
||||||
spdlog::drop_all();
|
spdlog::drop_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
||||||
|
|
||||||
|
TEST_CASE("wchar_api", "[stdout]")
|
||||||
|
{
|
||||||
|
auto l = spdlog::stdout_logger_st("wchar_logger");
|
||||||
|
l->set_pattern("%+");
|
||||||
|
l->set_level(spdlog::level::trace);
|
||||||
|
l->trace(L"Test wchar_api");
|
||||||
|
l->trace(L"Test wchar_api {}", L"param");
|
||||||
|
l->trace(L"Test wchar_api {}", 1);
|
||||||
|
l->trace(L"Test wchar_api {}", std::wstring{L"wstring param"});
|
||||||
|
l->trace(std::wstring{L"Test wchar_api wstring"});
|
||||||
|
|
||||||
|
spdlog::drop_all();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user