#include <stdio.h>
#include <stdlib.h>
#include "gtest/gtest.h"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 107 of file sample10_unittest.cc.
107 {
109
110 bool check_for_leaks = false;
111 if (argc > 1 && strcmp(argv[1], "--check_for_leaks") == 0 )
112 check_for_leaks = true;
113 else
114 printf("%s\n", "Run this program with --check_for_leaks to enable "
115 "custom leak checking in the tests.");
116
117
118
119 if (check_for_leaks) {
120 TestEventListeners& listeners = UnitTest::GetInstance()->listeners();
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136 listeners.Append(new LeakChecker);
137 }
139}
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
GTEST_API_ void InitGoogleTest(int *argc, char **argv)