diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-25 01:09:07 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-25 01:09:07 +0000 |
commit | 0d27868d0faef474594682f25336229daa89d6d7 (patch) | |
tree | 2b870d231c4e24592a2ea55ef7d94af707bd5e27 /include/gtest/gtest-test-part.h | |
parent | 3bef459eac9aa84c579f34249aebc9ff56832054 (diff) | |
download | googletest-0d27868d0faef474594682f25336229daa89d6d7.tar.gz googletest-0d27868d0faef474594682f25336229daa89d6d7.tar.bz2 googletest-0d27868d0faef474594682f25336229daa89d6d7.zip |
Simplifies the implementation by using std::vector instead of Vector.
Diffstat (limited to 'include/gtest/gtest-test-part.h')
-rw-r--r-- | include/gtest/gtest-test-part.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/gtest/gtest-test-part.h b/include/gtest/gtest-test-part.h index 348e4ec2..dd271602 100644 --- a/include/gtest/gtest-test-part.h +++ b/include/gtest/gtest-test-part.h @@ -34,6 +34,7 @@ #define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ #include <iosfwd> +#include <vector> #include <gtest/internal/gtest-internal.h> #include <gtest/internal/gtest-string.h> @@ -117,15 +118,11 @@ std::ostream& operator<<(std::ostream& os, const TestPartResult& result); // An array of TestPartResult objects. // -// We define this class as we cannot use STL containers when compiling -// Google Test with MSVC 7.1 and exceptions disabled. -// // Don't inherit from TestPartResultArray as its destructor is not // virtual. class TestPartResultArray { public: - TestPartResultArray(); - ~TestPartResultArray(); + TestPartResultArray() {} // Appends the given TestPartResult to the array. void Append(const TestPartResult& result); @@ -135,9 +132,9 @@ class TestPartResultArray { // Returns the number of TestPartResult objects in the array. int size() const; + private: - // Internally we use a Vector to implement the array. - internal::Vector<TestPartResult>* const array_; + std::vector<TestPartResult> array_; GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray); }; |