macro_rules! test_immutable_graph_impl { ($graph_impl: ident) => { ... }; ($module_name: ident, $graph_impl: ident) => { ... }; ($module_name: ident, $graph_impl: ident, $is_set: expr) => { ... }; ($module_name: ident, $graph_impl: ident, $is_set: expr, $is_gen: expr) => { ... }; ($module_name: ident, $graph_impl: ident, $is_set: expr, $is_gen: expr, $graph_collector: path) => { ... }; }
Expand description
Generate a test suite for an implementation of
Graph
and CollectibleGraph
.
If your type also implements MutableGraph
,
you should use test_graph_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
);graph_impl
: the type to test, implementingGraph
andCollectibleGraph
;is_set
: a boolean, indicating ifgraph_impl
implementsSetGraph
(defaults totrue
);is_gen
: a boolean, indicating ifgraph_impl
supports the generalized model (defaults totrue
);graph_collector
: a function used to collect triples into an instance ofgraph_impl
(defaults tograph_impl::from_triple_source
);