summaryrefslogtreecommitdiffstats
path: root/googletest/samples
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2019-07-31 16:22:29 (GMT)
committerGennadiy Civil <misterg@google.com>2019-08-01 20:05:33 (GMT)
commit2221875d0bc7b835e93d6c562f4879251037fa1f (patch)
tree2e88a388eee7a2b9a38f6c3dfe1f4eb273183816 /googletest/samples
parent9311242db422dd6f24c8e764847fe5d70d0d4859 (diff)
downloadgoogletest-2221875d0bc7b835e93d6c562f4879251037fa1f.zip
googletest-2221875d0bc7b835e93d6c562f4879251037fa1f.tar.gz
googletest-2221875d0bc7b835e93d6c562f4879251037fa1f.tar.bz2
Googletest export
Internal Change PiperOrigin-RevId: 260939845
Diffstat (limited to 'googletest/samples')
-rw-r--r--googletest/samples/sample9_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/googletest/samples/sample9_unittest.cc b/googletest/samples/sample9_unittest.cc
index c0d8ff2..e502d08 100644
--- a/googletest/samples/sample9_unittest.cc
+++ b/googletest/samples/sample9_unittest.cc
@@ -135,10 +135,10 @@ int main(int argc, char **argv) {
// This is an example of using the UnitTest reflection API to inspect test
// results. Here we discount failures from the tests we expected to fail.
int unexpectedly_failed_tests = 0;
- for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
- const TestCase& test_case = *unit_test.GetTestCase(i);
- for (int j = 0; j < test_case.total_test_count(); ++j) {
- const TestInfo& test_info = *test_case.GetTestInfo(j);
+ for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {
+ const testing::TestSuite& test_suite = *unit_test.GetTestSuite(i);
+ for (int j = 0; j < test_suite.total_test_count(); ++j) {
+ const TestInfo& test_info = *test_suite.GetTestInfo(j);
// Counts failed tests that were not meant to fail (those without
// 'Fails' in the name).
if (test_info.result()->Failed() &&