summaryrefslogtreecommitdiffstats
path: root/include/gtest/gtest.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-07-13 19:25:02 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-07-13 19:25:02 (GMT)
commit89080477aee9bd91536c9fb47bc31c62ea7d75bb (patch)
tree982a302a1017c97c3cf11da4341492509a08dc2f /include/gtest/gtest.h
parent600105ee3ac48a01143486e5536a5b8fff5b5b25 (diff)
downloadgoogletest-89080477aee9bd91536c9fb47bc31c62ea7d75bb.zip
googletest-89080477aee9bd91536c9fb47bc31c62ea7d75bb.tar.gz
googletest-89080477aee9bd91536c9fb47bc31c62ea7d75bb.tar.bz2
Adds color support for TERM=linux (by Alexander Demin); renames List to Vector (by Zhanyong Wan); implements Vector::Erase (by Vlad Losev).
Diffstat (limited to 'include/gtest/gtest.h')
-rw-r--r--include/gtest/gtest.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h
index f8aa91e..5db7c18 100644
--- a/include/gtest/gtest.h
+++ b/include/gtest/gtest.h
@@ -453,13 +453,13 @@ class TestResult {
friend class testing::TestInfo;
friend class testing::UnitTest;
- // Gets the list of TestPartResults.
- const internal::List<TestPartResult>& test_part_results() const {
+ // Gets the vector of TestPartResults.
+ const internal::Vector<TestPartResult>& test_part_results() const {
return *test_part_results_;
}
- // Gets the list of TestProperties.
- const internal::List<internal::TestProperty>& test_properties() const {
+ // Gets the vector of TestProperties.
+ const internal::Vector<internal::TestProperty>& test_properties() const {
return *test_properties_;
}
@@ -493,14 +493,15 @@ class TestResult {
// Clears the object.
void Clear();
- // Protects mutable state of the property list and of owned properties, whose
- // values may be updated.
+ // Protects mutable state of the property vector and of owned
+ // properties, whose values may be updated.
internal::Mutex test_properites_mutex_;
- // The list of TestPartResults
- scoped_ptr<internal::List<TestPartResult> > test_part_results_;
- // The list of TestProperties
- scoped_ptr<internal::List<internal::TestProperty> > test_properties_;
+ // The vector of TestPartResults
+ internal::scoped_ptr<internal::Vector<TestPartResult> > test_part_results_;
+ // The vector of TestProperties
+ internal::scoped_ptr<internal::Vector<internal::TestProperty> >
+ test_properties_;
// Running count of death tests.
int death_test_count_;
// The elapsed time, in milliseconds.
@@ -604,7 +605,7 @@ class TestInfo {
namespace internal {
-// A test case, which consists of a list of TestInfos.
+// A test case, which consists of a vector of TestInfos.
//
// TestCase is not copyable.
class TestCase {
@@ -667,11 +668,11 @@ class TestCase {
friend class testing::Test;
friend class UnitTestImpl;
- // Gets the (mutable) list of TestInfos in this TestCase.
- internal::List<TestInfo*>& test_info_list() { return *test_info_list_; }
+ // Gets the (mutable) vector of TestInfos in this TestCase.
+ internal::Vector<TestInfo*>& test_info_list() { return *test_info_list_; }
- // Gets the (immutable) list of TestInfos in this TestCase.
- const internal::List<TestInfo *> & test_info_list() const {
+ // Gets the (immutable) vector of TestInfos in this TestCase.
+ const internal::Vector<TestInfo *> & test_info_list() const {
return *test_info_list_;
}
@@ -712,8 +713,8 @@ class TestCase {
internal::String name_;
// Comment on the test case.
internal::String comment_;
- // List of TestInfos.
- internal::List<TestInfo*>* test_info_list_;
+ // Vector of TestInfos.
+ internal::Vector<TestInfo*>* test_info_list_;
// 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.
@@ -760,7 +761,7 @@ class Environment {
virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
};
-// A UnitTest consists of a list of TestCases.
+// A UnitTest consists of a vector of TestCases.
//
// This is a singleton class. The only instance of UnitTest is
// created when UnitTest::GetInstance() is first called. This