class TestCase
Defined at line 23 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
Represents a collection of |TestInfo| with a unique name. Here all the logic for
unique test definition per testcase exists. Also provides the mechanisms for
|Test::SetUpTestCase| and |Test::TearDownTestCase|.
Public Methods
void TestCase (const fbl::String & name, internal::SetUpTestCaseFn set_up, internal::TearDownTestCaseFn tear_down)
Defined at line 27 of file ../../zircon/system/ulib/zxtest/test-case.cc
void TestCase ()
Defined at line 29 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
void TestCase (const TestCase & )
Defined at line 32 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
void TestCase (TestCase && )
Defined at line 32 of file ../../zircon/system/ulib/zxtest/test-case.cc
void ~TestCase ()
Defined at line 33 of file ../../zircon/system/ulib/zxtest/test-case.cc
size_t TestCount ()
Returns the number of registered tests.
Defined at line 35 of file ../../zircon/system/ulib/zxtest/test-case.cc
TestCase & operator= (const TestCase & )
Defined at line 36 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
TestCase & operator= (TestCase && )
Defined at line 37 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
size_t MatchingTestCount ()
Returns the number of registered tests, matching a given filter.
Defined at line 37 of file ../../zircon/system/ulib/zxtest/test-case.cc
void Filter (FilterFn filter)
Filters the tests from |test_infos_| that do
Defined at line 39 of file ../../zircon/system/ulib/zxtest/test-case.cc
void Shuffle (std::uint32_t random_seed)
Shuffles the test execution order |selected_indexes_|.
Defined at line 51 of file ../../zircon/system/ulib/zxtest/test-case.cc
void UnShuffle ()
Restores the test execution order to match registration order. This does
not remove the effects of filter.
Defined at line 60 of file ../../zircon/system/ulib/zxtest/test-case.cc
const fbl::String & name ()
Returns the name of test case.
Defined at line 63 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
const TestInfo & GetTestInfo (size_t index)
Defined at line 65 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
bool RegisterTest (const fbl::String & name, const SourceLocation & location, internal::TestFactory factory)
Returns true if registration of |test_info| into this testcase was successful.
Defined at line 65 of file ../../zircon/system/ulib/zxtest/test-case.cc
const TestInfo & GetMatchingTestInfo (size_t index)
Returns TestInfo of the registered test that matches the filter, at a given
offset. If All tests match the filter, then it is equivalent to |TestCase::GetTestInfo|.
Defined at line 69 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
void SetReturnOnFailure (bool should_return_on_failure)
Test case will return upon encountering the first test failure.
Defined at line 74 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-case.h
void Run (LifecycleObserver * lifecycle_observer, internal::TestDriver * driver)
Executes all registered tests with the provided |driver|.
Defined at line 80 of file ../../zircon/system/ulib/zxtest/test-case.cc