Improve separation between code unit types

This commit is contained in:
Victor Zverovich
2021-05-19 09:06:57 -07:00
parent 39c3c4ec22
commit 95c358f721
6 changed files with 29 additions and 28 deletions
+12
View File
@@ -9,6 +9,18 @@
#include "gtest/gtest.h"
TEST(format_test, vformat_to) {
using wcontext = fmt::wformat_context;
fmt::basic_format_arg<wcontext> warg = fmt::detail::make_arg<wcontext>(42);
auto wargs = fmt::basic_format_args<wcontext>(&warg, 1);
auto w = std::wstring();
fmt::vformat_to(std::back_inserter(w), L"{}", wargs);
EXPECT_EQ(L"42", w);
w.clear();
fmt::vformat_to(std::back_inserter(w), FMT_STRING(L"{}"), wargs);
EXPECT_EQ(L"42", w);
}
#if FMT_USE_USER_DEFINED_LITERALS
TEST(format_test, format_udl) {
using namespace fmt::literals;