mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-25 18:59:45 +00:00
Test and fix writing wide chars.
This commit is contained in:
parent
525de51320
commit
c2e65d1371
2
format.h
2
format.h
@ -1023,7 +1023,7 @@ class BasicFormatter {
|
|||||||
Arg(double value) : type(DOUBLE), double_value(value), formatter(0) {}
|
Arg(double value) : type(DOUBLE), double_value(value), formatter(0) {}
|
||||||
Arg(long double value)
|
Arg(long double value)
|
||||||
: type(LONG_DOUBLE), long_double_value(value), formatter(0) {}
|
: 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) {
|
Arg(const Char *value) : type(STRING), formatter(0) {
|
||||||
string.value = value;
|
string.value = value;
|
||||||
|
@ -1032,6 +1032,7 @@ TEST(FormatterTest, WideFormatString) {
|
|||||||
EXPECT_EQ(L"42", str(Format(L"{}") << 42));
|
EXPECT_EQ(L"42", str(Format(L"{}") << 42));
|
||||||
EXPECT_EQ(L"4.2", str(Format(L"{}") << 4.2));
|
EXPECT_EQ(L"4.2", str(Format(L"{}") << 4.2));
|
||||||
EXPECT_EQ(L"abc", str(Format(L"{}") << L"abc"));
|
EXPECT_EQ(L"abc", str(Format(L"{}") << L"abc"));
|
||||||
|
EXPECT_EQ(L"z", str(Format(L"{}") << L'z'));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(FormatterTest, FormatStringFromSpeedTest) {
|
TEST(FormatterTest, FormatStringFromSpeedTest) {
|
||||||
|
Loading…
Reference in New Issue
Block a user