@@ -17,6 +17,13 @@ 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
+ #[ cfg( feature = "polonius-souffle" ) ]
21
+ {
22
+ let souffle_naive = Output :: compute ( all_facts, Algorithm :: Naive ( Engine :: Souffle ) , false ) ;
23
+ assert_equal ( & naive. errors , & souffle_naive. errors ) ;
24
+ assert_equal ( & naive. subset_errors , & souffle_naive. subset_errors ) ;
25
+ }
26
+
20
27
// Check that the "naive errors" are a subset of the "insensitive
21
28
// ones".
22
29
let insensitive = Output :: compute ( all_facts, Algorithm :: LocationInsensitive , false ) ;
@@ -82,6 +89,17 @@ fn test_facts(all_facts: &AllFacts, algorithms: &[Algorithm]) {
82
89
assert_equal ( & naive. errors , & opt. errors ) ;
83
90
assert_equal ( & naive. subset_errors , & opt. subset_errors ) ;
84
91
assert_equal ( & naive. move_errors , & opt. move_errors ) ;
92
+
93
+ #[ cfg( feature = "polonius-souffle" ) ]
94
+ if matches ! (
95
+ optimized_algorithm,
96
+ Algorithm :: DatafrogOpt ( Engine :: Datafrog )
97
+ ) {
98
+ let souffle_opt =
99
+ Output :: compute ( all_facts, Algorithm :: DatafrogOpt ( Engine :: Souffle ) , false ) ;
100
+ assert_equal ( & opt. errors , & souffle_opt. errors ) ;
101
+ assert_equal ( & opt. subset_errors , & souffle_opt. subset_errors ) ;
102
+ }
85
103
}
86
104
87
105
// The hybrid algorithm gets the same errors as the naive version
0 commit comments