Lines Matching defs:test
33 #include "gtest/gtest-death-test.h"
96 // The default death test style.
109 "Indicates how to run a death test in a forked child process: "
110 "\"threadsafe\" (child process re-executes the test binary "
111 "from the beginning, running only the specific death test) or "
112 "\"fast\" (child process runs the death test immediately "
130 "the single death test to run, and a file descriptor to "
134 "death test. FOR INTERNAL USE ONLY.");
143 // child process of a fast style death test.
149 // executing in the context of the death test child process. Tools such as
242 // Generates a textual failure message when a death test finds more than
249 << " in a threaded context. For this test, " << GTEST_NAME_ << " ";
259 << " this is the last message you see before your test times out.";
264 // Flag characters for reporting a death test that did not die.
277 // An enumeration describing all of the possible ways that a death test can
278 // conclude. DIED means that the process died while executing the test
279 // code; LIVED means that process lived beyond the end of the test code;
280 // RETURNED means that the test statement attempted to execute a return
281 // statement, which is not allowed; THREW means that the test statement
282 // returned control by throwing an exception. IN_PROGRESS means the test
287 // exec-style death test child process, in which case the error
293 // death test child process, which operates on a very small stack. Use
348 // This is called from a death test parent process to read a failure
349 // message from the death test child process and log it with the FATAL
368 GTEST_LOG_(FATAL) << "Error while reading death test internal: "
373 // Death test constructor. Increments the running death test count
374 // for the current test.
379 "Cannot run a death test outside of a TEST or "
384 // Creates and returns a death test by dispatching to the current
385 // death test factory.
388 int line, DeathTest** test) {
390 statement, std::move(matcher), file, line, test);
434 // test child process via a pipe, interprets it to set the outcome_
448 // True if the death test child process has been successfully spawned.
452 // How the death test concluded.
465 // test child process via a pipe, interprets it to set the outcome_
473 // failure of the death test) or until the pipe is closed (signifying
497 GTEST_LOG_(FATAL) << "Death test child process reported "
502 GTEST_LOG_(FATAL) << "Read from death test child process failed: "
511 // Signals that the death test code which should have exited, didn't.
512 // Should be called only in a death test child process.
516 // The parent process considers the death test to be a failure if
535 // Returns an indented copy of stderr output for a death test.
536 // This makes distinguishing death test output lines from regular log lines
553 // Assesses the success or failure of a death test, using both private
557 // outcome: An enumeration describing how the death test
558 // concluded: DIED, LIVED, THREW, or RETURNED. The death test
569 // this particular death test, which fails if it is false
573 // reported. Also sets the last death test message string.
582 buffer << "Death test: " << statement() << "\n";
595 buffer << " Result: illegal return in test statement.\n"
621 << "DeathTest::Passed somehow called before conclusion of test";
666 // determines whether to fail the test.
684 // The name of the file in which the death test is located.
686 // The line number on which the death test is located.
699 // Waits for the child in a death test to exit, returning its exit
739 // The AssumeRole process for a Windows death test. It creates a child
741 // death test. The child process is given the --gtest_filter and
743 // current death test only.
759 // a death test.
845 // The name of the file in which the death test is located.
847 // The line number on which the death test is located.
857 // Waits for the child in a death test to exit, returning its exit
947 // The AssumeRole process for a Fuchsia death test. It creates a child
949 // death test. The child process is given the --gtest_filter and
951 // current death test only.
1032 // Note: The test component must have `fuchsia.process.Launcher` declared
1065 // PID of child process during death test; 0 in the child process itself.
1074 // Waits for the child in a death test to exit, returning its exit
1088 // A concrete death test class that forks, then immediately runs the test
1097 // The AssumeRole process for a fork-and-run death test. It implements a
1115 // there are multiple threads running before the death test, and another
1130 // down in death test subprocesses.
1142 // A concrete death test class that forks and re-executes the main
1144 // only this specific death test to be run.
1164 // The name of the file in which the death test is located.
1166 // The line number on which the death test is located.
1171 // threadsafe-style death test process.
1180 // The main function for a threadsafe-style death test child process.
1187 // We need to execute the test program in the same environment where
1202 // invoke the test program via a valid path that contains at least
1248 // a thread-safe manner and instructs it to run the death test. The
1264 // We need to execute the test program in the same environment where
1348 // The AssumeRole process for a fork-and-exec death test. It re-executes the
1351 // death test to be re-run.
1402 // by the "test" argument to its address. If the test should be
1408 DeathTest** test) {
1418 "Death test count (" + StreamableToString(death_test_index) +
1426 *test = nullptr;
1435 *test = new WindowsDeathTest(statement, std::move(matcher), file, line);
1442 *test = new FuchsiaDeathTest(statement, std::move(matcher), file, line);
1448 *test = new ExecDeathTest(statement, std::move(matcher), file, line);
1450 *test = new NoExecDeathTest(statement, std::move(matcher));
1456 DeathTest::set_last_death_test_message("Unknown death test style \"" +