class Runner
Defined at line 129 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
This class is the entry point for test and constructs registration.
Public Members
static Options kDefaultOptions
Public Methods
void Runner (Reporter && reporter)
Defined at line 62 of file ../../zircon/system/ulib/zxtest/runner.cc
void ~Runner ()
Defined at line 66 of file ../../zircon/system/ulib/zxtest/runner.cc
int Run (const Options & options)
Runs the registered tests with the specified |options|.
Defined at line 102 of file ../../zircon/system/ulib/zxtest/runner.cc
void List (const Options & options)
List tests according to options.
Defined at line 154 of file ../../zircon/system/ulib/zxtest/runner.cc
void Runner ()
Defined at line 174 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void Runner (const Runner & )
Defined at line 176 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void Runner (Runner && )
Defined at line 177 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Runner & operator= (const Runner & )
Defined at line 180 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Runner & operator= (Runner && )
Defined at line 181 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
template <typename TestBase, typename TestImpl>
TestRef RegisterTest (const fbl::String & test_case_name, const fbl::String & test_name, const char * filename, int line)
Register a test for execution with the default factory.
Defined at line 185 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
template <typename TestBase, typename TestImpl>
TestRef RegisterTest (const fbl::String & test_case_name, const fbl::String & test_name, const char * filename, int line, internal::TestFactory factory)
Register a test for execution with a customized factory.
Defined at line 193 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
template <typename SuiteClass>
bool AddParameterizedTest (std::unique_ptr<internal::AddTestDelegate> delegate, const fbl::String & suite_name, const fbl::String & test_name, const SourceLocation & location)
Defined at line 203 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
template <typename SuiteClass, typename ParamType>
bool AddInstantiation (std::unique_ptr<internal::AddInstantiationDelegate<ParamType>> delegate, const fbl::String & instantiation_name, const SourceLocation & location, zxtest::internal::ValueProvider<ParamType> & provider, std::function<std::string (zxtest::TestParamInfo<ParamType>)> name_fn)
Defined at line 225 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Runner * GetInstance ()
Returns process shared |Runner| instance.
Defined at line 236 of file ../../zircon/system/ulib/zxtest/runner.cc
void NotifyAssertion (const Assertion & assertion)
Provides an entry point for assertions. The runner will propagate the assertion to the
interested parties. This is needed in a global scope, because helper methods do not have
access to a |Test| instance and legacy tests are not part of a Fixture, but wrapped by one.
If this is called without any test running, it will have no effect.
Defined at line 227 of file ../../zircon/system/ulib/zxtest/runner.cc
void SkipCurrent (const Message & message)
Tells the runner to skip the current test. The runner will propagate the message to
interested parties. See NotifyAssertion above for more explanation as to why this is in
global scope.
Defined at line 231 of file ../../zircon/system/ulib/zxtest/runner.cc
const RunnerSummary & summary ()
Defined at line 251 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
const TestInfo & GetTestInfo (const TestRef & test_ref)
Defined at line 253 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void AddGlobalTestEnvironment (std::unique_ptr<Environment> environment)
Adds an environment to be set up and tear down for each iteration.
Defined at line 258 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
bool IsSkipped ()
Returns true if the current test is skipped.
Defined at line 274 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
bool CurrentTestHasFatalFailures ()
Returns true if the current test should be aborted. This happens as a result of a fatal
failure.
Defined at line 278 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
bool CurrentTestHasFailures ()
Returns whether the current test has experienced any type of failure.
Defined at line 281 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
int random_seed ()
Defined at line 283 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void AddObserver (LifecycleObserver * observer)
Defined at line 285 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
const Options & options ()
Set of options currently in use. By default |Runner::kDefaultOptions| will be returned.
Defined at line 288 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void NotifyFatalError ()
Notify the runner that the test is in a bad state, and should attempt to exit. This means
end test execution.
Defined at line 292 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Reporter * mutable_reporter ()
Returns a pointer to the |LogSink| where the |reporter_| is running to.
Defined at line 295 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
bool IsRunning ()
Returns true if the runner is currently executing tests.
Defined at line 298 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void EnableAsserts ()
Defined at line 300 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void DisableAsserts ()
Defined at line 301 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void PushTrace (zxtest::Message * trace)
Defined at line 303 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void PopTrace ()
Defined at line 304 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
cpp20::span<zxtest::Message *> GetScopedTraces ()
Defined at line 306 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Records
Friends
class RunnerTestPeer