Records
-
class AsContainerMatcherP -
class GotExceptionMatcher -
class GotExceptionMatcherP -
class HasRegistersMatcher -
class Hex -
class IsPageFaultMatcher -
class IsPageFaultMatcherP -
class IsSingleStepMatcher -
class IsTrapMatcher -
class WithFpMatcherP -
class WithPcMatcherP -
class WithReturnAddressMatcherP -
class WithReturnValueMatcherP -
class WithScspMatcherP -
class WithSpMatcherP -
class WithTpMatcherP -
class WithTypeMatcherP
Functions
-
RegistersContainer RegistersAsContainer (const zx_thread_state_general_regs_t & )Defined at line 18 of file ../../src/lib/captive-thread/testing/registers-as-container.cc
-
template <auto* result_listener>CaptiveThread * MatcherThread (zx::result<CaptiveThread *> result, auto * result_listener)This is a helper used by some matchers below to match on values of type
zx::result
<CaptiveThread
*> as returned by CaptiveThread::WaitForException().
Defined at line 26 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
GotExceptionMatcher GotException ()This matches a CaptiveThread::WaitForException() return value when the
thread has stopped in an exception.
Defined at line 36 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>GotExceptionMatcherP<matcher_type> GotException (matcher_type gmock_p0)With another matcher as argument, it matches an exception with whose
zx_exception_report_t is matched by that other matcher.
Defined at line 46 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <auto* result_listener>const zx_exception_report_t * MatcherExceptionReport (const zx_exception_report_t & report, auto * result_listener)This is a helper used by some matchers below to match on values either of
type zx_exception_report_t when the matcher is passed into GotException(),
or of the type GotException() itself matches on, so as to implicitly wrap
GotException() around that matcher.
Defined at line 61 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <auto* result_listener>std::optional<zx_exception_report_t> MatcherExceptionReport (zx::result<CaptiveThread *> result, auto * result_listener)Defined at line 66 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
RegistersContainer RegistersAsContainer (const zx_thread_state_fp_regs_t & ) -
RegistersContainer RegistersAsContainer (const zx_thread_state_vector_regs_t & ) -
RegistersContainer RegistersAsContainer (const zx_thread_state_debug_regs_t & ) -
void PrintTo (const RegistersContainer & , std::ostream * )Defined at line 9 of file ../../src/lib/captive-thread/testing/registers-as-container.cc
-
template <>WithTypeMatcherP<matcher_type> WithType (matcher_type gmock_p0)This is a matcher on zx_exception_report_t that wraps a matcher on the
zx_excp_type_t value.
Defined at line 82 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
IsTrapMatcher IsTrap ()This is a composite matcher used inside GotException() to match the
canonical exception type induced by __builtin_trap() (and many other ways).
Defined at line 97 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
IsPageFaultMatcher IsPageFault ()This is a composite matcher used inside GotException() to match any page
fault.
Defined at line 103 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>IsPageFaultMatcherP<matcher_type> IsPageFault (matcher_type gmock_p0)This is a composite matcher used inside GotException() to match a page fault
whose fault address is matched by the argument matcher.
Defined at line 109 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
IsSingleStepMatcher IsSingleStep ()Defined at line 123 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
GotExceptionMatcherP<captive_thread::testing::IsSingleStepMatcher> GotSingleStep ()Defined at line 127 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <RegistersType Regs = zx_thread_state_general_regs_t, class Matcher>auto HasRegisters (Matcher matcher)Defined at line 180 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <RegistersType Regs = zx_thread_state_general_regs_t>auto HasRegisters ()Defined at line 185 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>WithPcMatcherP<matcher_type> WithPc (matcher_type gmock_p0)WithPc(m) matches zx_thread_state_general_regs_t with PC that m matches.
It's used inside HasRegisters(). WithSp() and WithTp() are similar for the
stack pointer and thread pointer, respectively.
Defined at line 192 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>WithSpMatcherP<matcher_type> WithSp (matcher_type gmock_p0)Defined at line 195 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>WithFpMatcherP<matcher_type> WithFp (matcher_type gmock_p0)Defined at line 198 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>WithReturnAddressMatcherP<matcher_type> WithReturnAddress (matcher_type gmock_p0)Defined at line 201 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>WithScspMatcherP<matcher_type> WithScsp (matcher_type gmock_p0)Defined at line 205 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>WithTpMatcherP<matcher_type> WithTp (matcher_type gmock_p0)Defined at line 209 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>WithReturnValueMatcherP<matcher_type> WithReturnValue (matcher_type gmock_p0)Defined at line 212 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
void PrintTo (const Hex & hex, std::ostream * os)Defined at line 227 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
std::ostream & operator<< (std::ostream & os, const Hex & hex)Defined at line 232 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
Hex AsHex (uint64_t value)Defined at line 236 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <RegistersType Regs = zx_thread_state_general_regs_t>RegistersContainer RegistersAsContainer (CaptiveThread & thread)Defined at line 247 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
template <>AsContainerMatcherP<matcher_type> AsContainer (matcher_type gmock_p0)Defined at line 254 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h
-
std::ostream & operator<< (std::ostream & os, const RegistersContainer & regs)Defined at line 262 of file ../../src/lib/captive-thread/testing/include/lib/captive-thread/testing/matchers.h