You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
400 B

25 years ago
  1. #include "test_I.h"
  2. int test_I_dpb (int iterations)
  3. {
  4. int error = 0;
  5. int i;
  6. // Check against ash.
  7. for (i = iterations; i > 0; i--) {
  8. cl_I a = testrandom_I();
  9. cl_I b = testrandom_I();
  10. sintL s = random32() % 1024;
  11. sintL p = random32() % 1024;
  12. cl_I mask = ash(ash(1,s)-1,p);
  13. ASSERT4(dpb(a,b,cl_byte(s,p)) == logxor(logand(ash(a,p),mask),logandc2(b,mask)), a,s,p,b);
  14. }
  15. return error;
  16. }