[clangd] Delete regex assertion, breaking on windows too...
authorSam McCall <sam.mccall@gmail.com>
Tue, 19 May 2020 14:06:08 +0000 (16:06 +0200)
committerSam McCall <sam.mccall@gmail.com>
Tue, 19 May 2020 14:07:01 +0000 (16:07 +0200)
clang-tools-extra/clangd/unittests/support/TraceTests.cpp

index 953002b..f4ff878 100644 (file)
@@ -25,7 +25,6 @@ namespace {
 
 using testing::_;
 using testing::ElementsAre;
-using testing::MatchesRegex;
 using testing::SizeIs;
 using testing::StartsWith;
 
@@ -170,16 +169,11 @@ TEST_F(CSVMetricsTracerTest, RecordsValues) {
   Counter.record(1, "");
   Dist.record(2, "y");
 
-  auto Lines = outputLines();
-  ASSERT_THAT(
-      Lines,
-      ElementsAre("Kind,Metric,Label,Value,Timestamp",
-                  StartsWith("d,dist,x,1.000000e+00,"),
-                  StartsWith("c,cnt,,1.000000e+00,"),
-                  StartsWith("d,dist,y,2.000000e+00,"), ""));
-  // Also check timestamp format.
-  EXPECT_THAT(Lines[1].str(),
-              MatchesRegex(R"(d,dist,x,1\.000000e\+00,[0-9]+\.[0-9]{6})"));
+  ASSERT_THAT(outputLines(),
+              ElementsAre("Kind,Metric,Label,Value,Timestamp",
+                          StartsWith("d,dist,x,1.000000e+00,"),
+                          StartsWith("c,cnt,,1.000000e+00,"),
+                          StartsWith("d,dist,y,2.000000e+00,"), ""));
 }
 
 TEST_F(CSVMetricsTracerTest, Escaping) {