llvm.org GIT mirror llvm / dcb4305
UnitTests: Followup to 305519 We have to use ASSERT_XXX instead of EXPECT_XXX if the test cannot continue in the failure case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305522 91177308-0d34-0410-b5e6-96231b3b80d8 Matthias Braun 3 years ago
2 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
150150 std::unique_ptr MIR;
151151 std::unique_ptr M = parseMIR(Context, PM, MIR, *TM, MIRString,
152152 "func");
153 EXPECT_TRUE(M);
153 ASSERT_TRUE(M);
154154
155155 PM.add(new TestPass(T));
156156
2020
2121 std::string Error;
2222 const Target *TheTarget = TargetRegistry::lookupTarget(TT, Error);
23 EXPECT_TRUE(TheTarget);
2423
2524 return std::unique_ptr(
2625 TheTarget->createTargetMachine(TT, CPU, FS, TargetOptions(), None,
5756 std::unique_ptr MBuffer = MemoryBuffer::getMemBuffer(MIRString);
5857 std::unique_ptr MParser =
5958 createMIRParser(std::move(MBuffer), Context);
60 EXPECT_TRUE(MParser);
59 ASSERT_TRUE(MParser);
6160
6261 std::unique_ptr M = MParser->parseIRModule();
63 EXPECT_TRUE(M);
62 ASSERT_TRUE(M);
6463
6564 M->setTargetTriple(TM->getTargetTriple().getTriple());
6665 M->setDataLayout(TM->createDataLayout());
6766
6867 MachineModuleInfo MMI(TM);
6968 bool Res = MParser->parseMachineFunctions(*M, MMI);
70 EXPECT_FALSE(Res);
69 ASSERT_FALSE(Res);
7170
7271 auto F = M->getFunction("sizes");
73 EXPECT_TRUE(F);
72 ASSERT_TRUE(F != nullptr);
7473 auto &MF = MMI.getOrCreateMachineFunction(*F);
7574
7675 Checks(*II, MF);
8079
8180 TEST(InstSizes, STACKMAP) {
8281 std::unique_ptr TM = createTargetMachine();
82 ASSERT_TRUE(TM);
8383 std::unique_ptr II = createInstrInfo(TM.get());
8484
8585 runChecks(TM.get(), II.get(), "", " STACKMAP 0, 16\n"