diff options
| author | Matthias Braun <matze@braunis.de> | 2017-06-15 22:50:57 +0000 | 
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2017-06-15 22:50:57 +0000 | 
| commit | 531f3a9c66b9e06cc7ac6c1869ab44a5732e4efc (patch) | |
| tree | fa94030cd10751ed0c5fdbdcc518387ee0bdc498 | |
| parent | 589eae515e82e1f382ddf83984d6418a347d7f3a (diff) | |
| download | bcm5719-llvm-531f3a9c66b9e06cc7ac6c1869ab44a5732e4efc.tar.gz bcm5719-llvm-531f3a9c66b9e06cc7ac6c1869ab44a5732e4efc.zip  | |
UnitTests: Followup to 305519
We have to use ASSERT_XXX instead of EXPECT_XXX if the test cannot
continue in the failure case.
llvm-svn: 305522
| -rw-r--r-- | llvm/unittests/MI/LiveIntervalTest.cpp | 2 | ||||
| -rw-r--r-- | llvm/unittests/Target/AArch64/InstSizes.cpp | 10 | 
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/unittests/MI/LiveIntervalTest.cpp b/llvm/unittests/MI/LiveIntervalTest.cpp index 43dfa4a7978..01dce37d9c6 100644 --- a/llvm/unittests/MI/LiveIntervalTest.cpp +++ b/llvm/unittests/MI/LiveIntervalTest.cpp @@ -151,7 +151,7 @@ body: |    std::unique_ptr<MIRParser> MIR;    std::unique_ptr<Module> M = parseMIR(Context, PM, MIR, *TM, MIRString,                                         "func"); -  EXPECT_TRUE(M); +  ASSERT_TRUE(M);    PM.add(new TestPass(T)); diff --git a/llvm/unittests/Target/AArch64/InstSizes.cpp b/llvm/unittests/Target/AArch64/InstSizes.cpp index 32b91da0910..f5a6d4fa67d 100644 --- a/llvm/unittests/Target/AArch64/InstSizes.cpp +++ b/llvm/unittests/Target/AArch64/InstSizes.cpp @@ -21,7 +21,6 @@ std::unique_ptr<TargetMachine> createTargetMachine() {    std::string Error;    const Target *TheTarget = TargetRegistry::lookupTarget(TT, Error); -  EXPECT_TRUE(TheTarget);    return std::unique_ptr<TargetMachine>(        TheTarget->createTargetMachine(TT, CPU, FS, TargetOptions(), None, @@ -58,20 +57,20 @@ void runChecks(    std::unique_ptr<MemoryBuffer> MBuffer = MemoryBuffer::getMemBuffer(MIRString);    std::unique_ptr<MIRParser> MParser =        createMIRParser(std::move(MBuffer), Context); -  EXPECT_TRUE(MParser); +  ASSERT_TRUE(MParser);    std::unique_ptr<Module> M = MParser->parseIRModule(); -  EXPECT_TRUE(M); +  ASSERT_TRUE(M);    M->setTargetTriple(TM->getTargetTriple().getTriple());    M->setDataLayout(TM->createDataLayout());    MachineModuleInfo MMI(TM);    bool Res = MParser->parseMachineFunctions(*M, MMI); -  EXPECT_FALSE(Res); +  ASSERT_FALSE(Res);    auto F = M->getFunction("sizes"); -  EXPECT_TRUE(F); +  ASSERT_TRUE(F != nullptr);    auto &MF = MMI.getOrCreateMachineFunction(*F);    Checks(*II, MF); @@ -81,6 +80,7 @@ void runChecks(  TEST(InstSizes, STACKMAP) {    std::unique_ptr<TargetMachine> TM = createTargetMachine(); +  ASSERT_TRUE(TM);    std::unique_ptr<AArch64InstrInfo> II = createInstrInfo(TM.get());    runChecks(TM.get(), II.get(), "", "    STACKMAP 0, 16\n"  | 

