[PATCH] D48358: [llvm-exegesis] Fix failing test.
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 20 04:13:11 PDT 2018
gchatelet created this revision.
gchatelet added a reviewer: courbet.
Herald added subscribers: llvm-commits, tschuett.
Repository:
rL LLVM
https://reviews.llvm.org/D48358
Files:
unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
Index: unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
===================================================================
--- unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
+++ unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
@@ -20,6 +20,8 @@
namespace exegesis {
namespace {
+using testing::AnyOf;
+using testing::ElementsAre;
using testing::HasSubstr;
using testing::Not;
using testing::SizeIs;
@@ -119,8 +121,8 @@
const InstructionInstance &II = Proto.Snippet[0];
EXPECT_THAT(II.getOpcode(), Opcode);
ASSERT_THAT(II.VariableValues, SizeIs(2));
- EXPECT_THAT(II.VariableValues[0], IsReg());
- EXPECT_THAT(II.VariableValues[1], IsInvalid());
+ EXPECT_THAT(II.VariableValues, AnyOf(ElementsAre(IsReg(), IsInvalid()),
+ ElementsAre(IsInvalid(), IsReg())));
EXPECT_THAT(Proto.Snippet[1].getOpcode(), Not(Opcode));
// TODO: check that the two instructions alias each other.
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48358.152052.patch
Type: text/x-patch
Size: 972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180620/8848a6f5/attachment.bin>
More information about the llvm-commits
mailing list