Lines Matching refs:writer
28 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
29 writer.AppendChar('0'); in TEST()
30 ASSERT_EQ(writer.GetStringView().ToStdString(), "0"); in TEST()
33 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
34 writer.AppendInt(132545); in TEST()
35 ASSERT_EQ(writer.GetStringView().ToStdString(), "132545"); in TEST()
38 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
39 writer.AppendUnsignedInt(523); in TEST()
40 ASSERT_EQ(writer.GetStringView().ToStdString(), "523"); in TEST()
43 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
44 writer.AppendPaddedInt<'0', 3>(0); in TEST()
45 ASSERT_EQ(writer.GetStringView().ToStdString(), "000"); in TEST()
48 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
49 writer.AppendPaddedInt<'0', 1>(1); in TEST()
50 ASSERT_EQ(writer.GetStringView().ToStdString(), "1"); in TEST()
53 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
54 writer.AppendPaddedInt<'0', 3>(1); in TEST()
55 ASSERT_EQ(writer.GetStringView().ToStdString(), "001"); in TEST()
58 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
59 writer.AppendPaddedInt<'0', 0>(1); in TEST()
60 ASSERT_EQ(writer.GetStringView().ToStdString(), "1"); in TEST()
63 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
64 writer.AppendPaddedInt<' ', 5>(123); in TEST()
65 ASSERT_EQ(writer.GetStringView().ToStdString(), " 123"); in TEST()
68 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
69 writer.AppendPaddedUnsignedInt<' ', 5>(123); in TEST()
70 ASSERT_EQ(writer.GetStringView().ToStdString(), " 123"); in TEST()
73 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
74 writer.AppendDouble(123.25); in TEST()
75 ASSERT_EQ(writer.GetStringView().ToStdString(), "123.250000"); in TEST()
78 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
79 writer.AppendInt(std::numeric_limits<int64_t>::min()); in TEST()
80 ASSERT_EQ(writer.GetStringView().ToStdString(), "-9223372036854775808"); in TEST()
83 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
84 writer.AppendInt(std::numeric_limits<int64_t>::max()); in TEST()
85 ASSERT_EQ(writer.GetStringView().ToStdString(), "9223372036854775807"); in TEST()
88 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
89 writer.AppendUnsignedInt(std::numeric_limits<uint64_t>::max()); in TEST()
90 ASSERT_EQ(writer.GetStringView().ToStdString(), "18446744073709551615"); in TEST()
93 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
94 writer.AppendBool(true); in TEST()
95 ASSERT_EQ(writer.GetStringView().ToStdString(), "true"); in TEST()
98 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
99 writer.AppendBool(false); in TEST()
100 ASSERT_EQ(writer.GetStringView().ToStdString(), "false"); in TEST()
105 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
106 writer.AppendLiteral(kTestStr); in TEST()
107 ASSERT_EQ(writer.GetStringView().ToStdString(), kTestStr); in TEST()
110 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
111 writer.AppendString(kTestStr, sizeof(kTestStr) - 1); in TEST()
112 ASSERT_EQ(writer.GetStringView().ToStdString(), kTestStr); in TEST()
115 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
116 writer.AppendString(kTestStr); in TEST()
117 ASSERT_EQ(writer.GetStringView().ToStdString(), kTestStr); in TEST()
120 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
121 writer.AppendChar('x', sizeof(buffer)); in TEST()
122 ASSERT_EQ(writer.GetStringView().ToStdString(), in TEST()
129 base::StringWriter writer(buffer, sizeof(buffer)); in TEST() local
130 writer.AppendChar('0'); in TEST()
131 writer.AppendInt(132545); in TEST()
132 writer.AppendUnsignedInt(523); in TEST()
133 writer.AppendPaddedInt<'0', 0>(1); in TEST()
134 writer.AppendPaddedInt<'0', 3>(0); in TEST()
135 writer.AppendPaddedInt<'0', 1>(1); in TEST()
136 writer.AppendPaddedInt<'0', 2>(1); in TEST()
137 writer.AppendPaddedInt<'0', 3>(1); in TEST()
138 writer.AppendPaddedInt<' ', 5>(123); in TEST()
139 writer.AppendPaddedUnsignedInt<' ', 5>(456); in TEST()
140 writer.AppendDouble(123.25); in TEST()
141 writer.AppendBool(true); in TEST()
144 writer.AppendLiteral(kTestStr); in TEST()
145 writer.AppendString(kTestStr, sizeof(kTestStr) - 1); in TEST()
146 writer.AppendString(kTestStr); in TEST()
148 ASSERT_EQ(writer.GetStringView().ToStdString(), in TEST()