@@ -17,6 +17,10 @@ use std::path::Path;
17
17
fn test_facts ( all_facts : & AllFacts , algorithms : & [ Algorithm ] ) {
18
18
let naive = Output :: compute ( all_facts, Algorithm :: Naive ( Engine :: Datafrog ) , true ) ;
19
19
20
+ let souffle_naive = Output :: compute ( all_facts, Algorithm :: Naive ( Engine :: Souffle ) , false ) ;
21
+ assert_equal ( & naive. errors , & souffle_naive. errors ) ;
22
+ assert_equal ( & naive. subset_errors , & souffle_naive. subset_errors ) ;
23
+
20
24
// Check that the "naive errors" are a subset of the "insensitive
21
25
// ones".
22
26
let insensitive = Output :: compute ( all_facts, Algorithm :: LocationInsensitive , false ) ;
@@ -82,6 +86,12 @@ fn test_facts(all_facts: &AllFacts, algorithms: &[Algorithm]) {
82
86
assert_equal ( & naive. errors , & opt. errors ) ;
83
87
assert_equal ( & naive. subset_errors , & opt. subset_errors ) ;
84
88
assert_equal ( & naive. move_errors , & opt. move_errors ) ;
89
+
90
+ if matches ! ( optimized_algorithm, Algorithm :: DatafrogOpt ( Engine :: Datafrog ) ) {
91
+ let souffle_opt = Output :: compute ( all_facts, Algorithm :: DatafrogOpt ( Engine :: Souffle ) , false ) ;
92
+ assert_equal ( & opt. errors , & souffle_opt. errors ) ;
93
+ assert_equal ( & opt. subset_errors , & souffle_opt. subset_errors ) ;
94
+ }
85
95
}
86
96
87
97
// The hybrid algorithm gets the same errors as the naive version
0 commit comments