]> www.ginac.de Git - cln.git/blob - tests/test_I_dpf.cc
* Fix typo.
[cln.git] / tests / test_I_dpf.cc
1 #include "test_I.h"
2
3 int test_I_deposit_field (int iterations)
4 {
5         int error = 0;
6         int i;
7         // Check against ash.
8         for (i = iterations; i > 0; i--) {
9                 cl_I a = testrandom_I();
10                 cl_I b = testrandom_I();
11                 sintL s = random32() % 1024;
12                 sintL p = random32() % 1024;
13                 cl_I mask = ash(ash(1,s)-1,p);
14                 ASSERT4(deposit_field(a,b,cl_byte(s,p)) == logxor(logand(a,mask),logandc2(b,mask)), a,s,p,b);
15         }
16         return error;
17 }