r326086 - Resolve build bot problems in unittests/Format/FormatTest.cpp
Bjorn Pettersson via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 26 06:14:11 PST 2018
Author: bjope
Date: Mon Feb 26 06:14:11 2018
New Revision: 326086
URL: http://llvm.org/viewvc/llvm-project?rev=326086&view=rev
Log:
Resolve build bot problems in unittests/Format/FormatTest.cpp
Summary:
Make the new GetStyleWithEmptyFileName test case independent
of the file system used when running the test. Since the
test is supposed to use the fallback "Google" style we now
use a InMemoryFileSystem to make sure that we do not accidentaly
find a .clang-format file in the real file system. That could
for example happen when having the build directory inside the
llvm och clang repo (as there is a .clang-format file inside
the repos).
Reviewers: vsapsai, jolesiak, krasimir, benhamilton
Reviewed By: krasimir
Subscribers: uabelho, twoh, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D43732
Modified:
cfe/trunk/unittests/Format/FormatTest.cpp
Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=326086&r1=326085&r2=326086&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Mon Feb 26 06:14:11 2018
@@ -11724,7 +11724,8 @@ TEST_F(FormatTest, NoSpaceAfterSuper) {
}
TEST(FormatStyle, GetStyleWithEmptyFileName) {
- auto Style1 = getStyle("file", "", "Google");
+ vfs::InMemoryFileSystem FS;
+ auto Style1 = getStyle("file", "", "Google", "", &FS);
ASSERT_TRUE((bool)Style1);
ASSERT_EQ(*Style1, getGoogleStyle());
}
More information about the cfe-commits
mailing list