From c2e65d13710e0a4ee790286b4031c5e3fbb317ca Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 6 Sep 2013 19:34:55 -0700 Subject: [PATCH] Test and fix writing wide chars. --- format.h | 2 +- format_test.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/format.h b/format.h index 3ca653d0..542f7b67 100644 --- a/format.h +++ b/format.h @@ -1023,7 +1023,7 @@ class BasicFormatter { Arg(double value) : type(DOUBLE), double_value(value), formatter(0) {} Arg(long double value) : type(LONG_DOUBLE), long_double_value(value), formatter(0) {} - Arg(char value) : type(CHAR), int_value(value), formatter(0) {} + Arg(Char value) : type(CHAR), int_value(value), formatter(0) {} Arg(const Char *value) : type(STRING), formatter(0) { string.value = value; diff --git a/format_test.cc b/format_test.cc index 4c62c7b2..e5e0d9a2 100644 --- a/format_test.cc +++ b/format_test.cc @@ -1032,6 +1032,7 @@ TEST(FormatterTest, WideFormatString) { EXPECT_EQ(L"42", str(Format(L"{}") << 42)); EXPECT_EQ(L"4.2", str(Format(L"{}") << 4.2)); EXPECT_EQ(L"abc", str(Format(L"{}") << L"abc")); + EXPECT_EQ(L"z", str(Format(L"{}") << L'z')); } TEST(FormatterTest, FormatStringFromSpeedTest) {