[clangd-dev] clangd testcase style

Nathan Ridge via clangd-dev clangd-dev at lists.llvm.org
Fri Nov 1 07:53:31 PDT 2019


The issue is not with locating the failing testcase, but with running only that one test case under the debugger.

Suppose I want to investigate a failure in a particular testcase, and I put a breakpoint in some relevant code. I don't want to be running all the other testcases as well, and have to skip over that breakpoint for the other test cases, before reaching mine. Hence the commenting-out strategy.

________________________________________
From: Ilya Biryukov <iu.biryukov at gmail.com>
Sent: November 1, 2019 2:38 PM
To: Nathan Ridge
Cc: via clangd-dev
Subject: Re: [clangd-dev] clangd testcase style

Hi Nathan,

I usually ensure the test outputs its inputs in case of failure and then do a text search for that.

It's not super convenient, but definitely does the job.

On Fri, 1 Nov 2019, 00:27 Nathan Ridge via clangd-dev, <clangd-dev at lists.llvm.org<mailto:clangd-dev at lists.llvm.org>> wrote:
Hi,

I have noticed that many of the unit tests in clangd are written in a style where a single testcase from the gtest point of view actually runs a large array of testcases. Some examples are SemanticHighlighting.GetsCorrectTokens and LocateSymbol.All.

I realize this saves a bit of typing when writing the test cases, but I find it impedes debuggability.

My current workflow for debugging an individual test case in a test like this, is to comment out all the other test cases in the array, and then run the test under the debugger, which is pretty laborious I was wondering, does anyone else have a better workflow?

Thanks,
Nate
_______________________________________________
clangd-dev mailing list
clangd-dev at lists.llvm.org<mailto:clangd-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev


More information about the clangd-dev mailing list