Expand description
Utilities to assert the structure of a DiagnosticsHierarchy.
Pretty much the useful assert_data_tree
macro
plus some utilities for it.
Macros§
- Macro to simplify tree matching in tests. The first argument is the actual tree passed as a
DiagnosticsHierarchyGetter
(e.g. aDiagnosticsHierarchy
or anInspector
). The second argument is given totree_assertion!
which creates aTreeAssertion
to validate the tree. - Macro to check a hierarchy with a nice JSON diff. The syntax of the
expected
value is the same as that ofhierarchy!
, and essentially the same asassert_data_tree!
, except that partial tree matching is not supported (i.e. the keywordcontains
). - This macro simplifies creating diagnostics hierarchies, to remove the need of writing multiple nested hierarchies and manually writing all properties.
- Macro to simplify creating
TreeAssertion
s. Commonly used indirectly through the second parameter ofassert_data_tree!
. Seeassert_data_tree!
for more usage examples.
Structs§
- A PropertyAssertion that passes for any Boolean.
- A PropertyAssertion that passes for any Bytes.
- A PropertyAssertion that passes for any Double.
- A PropertyAssertion that passes for any Int.
- A PropertyAssertion that passes for any Int, Uint, or Double.
- A PropertyAssertion that always passes
- A PropertyAssertion that passes for any String.
- A PropertyAssertion that passes for any Uint.
- A hierarchy of nodes representing structured data, such as Inspect or structured log data.
- An assertion for a histogram property.
- A PropertyAssertion that passes for non-zero, signed integers.
- A PropertyAssertion that passes for non-zero, unsigned integers.
- Struct for matching against a Data tree (DiagnosticsHierarchy).
Traits§
- A type which can function as a “view” into a diagnostics hierarchy, optionally allocating a new instance to service a request.
- Trait implemented by types that can act as properies for assertion.