Makes gtest's tuple implementation work with Symbian 5th edition by bypassing 2 compiler bugs (by Zhanyong Wan); refactors for the event listener API (by Vlad Losev).
This commit is contained in:
		@@ -418,6 +418,9 @@ class TestResult {
 | 
			
		||||
  // of successful test parts and the number of failed test parts.
 | 
			
		||||
  int total_part_count() const;
 | 
			
		||||
 | 
			
		||||
  // Returns the number of the test properties.
 | 
			
		||||
  int test_property_count() const;
 | 
			
		||||
 | 
			
		||||
  // Returns true iff the test passed (i.e. no test part failed).
 | 
			
		||||
  bool Passed() const { return !Failed(); }
 | 
			
		||||
 | 
			
		||||
@@ -436,6 +439,15 @@ class TestResult {
 | 
			
		||||
  // Sets the elapsed time.
 | 
			
		||||
  void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }
 | 
			
		||||
 | 
			
		||||
  // 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;
 | 
			
		||||
 | 
			
		||||
  // 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;
 | 
			
		||||
 | 
			
		||||
  // Adds a test part result to the list.
 | 
			
		||||
  void AddTestPartResult(const TestPartResult& test_part_result);
 | 
			
		||||
 | 
			
		||||
@@ -639,6 +651,10 @@ class TestCase {
 | 
			
		||||
  // Returns the elapsed time, in milliseconds.
 | 
			
		||||
  internal::TimeInMillis elapsed_time() const { return elapsed_time_; }
 | 
			
		||||
 | 
			
		||||
  // Returns the i-th test among all the tests. i can range from 0 to
 | 
			
		||||
  // total_test_count() - 1. If i is not in that range, returns NULL.
 | 
			
		||||
  const TestInfo* GetTestInfo(int i) const;
 | 
			
		||||
 | 
			
		||||
  // Adds a TestInfo to this test case.  Will delete the TestInfo upon
 | 
			
		||||
  // destruction of the TestCase object.
 | 
			
		||||
  void AddTestInfo(TestInfo * test_info);
 | 
			
		||||
@@ -799,7 +815,50 @@ class UnitTest {
 | 
			
		||||
  // Accessors for the implementation object.
 | 
			
		||||
  internal::UnitTestImpl* impl() { return impl_; }
 | 
			
		||||
  const internal::UnitTestImpl* impl() const { return impl_; }
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  // Gets the number of successful test cases.
 | 
			
		||||
  int successful_test_case_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the number of failed test cases.
 | 
			
		||||
  int failed_test_case_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the number of all test cases.
 | 
			
		||||
  int total_test_case_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the number of all test cases that contain at least one test
 | 
			
		||||
  // that should run.
 | 
			
		||||
  int test_case_to_run_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the number of successful tests.
 | 
			
		||||
  int successful_test_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the number of failed tests.
 | 
			
		||||
  int failed_test_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the number of disabled tests.
 | 
			
		||||
  int disabled_test_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the number of all tests.
 | 
			
		||||
  int total_test_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the number of tests that should run.
 | 
			
		||||
  int test_to_run_count() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the elapsed time, in milliseconds.
 | 
			
		||||
  internal::TimeInMillis elapsed_time() const;
 | 
			
		||||
 | 
			
		||||
  // Returns true iff the unit test passed (i.e. all test cases passed).
 | 
			
		||||
  bool Passed() const;
 | 
			
		||||
 | 
			
		||||
  // Returns true iff the unit test failed (i.e. some test case failed
 | 
			
		||||
  // or something outside of all tests failed).
 | 
			
		||||
  bool Failed() const;
 | 
			
		||||
 | 
			
		||||
  // Gets the i-th test case among all the test cases. i can range from 0 to
 | 
			
		||||
  // total_test_case_count() - 1. If i is not in that range, returns NULL.
 | 
			
		||||
  const internal::TestCase* GetTestCase(int i) const;
 | 
			
		||||
 | 
			
		||||
  // ScopedTrace is a friend as it needs to modify the per-thread
 | 
			
		||||
  // trace stack, which is a private member of UnitTest.
 | 
			
		||||
  friend class internal::ScopedTrace;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user