diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-07-01 22:55:05 (GMT) |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-07-01 22:55:05 (GMT) |
commit | 600105ee3ac48a01143486e5536a5b8fff5b5b25 (patch) | |
tree | e321c70ebc0eb178e91fcbf9993cdbeb5606c8e2 /include/gtest | |
parent | b2db677c9905a34ca6454aa526f7a0cc5cfaeca1 (diff) | |
download | googletest-600105ee3ac48a01143486e5536a5b8fff5b5b25.zip googletest-600105ee3ac48a01143486e5536a5b8fff5b5b25.tar.gz googletest-600105ee3ac48a01143486e5536a5b8fff5b5b25.tar.bz2 |
Makes List a random-access data structure. This simplifies the implementation and makes it easier to implement test shuffling.
Diffstat (limited to 'include/gtest')
-rw-r--r-- | include/gtest/gtest.h | 11 | ||||
-rw-r--r-- | include/gtest/internal/gtest-internal.h | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h index 7d06078..f8aa91e 100644 --- a/include/gtest/gtest.h +++ b/include/gtest/gtest.h @@ -434,13 +434,14 @@ class TestResult { TimeInMillis elapsed_time() const { return elapsed_time_; } // Returns the i-th test part result among all the results. i can range - // from 0 to test_property_count() - 1. If i is not in that range, returns - // NULL. - const TestPartResult* GetTestPartResult(int i) const; + // from 0 to test_property_count() - 1. If i is not in that range, aborts + // the program. + const TestPartResult& GetTestPartResult(int i) const; // Returns the i-th test property. i can range from 0 to - // test_property_count() - 1. If i is not in that range, returns NULL. - const TestProperty* GetTestProperty(int i) const; + // test_property_count() - 1. If i is not in that range, aborts the + // program. + const TestProperty& GetTestProperty(int i) const; private: friend class DefaultGlobalTestPartResultReporter; diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h index a4c3736..91b386f 100644 --- a/include/gtest/internal/gtest-internal.h +++ b/include/gtest/internal/gtest-internal.h @@ -116,9 +116,7 @@ class ScopedTrace; // Implements scoped trace. class TestInfoImpl; // Opaque implementation of TestInfo class TestResult; // Result of a single Test. class UnitTestImpl; // Opaque implementation of UnitTest - template <typename E> class List; // A generic list. -template <typename E> class ListNode; // A node in a generic list. // How many times InitGoogleTest() has been called. extern int g_init_gtest_count; |