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