[clangd] Fix nondeterministic test

llvm-svn: 344030
This commit is contained in:
Sam McCall 2018-10-09 10:02:02 +00:00
parent cf6d5fab32
commit c92e4f35fd
1 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,7 @@
#include <string>
#include <vector>
using ::testing::AnyOf;
using ::testing::ElementsAre;
using ::testing::UnorderedElementsAre;
using namespace llvm;
@ -257,7 +258,9 @@ TEST(DexIterators, StringRepresentation) {
EXPECT_EQ(llvm::to_string(*I2), "T=L2");
auto Tree = C.limit(C.intersect(move(I1), move(I2)), 10);
EXPECT_EQ(llvm::to_string(*Tree), "(LIMIT 10 (& [1 3 5] T=L2))");
// AND reorders its children, we don't care which order it prints.
EXPECT_THAT(llvm::to_string(*Tree), AnyOf("(LIMIT 10 (& [1 3 5] T=L2))",
"(LIMIT 10 (& T=L2 [1 3 5]))"));
}
TEST(DexIterators, Limit) {