瀏覽代碼

Update tests to match new subtraction code

Ian Goldberg 7 月之前
父節點
當前提交
aa81399d1a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      sigma_compiler_core/src/sigma/types.rs

+ 2 - 2
sigma_compiler_core/src/sigma/types.rs

@@ -859,13 +859,13 @@ mod tests {
             &vars,
             parse_quote! {(a-(2-3))*(A+(3*4)*A)},
             quote! {
-            (a-(Scalar::from_u128(1u128).neg()))*(A+A*(Scalar::from_u128(12u128))) },
+            (a+(-(Scalar::from_u128(1u128).neg())))*(A+A*(Scalar::from_u128(12u128))) },
         );
         check_tokens(
             &vars,
             parse_quote! {(a-(2-3))*(A+A*(3*4))},
             quote! {
-            (a-(Scalar::from_u128(1u128).neg()))*(A+A*(Scalar::from_u128(12u128))) },
+            (a+(-(Scalar::from_u128(1u128).neg())))*(A+A*(Scalar::from_u128(12u128))) },
         );
 
         // Tests that should fail