[clang-tools-extra] 61559d0 - [clangd] Squash GCC error with StringRef + gtest MatchesRegex()
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Tue May 26 12:34:39 PDT 2020
Might be handy to link to a buildbot and/or quote the specific error
message in the commit message for changes like this so it's clear what's
being addressed by the change.
On Tue, May 19, 2020 at 4:58 AM Sam McCall via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
>
> Author: Sam McCall
> Date: 2020-05-19T13:58:23+02:00
> New Revision: 61559d045868e3980deca6cf5d30ad8816951960
>
> URL:
> https://github.com/llvm/llvm-project/commit/61559d045868e3980deca6cf5d30ad8816951960
> DIFF:
> https://github.com/llvm/llvm-project/commit/61559d045868e3980deca6cf5d30ad8816951960.diff
>
> LOG: [clangd] Squash GCC error with StringRef + gtest MatchesRegex()
>
> Added:
>
>
> Modified:
> clang-tools-extra/clangd/unittests/support/TraceTests.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff --git a/clang-tools-extra/clangd/unittests/support/TraceTests.cpp
> b/clang-tools-extra/clangd/unittests/support/TraceTests.cpp
> index cee43f73f211..953002b69a46 100644
> --- a/clang-tools-extra/clangd/unittests/support/TraceTests.cpp
> +++ b/clang-tools-extra/clangd/unittests/support/TraceTests.cpp
> @@ -170,12 +170,16 @@ TEST_F(CSVMetricsTracerTest, RecordsValues) {
> Counter.record(1, "");
> Dist.record(2, "y");
>
> - EXPECT_THAT(
> - outputLines(),
> + auto Lines = outputLines();
> + ASSERT_THAT(
> + Lines,
> ElementsAre("Kind,Metric,Label,Value,Timestamp",
> -
> MatchesRegex(R"(d,dist,x,1\.000000e\+00,[0-9]+\.[0-9]{6})"),
> + 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})"));
> }
>
> TEST_F(CSVMetricsTracerTest, Escaping) {
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200526/024b3779/attachment.html>
More information about the cfe-commits
mailing list