scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.81k stars 572 forks source link

Cleanup and test gadgetlib2 comparison gadget #110

Closed dcmiddle closed 5 years ago

dcmiddle commented 6 years ago

In gadgetlib2 cleanup the comparison gadget's interface and add a unit test for it.

dcmiddle commented 6 years ago

I can't reproduce the Travis failure. Running in both 16.04 and 14.04 (via dockers) both make check and separately running the test binary itself pass. Is it possible to run the test binary in the CI environment to get more output? Or if someone else is willing to try the branch it should work just like this…

/project/libsnark/build# make check
…
      Start  6: gadgetlib2_gadget_test
 6/23 Test  #6: gadgetlib2_gadget_test ...........................   Passed    0.02 sec
…
100% tests passed, 0 tests failed out of 23

Total Test time (real) = 128.99 sec
[100%] Built target check
/project/libsnark/build# libsnark/gadgetlib2_gadget_test     
Running main() from gtest_main.cc
[==========] Running 12 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 12 tests from gadgetLib2
…
[ RUN      ] gadgetLib2.R1P_Comparison_Gadget_SimpleTest
[       OK ] gadgetLib2.R1P_Comparison_Gadget_SimpleTest (0 ms)
…
[----------] 12 tests from gadgetLib2 (14 ms total)

[----------] Global test environment tear-down
[==========] 12 tests from 1 test case ran. (14 ms total)
[  PASSED  ] 12 tests.