aboutsummaryrefslogtreecommitdiff
path: root/utils/unittest/googletest/gtest-test-part.cc
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-06-02 22:02:30 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-06-02 22:02:30 +0000
commit57240ff6e2252f8986f6e47e4010bc52fbae25d1 (patch)
treedacdd66eb30eedab81795672528b6888def253f7 /utils/unittest/googletest/gtest-test-part.cc
parent190f8ee25a6977ac6eb71b816498df42f17ad9a7 (diff)
Merge gtest-1.5.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/unittest/googletest/gtest-test-part.cc')
-rw-r--r--utils/unittest/googletest/gtest-test-part.cc16
1 files changed, 3 insertions, 13 deletions
diff --git a/utils/unittest/googletest/gtest-test-part.cc b/utils/unittest/googletest/gtest-test-part.cc
index 2d4cc2bd1e..8249afeb4c 100644
--- a/utils/unittest/googletest/gtest-test-part.cc
+++ b/utils/unittest/googletest/gtest-test-part.cc
@@ -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<TestPartResult>) {
-}
-
-// 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<int>(array_.size());
}
namespace internal {