@@ -29,11 +29,6 @@ namespace influxdb::test
29
29
{
30
30
using namespace Catch ::Matchers;
31
31
32
- namespace
33
- {
34
- constexpr std::chrono::time_point<std::chrono::system_clock> ignoreTimestamp (std::chrono::milliseconds(1230 ));
35
- }
36
-
37
32
TEST_CASE (" Empty measurement" , " [PointTest]" )
38
33
{
39
34
const Point point{" test" };
@@ -186,60 +181,4 @@ namespace influxdb::test
186
181
const auto point3 = Point{" test" }.addField (" float_field" , 1.23456789E-6 );
187
182
CHECK_THAT (point3.getFields (), Equals (" float_field=0.00000" ));
188
183
}
189
-
190
- TEST_CASE (" Line protocol of empty measurement" , " [PointTest]" )
191
- {
192
- const auto point = Point{" test" }.setTimestamp (ignoreTimestamp);
193
- CHECK_THAT (point.toLineProtocol (), Equals (" test 1230000000" ));
194
- }
195
-
196
- TEST_CASE (" Line protocol of measurement with value" , " [PointTest]" )
197
- {
198
- const auto point = Point{" test" }.addField (" x" , " y" ).setTimestamp (ignoreTimestamp);
199
- CHECK_THAT (point.toLineProtocol (), Equals (R"( test x="y" 1230000000)" ));
200
- }
201
-
202
- TEST_CASE (" Line protocol of measurement with multiple values" , " [PointTest]" )
203
- {
204
- const auto point = Point{" test" }
205
- .addField (" int_field" , 12 )
206
- .addField (" longlong_field" , 123456790LL )
207
- .addField (" string_field" , " str" )
208
- .addField (" double_field" , 1.81 )
209
- .addField (" bool_true_field" , true )
210
- .addField (" bool_false_field" , false )
211
- .addField (" uint_field" , std::numeric_limits<unsigned int >::max ())
212
- .addField (" ulonglong_field" , std::numeric_limits<unsigned long long int >::max ())
213
- .setTimestamp (ignoreTimestamp);
214
-
215
- CHECK_THAT (point.toLineProtocol (), Equals (" test int_field=12i,"
216
- " longlong_field=123456790i,"
217
- " string_field=\" str\" ,"
218
- " double_field=1.81000,"
219
- " bool_true_field=true,"
220
- " bool_false_field=false,"
221
- " uint_field=4294967295u,"
222
- " ulonglong_field=18446744073709551615u 1230000000" ));
223
- }
224
-
225
- TEST_CASE (" Line protocol of measurement with tag" , " [PointTest]" )
226
- {
227
- const auto point = Point{" test" }
228
- .addField (" v" , 3 )
229
- .addTag (" t0" , " tv0" )
230
- .setTimestamp (ignoreTimestamp);
231
- CHECK_THAT (point.toLineProtocol (), Equals (R"( test,t0=tv0 v=3i 1230000000)" ));
232
- }
233
-
234
- TEST_CASE (" Line protocol of measurement with multiple tags" , " [PointTest]" )
235
- {
236
- const auto point = Point{" test" }
237
- .addField (" v" , 3 )
238
- .addTag (" t0" , " tv0" )
239
- .addTag (" t1" , " tv1" )
240
- .addTag (" t2" , " tv2" )
241
- .setTimestamp (ignoreTimestamp);
242
- CHECK_THAT (point.toLineProtocol (), Equals (R"( test,t0=tv0,t1=tv1,t2=tv2 v=3i 1230000000)" ));
243
- }
244
-
245
184
}
0 commit comments