|
|
@ -453,16 +453,17 @@ fn are_query_results_isomorphic( |
|
|
|
|
|
|
|
|
|
|
|
fn compare_solutions(expected: &[(Variable, Term)], actual: &[(Variable, Term)]) -> bool { |
|
|
|
fn compare_solutions(expected: &[(Variable, Term)], actual: &[(Variable, Term)]) -> bool { |
|
|
|
let mut bnode_map = HashMap::new(); |
|
|
|
let mut bnode_map = HashMap::new(); |
|
|
|
expected.iter().zip(actual).all( |
|
|
|
expected.len() == actual.len() |
|
|
|
move |((expected_variable, expected_value), (actual_variable, actual_value))| { |
|
|
|
&& expected.iter().zip(actual).all( |
|
|
|
expected_variable == actual_variable |
|
|
|
move |((expected_variable, expected_value), (actual_variable, actual_value))| { |
|
|
|
&& compare_terms( |
|
|
|
expected_variable == actual_variable |
|
|
|
expected_value.as_ref(), |
|
|
|
&& compare_terms( |
|
|
|
actual_value.as_ref(), |
|
|
|
expected_value.as_ref(), |
|
|
|
&mut bnode_map, |
|
|
|
actual_value.as_ref(), |
|
|
|
) |
|
|
|
&mut bnode_map, |
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
}, |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fn compare_terms<'a>( |
|
|
|
fn compare_terms<'a>( |
|
|
|