Lines Matching defs:test

33 #include "gtest/gtest-death-test.h"
92 // The default death test style.
105 "Indicates how to run a death test in a forked child process: "
106 "\"threadsafe\" (child process re-executes the test binary "
107 "from the beginning, running only the specific death test) or "
108 "\"fast\" (child process runs the death test immediately "
126 "the single death test to run, and a file descriptor to "
130 "death test. FOR INTERNAL USE ONLY.");
139 // child process of a fast style death test.
145 // executing in the context of the death test child process. Tools such as
238 // Generates a textual failure message when a death test finds more than
245 << " in a threaded context. For this test, " << GTEST_NAME_ << " ";
255 << " this is the last message you see before your test times out.";
260 // Flag characters for reporting a death test that did not die.
273 // An enumeration describing all of the possible ways that a death test can
274 // conclude. DIED means that the process died while executing the test
275 // code; LIVED means that process lived beyond the end of the test code;
276 // RETURNED means that the test statement attempted to execute a return
277 // statement, which is not allowed; THREW means that the test statement
278 // returned control by throwing an exception. IN_PROGRESS means the test
283 // exec-style death test child process, in which case the error
289 // death test child process, which operates on a very small stack. Use
344 // This is called from a death test parent process to read a failure
345 // message from the death test child process and log it with the FATAL
364 GTEST_LOG_(FATAL) << "Error while reading death test internal: "
369 // Death test constructor. Increments the running death test count
370 // for the current test.
375 "Cannot run a death test outside of a TEST or "
380 // Creates and returns a death test by dispatching to the current
381 // death test factory.
384 int line, DeathTest** test) {
386 statement, std::move(matcher), file, line, test);
430 // test child process via a pipe, interprets it to set the outcome_
444 // True if the death test child process has been successfully spawned.
448 // How the death test concluded.
461 // test child process via a pipe, interprets it to set the outcome_
469 // failure of the death test) or until the pipe is closed (signifying
493 GTEST_LOG_(FATAL) << "Death test child process reported "
498 GTEST_LOG_(FATAL) << "Read from death test child process failed: "
507 // Signals that the death test code which should have exited, didn't.
508 // Should be called only in a death test child process.
512 // The parent process considers the death test to be a failure if
531 // Returns an indented copy of stderr output for a death test.
532 // This makes distinguishing death test output lines from regular log lines
549 // Assesses the success or failure of a death test, using both private
553 // outcome: An enumeration describing how the death test
554 // concluded: DIED, LIVED, THREW, or RETURNED. The death test
565 // this particular death test, which fails if it is false
569 // reported. Also sets the last death test message string.
578 buffer << "Death test: " << statement() << "\n";
591 buffer << " Result: illegal return in test statement.\n"
617 << "DeathTest::Passed somehow called before conclusion of test";
648 // determines whether to fail the test.
666 // The name of the file in which the death test is located.
668 // The line number on which the death test is located.
681 // Waits for the child in a death test to exit, returning its exit
721 // The AssumeRole process for a Windows death test. It creates a child
723 // death test. The child process is given the --gtest_filter and
725 // current death test only.
741 // a death test.
827 // The name of the file in which the death test is located.
829 // The line number on which the death test is located.
869 // Waits for the child in a death test to exit, returning its exit
959 // The AssumeRole process for a Fuchsia death test. It creates a child
961 // death test. The child process is given the --gtest_filter and
963 // current death test only.
1071 // PID of child process during death test; 0 in the child process itself.
1080 // Waits for the child in a death test to exit, returning its exit
1094 // A concrete death test class that forks, then immediately runs the test
1103 // The AssumeRole process for a fork-and-run death test. It implements a
1121 // there are multiple threads running before the death test, and another
1136 // down in death test subprocesses.
1148 // A concrete death test class that forks and re-executes the main
1150 // only this specific death test to be run.
1170 // The name of the file in which the death test is located.
1172 // The line number on which the death test is located.
1205 // threadsafe-style death test process.
1214 // The main function for a threadsafe-style death test child process.
1221 // We need to execute the test program in the same environment where
1236 // invoke the test program via a valid path that contains at least
1282 // a thread-safe manner and instructs it to run the death test. The
1298 // We need to execute the test program in the same environment where
1383 // The AssumeRole process for a fork-and-exec death test. It re-executes the
1386 // death test to be re-run.
1437 // by the "test" argument to its address. If the test should be
1443 DeathTest** test) {
1453 "Death test count (" + StreamableToString(death_test_index) +
1461 *test = nullptr;
1470 *test = new WindowsDeathTest(statement, std::move(matcher), file, line);
1477 *test = new FuchsiaDeathTest(statement, std::move(matcher), file, line);
1483 *test = new ExecDeathTest(statement, std::move(matcher), file, line);
1485 *test = new NoExecDeathTest(statement, std::move(matcher));
1491 DeathTest::set_last_death_test_message("Unknown death test style \"" +