OLD | NEW |
1 // Copyright 2005, Google Inc. | 1 // Copyright 2005, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 int disabled_test_count() const; | 543 int disabled_test_count() const; |
544 | 544 |
545 // Gets the number of all tests. | 545 // Gets the number of all tests. |
546 int total_test_count() const; | 546 int total_test_count() const; |
547 | 547 |
548 // Gets the number of tests that should run. | 548 // Gets the number of tests that should run. |
549 int test_to_run_count() const; | 549 int test_to_run_count() const; |
550 | 550 |
551 // Gets the elapsed time, in milliseconds. | 551 // Gets the elapsed time, in milliseconds. |
552 TimeInMillis elapsed_time() const { return elapsed_time_; } | 552 TimeInMillis elapsed_time() const { return elapsed_time_; } |
| 553 ·· |
| 554 // Gets the start datetime, in milliseconds. |
| 555 TimeInMillis start_datetime() const { return start_datetime_; } |
553 | 556 |
554 // Returns true iff the unit test passed (i.e. all test cases passed). | 557 // Returns true iff the unit test passed (i.e. all test cases passed). |
555 bool Passed() const { return !Failed(); } | 558 bool Passed() const { return !Failed(); } |
556 | 559 |
557 // Returns true iff the unit test failed (i.e. some test case failed | 560 // Returns true iff the unit test failed (i.e. some test case failed |
558 // or something outside of all tests failed). | 561 // or something outside of all tests failed). |
559 bool Failed() const { | 562 bool Failed() const { |
560 return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed(); | 563 return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed(); |
561 } | 564 } |
562 | 565 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 bool post_flag_parse_init_performed_; | 878 bool post_flag_parse_init_performed_; |
876 | 879 |
877 // The random number seed used at the beginning of the test run. | 880 // The random number seed used at the beginning of the test run. |
878 int random_seed_; | 881 int random_seed_; |
879 | 882 |
880 // Our random number generator. | 883 // Our random number generator. |
881 internal::Random random_; | 884 internal::Random random_; |
882 | 885 |
883 // How long the test took to run, in milliseconds. | 886 // How long the test took to run, in milliseconds. |
884 TimeInMillis elapsed_time_; | 887 TimeInMillis elapsed_time_; |
| 888 ·· |
| 889 // Start timestamp, in milliseconds. |
| 890 TimeInMillis start_datetime_; |
885 | 891 |
886 #if GTEST_HAS_DEATH_TEST | 892 #if GTEST_HAS_DEATH_TEST |
887 // The decomposed components of the gtest_internal_run_death_test flag, | 893 // The decomposed components of the gtest_internal_run_death_test flag, |
888 // parsed when RUN_ALL_TESTS is called. | 894 // parsed when RUN_ALL_TESTS is called. |
889 internal::scoped_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_; | 895 internal::scoped_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_; |
890 internal::scoped_ptr<internal::DeathTestFactory> death_test_factory_; | 896 internal::scoped_ptr<internal::DeathTestFactory> death_test_factory_; |
891 #endif // GTEST_HAS_DEATH_TEST | 897 #endif // GTEST_HAS_DEATH_TEST |
892 | 898 |
893 // A per-thread stack of traces created by the SCOPED_TRACE() macro. | 899 // A per-thread stack of traces created by the SCOPED_TRACE() macro. |
894 internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_; | 900 internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 static const std::vector<testing::TestPartResult>& test_part_results( | 1035 static const std::vector<testing::TestPartResult>& test_part_results( |
1030 const TestResult& test_result) { | 1036 const TestResult& test_result) { |
1031 return test_result.test_part_results(); | 1037 return test_result.test_part_results(); |
1032 } | 1038 } |
1033 }; | 1039 }; |
1034 | 1040 |
1035 } // namespace internal | 1041 } // namespace internal |
1036 } // namespace testing | 1042 } // namespace testing |
1037 | 1043 |
1038 #endif // GTEST_SRC_GTEST_INTERNAL_INL_H_ | 1044 #endif // GTEST_SRC_GTEST_INTERNAL_INL_H_ |
OLD | NEW |