Namespaces
Functions
-
fpromise::promise<std::vector<std::string>> ReadAllChildNames (TreeNameIteratorClient & iter)Collect all of the names of the children of the `Inspector` managed by the tree server
which started the TreeNameIterator server. Essentially, it drains the iterator.
Defined at line 87 of file ../../sdk/lib/inspect/component/cpp/testing.cc
-
fpromise::promise<Hierarchy> ReadFromTree (TreeClient & tree, async_dispatcher_t * dispatcher)Turn a Tree handle into a complete hierarchy, including lazy children/values.
This function uses `ZX_ASSERT` if it encounters FIDL errors.
Defined at line 120 of file ../../sdk/lib/inspect/component/cpp/testing.cc
-
::testing::Matcher<const NodeValue &> NameMatches (std::string name)Matches against the name of an Inspect Node.
Example:
EXPECT_THAT(node, NameMatches("objects"));
Defined at line 123 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const NodeValue &> PropertyList (PropertiesMatcher matcher)Matches against the property list of an Inspect Node.
Example:
EXPECT_THAT(node, AllOf(PropertyList(::testing::IsEmpty())));
Defined at line 127 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const PropertyValue &> StringIs (const std::string & name, ::testing::Matcher<std::string> matcher)Matches a particular StringProperty with the given name using the given matcher.
Defined at line 131 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const PropertyValue &> ByteVectorIs (const std::string & name, ::testing::Matcher<std::vector<uint8_t>> matcher)Matches a particular ByteVectorProperty with the given name using the given matcher.
Defined at line 140 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
template <typename T>size_t ComputeLinearBucketIndex (T floor, T step_size, size_t total_buckets, T value)Computes the bucket index for a value in a linear histogram.
|total_buckets| is the number of buckets initially defined when the histogram
property was created plus 2 (overflow and underflow).
Defined at line 148 of file ../../sdk/lib/inspect/testing/cpp/inspect.h
-
::testing::Matcher<const PropertyValue &> IntIs (const std::string & name, ::testing::Matcher<int64_t> matcher)Matches a particular IntProperty with the given name using the given matcher.
Defined at line 149 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const PropertyValue &> UintIs (const std::string & name, ::testing::Matcher<uint64_t> matcher)Matches a particular UintProperty with the given name using the given matcher.
Defined at line 158 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
template <typename T>size_t ComputeExponentialBucketIndex (T floor, T initial_step, T step_multiplier, size_t total_buckets, T value)Computes the bucket index for a value in an exponential histogram.
|total_buckets| is the number of buckets initially defined when the histogram
property was created plus 2 (overflow and underflow).
Defined at line 161 of file ../../sdk/lib/inspect/testing/cpp/inspect.h
-
::testing::Matcher<const PropertyValue &> DoubleIs (const std::string & name, ::testing::Matcher<double> matcher)Matches a particular DoubleProperty with the given name using the given matcher.
Defined at line 167 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const PropertyValue &> BoolIs (const std::string & name, ::testing::Matcher<bool> matcher)Matches a particular BoolProperty with the given name using the given matcher.
Defined at line 176 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
template <typename T>std::vector<T> CreateExpectedLinearHistogramContents (T floor, T step_size, size_t buckets, const std::vector<T> & values)Creates the expected contents of a linear histogram given parameters and
values.
Defined at line 177 of file ../../sdk/lib/inspect/testing/cpp/inspect.h
-
::testing::Matcher<const PropertyValue &> IntArrayIs (const std::string & name, ::testing::Matcher<std::vector<int64_t>> )Matches the values of an integer array.
Defined at line 185 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const PropertyValue &> UintArrayIs (const std::string & name, ::testing::Matcher<std::vector<uint64_t>> )Matches the values of an unsigned integer array.
Defined at line 194 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
template <typename T>std::vector<T> CreateExpectedExponentialHistogramContents (T floor, T initial_step, T step_multiplier, size_t buckets, const std::vector<T> & values)Creates the expected contents of an exponential histogram given parameters
and values.
Defined at line 196 of file ../../sdk/lib/inspect/testing/cpp/inspect.h
-
::testing::Matcher<const PropertyValue &> DoubleArrayIs (const std::string & name, ::testing::Matcher<std::vector<double>> )Matches the values of a double width floating point number array.
Defined at line 203 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const PropertyValue &> StringArrayIs (const std::string & name, const ::testing::Matcher<std::vector<std::string>> & matcher)Matches the values of a string array.
Defined at line 212 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const PropertyValue &> ArrayDisplayFormatIs (ArrayDisplayFormat format)Matches the display format of a numeric array value.
Defined at line 221 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const Hierarchy &> NodeMatches (NodeMatcher matcher)Matcher for the object inside an Hierarchy.
Defined at line 237 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const Hierarchy &> ObjectMatches (NodeMatcher matcher)DEPRECATED: Compatibility for downstream clients.
TODO(https://fxbug.dev/42122386): Remove this.
Defined at line 241 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc
-
::testing::Matcher<const Hierarchy &> PrefixPathMatches (PrefixPathMatcher matcher)Matcher for the base path inside an Hierarchy.
-
::testing::Matcher<const Hierarchy &> ChildrenMatch (ChildrenMatcher matcher)Matcher for the children of the object in an Hierarchy.
Defined at line 245 of file ../../sdk/lib/inspect/testing/cpp/inspect.cc