Macro sophia_api::test_dataset_impl
source · macro_rules! test_dataset_impl { ($dataset_impl: ident) => { ... }; ($module_name: ident, $dataset_impl: ident) => { ... }; ($module_name: ident, $dataset_impl: ident, $is_set: expr) => { ... }; ($module_name: ident, $dataset_impl: ident, $is_set: expr, $is_gen: expr) => { ... }; ($module_name: ident, $dataset_impl: ident, $is_set: expr, $is_gen: expr, $dataset_collector: path) => { ... }; ($module_name: ident, $dataset_impl: ident, $is_set: expr, $is_gen: expr, $dataset_collector: path, { $($mt:tt)* }) => { ... }; }
Expand description
Generate a test suite for an implementation of
Dataset
, CollectibleDataset
and MutableDataset
.
If your type only implements Dataset
and CollectibleDataset
,
you should use test_immutable_dataset_impl
instead.
This macro is only available when the feature test_macro
is enabled.
It accepts the following parameters:
module_name
: the name of the module to generate (defaults totest
);dataset_impl
: the type to test, implementingDataset
,CollectibleDataset
andMutableDataset
;is_set
: a Boolean, indicating ifdataset_impl
implementsSetDataset
(defaults totrue
);is_gen
: a Boolean, indicating ifdataset_impl
supports the generalized model (defaults totrue
).dataset_collector
: a function used to create an empty instance ofdataset_impl
(defaults todataset_impl::from_quad_source
);mt
is used internally, do not touch it…