Enumerations

enum class TestStatus : std::uint8_t
Name Value
kRunning 0
kPassed 1
kFailed 2
kSkipped 3

Test Status.

Defined at line 14 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/test-driver.h

Records

Functions

  • std::string_view ToStringView (std::string_view str)

    Defined at line 23 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/message.h

  • std::string ToHex (const void * ptr, size_t size)

    Returns a string with the Hex representation of the contents of the buffer pointed by ptr. If

    |ptr| is nullptr, returns "<nullptr>". If |size| is 0 returns

    <empty

    >.

    Defined at line 23 of file ../../zircon/system/ulib/zxtest/message.cc

  • template <typename Actual, typename Expected, typename Comparer>
    bool Compare (const Actual & actual, const Expected & expected, const Comparer & compare)

    Used for delegating an assertion evaluation. to a lambda.

    Defined at line 25 of file ../../zircon/system/ulib/zxtest/include/zxtest/cpp/internal.h

  • std::string_view ToStringView (const char * str)

    We avoid calling std::string_view's constructor of a single `const char*`

    argument, as that will call std::char_traits

    <char

    >::length() which may not

    support nullptrs.

    Defined at line 28 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/message.h

  • std::string_view ToStringView (char * str)

    Defined at line 35 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/message.h

  • template <typename Actual, typename Expected, typename Comparer>
    bool Compare (const Actual * a, const Expected * e, const Comparer & compare)

    Alternative when there exists an implicit conversion to pointer, which allows

    VLAs to be compared.

    Defined at line 37 of file ../../zircon/system/ulib/zxtest/include/zxtest/cpp/internal.h

  • void operator& (Tag , const StreamableBase & )

    Lower precedence operator that returns void, such that the following

    expressions are valid in functions that return void:

    return Tag{}

    &

    StreamableBase{};

    return Tag{}

    &

    StreamableBase{}

    <

    <

    "Stream operators are higher precedence than &";

    Defined at line 38 of file ../../zircon/system/ulib/zxtest/include/zxtest/cpp/streams_helper.h

  • template <auto& status>
    zx_status_t GetStatus (const std::convertible_to<zx_status_t> auto & status)

    Defined at line 41 of file ../../zircon/system/ulib/zxtest/include/zxtest/cpp/internal.h

  • template <typename Stringlike>
    std::enable_if_t<!std::is_convertible_v<Stringlike, nullptr_t>, std::string_view> ToStringView (const Stringlike & str)

    Else, default to assuming that std::data will yield a C string.

    Defined at line 41 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/message.h

  • template <typename Stringlike>
    std::enable_if_t<! std::is_convertible_v<Stringlike, nullptr_t>, std::string_view> ToStringView (const Stringlike & str)

    Else, default to assuming that std::data will yield a C string.

    Defined at line 41 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/message.h

  • template <typename Stringlike>
    std::enable_if_t<std::is_convertible_v<Stringlike, nullptr_t>, std::string_view> ToStringView (const Stringlike & str)

    Defined at line 49 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/message.h

  • std::string_view PrintVolatile (const volatile void * ptr, size_t size)

    It's not necessarily safe to do pointer arithmetic on volatiles because of alignment issues, so

    just print whether the pointer is nullptr/empty/normal.

    Defined at line 53 of file ../../zircon/system/ulib/zxtest/message.cc

  • template <typename Actual, typename Expected, typename CompareOp, typename PrintActual, typename PrintExpected, typename DescGenerator>
    bool EvaluateStatusCondition (const Actual & actual, const Expected & expected, const char * actual_symbol, const char * expected_symbol, const zxtest::SourceLocation & location, bool is_fatal, const DescGenerator & description, const CompareOp & compare, const PrintActual & print_actual, const PrintExpected & print_expected)

    Evaluates a condition and returns true if it is satisfied. If it is not, will create an assertion

    and notify the global runner instance.

    Defined at line 65 of file ../../zircon/system/ulib/zxtest/include/zxtest/cpp/internal.h

  • template <typename... A, typename B>
    auto Combine (::zxtest::internal::ValueProvider<std::tuple<A...>> a, ::zxtest::internal::ValueProvider<B> b)

    Internal combine handler.

    See above for a note about why there are internal handlers.

    Defined at line 82 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/values.h

  • template <typename Actual, typename Expected, typename CompareOp, typename PrintActual, typename PrintExpected, typename DescGenerator>
    bool EvaluateCondition (const Actual & actual, const Expected & expected, const char * actual_symbol, const char * expected_symbol, const zxtest::SourceLocation & location, bool is_fatal, const DescGenerator & description, const CompareOp & compare, const PrintActual & print_actual, const PrintExpected & print_expected)

    Evaluates a condition and returns true if it is satisfied. If it is not, will create an assertion

    and notify the global runner instance.

    Defined at line 88 of file ../../zircon/system/ulib/zxtest/include/zxtest/cpp/internal.h

  • template <typename... A, typename... B>
    auto Combine (::zxtest::internal::ValueProvider<std::tuple<A...>> a, ::zxtest::internal::ValueProvider<std::tuple<B...>> b)

    Internal combine handler.

    See above for a note about why there are internal handlers.

    Defined at line 102 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/values.h

  • template <typename T>
    const T * ToPointer (const T * value)

    Force Array to become a pointer, has no effect in pointers.

    Defined at line 107 of file ../../zircon/system/ulib/zxtest/include/zxtest/cpp/internal.h

  • template <typename Actual, typename Expected, typename CompareOp, typename PrintActual, typename PrintExpected>
    std::unique_ptr<StreamableAssertion> EvaluateConditionForStream (const Actual & actual, const Expected & expected, const char * actual_symbol, const char * expected_symbol, const zxtest::SourceLocation & location, bool is_fatal, const CompareOp & compare, const PrintActual & print_actual, const PrintExpected & print_expected)

    Evaluates a condition and returns true if it is satisfied. If it is not, will create an assertion

    and notify the global runner instance.

    Defined at line 110 of file ../../zircon/system/ulib/zxtest/include/zxtest/cpp/streams_helper.h

  • template <typename Atypename Btypename... ProviderType>
    auto Combine (::zxtest::internal::ValueProvider<A> a, ::zxtest::internal::ValueProvider<B> b, ProviderType &&... providers)

    Internal combine handler.

    See above for a note about why there are internal handlers.

    Defined at line 122 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/values.h