diff options
author | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2018-02-26 14:14:11 +0000 |
---|---|---|
committer | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2018-02-26 14:14:11 +0000 |
commit | 0b2f774be69dcfbccb70c77b70264f93a661a590 (patch) | |
tree | f2842ebfd4256a6335f77f86e8b167f2ad995052 /clang/unittests/Format/FormatTest.cpp | |
parent | f3fa88b288d9ad4725b6e25ed6a7aa0809342b9c (diff) | |
download | bcm5719-llvm-0b2f774be69dcfbccb70c77b70264f93a661a590.tar.gz bcm5719-llvm-0b2f774be69dcfbccb70c77b70264f93a661a590.zip |
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
llvm-svn: 326086
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index f87fd8481af..082f6e4864d 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -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()); } |