template <class Traits>
class TestDataItem
Defined at line 108 of file ../../src/lib/zxdump/test-data-holder.h
TestDataHolder
<T
...> holds data from get_info and get_property calls.
Each T is InfoTraits
<
...> or PropertyTraits
<
...>. Get
<T
>() yields a
TestDataItem
<T
>, defined below. Data can be easily checked against
another identically-typed data holder, or individual items can be
checked against other like items.
Public Methods
const auto & operator* ()
Defined at line 110 of file ../../src/lib/zxdump/test-data-holder.h
const auto * operator-> ()
Defined at line 112 of file ../../src/lib/zxdump/test-data-holder.h
void Fill (const typename Traits::type & value)
This fills the item with an explicit value, which might be a span.
Defined at line 115 of file ../../src/lib/zxdump/test-data-holder.h
void Fill (zxdump::Object & object)
This fills the item using get_info / get_property.
Defined at line 124 of file ../../src/lib/zxdump/test-data-holder.h
void Check (const TestDataItem<Traits> & new_item)
Check a new value against this value. For thread and process items this
is usually just doing EXPECT_EQ, expecting both samples to be taken
while the process is suspended and so nothing changes. For job and
kernel values that keep changing, it checks for the new value being
plausible for a sample taken later, e.g. EXPECT_GE for statistics.
Defined at line 135 of file ../../src/lib/zxdump/test-data-holder.h
void Check (const typename Traits::type & new_value)
Check a new raw value rather than another identical TestDataItem.
This has specializations for all the traits types.
Defined at line 139 of file ../../src/lib/zxdump/test-data-holder.h