complement_test

Macro complement_test 

Source
macro_rules! complement_test {
    (
        name: $name:ident,
        problem_a: $prob_a:ty,
        problem_b: $prob_b:ty,
        test_graphs: [
            $(($n:expr, [$($edge:expr),*])),* $(,)?
        ]
    ) => { ... };
}
Expand description

Generate tests for verifying complement relationships between problems.

§Example

complement_test! {
    name: is_vc_complement,
    problem_a: IndependentSet<i32>,
    problem_b: VertexCovering<i32>,
    test_graphs: [
        (3, [(0, 1), (1, 2)]),
        (4, [(0, 1), (1, 2), (2, 3), (0, 3)]),
    ]
}