Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
gtest_premature_exit_test.cc File Reference
#include <stdio.h>
#include "gtest/gtest.h"
Include dependency graph for gtest_premature_exit_test.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 110 of file gtest_premature_exit_test.cc.

110 {
111 InitGoogleTest(&argc, argv);
112 const int exit_code = RUN_ALL_TESTS();
113
114 // Test that the premature-exit file is deleted upon return from
115 // RUN_ALL_TESTS().
116 const char* const filepath = GetEnv("TEST_PREMATURE_EXIT_FILE");
117 if (filepath != NULL && *filepath != '\0') {
118 if (PrematureExitTest::FileExists(filepath)) {
119 printf(
120 "File %s shouldn't exist after the test program finishes, but does.",
121 filepath);
122 return 1;
123 }
124 }
125
126 return exit_code;
127}
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition gtest.h:2328
char ** argv
LOGGING_API void printf(Category category, const char *format,...)
Definition Logging.cpp:30
const char * GetEnv(const char *name)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition gtest.cc:5787
Here is the call graph for this function: