From a753eca66f744f521fa45987c4be027f2ad8e75a Mon Sep 17 00:00:00 2001 From: Peter Rong Date: Sat, 15 Apr 2023 16:39:01 -0700 Subject: [PATCH] [FuzzMutate] Update unit testing There are some typos in the previous patch e0117a3efacf that woulc break unit test and CI. These typos are fixed now. Signed-off-by: Peter Rong --- llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp b/llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp index 008b41e..3a1f91a 100644 --- a/llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp +++ b/llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp @@ -420,18 +420,18 @@ TEST(RandomIRBuilderTest, findOrCreateGlobalVariable) { // Find existing global std::unique_ptr M1 = parseAssembly(SourceCode, Ctx); - IB.findOrCreateGlobalVariable(&*M1, {}, fuzzerop::onlyType(Types[0])); + IB.findOrCreateGlobalVariable(&*M1, {}, fuzzerop::onlyType(Types[1])); ASSERT_FALSE(verifyModule(*M1, &errs())); unsigned NumGV1 = M1->getNumNamedValues(); auto [GV1, DidCreate1] = - IB.findOrCreateGlobalVariable(&*M1, {}, fuzzerop::onlyType(Types[0])); + IB.findOrCreateGlobalVariable(&*M1, {}, fuzzerop::onlyType(Types[1])); ASSERT_FALSE(verifyModule(*M1, &errs())); ASSERT_EQ(M1->getNumNamedValues(), NumGV1 + DidCreate1); // Create new global std::unique_ptr M2 = parseAssembly(SourceCode, Ctx); auto [GV2, DidCreate2] = - IB.findOrCreateGlobalVariable(&*M1, {}, fuzzerop::onlyType(Types[1])); + IB.findOrCreateGlobalVariable(&*M2, {}, fuzzerop::onlyType(Types[2])); ASSERT_FALSE(verifyModule(*M2, &errs())); ASSERT_TRUE(DidCreate2); } -- 2.7.4