Fix flakyness in TestCompletion

One of the file name templates was occasionally generating the name
"fooa***", which conflicted with the one of the tests expectation that
there is only one item beginning with "fooa".

There doesn't seem to be a good reason for using random file templates
here, so just switch to a fixed set of files to increase
reproducibility.

llvm-svn: 297743
This commit is contained in:
Pavel Labath 2017-03-14 14:58:31 +00:00
parent 2de256642b
commit bb114f84e7
1 changed files with 2 additions and 2 deletions

View File

@ -127,8 +127,8 @@ protected:
ASSERT_NO_ERROR(fs::createUniqueDirectory("FsCompletion", BaseDir)); ASSERT_NO_ERROR(fs::createUniqueDirectory("FsCompletion", BaseDir));
const char *DirNames[] = {"foo", "fooa", "foob", "fooc", const char *DirNames[] = {"foo", "fooa", "foob", "fooc",
"bar", "baz", "test_folder"}; "bar", "baz", "test_folder"};
const char *FileNames[] = {"aa%%%%.tmp", "ab%%%%.tmp", "ac%%%%.tmp", const char *FileNames[] = {"aa1234.tmp", "ab1234.tmp", "ac1234.tmp",
"foo%%%%.tmp", "bar%%%%.tmp", "baz%%%%.tmp"}; "foo1234.tmp", "bar1234.tmp", "baz1234.tmp"};
SmallString<128> *Dirs[] = {&DirFoo, &DirFooA, &DirFooB, &DirFooC, SmallString<128> *Dirs[] = {&DirFoo, &DirFooA, &DirFooB, &DirFooC,
&DirBar, &DirBaz, &DirTestFolder}; &DirBar, &DirBaz, &DirTestFolder};
for (auto Dir : llvm::zip(DirNames, Dirs)) { for (auto Dir : llvm::zip(DirNames, Dirs)) {