[PATCH] D137823: [clang-format][NFC] Moved configuration parsing tests in own file

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 14 16:25:58 PST 2022


owenpan added inline comments.


================
Comment at: clang/unittests/Format/ConfigParseTest.cpp:1006
+
+TEST(FormatStyle, GetStyleWithEmptyFileName) {
+  llvm::vfs::InMemoryFileSystem FS;
----------------
HazardyKnusperkeks wrote:
> owenpan wrote:
> > Otherwise, the test will be skipped.
> That is not true.
> It will be executed, and that was the name in the beginning.
> 
> I only changed the old `FormatTest` to `ParseTest` and didn't change these 3, because I thought someone made this on purpose.
> 
> ```
> [ RUN      ] ParseTest.ConfigurationRoundTripTest
> [       OK ] ParseTest.ConfigurationRoundTripTest (4 ms)
> [----------] 7 tests from ParseTest (201 ms total)
> 
> [----------] 3 tests from FormatStyle
> [ RUN      ] FormatStyle.GetStyleWithEmptyFileName
> [       OK ] FormatStyle.GetStyleWithEmptyFileName (3 ms)
> ```
You are right. However, IMO we should still rename `FormatTest`. In fact, we should rename both `ParseTest` and `FormatTest` to `ConfigParseTest` to match the filename like other test files.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137823/new/

https://reviews.llvm.org/D137823



More information about the cfe-commits mailing list