Improve compile-time checks

This commit is contained in:
Victor Zverovich
2021-05-19 07:57:57 -07:00
parent 21d93bfd33
commit e9c1c415b8
8 changed files with 343 additions and 298 deletions
+7
View File
@@ -9,6 +9,13 @@
#include "gtest/gtest.h"
#if FMT_USE_USER_DEFINED_LITERALS
TEST(format_test, format_udl) {
using namespace fmt::literals;
EXPECT_EQ(L"{}c{}"_format(L"ab", 1), fmt::format(L"{}c{}", L"ab", 1));
}
#endif
TEST(wchar_test, print) {
// Check that the wide print overload compiles.
if (fmt::detail::const_check(false)) fmt::print(L"test");