summaryrefslogtreecommitdiffstats
path: root/include/gtest/gtest.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-02-25 01:09:07 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-02-25 01:09:07 (GMT)
commit0d27868d0faef474594682f25336229daa89d6d7 (patch)
tree2b870d231c4e24592a2ea55ef7d94af707bd5e27 /include/gtest/gtest.h
parent3bef459eac9aa84c579f34249aebc9ff56832054 (diff)
downloadgoogletest-0d27868d0faef474594682f25336229daa89d6d7.zip
googletest-0d27868d0faef474594682f25336229daa89d6d7.tar.gz
googletest-0d27868d0faef474594682f25336229daa89d6d7.tar.bz2
Simplifies the implementation by using std::vector instead of Vector.
Diffstat (limited to 'include/gtest/gtest.h')
-rw-r--r--include/gtest/gtest.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h
index 02d4c5e..c6f82e7 100644
--- a/include/gtest/gtest.h
+++ b/include/gtest/gtest.h
@@ -52,6 +52,8 @@
#define GTEST_INCLUDE_GTEST_GTEST_H_
#include <limits>
+#include <vector>
+
#include <gtest/internal/gtest-internal.h>
#include <gtest/internal/gtest-string.h>
#include <gtest/gtest-death-test.h>
@@ -535,13 +537,13 @@ class TestResult {
friend class internal::WindowsDeathTest;
// Gets the vector of TestPartResults.
- const internal::Vector<TestPartResult>& test_part_results() const {
- return *test_part_results_;
+ const std::vector<TestPartResult>& test_part_results() const {
+ return test_part_results_;
}
// Gets the vector of TestProperties.
- const internal::Vector<TestProperty>& test_properties() const {
- return *test_properties_;
+ const std::vector<TestProperty>& test_properties() const {
+ return test_properties_;
}
// Sets the elapsed time.
@@ -579,9 +581,9 @@ class TestResult {
internal::Mutex test_properites_mutex_;
// The vector of TestPartResults
- internal::scoped_ptr<internal::Vector<TestPartResult> > test_part_results_;
+ std::vector<TestPartResult> test_part_results_;
// The vector of TestProperties
- internal::scoped_ptr<internal::Vector<TestProperty> > test_properties_;
+ std::vector<TestProperty> test_properties_;
// Running count of death tests.
int death_test_count_;
// The elapsed time, in milliseconds.
@@ -745,11 +747,11 @@ class TestCase {
friend class internal::UnitTestImpl;
// Gets the (mutable) vector of TestInfos in this TestCase.
- internal::Vector<TestInfo*>& test_info_list() { return *test_info_list_; }
+ std::vector<TestInfo*>& test_info_list() { return test_info_list_; }
// Gets the (immutable) vector of TestInfos in this TestCase.
- const internal::Vector<TestInfo *> & test_info_list() const {
- return *test_info_list_;
+ const std::vector<TestInfo*>& test_info_list() const {
+ return test_info_list_;
}
// Returns the i-th test among all the tests. i can range from 0 to
@@ -798,11 +800,11 @@ class TestCase {
internal::String comment_;
// The vector of TestInfos in their original order. It owns the
// elements in the vector.
- const internal::scoped_ptr<internal::Vector<TestInfo*> > test_info_list_;
+ std::vector<TestInfo*> test_info_list_;
// Provides a level of indirection for the test list to allow easy
// shuffling and restoring the test order. The i-th element in this
// vector is the index of the i-th test in the shuffled test list.
- const internal::scoped_ptr<internal::Vector<int> > test_indices_;
+ std::vector<int> test_indices_;
// Pointer to the function that sets up the test case.
Test::SetUpTestCaseFunc set_up_tc_;
// Pointer to the function that tears down the test case.