Skip to content

Commit

Permalink
tests for adding same point equals doubling
Browse files Browse the repository at this point in the history
  • Loading branch information
querolita committed Jan 28, 2025
1 parent 3dd6b5a commit 8e77d3a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib/provable/test/twisted-curve.unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,17 @@ for (let Curve of curves) {
(p, s) => CurveTwisted.scale(s, p, Curve),
`${Curve.name} scale`
);

// test adding same point equals doubling
equivalentProvable({ from: [point], to: point, verbose: true })(
(p) => Curve.add(p, p),
(p) => CurveTwisted.double(p, Curve),
`${Curve.name} adding same point equals doubling`
);

equivalentProvable({ from: [point], to: point, verbose: true })(
(p) => Curve.double(p),
(p) => CurveTwisted.add(p, p, Curve),
`${Curve.name} doubling equals adding same point`
);
}

0 comments on commit 8e77d3a

Please sign in to comment.