You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried running clang-format on the test case example at the main page. Unfortunately the result wasn't so nice (see below). I tried a few different settings for clang-format, but I couldn't get it better. Any thoughts on how to improve this?
Note: I guess the problem is due to clang-format not understanding what the CASE macro really represent.
Note: I know I can wrap the test case section with // clang-format off, but then I'm back to manually formatting the white space...
Note: I can get the formatting to behave with clang-format by not using the macro CASE, as below. I can also of course replace (lest::env & lestenv) with a macro of my own like lest_TC_ARGS:
const lest::test specification[] = {
{
"A test case title, within extra braces",
[](lest::env &lest_env) {
EXPECT(0 == string().length());
EXPECT(0 == string().length());
},
},
"Another test case, now without extra braces and macro for test args",
[] lest_TC_ARGS {
EXPECT(0 == string().length());
EXPECT(0 == string().length());
},
{
"Again within extra braces, and using macro for test args",
[] lest_TC_ARGS {
EXPECT(0 == string().length());
EXPECT(0 == string().length());
},
},
};
The text was updated successfully, but these errors were encountered:
Hi,
I tried running
clang-format
on the test case example at the main page. Unfortunately the result wasn't so nice (see below). I tried a few different settings forclang-format
, but I couldn't get it better. Any thoughts on how to improve this?Note: I guess the problem is due to
clang-format
not understanding what theCASE
macro really represent.Note: I know I can wrap the test case section with
// clang-format off
, but then I'm back to manually formatting the white space...Here's the result after
clang-format
:This is the original formatting:
Note: I can get the formatting to behave with clang-format by not using the macro CASE, as below. I can also of course replace
(lest::env & lestenv)
with a macro of my own likelest_TC_ARGS
:The text was updated successfully, but these errors were encountered: