Lines Matching defs:Test
32 // The Google C++ Testing Framework (Google Test)
34 // This header file defines the public API for Google Test. It should be
35 // included by any test program that uses Google Test.
47 // Acknowledgment: Google Test borrowed the idea of automatic test
89 // The Google C++ Testing Framework (Google Test)
92 // Google Test. They are subject to change without notice.
128 // Low-level types and utilities for porting Google Test to various
131 // outside Google Test MUST NOT USE THEM DIRECTLY. Macros that don't
132 // end with _ are part of Google Test's public API and can be used by
133 // code outside Google Test.
135 // This file is fundamental to Google Test. All other Google Test source
137 // any other Google Test header.
145 // Google Test can be used in many different environments. Macros in
146 // this section tell Google Test what kind of environment it is being
147 // used in, such that Google Test can provide environment-specific
150 // Google Test tries to automatically detect the properties of its
154 // macros in the build script to override Google Test's decisions.
156 // If the user doesn't define a macro in the list, Google Test will
184 // std::wstring does/doesn't work (Google Test can
196 // Test's own tr1 tuple implementation should be
199 // GTEST_LANG_CXX11 - Define it to 1/0 to indicate that Google Test
203 // Google Test as a shared library (known as
206 // - Define to 1 when compiling Google Test itself
212 // Macros indicating the platform on which Google Test is being used
214 // otherwise UNDEFINED -- it's never defined to 0.). Google Test
215 // defines these macros automatically. Code outside Google Test MUST
240 // most stable support. Since core members of the Google Test project
251 // Macros indicating which Google Test features are available (a macro
253 // otherwise UNDEFINED -- it's never defined to 0.). Google Test
254 // defines these macros automatically. Code outside Google Test MUST
271 // GTEST_IS_THREADSAFE - Google Test is thread-safe.
283 // the given Google Test flag.
288 // The following macros and utilities are for Google Test's INTERNAL
289 // use only. Code outside Google Test MUST NOT USE THEM DIRECTLY.
406 // The Google C++ Testing Framework (Google Test)
414 // Determines the platform on which Google Test is compiled.
513 // Test filtering:
545 # define GTEST_NAME_ "Google Test"
679 // Defines this to true iff Google Test can use POSIX regular expressions.
764 # error "Google Test cannot be used where ::std::string isn't available."
859 // Determines whether Google Test can use the pthreads library.
864 // To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
888 // Determines whether Google Test can use tr1/tuple. You can define
889 // this macro to 0 to prevent Google Test from using tuple (any
901 // Determines whether Google Test's own tr1 tuple implementation
987 // Implements a subset of TR1 tuple needed by Google Test and Google Mock.
1072 // Anything in namespace gtest_internal is Google Test's INTERNAL
2054 // Determines whether to support stream redirection. This is used to test
2068 // Google Test does not support death tests for VC 7.1 and earlier as
2106 // Determines whether test results can be streamed to a socket.
2287 // A secret type that Google Test users don't know about. It has no
2395 // enough stuff to satisfy Google Test's need.
2490 // We use a const char* instead of an std::string, as Google Test used to be
2636 // instead. Thus, it's important to test in debug mode to make sure
2650 // Ensures that To is a sub-type of From *. This test is here only
2728 // Google Test's own constructs. Don't use it in user tests, either
2748 // This class is only for testing Google Test's own constructs. Do not
2767 // Blocks until the controller thread notifies. Must be called from a test
2823 // This class is only for testing Google Test's own constructs. Do not
2865 // Helper class for testing Google Test's multi-threading constructs.
2875 // These classes are only for testing Google Test's own constructs. Do
3071 // Helper class for testing Google Test's multi-threading constructs.
3127 // Google Test only uses global ThreadLocal objects. That means they
3129 // object managed by Google Test will be leaked as long as all threads
3130 // using Google Test have exited when main() returns.
3418 // and thread-local variable). Necessary for compiling Google Test where
3419 // mutex is not supported - using Google Test in multiple threads is not
3692 // several places in Google Test. This implementation provides a reasonable
3740 // Google Test uses this class in the implementation of floating-point
3743 // For now it only handles UInt (unsigned int) as that's all Google Test
3832 // corresponding to the given Google Test flag.
3894 // The Google C++ Testing Framework (Google Test)
3983 // namespace which Google Test's Message class is in.
3986 // defined in the global namespace) to be used in Google Test
4143 // The Google C++ Testing Framework (Google Test)
4146 // Google Test. They are subject to change without notice. They should not used
4147 // by code external to Google Test.
4309 // Google Test filepath utilities
4312 // Google Test. They are subject to change without notice.
4359 // Given directory = "dir", base_name = "test", number = 0,
4360 // extension = "xml", returns "dir/test.xml". If number is greater
4368 // Given directory = "dir", relative_path = "test.xml",
4369 // returns "dir/test.xml".
4522 // type-parameterized tests in one type-parameterized test case.
4543 // the typed-test-only section below.
5205 // user would write Types<T1, ..., TN>, and Google Test will translate
6913 // user would write Templates<T1, ..., TN>, and Google Test will translate
7834 class Test; // Represents a test.
7835 class TestInfo; // Information about a test.
7836 class TestPartResult; // Result of a test part.
7837 class UnitTest; // A collection of test cases.
7856 // different sizes, so we can use sizeof() to test which version is
7882 // Appends the user-supplied message to the Google-Test-generated message.
7888 // This exception is thrown by (and only by) a failed Google Test
7905 // a trace stack maintained by Google Test.
8062 // This function is needed to test the AlmostEquals() method.
8170 // test fixture classes in the same test case, we need to assign
8201 // Returns the type ID of ::testing::Test. Always call this instead
8202 // of GetTypeId< ::testing::Test>() to get the type ID of
8203 // ::testing::Test, as the latter may give the wrong result due to a
8204 // suspected linker bug when compiling Google Test as a Mac OS X
8209 // of a Test object.
8214 // Creates a test instance to run. The instance is both created and destroyed
8216 virtual Test* CreateTest() = 0;
8226 // It is used in TEST and TEST_F macros.
8230 virtual Test* CreateTest() { return new TestClass; }
8257 // Creates a new TestInfo object and registers it with Google Test;
8262 // test_case_name: name of the test case
8263 // name: name of the test
8264 // type_param the name of the test's type parameter, or NULL if
8265 // this is not a typed or a type-parameterized test.
8266 // value_param text representation of the test's value parameter,
8267 // or NULL if this is not a type-parameterized test.
8268 // code_location: code location where the test is defined
8269 // fixture_class_id: ID of the test fixture class
8270 // set_up_tc: pointer to the function that sets up the test case
8271 // tear_down_tc: pointer to the function that tears down the test case
8272 // factory: pointer to the factory that creates a test object.
8293 // State of the definition of a type-parameterized test case.
8298 // Adds the given test name to defined_test_names_ and return true
8299 // if the test case hasn't been registered; otherwise aborts the
8304 fprintf(stderr, "%s Test %s must be defined before "
8325 // Verifies that registered_tests match the test names in
8362 // registers a list of type-parameterized tests with Google Test. The
8371 // 'index' is the index of the test in the type list 'Types'
8383 // First, registers the first type-parameterized test in the type
8416 // Test. The return value is insignificant - we just need to return
8427 fprintf(stderr, "Failed to get code location for test %s.%s at %s.",
8438 // First, register the first test in 'Test' for each type in 'Types'.
8442 // Next, recurses (at compile time) with the tail of the test list.
8929 // Implements Boolean test assertions such as EXPECT_TRUE. expression can be
8955 // Expands to the name of the class that implements the given test.
9016 // The Google C++ Testing Framework (Google Test)
9056 // The Google C++ Testing Framework (Google Test)
9072 // Names of the flags (needed for parsing Google Test flags).
9081 // returns a concrete class that depends on the prevailing death test
9095 // appropriate action to take for the current death test; for example,
9098 // case. Otherwise, the DeathTest pointer pointed to by the "test"
9099 // argument is set. If the death test should be skipped, the pointer
9101 // DeathTest object that controls the execution of the current test.
9103 const char* file, int line, DeathTest** test);
9107 // A helper class that aborts a death test when it's deleted.
9110 explicit ReturnSentinel(DeathTest* test) : test_(test) { }
9118 // test is encountered. EXECUTE means that the death test logic should
9121 // test, then wait for it to complete.
9124 // An enumeration of the three reasons that a test might be aborted.
9134 // Waits for the death test to finish and returns its status.
9137 // Returns true if the death test passed; that is, the test process
9138 // exited during the test, its exit status matches a user-supplied
9146 // Signals that the death test did not die as expected.
9150 // the last death test.
9156 // A string containing a description of the outcome of the last death test.
9167 const char* file, int line, DeathTest** test) = 0;
9174 const char* file, int line, DeathTest** test);
9181 // Traps C++ exceptions escaping statement and reports them as test
9191 "death test statement. Exception message: %s\n", \
9298 // compile on a death-test supporting system.
9301 // statement - A statement that a macro such as EXPECT_DEATH would test
9306 // regex - A regex that a macro such as EXPECT_DEATH would use to test
9347 // meaning that the death test child process will re-execute the test binary
9348 // from the start, running only a single death test, or "fast",
9349 // meaning that the child process will execute the test logic immediately
9358 // executing in the context of the death test child process. Tools such as
9376 // test in it; the sub-process exits with code 0 at the end of the
9377 // death test, if it hasn't exited already.
9407 // syntax implemented as part of Google Test. This limited
9449 // death test, which already incurs significant overhead by launching
9454 // A "threadsafe" style death test obtains the path to the test
9458 // invoke the test program via a path that contains at least one
9461 // is rarely a problem as people usually don't put the test binary
9473 // test case, if any:
9484 // test case, if any:
9519 // In practice, this can be used to test functions that utilize the
9530 // TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
9547 // need to test that a function has appropriate side-effects in opt
9579 // useful when you are combining death test assertions with normal test
9580 // assertions in one test.
9597 // pump.py gtest-param-test.h.pump
9632 // in Google C++ Testing Framework (Google Test)
9640 // Value-parameterized tests allow you to test your code with different
9641 // parameters without writing multiple copies of the same test.
9651 // TestWithParam<T> is itself derived from testing::Test. T can be any
9664 // Inside a test, access the test parameter with the GetParam() method
9674 // Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
9675 // case with any set of parameters you want. Google Test defines a number
9676 // of functions for generating test parameters. They return what we call
9695 // The following statement will instantiate tests from the FooTest test case
9705 // actual test case name. Remember to pick unique prefixes for different
9732 // in the given test case, whether their definitions come before or
9739 // give the user a chance to inspect the generated tests with Google Test
9750 // A parameterized test fixture must be derived from testing::Test and from
9753 // TestWithParam<T> inherits from both Test and WithParamInterface. In more
9755 // separately from Test and WithParamInterface. For example:
9757 class BaseTest : public ::testing::Test {
9758 // You can inherit all the usual members for a non-parameterized test
9763 // The usual test fixture members go here too.
9767 // This is an ordinary non-parameterized test.
10104 // Google Test - The Google C++ Testing Framework
11110 // Input to a parameterized test name generator, describing a test parameter.
11121 // A builtin parameterized test name generator which returns the result of
11135 // fixture class for the same test case. This may happen when
11428 // Default parameterized test name generator, returns a string containing the
11429 // integer test parameter index.
11439 // Parameterized test name overload helpers, which help the
11441 // test name generator and user param name generator.
11467 virtual Test* CreateTest() {
11481 // test factories for passing into MakeAndRegisterTestInfo function.
11492 // TestMetaFactory creates test factories for passing into
11494 // ownership of test factory pointer, same factory object cannot be passed
11496 // it for each Test/Parameter value combination. Thus it needs meta factory
11518 // accumulates test information provided by TEST_P macro invocations
11520 // and uses that information to register all resulting test instances
11528 // Base part of test case name for display purposes.
11530 // Test case id to verify identity.
11533 // test case right before running them in RUN_ALL_TESTS macro.
11548 // macro invocations for a particular test case and generators
11550 // test case. It registers tests with all values generated by all
11567 // Test case base name for display purposes.
11569 // Test case id to verify identity.
11572 // about a single test in a LocalTestInfo structure.
11573 // test_case_name is the base name of the test case (without invocation
11574 // prefix). test_base_name is the name of an individual test without
11575 // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
11576 // test case base name and DoBar is test base name.
11595 // UnitTest class invokes this method to register tests in this test case
11596 // test cases right before running tests in RUN_ALL_TESTS macro.
11629 << "Parameterized test name '" << param_name
11634 << "Duplicate parameterized test name '" << param_name
11656 // LocalTestInfo structure keeps information about a single test registered
11719 // classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P
11733 // tests and instantiations of a particular test case.
11743 // Complain about incorrect usage of Google Test facilities
11745 // test case setup and tear-down in this case.
11824 // Currently Google Test supports at most 50 arguments in Values,
11843 // include/gtest/gtest-param-test.h.
16937 // Google Test uses these generators to produce parameters for value-
16938 // parameterized tests. When a parameterized test case is instantiated
16939 // with a particular generator, Google Test creates and runs tests
16942 // In the following sample, tests from test case FooTest are instantiated
17008 // This instantiates tests from test case StringTest
17014 // This instantiates tests from test case StlStringTest
17071 // For example, this instantiates tests from test case BarTest each
17076 // This instantiates tests from test case BazTest each with values 1, 2, 3.5.
17946 // In the following example all tests in the test case FlagDependentTest
17974 // Test.
17978 // This will instantiate tests in test case AnimalTest each one with
18004 // // Test your code using external_flag_1 and external_flag_2 here.
18146 // to specify a function or functor that generates custom test name suffixes
18147 // based on the test parameters. The function should accept one argument of
18150 // testing::PrintToStringParamName is a builtin test suffix generator that
18154 // Note: test names must be non-empty, unique, and may only contain ASCII
18217 // When you need to test the private or protected members of a class,
18227 // class MyClassTest : public testing::Test {
18279 // A copyable object representing the result of a test part (i.e. an
18285 // The possible outcomes of a test part (i.e. an assertion or an
18289 kNonFatalFailure, // Failed but the test can continue.
18290 kFatalFailure // Failed and the test should be terminated.
18307 // Gets the outcome of the test part.
18310 // Gets the name of the source file where the test part took place, or
18316 // Gets the line in the source file where the test part took place,
18323 // Gets the message associated with the test part.
18326 // Returns true iff the test part passed.
18329 // Returns true iff the test part failed.
18332 // Returns true iff the test part non-fatally failed.
18335 // Returns true iff the test part fatally failed.
18345 // The name of the source file where the test part took place, or
18348 // The line in the source file where the test part took place, or -1
18351 std::string summary_; // The test failure summary.
18352 std::string message_; // The test failure message.
18381 // This interface knows how to report a test part result.
18393 // current test part result reporter. Besides checking if fatal failures were
18452 // Typed (aka type-driven) tests repeat the same test for types in a
18453 // list. You must know which types you want to test with when writing
18459 // by a type. Remember to derive it from testing::Test.
18461 class FooTest : public testing::Test {
18469 // Next, associate a list of types with the test case, which will be
18480 // tests for this test case as you want.
18482 // Inside a test, refer to TypeParam to get the type parameter.
18502 // Type-parameterized tests are abstract test patterns parameterized
18504 // allow you to define the test pattern without knowing what the type
18512 // each implementation can easily instantiate the test suite to verify
18519 // by a type. Remember to derive it from testing::Test.
18521 class FooTest : public testing::Test {
18525 // Next, declare that you will define a type-parameterized test case
18531 // for this type-parameterized test case as you want.
18533 // Inside a test, refer to TypeParam to get the type parameter.
18540 // Now the tricky part: you need to register all test patterns before
18542 // test case name; the rest are the names of the tests in this test
18553 // to the actual test case name. Remember to pick unique prefixes for
18572 // given test case.
18611 // the given type-parameterized test case are defined in. The exact
18619 // the defined tests in the given test case.
18626 // the registered tests in the given test case.
18630 // The variables defined in the type-parameterized test macros are
18703 // This flag controls whether Google Test catches all test-thrown exceptions
18709 // to let Google Test decide.
18716 // This flag causes the Google Test to list tests. None of the tests listed
18720 // This flag controls whether Google Test emits a detailed XML report to a file
18724 // This flags control whether Google Test prints the elapsed time for each
18725 // test.
18735 // This flag controls whether Google Test includes Google Test internal
18752 // platforms test results are streamed to the specified port on
18782 class Test;
18795 // 1. Defining predicate functions to be used with Boolean test assertions
18903 // Returns the text streamed into this AssertionResult. Test assertions
18944 // with test assertions.
18960 // In Google Test, a unit test program contains one or many TestCases, and
18963 // When you define a test using the TEST macro, you don't need to
18964 // explicitly derive from Test - the TEST macro automatically does
18967 // The only time you derive from Test is when defining a test fixture
18970 // class FooTest : public testing::Test {
18980 // Test is not copyable.
18981 class GTEST_API_ Test {
18986 // a test case.
18990 // The d'tor is virtual as we intend to inherit from Test.
18991 virtual ~Test();
18993 // Sets up the stuff shared by all tests in this test case.
18995 // Google Test will call Foo::SetUpTestCase() before running the first
18996 // test in test case Foo. Hence a sub-class can define its own
19001 // Tears down the stuff shared by all tests in this test case.
19003 // Google Test will call Foo::TearDownTestCase() after running the last
19004 // test in test case Foo. Hence a sub-class can define its own
19009 // Returns true iff the current test has a fatal failure.
19012 // Returns true iff the current test has a non-fatal failure.
19015 // Returns true iff the current test has a (either fatal or
19019 // Logs a property for the current test, test case, or for the entire
19020 // invocation of the test program when used outside of the context of a
19021 // test case. Only the last value for a given key is remembered. These
19023 // not members of the test fixture. Calls to RecordProperty made during
19024 // lifespan of the test (from the moment its constructor starts to the
19031 // Test) will be output as attributes of the <testsuites> element.
19036 // Creates a Test object.
19037 Test();
19039 // Sets up the test fixture.
19042 // Tears down the test fixture.
19046 // Returns true iff the current test has the same fixture class as
19047 // the first test in the current test case.
19050 // Runs the test after the test fixture has been set up.
19052 // A sub-class must implement this to define the test logic.
19055 // Instead, use the TEST or TEST_F macro.
19058 // Sets up, executes, and tears down the test.
19068 // wondering why it is never called by Google Test. The declaration of
19074 // test fixture.
19077 // if the method is called from the user's test fixture.
19087 GTEST_DISALLOW_COPY_AND_ASSIGN_(Test);
19092 // A copyable object representing a user specified test property which can be
19127 // The result of a single Test. This includes a list of
19129 // death tests there are in the Test, and how much time it took to run
19130 // the Test.
19141 // Gets the number of all test parts. This is the sum of the number
19142 // of successful test parts and the number of failed test parts.
19145 // Returns the number of the test properties.
19148 // Returns true iff the test passed (i.e. no test part failed).
19151 // Returns true iff the test failed.
19154 // Returns true iff the test fatally failed.
19157 // Returns true iff the test has a non-fatal failure.
19163 // Returns the i-th test part result among all the results. i can range
19168 // Returns the i-th test property. i can range from 0 to
19196 // Adds a test property to the list. The property is validated and may add
19205 // Adds a failure if the key is a reserved attribute of Google Test
19211 // Adds a test part result to the list.
19214 // Returns the death test count.
19217 // Increments the death test count, returning the new count.
19220 // Clears the test part results.
19243 // A TestInfo object stores the following information about a test:
19245 // Test case name
19246 // Test name
19247 // Whether the test should be run
19248 // A function pointer that creates the test object when invoked
19249 // Test result
19260 // Returns the test case name.
19263 // Returns the test name.
19267 // or a type-parameterized test.
19275 // is not a value-parameterized test.
19282 // Returns the file name where this test is defined.
19285 // Returns the line where this test is defined.
19288 // Returns true if this test should run, that is if the test is not
19292 // Google Test allows the user to filter the tests by their full names.
19293 // The full name of a test Bar in test case Foo is defined as
19298 // negative patterns (tests to exclude). A test is run if it
19306 // Returns true iff this test will appear in the XML report.
19314 // Returns the result of the test.
19321 friend class Test;
19332 Test::SetUpTestCaseFunc set_up_tc,
19333 Test::TearDownTestCaseFunc tear_down_tc,
19340 const char* a_type_param, // NULL if not a type-parameterized test
19341 const char* a_value_param, // NULL if not a value-parameterized test
19346 // Increments the number of death tests encountered in this test so
19352 // Creates the test object, runs it, records its result, and then
19360 // These fields are immutable properties of the test.
19361 const std::string test_case_name_; // Test case name
19362 const std::string name_; // Test name
19364 // type-parameterized test.
19367 // value-parameterized test.
19370 const internal::TypeId fixture_class_id_; // ID of the test fixture class
19371 bool should_run_; // True iff this test should run
19372 bool is_disabled_; // True iff this test is disabled
19373 bool matches_filter_; // True if this test matches the
19376 // the test object
19379 // test for the second time.
19385 // A test case, which consists of a vector of TestInfos.
19397 // name: name of the test case
19398 // a_type_param: the name of the test's type parameter, or NULL if
19399 // this is not a type-parameterized test.
19400 // set_up_tc: pointer to the function that sets up the test case
19401 // tear_down_tc: pointer to the function that tears down the test case
19403 Test::SetUpTestCaseFunc set_up_tc,
19404 Test::TearDownTestCaseFunc tear_down_tc);
19413 // type-parameterized test case.
19420 // Returns true if any test in this test case should run.
19423 // Gets the number of successful tests in this test case.
19426 // Gets the number of failed tests in this test case.
19432 // Gets the number of disabled tests in this test case.
19438 // Get the number of tests in this test case that should run.
19441 // Gets the number of all tests in this test case.
19444 // Returns true iff the test case passed.
19447 // Returns true iff the test case failed.
19453 // Returns the i-th test among all the tests. i can range from 0 to
19457 // Returns the TestResult that holds test properties recorded during
19462 friend class Test;
19473 // Returns the i-th test among all the tests. i can range from 0 to
19480 // Adds a TestInfo to this test case. Will delete the TestInfo upon
19484 // Clears the results of all tests in this test case.
19487 // Clears the results of all tests in the given test case.
19492 test in this TestCase.
19503 // Returns true iff test passed.
19508 // Returns true iff test failed.
19513 // Returns true iff the test is disabled and will be reported in the XML
19519 // Returns true iff test is disabled.
19524 // Returns true iff this test will appear in the XML report.
19529 // Returns true if the given test should run.
19534 // Shuffles the tests in this test case.
19537 // Restores the test order to before the first shuffle.
19540 // Name of the test case.
19543 // type-parameterized test.
19548 // Provides a level of indirection for the test list to allow easy
19549 // shuffling and restoring the test order. The i-th element in this
19550 // vector is the index of the i-th test in the shuffled test list.
19552 // Pointer to the function that sets up the test case.
19553 Test::SetUpTestCaseFunc set_up_tc_;
19554 // Pointer to the function that tears down the test case.
19555 Test::TearDownTestCaseFunc tear_down_tc_;
19556 // True iff any test in this test case should run.
19560 // Holds test properties recorded during execution of SetUpTestCase and
19577 // as in some cases Google Test is used where exceptions are enabled, and
19605 // Fired before any test activity starts.
19620 // Fired before the test case starts.
19623 // Fired before the test starts.
19629 // Fired after the test ends.
19632 // Fired after the test case ends.
19645 // Fired after all test activities have ended.
19673 // TestEventListeners lets users add listeners to track events in Google Test.
19679 // Appends an event listener to the end of the list. Google Test assumes
19681 // the test program finishes).
19776 // Returns the working directory when the first TEST() or TEST_F()
19780 // Returns the TestCase object for the test that's currently running,
19781 // or NULL if no test is running.
19785 // Returns the TestInfo object for the test that's currently running,
19786 // or NULL if no test is running.
19790 // Returns the random seed used at the start of the current test run.
19802 // Gets the number of successful test cases.
19805 // Gets the number of failed test cases.
19808 // Gets the number of all test cases.
19811 // Gets the number of all test cases that contain at least one test
19836 // Gets the time of the test program start, in ms from the start of the
19843 // Returns true iff the unit test passed (i.e. all test cases passed).
19846 // Returns true iff the unit test failed (i.e. some test case failed
19850 // Gets the i-th test case among all the test cases. i can range from 0 to
19854 // Returns the TestResult containing information on test failures and
19855 // properties logged outside of individual test cases.
19859 // inside Google Test.
19863 // Registers and returns a global test environment. When a test
19864 // program is run, all global test environments will be set-up in
19866 // have finished, all global test environments will be torn-down in
19875 // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)
19886 // inside a test, to current TestCase's ad_hoc_test_result_ when invoked
19892 // Gets the i-th test case among all the test cases. i can range from 0 to
19902 friend class Test;
19920 // Google Test trace stack.
19924 // Pops a trace from the per-thread Google Test trace stack.
19942 // A convenient wrapper for adding an environment for the test
19964 // Initializes Google Test. This must be called before calling
19966 // flags that Google Test recognizes. Whenever a Google Test flag is
19969 // No value is returned. Instead, the Google Test flag variables are
20321 // A value-parameterized class must inherit from both ::testing::Test and
20323 // from ::testing::TestWithParam, but more complicated test hierarchies
20324 // may need to inherit from Test and WithParamInterface at different levels.
20326 // This interface has support for accessing the test parameter value via
20360 // The current parameter value. Is also available in the test fixture's
20363 // like writing 'WithParamInterface<bool>::GetParam()' for a test that
20367 << "GetParam() can only be called inside a value-parameterized test "
20374 // remains alive and unchanged throughout the current test.
20379 // Static value used for accessing parameter during a test lifetime.
20382 // TestClass must be a subclass of WithParamInterface<T> and Test.
20393 class TestWithParam : public Test, public WithParamInterface<T> {
20398 // Macros for indicating success/failure in test code.
20400 // ADD_FAILURE unconditionally adds a failure to the current test.
20402 // current test successful, as a test is only successful when it has
20852 // When they are not, Google Test prints both the tested expressions and
20989 // Google Test uses ULP-based comparison to automatically pick a default
21033 // Macros that test for HRESULT failure and success, these are only useful
21038 // When expr unexpectedly fails or succeeds, Google Test prints the
21072 // number, and the given message) to be included in every test failure
21122 // Defines a test.
21124 // The first parameter is the name of the test case, and the second
21125 // parameter is the name of the test within the test case.
21127 // The convention is to end the test case name with "Test". For
21128 // example, a test case for the Foo class can be named FooTest.
21130 // Test code should appear between braces after an invocation of
21133 // TEST(FooTest, InitializesCorrectly) {
21139 // ::testing::Test>() here to get the type ID of testing::Test. This
21140 // is to work around a suspected linker bug when using Google Test as
21142 // ::testing::Test>() to return different values depending on whether
21143 // the call is from the Google Test framework itself or from user test
21145 // value, as it always calls GetTypeId<>() from the Google Test
21149 ::testing::Test, ::testing::internal::GetTestTypeId())
21151 // Define this macro to 1 to omit the definition of TEST(), which
21154 # define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
21157 // Defines a test that uses a test fixture.
21159 // The first parameter is the name of the test fixture class, which
21160 // also doubles as the test case name. The second parameter is the
21161 // name of the test within the test case.
21163 // A test fixture class must be declared earlier. The user should put
21164 // his test code between braces after using this macro. Example:
21166 // class FooTest : public testing::Test {