macro_rules! test_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) => { ... };
    ($module_name: ident, $graph_impl: ident, $is_set: expr, $is_gen: expr, $graph_collector: path, { $($mt:tt)* }) => { ... };
}
Expand description

Generate a test suite for an implementation of Graph, CollectibleGraph and MutableGraph.

If your type only implements Graph and CollectibleGraph, you should use test_immutable_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 to test);
  • graph_impl: the type to test, implementing Graph, CollectibleGraph and MutableGraph;
  • is_set: a boolean, indicating if graph_impl implements SetGraph (defaults to true);
  • is_gen: a boolean, indicating if graph_impl supports the generalized model (defaults to true);
  • graph_collector: a function used to collect triples into an instance of graph_impl (defaults to graph_impl::from_triple_source);
  • mt is used internally, do not touch it…