Skip to content

Commit

Permalink
Added tests for Serializable impls of ExtendedNielsPoint and `Aff…
Browse files Browse the repository at this point in the history
…ineNielsPoint`
  • Loading branch information
d-sonuga committed Dec 5, 2024
1 parent 53715d2 commit a684eb8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/points.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use dusk_bytes::Serializable;
use dusk_jubjub::{AffineNielsPoint, ExtendedNielsPoint};

#[test]
fn affine_niels_point_encoding() {
let point = AffineNielsPoint::identity();
assert_eq!(point, AffineNielsPoint::from_bytes(&point.to_bytes()).unwrap());
}

#[test]
fn extended_niels_point_encoding() {
let point = ExtendedNielsPoint::identity();
assert_eq!(point, ExtendedNielsPoint::from_bytes(&point.to_bytes()).unwrap());
}

0 comments on commit a684eb8

Please sign in to comment.