X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Funittest%2Fgoogletest%2Fgtest-test-part.cc;h=161278027d085bbd84676269dbc8841dece765be;hb=ca8d1842cff5cd5866c0d4d46cf736ca9f8718f4;hp=2d4cc2bd1edd4943ad8eba1b14380adcf984d90b;hpb=190f8ee25a6977ac6eb71b816498df42f17ad9a7;p=oota-llvm.git diff --git a/utils/unittest/googletest/gtest-test-part.cc b/utils/unittest/googletest/gtest-test-part.cc index 2d4cc2bd1ed..161278027d0 100644 --- a/utils/unittest/googletest/gtest-test-part.cc +++ b/utils/unittest/googletest/gtest-test-part.cc @@ -31,7 +31,7 @@ // // The Google C++ Testing Framework (Google Test) -#include +#include "gtest/gtest-test-part.h" // Indicates that this translation unit is part of Google Test's // implementation. It must come before gtest-internal-inl.h is @@ -64,19 +64,9 @@ std::ostream& operator<<(std::ostream& os, const TestPartResult& result) { << result.message() << std::endl; } -// Constructs an empty TestPartResultArray. -TestPartResultArray::TestPartResultArray() - : array_(new internal::Vector) { -} - -// Destructs a TestPartResultArray. -TestPartResultArray::~TestPartResultArray() { - delete array_; -} - // Appends a TestPartResult to the array. void TestPartResultArray::Append(const TestPartResult& result) { - array_->PushBack(result); + array_.push_back(result); } // Returns the TestPartResult at the given index (0-based). @@ -86,12 +76,12 @@ const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const { internal::posix::Abort(); } - return array_->GetElement(index); + return array_[index]; } // Returns the number of TestPartResult objects in the array. int TestPartResultArray::size() const { - return array_->size(); + return static_cast(array_.size()); } namespace internal {