Add some additional tests. #141

pull gmaxwell wants to merge 2 commits into bitcoin-core:master from gmaxwell:more_tests changing 1 files +251 −3
  1. gmaxwell commented at 8:50 AM on December 8, 2014: contributor

    No description provided.

  2. Add some additional tests. 8d11164bc0
  3. Add a few more additional tests. 7c6fed2857
  4. in src/tests.c:None in 3909a16eca outdated
     514 | +    secp256k1_fe_t y;
     515 | +    secp256k1_fe_t z;
     516 | +    secp256k1_fe_t q;
     517 | +    secp256k1_fe_t fe5;
     518 | +    CHECK(secp256k1_fe_set_b32(&fe5, f32_5));
     519 | +    for (int i=0; i<5*count; i++) {
    


    sipa commented at 4:32 PM on December 8, 2014:

    Some comments would be welcome.


    gmaxwell commented at 5:16 PM on December 8, 2014:

    added

  5. in src/tests.c:None in 3909a16eca outdated
     525 | +        secp256k1_fe_add(&z,&y);
     526 | +        secp256k1_fe_normalize(&z);
     527 | +        secp256k1_fe_cmov(&z, &x, 0);
     528 | +        CHECK(secp256k1_fe_equal(&x, &z) == 0);
     529 | +        CHECK(secp256k1_fe_cmp_var(&x, &z) != 0);
     530 | +        secp256k1_fe_cmov(&y, &x, 1);
    


    sipa commented at 4:34 PM on December 8, 2014:

    Test equality between x and y after this line?


    gmaxwell commented at 4:59 PM on December 8, 2014:

    Sure, I can make it explicit. The code below fails if the cmov doesn't work, already... but nicer if the failure is more complete/obvious.

  6. sipa commented at 12:36 AM on December 9, 2014: contributor

    ACK

  7. sipa merged this on Dec 9, 2014
  8. sipa closed this on Dec 9, 2014

  9. sipa referenced this in commit ee1eaa792d on Dec 9, 2014
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me