21 RAPIDJSON_DIAG_OFF(c++98-compat)
28 EXPECT_EQ(0u, buffer.
GetSize());
37 EXPECT_EQ(1u, buffer.
GetSize());
58 EXPECT_EQ(0u, buffer.
GetSize());
67 EXPECT_EQ(5u, buffer.
GetSize());
72 EXPECT_EQ(5u + 65536u, buffer.
GetSize());
84 EXPECT_EQ(2u, buffer.
GetSize());
94 EXPECT_EQ(3u *
sizeof(
wchar_t), buffer.
GetSize());
98 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS 100 #if 0 // Many old compiler does not support these. Turn it off temporaily. 102 #include <type_traits> 115 #if !defined(_MSC_VER) || _MSC_VER >= 1800 126 #if !defined(_MSC_VER) || _MSC_VER >= 1800 156 EXPECT_EQ(4u, y.GetSize());
157 EXPECT_EQ(4u, y.GetLength());
158 EXPECT_STREQ(
"ABCD", y.GetString());
162 EXPECT_EQ(0u, y.GetSize());
163 EXPECT_EQ(0u, y.GetLength());
164 EXPECT_EQ(4u, z.GetSize());
165 EXPECT_EQ(4u, z.GetLength());
166 EXPECT_STREQ(
"ABCD", z.GetString());
184 EXPECT_EQ(4u, y.GetLength());
185 EXPECT_STREQ(
"ABCD", y.GetString());
188 #endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS size_t GetSize() const
Get the size of string in bytes in the string buffer.
const Ch * GetString() const
void PutN(FileWriteStream &stream, char c, size_t n)
Implement specialized version of PutN() with memset() for better performance.
TEST(StringBuffer, InitialSize)
const GenericPointer< typename T::ValueType > T2 value
size_t GetLength() const
Get the length of string in Ch in the string buffer.