@@ -17,8 +17,7 @@ use std::path::Path;
1717fn test_facts ( all_facts : & AllFacts , algorithms : & [ Algorithm ] ) {
1818 let naive = Output :: compute ( all_facts, Algorithm :: Naive , true ) ;
1919
20- // Check that the "naive errors" are a subset of the "insensitive
21- // ones".
20+ // Check that the "naive errors" are a subset of the "insensitive ones".
2221 let insensitive = Output :: compute ( all_facts, Algorithm :: LocationInsensitive , false ) ;
2322 for ( naive_point, naive_loans) in & naive. errors {
2423 match insensitive. errors . get ( & naive_point) {
@@ -77,18 +76,37 @@ fn test_facts(all_facts: &AllFacts, algorithms: &[Algorithm]) {
7776 for & optimized_algorithm in algorithms {
7877 println ! ( "Algorithm {:?}" , optimized_algorithm) ;
7978 let opt = Output :: compute ( all_facts, optimized_algorithm, true ) ;
80- // TMP: until we reach our correctness goals, deactivate some comparisons between variants
81- // assert_equal(&naive.loan_live_at, &opt.loan_live_at);
82- assert_equal ( & naive. errors , & opt. errors ) ;
83- assert_equal ( & naive. subset_errors , & opt. subset_errors ) ;
84- assert_equal ( & naive. move_errors , & opt. move_errors ) ;
79+ assert_equal (
80+ & naive. loan_live_at ,
81+ & opt. loan_live_at ,
82+ "naive vs opt loan_live_at" ,
83+ ) ;
84+ assert_equal ( & naive. errors , & opt. errors , "naive vs opt errors" ) ;
85+ assert_equal (
86+ & naive. subset_errors ,
87+ & opt. subset_errors ,
88+ "naive vs opt subset_errors" ,
89+ ) ;
90+ assert_equal (
91+ & naive. move_errors ,
92+ & opt. move_errors ,
93+ "naive vs opt move_errors" ,
94+ ) ;
8595 }
8696
8797 // The hybrid algorithm gets the same errors as the naive version
8898 let opt = Output :: compute ( all_facts, Algorithm :: Hybrid , true ) ;
89- assert_equal ( & naive. errors , & opt. errors ) ;
90- assert_equal ( & naive. subset_errors , & opt. subset_errors ) ;
91- assert_equal ( & naive. move_errors , & opt. move_errors ) ;
99+ assert_equal ( & naive. errors , & opt. errors , "naive vs hybrid errors" ) ;
100+ assert_equal (
101+ & naive. subset_errors ,
102+ & opt. subset_errors ,
103+ "naive vs hybrid subset_errors" ,
104+ ) ;
105+ assert_equal (
106+ & naive. move_errors ,
107+ & opt. move_errors ,
108+ "naive vs hybrid move_errors" ,
109+ ) ;
92110}
93111
94112fn test_fn ( dir_name : & str , fn_name : & str , algorithm : Algorithm ) -> Result < ( ) , Box < dyn Error > > {
@@ -155,7 +173,7 @@ fn test_insensitive_errors() -> Result<(), Box<dyn Error>> {
155173 expected. insert ( Point :: from ( 24 ) , vec ! [ Loan :: from( 1 ) ] ) ;
156174 expected. insert ( Point :: from ( 50 ) , vec ! [ Loan :: from( 2 ) ] ) ;
157175
158- assert_equal ( & insensitive. errors , & expected) ;
176+ assert_equal ( & insensitive. errors , & expected, "insensitive errors" ) ;
159177 Ok ( ( ) )
160178}
161179
0 commit comments