diff options
author | lloyd <[email protected]> | 2008-10-11 15:29:03 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-11 15:29:03 +0000 |
commit | 86157e5f8774fb63f02d84355196b6d9dd6d6bd5 (patch) | |
tree | f11b63093cc8eb5db2db709ea0457dc482f94e06 | |
parent | 205c046594673c4d9c539b174584be394801053a (diff) |
If any are unequal print all values in test_gfp_shared_vals
-rw-r--r-- | checks/gfpmath.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/checks/gfpmath.cpp b/checks/gfpmath.cpp index 9484a488d..8dba8cdfe 100644 --- a/checks/gfpmath.cpp +++ b/checks/gfpmath.cpp @@ -501,14 +501,16 @@ bool test_gfp_shared_vals() shcpy_a.turn_on_sp_red_mul(); GFpElement c5 = shcpy_a * shcpy_a; - if(c1 != c2) - std::cout << "test_gfp_shared_vals failed - c1 = " << c1 << " c2 = " << c2 << "\n"; - if(c2 != c3) - std::cout << "test_gfp_shared_vals failed - c2 = " << c2 << " c3 = " << c3 << "\n"; - if(c3 != c4) - std::cout << "test_gfp_shared_vals failed - c3 = " << c3 << " c4 = " << c4 << "\n"; - if(c4 != c5) - std::cout << "test_gfp_shared_vals failed - c4 = " << c4 << " c5 = " << c5 << "\n"; + if(c1 != c2 || c2 != c3 || c3 != c4 || c4 != c5) + { + std::cout << "test_gfp_shared_vals failed" + << " a=" << a + << " shcpy_a=" << shcpy_a + << " c1=" << c1 << " c2=" << c2 + << " c3=" << c3 << " c4=" << c4 + << " c5=" << c5 << "\n"; + pass = false; + } swap(a,shcpy_a); std::tr1::shared_ptr<GFpModulus> ptr3 = a.get_ptr_mod(); |