File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/crypto/src/bls12_318 Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -195,17 +195,21 @@ pub fn bls12_381_g2_is_identity(g2: &[u8; BLS12_381_G2_POINT_LEN]) -> Result<boo
195
195
196
196
#[ cfg( test) ]
197
197
mod tests {
198
+ use crate :: { BLS12_381_G1_GENERATOR_COMPRESSED , BLS12_381_G2_GENERATOR_COMPRESSED } ;
199
+
198
200
use super :: * ;
199
201
use hex_literal:: hex;
200
202
201
203
#[ test]
202
204
fn g1_generator_works ( ) {
203
- let _gen = G1 :: generator ( ) ;
205
+ let generator = G1 :: generator ( ) ;
206
+ assert_eq ! ( generator. to_compressed( ) , BLS12_381_G1_GENERATOR_COMPRESSED ) ;
204
207
}
205
208
206
209
#[ test]
207
210
fn g2_generator_works ( ) {
208
- let _gen = G2 :: generator ( ) ;
211
+ let generator = G2 :: generator ( ) ;
212
+ assert_eq ! ( generator. to_compressed( ) , BLS12_381_G2_GENERATOR_COMPRESSED ) ;
209
213
}
210
214
211
215
#[ test]
You can’t perform that action at this time.
0 commit comments