tesseract v5.3.3.20231005
gtest_no_test_unittest.cc File Reference
#include "gtest/gtest.h"

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 35 of file gtest_no_test_unittest.cc.

35 {
36 testing::InitGoogleTest(&argc, argv);
37
38 // An ad-hoc assertion outside of all tests.
39 //
40 // This serves three purposes:
41 //
42 // 1. It verifies that an ad-hoc assertion can be executed even if
43 // no test is defined.
44 // 2. It verifies that a failed ad-hoc assertion causes the test
45 // program to fail.
46 // 3. We had a bug where the XML output won't be generated if an
47 // assertion is executed before RUN_ALL_TESTS() is called, even
48 // though --gtest_output=xml is specified. This makes sure the
49 // bug is fixed and doesn't regress.
50 EXPECT_EQ(1, 2);
51
52 // The above EXPECT_EQ() should cause RUN_ALL_TESTS() to return non-zero.
53 return RUN_ALL_TESTS() ? 0 : 1;
54}
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:2043
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition: gtest.h:2489
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: gtest.cc:6660