@@ -133,21 +133,29 @@ mod instance_validation {
133133
134134 // The following relation is trivially invalid.
135135 // That is, we know that no witness will ever satisfy it.
136- // In this case, we're letting the prover fail and build the relation anyways.
137136 let mut linear_relation = LinearRelation :: < G > :: new ( ) ;
138137 let B_var = linear_relation. allocate_element ( ) ;
139138 let C_var = linear_relation. allocate_eq ( B_var ) ;
140139 linear_relation. set_elements ( [ ( B_var , B ) , ( C_var , C ) ] ) ;
141- assert ! ( linear_relation. canonical( ) . is_ok( ) ) ;
140+ assert ! ( linear_relation
141+ . canonical( )
142+ . err( )
143+ . unwrap( )
144+ . message
145+ . contains( "trivially false constraint" ) ) ;
142146
143147 // Also in this case, we know that no witness will ever satisfy the relation.
144- // Also here, the relation is built even though the prover will never be able to give a valid proof for it.
145148 // X != B * pub_scalar + A * 3
146149 let mut linear_relation = LinearRelation :: < G > :: new ( ) ;
147150 let [ B_var , A_var ] = linear_relation. allocate_elements ( ) ;
148151 let X_var = linear_relation. allocate_eq ( B_var * pub_scalar + A_var * Scalar :: from ( 3 ) ) ;
149152 linear_relation. set_elements ( [ ( B_var , B ) , ( A_var , A ) , ( X_var , X ) ] ) ;
150- assert ! ( linear_relation. canonical( ) . is_ok( ) ) ;
153+ assert ! ( linear_relation
154+ . canonical( )
155+ . err( )
156+ . unwrap( )
157+ . message
158+ . contains( "trivially false constraint" ) ) ;
151159
152160 // The following relation is valid and should pass.
153161 let mut linear_relation = LinearRelation :: < G > :: new ( ) ;
0 commit comments