fn g1_serde_should_be_correct(hex_test_vector: &str, value: G1, test_name: &str) {
    let serialised = g1_to_bytes(&value);
    assert_eq!(
        hex_test_vector,
        hex::encode(&serialised[..]),
        "Serialisation does not match for {}",
        test_name
    );
    let bytes = hex::decode(hex_test_vector).expect("Invalid test vector hex encoding");
    let bytes = &g1_bytes_from_vec(&bytes);
    let parsed = g1_from_bytes(&bytes).expect("Failed to parse test vector");
    assert_eq!(
        parsed, value,
        "Parsed value does not match for {}",
        test_name
    );
}
/// Verifies that conversions between a value and a test vector work as
/// expected.
Verifies that conversions between a value and a test vector work as
expected.
Verifies that conversions between a value and a test vector work as expected .
fn g1_serde_should_be_correct(hex_test_vector: &str, value: G1, test_name: &str) {
    let serialised = g1_to_bytes(&value);
    assert_eq!(
        hex_test_vector,
        hex::encode(&serialised[..]),
        "Serialisation does not match for {}",
        test_name
    );
    let bytes = hex::decode(hex_test_vector).expect("Invalid test vector hex encoding");
    let bytes = &g1_bytes_from_vec(&bytes);
    let parsed = g1_from_bytes(&bytes).expect("Failed to parse test vector");
    assert_eq!(
        parsed, value,
        "Parsed value does not match for {}",
        test_name
    );
}
fn g1_serde_should_be_correct ( hex_test_vector : & str , value : G1 , test_name : & str ) { let serialised = g1_to_bytes ( & value ) ; assert_eq ! ( hex_test_vector hex encode ( serialised [ ] ) " " test_name ) ; let bytes = hex :: decode ( hex_test_vector ) . expect ( " " ) ; let bytes = & g1_bytes_from_vec ( & bytes ) ; let parsed = g1_from_bytes ( & bytes ) . expect ( " " ) ; assert_eq ! ( parsed value " " test_name ) ; }
Verifies that conversions between a value and a test vector work as
expected.
Verifies that conversions between a value and a test vector work as expected .
hex_test_vector
&str
value
G1
test_name
&str
hex_test_vector
&str
value
G1
test_name
&str