[llvm] r335115 - [llvm-exegesis] Fix failing test.
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 20 04:09:36 PDT 2018
Author: gchatelet
Date: Wed Jun 20 04:09:36 2018
New Revision: 335115
URL: http://llvm.org/viewvc/llvm-project?rev=335115&view=rev
Log:
[llvm-exegesis] Fix failing test.
Reviewers: courbet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D48358
Modified:
llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
Modified: llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp?rev=335115&r1=335114&r2=335115&view=diff
==============================================================================
--- llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp (original)
+++ llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp Wed Jun 20 04:09:36 2018
@@ -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 @@ TEST_F(LatencySnippetGeneratorTest, Depe
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.
}
More information about the llvm-commits
mailing list