From 7c7aba6e5fef47a01a136be655b0a92cfd7090f6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 16 Jun 2017 21:03:24 +0000 Subject: Vendor import of llvm trunk r305575: https://llvm.org/svn/llvm-project/llvm/trunk@305575 --- .../DebugInfo/CodeView/RandomAccessVisitorTest.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp') diff --git a/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp b/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp index 0ca24c716d1d8..4fa172a37ef2d 100644 --- a/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp +++ b/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp @@ -7,8 +7,6 @@ // //===----------------------------------------------------------------------===// -#include "ErrorChecking.h" - #include "llvm/ADT/SmallBitVector.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" @@ -22,6 +20,7 @@ #include "llvm/Support/Allocator.h" #include "llvm/Support/BinaryItemStream.h" #include "llvm/Support/Error.h" +#include "llvm/Testing/Support/Error.h" #include "gtest/gtest.h" @@ -219,7 +218,8 @@ TEST_F(RandomAccessVisitorTest, MultipleVisits) { for (uint32_t I : IndicesToVisit) { TypeIndex TI = TypeIndex::fromArrayIndex(I); CVType T = Types.getType(TI); - EXPECT_NO_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks)); + EXPECT_THAT_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks), + Succeeded()); } // [0,8) should be present @@ -247,7 +247,8 @@ TEST_F(RandomAccessVisitorTest, DescendingWithinChunk) { for (uint32_t I : IndicesToVisit) { TypeIndex TI = TypeIndex::fromArrayIndex(I); CVType T = Types.getType(TI); - EXPECT_NO_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks)); + EXPECT_THAT_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks), + Succeeded()); } // [0, 7] @@ -275,7 +276,8 @@ TEST_F(RandomAccessVisitorTest, AscendingWithinChunk) { for (uint32_t I : IndicesToVisit) { TypeIndex TI = TypeIndex::fromArrayIndex(I); CVType T = Types.getType(TI); - EXPECT_NO_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks)); + EXPECT_THAT_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks), + Succeeded()); } // [0, 7] @@ -305,7 +307,8 @@ TEST_F(RandomAccessVisitorTest, StopPrematurelyInChunk) { for (uint32_t I : IndicesToVisit) { TypeIndex TI = TypeIndex::fromArrayIndex(I); CVType T = Types.getType(TI); - EXPECT_NO_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks)); + EXPECT_THAT_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks), + Succeeded()); } // [0, 8) should be visited. @@ -334,7 +337,8 @@ TEST_F(RandomAccessVisitorTest, InnerChunk) { for (uint32_t I : IndicesToVisit) { TypeIndex TI = TypeIndex::fromArrayIndex(I); CVType T = Types.getType(TI); - EXPECT_NO_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks)); + EXPECT_THAT_ERROR(codeview::visitTypeRecord(T, TI, TestState->Callbacks), + Succeeded()); } // [4, 9) -- cgit v1.2.3