• Home
  • Raw
  • Download

Lines Matching full:replacements

39   auto Replacements = formatv_object_base::parseFormatString("");  in TEST()  local
40 EXPECT_EQ(0U, Replacements.size()); in TEST()
45 auto Replacements = formatv_object_base::parseFormatString(kFormatString); in TEST() local
46 ASSERT_EQ(1U, Replacements.size()); in TEST()
47 EXPECT_EQ(kFormatString, Replacements[0].Spec); in TEST()
48 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST()
53 auto Replacements = formatv_object_base::parseFormatString("{{"); in TEST() local
54 ASSERT_EQ(1u, Replacements.size()); in TEST()
55 EXPECT_EQ("{", Replacements[0].Spec); in TEST()
56 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST()
59 Replacements = formatv_object_base::parseFormatString("{{{{{{"); in TEST()
60 ASSERT_EQ(1u, Replacements.size()); in TEST()
61 EXPECT_EQ("{{{", Replacements[0].Spec); in TEST()
62 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST()
65 Replacements = formatv_object_base::parseFormatString("}"); in TEST()
66 ASSERT_EQ(1u, Replacements.size()); in TEST()
67 EXPECT_EQ("}", Replacements[0].Spec); in TEST()
68 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST()
71 Replacements = formatv_object_base::parseFormatString("}}}"); in TEST()
72 ASSERT_EQ(1u, Replacements.size()); in TEST()
73 EXPECT_EQ("}}}", Replacements[0].Spec); in TEST()
74 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST()
79 auto Replacements = formatv_object_base::parseFormatString("{0}"); in TEST() local
80 ASSERT_EQ(1u, Replacements.size()); in TEST()
81 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
82 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
83 EXPECT_EQ(0u, Replacements[0].Align); in TEST()
84 EXPECT_EQ("", Replacements[0].Options); in TEST()
86 Replacements = formatv_object_base::parseFormatString("{1}"); in TEST()
87 ASSERT_EQ(1u, Replacements.size()); in TEST()
88 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
89 EXPECT_EQ(1u, Replacements[0].Index); in TEST()
90 EXPECT_EQ(0u, Replacements[0].Align); in TEST()
91 EXPECT_EQ(AlignStyle::Right, Replacements[0].Where); in TEST()
92 EXPECT_EQ("", Replacements[0].Options); in TEST()
95 Replacements = formatv_object_base::parseFormatString("{0,3}"); in TEST()
96 ASSERT_EQ(1u, Replacements.size()); in TEST()
97 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
98 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
99 EXPECT_EQ(3u, Replacements[0].Align); in TEST()
100 EXPECT_EQ(AlignStyle::Right, Replacements[0].Where); in TEST()
101 EXPECT_EQ("", Replacements[0].Options); in TEST()
104 Replacements = formatv_object_base::parseFormatString("{0,-3}"); in TEST()
105 ASSERT_EQ(1u, Replacements.size()); in TEST()
106 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
107 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
108 EXPECT_EQ(3u, Replacements[0].Align); in TEST()
109 EXPECT_EQ(AlignStyle::Left, Replacements[0].Where); in TEST()
110 EXPECT_EQ("", Replacements[0].Options); in TEST()
113 Replacements = formatv_object_base::parseFormatString("{0,=3}"); in TEST()
114 ASSERT_EQ(1u, Replacements.size()); in TEST()
115 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
116 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
117 EXPECT_EQ(3u, Replacements[0].Align); in TEST()
118 EXPECT_EQ(AlignStyle::Center, Replacements[0].Where); in TEST()
119 EXPECT_EQ("", Replacements[0].Options); in TEST()
122 Replacements = formatv_object_base::parseFormatString("{0:foo}"); in TEST()
123 ASSERT_EQ(1u, Replacements.size()); in TEST()
124 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
125 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
126 EXPECT_EQ(0u, Replacements[0].Align); in TEST()
127 EXPECT_EQ(AlignStyle::Right, Replacements[0].Where); in TEST()
128 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
131 Replacements = formatv_object_base::parseFormatString("{0,-3:foo}"); in TEST()
132 ASSERT_EQ(1u, Replacements.size()); in TEST()
133 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
134 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
135 EXPECT_EQ(3u, Replacements[0].Align); in TEST()
136 EXPECT_EQ(AlignStyle::Left, Replacements[0].Where); in TEST()
137 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
140 Replacements = formatv_object_base::parseFormatString("{ 0, -3 : foo }"); in TEST()
141 ASSERT_EQ(1u, Replacements.size()); in TEST()
142 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
143 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
144 EXPECT_EQ(3u, Replacements[0].Align); in TEST()
145 EXPECT_EQ(AlignStyle::Left, Replacements[0].Where); in TEST()
146 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
150 Replacements = formatv_object_base::parseFormatString("{0:0:1}"); in TEST()
151 ASSERT_EQ(1u, Replacements.size()); in TEST()
152 EXPECT_EQ("0:0:1", Replacements[0].Spec); in TEST()
153 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
154 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
155 EXPECT_EQ(0u, Replacements[0].Align); in TEST()
156 EXPECT_EQ(AlignStyle::Right, Replacements[0].Where); in TEST()
157 EXPECT_EQ("0:1", Replacements[0].Options); in TEST()
160 Replacements = formatv_object_base::parseFormatString("{0,p+4:foo}"); in TEST()
161 ASSERT_EQ(1u, Replacements.size()); in TEST()
162 EXPECT_EQ("0,p+4:foo", Replacements[0].Spec); in TEST()
163 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
164 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
165 EXPECT_EQ(4u, Replacements[0].Align); in TEST()
166 EXPECT_EQ(AlignStyle::Right, Replacements[0].Where); in TEST()
167 EXPECT_EQ('p', Replacements[0].Pad); in TEST()
168 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
171 Replacements = formatv_object_base::parseFormatString("{0,-+4:foo}"); in TEST()
172 ASSERT_EQ(1u, Replacements.size()); in TEST()
173 EXPECT_EQ("0,-+4:foo", Replacements[0].Spec); in TEST()
174 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
175 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
176 EXPECT_EQ(4u, Replacements[0].Align); in TEST()
177 EXPECT_EQ(AlignStyle::Right, Replacements[0].Where); in TEST()
178 EXPECT_EQ('-', Replacements[0].Pad); in TEST()
179 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
181 Replacements = formatv_object_base::parseFormatString("{0,+-4:foo}"); in TEST()
182 ASSERT_EQ(1u, Replacements.size()); in TEST()
183 EXPECT_EQ("0,+-4:foo", Replacements[0].Spec); in TEST()
184 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
185 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
186 EXPECT_EQ(4u, Replacements[0].Align); in TEST()
187 EXPECT_EQ(AlignStyle::Left, Replacements[0].Where); in TEST()
188 EXPECT_EQ('+', Replacements[0].Pad); in TEST()
189 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
191 Replacements = formatv_object_base::parseFormatString("{0,==4:foo}"); in TEST()
192 ASSERT_EQ(1u, Replacements.size()); in TEST()
193 EXPECT_EQ("0,==4:foo", Replacements[0].Spec); in TEST()
194 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
195 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
196 EXPECT_EQ(4u, Replacements[0].Align); in TEST()
197 EXPECT_EQ(AlignStyle::Center, Replacements[0].Where); in TEST()
198 EXPECT_EQ('=', Replacements[0].Pad); in TEST()
199 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
201 Replacements = formatv_object_base::parseFormatString("{0,:=4:foo}"); in TEST()
202 ASSERT_EQ(1u, Replacements.size()); in TEST()
203 EXPECT_EQ("0,:=4:foo", Replacements[0].Spec); in TEST()
204 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
205 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
206 EXPECT_EQ(4u, Replacements[0].Align); in TEST()
207 EXPECT_EQ(AlignStyle::Center, Replacements[0].Where); in TEST()
208 EXPECT_EQ(':', Replacements[0].Pad); in TEST()
209 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
214 auto Replacements = formatv_object_base::parseFormatString("{0,3}"); in TEST() local
215 ASSERT_EQ(1u, Replacements.size()); in TEST()
216 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
217 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
218 EXPECT_EQ(3u, Replacements[0].Align); in TEST()
219 EXPECT_EQ("", Replacements[0].Options); in TEST()
222 Replacements = formatv_object_base::parseFormatString("{0,3:}"); in TEST()
223 ASSERT_EQ(1u, Replacements.size()); in TEST()
224 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
225 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
226 EXPECT_EQ(3u, Replacements[0].Align); in TEST()
227 EXPECT_EQ("", Replacements[0].Options); in TEST()
230 Replacements = formatv_object_base::parseFormatString("{0:foo}"); in TEST()
231 ASSERT_EQ(1u, Replacements.size()); in TEST()
232 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
233 EXPECT_EQ(AlignStyle::Right, Replacements[0].Where); in TEST()
234 EXPECT_EQ(' ', Replacements[0].Pad); in TEST()
235 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
236 EXPECT_EQ(0u, Replacements[0].Align); in TEST()
237 EXPECT_EQ("foo", Replacements[0].Options); in TEST()
241 auto Replacements = in TEST() local
243 ASSERT_EQ(5u, Replacements.size()); in TEST()
245 EXPECT_EQ(ReplacementType::Format, Replacements[0].Type); in TEST()
246 EXPECT_EQ(0u, Replacements[0].Index); in TEST()
247 EXPECT_EQ(0u, Replacements[0].Align); in TEST()
248 EXPECT_EQ(AlignStyle::Right, Replacements[0].Where); in TEST()
249 EXPECT_EQ("", Replacements[0].Options); in TEST()
252 EXPECT_EQ(ReplacementType::Literal, Replacements[1].Type); in TEST()
253 EXPECT_EQ(" ", Replacements[1].Spec); in TEST()
256 EXPECT_EQ(ReplacementType::Format, Replacements[2].Type); in TEST()
257 EXPECT_EQ(1u, Replacements[2].Index); in TEST()
258 EXPECT_EQ(0u, Replacements[2].Align); in TEST()
259 EXPECT_EQ(AlignStyle::Right, Replacements[2].Where); in TEST()
260 EXPECT_EQ("foo", Replacements[2].Options); in TEST()
263 EXPECT_EQ(ReplacementType::Literal, Replacements[3].Type); in TEST()
264 EXPECT_EQ("-", Replacements[3].Spec); in TEST()
267 EXPECT_EQ(ReplacementType::Format, Replacements[4].Type); in TEST()
268 EXPECT_EQ(2u, Replacements[4].Index); in TEST()
269 EXPECT_EQ(3u, Replacements[4].Align); in TEST()
270 EXPECT_EQ(AlignStyle::Left, Replacements[4].Where); in TEST()
271 EXPECT_EQ("bar", Replacements[4].Options); in TEST()