macro_rules! test_immutable_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) => { ... }; }
Expand description
Generate a test suite for an implementation of
Dataset
and CollectibleDataset
.
If your type also implements MutableDataset
,
you should use test_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
andCollectibleDataset
;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 collect quads into an instance ofdataset_impl
(defaults todataset_impl::from_quad_source
);