[PATCH] D48358: [llvm-exegesis] Fix failing test.

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 20 04:14:08 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL335115: [llvm-exegesis] Fix failing test. (authored by gchatelet, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D48358

Files:
  llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp


Index: llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
===================================================================
--- llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
+++ llvm/trunk/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.152053.patch
Type: text/x-patch
Size: 1005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180620/c66f763a/attachment.bin>


More information about the llvm-commits mailing list