PageRenderTime 59ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/cln-1.3.2/tests/test_I_minus1.cc

#
C++ | 13 lines | 11 code | 1 blank | 1 comment | 2 complexity | aa47f14d860caeb0bf9e76b9dbcc2aad MD5 | raw file
Possible License(s): GPL-2.0
  1. #include "test_I.h"
  2. int test_I_minus1 (int iterations)
  3. {
  4. int error = 0;
  5. int i;
  6. // Check against "+".
  7. for (i = iterations; i > 0; i--) {
  8. cl_I a = testrandom_I();
  9. ASSERT1(minus1(a) == -1+a, a);
  10. }
  11. return error;
  12. }