Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

tbitmap.c

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1989 Microsoft Corporation 00004 00005 Module Name: 00006 00007 tbitmap.c 00008 00009 Abstract: 00010 00011 Test program for the Bitmap Procedures 00012 00013 Author: 00014 00015 Gary Kimura [GaryKi] 30-Jan-1989 00016 00017 Revision History: 00018 00019 --*/ 00020 00021 #include <stdio.h> 00022 00023 #include "nt.h" 00024 #include "ntrtl.h" 00025 00026 ULONG Buffer[512]; 00027 RTL_BITMAP BitMapHeader; 00028 PRTL_BITMAP BitMap; 00029 00030 int 00031 main( 00032 int argc, 00033 char *argv[] 00034 ) 00035 { 00036 ULONG j; 00037 00038 DbgPrint("Start BitMapTest()\n"); 00039 00040 // 00041 // First create a new bitmap 00042 // 00043 00044 BitMap = &BitMapHeader; 00045 RtlInitializeBitMap( BitMap, Buffer, 2048*8 ); 00046 00047 // 00048 // >>>> Test setting bits 00049 // 00050 00051 // 00052 // Now clear all bits 00053 // 00054 00055 RtlClearAllBits( BitMap ); 00056 if (RtlNumberOfClearBits( BitMap ) != 2048*8) { DbgPrint("Number of Clear bits error 1\n" ); } 00057 if (RtlNumberOfSetBits( BitMap ) != 0) { DbgPrint("Number of Set bits error 1\n" ); } 00058 00059 // 00060 // Now set some bit patterns, and test them 00061 // 00062 00063 RtlSetBits( BitMap, 0, 1 ); 00064 RtlSetBits( BitMap, 63, 1 ); 00065 RtlSetBits( BitMap, 65, 30 ); 00066 RtlSetBits( BitMap, 127, 2 ); 00067 RtlSetBits( BitMap, 191, 34 ); 00068 00069 if ((BitMap->Buffer[0] != 0x00000001) || 00070 (BitMap->Buffer[1] != 0x80000000) || 00071 (BitMap->Buffer[2] != 0x7ffffffe) || 00072 (BitMap->Buffer[3] != 0x80000000) || 00073 (BitMap->Buffer[4] != 0x00000001) || 00074 (BitMap->Buffer[5] != 0x80000000) || 00075 (BitMap->Buffer[6] != 0xffffffff) || 00076 (BitMap->Buffer[7] != 0x00000001)) { 00077 00078 DbgPrint("RtlSetBits Error\n"); 00079 return FALSE; 00080 } 00081 00082 if (RtlNumberOfClearBits( BitMap ) != 2048*8 - 68) { DbgPrint("Number of Clear bits error 2\n" ); } 00083 if (RtlNumberOfSetBits( BitMap ) != 68) { DbgPrint("Number of Set bits error 2\n" ); } 00084 00085 // 00086 // Now test some RtlFindClearBitsAndSet 00087 // 00088 00089 RtlSetAllBits( BitMap ); 00090 00091 RtlClearBits( BitMap, 0 + 10*32, 1 ); 00092 RtlClearBits( BitMap, 5 + 11*32, 1 ); 00093 RtlClearBits( BitMap, 7 + 12*32, 1 ); 00094 00095 RtlClearBits( BitMap, 0 + 13*32, 9 ); 00096 RtlClearBits( BitMap, 4 + 14*32, 9 ); 00097 RtlClearBits( BitMap, 7 + 15*32, 9 ); 00098 00099 RtlClearBits( BitMap, 0 + 16*32, 10 ); 00100 RtlClearBits( BitMap, 4 + 17*32, 10 ); 00101 RtlClearBits( BitMap, 6 + 18*32, 10 ); 00102 RtlClearBits( BitMap, 7 + 19*32, 10 ); 00103 00104 RtlClearBits( BitMap, 0 + 110*32, 14 ); 00105 RtlClearBits( BitMap, 1 + 111*32, 14 ); 00106 RtlClearBits( BitMap, 2 + 112*32, 14 ); 00107 00108 RtlClearBits( BitMap, 0 + 113*32, 15 ); 00109 RtlClearBits( BitMap, 1 + 114*32, 15 ); 00110 RtlClearBits( BitMap, 2 + 115*32, 15 ); 00111 00112 //DbgPrint("ClearBits = %08lx, ", RtlNumberOfClearBits( BitMap )); 00113 //DbgPrint("SetBits = %08lx\n", RtlNumberOfSetBits( BitMap )); 00114 00115 // { 00116 // ULONG i; 00117 // for (i = 0; i < 16; i++) { 00118 // DbgPrint("%2d: ", i); 00119 // DbgPrint("%08lx\n", BitMap->Buffer[i]); 00120 // } 00121 // } 00122 00123 if (RtlFindClearBitsAndSet(BitMap, 15, 0) != 0 + 113*32) { 00124 DbgPrint("RtlFindClearBitsAndSet Error 0 + 113*32\n"); 00125 return FALSE; 00126 } 00127 if (RtlFindClearBitsAndSet(BitMap, 15, 0) != 1 + 114*32) { 00128 DbgPrint("RtlFindClearBitsAndSet Error 1 + 114*32\n"); 00129 return FALSE; 00130 } 00131 if (RtlFindClearBitsAndSet(BitMap, 15, 0) != 2 + 115*32) { 00132 DbgPrint("RtlFindClearBitsAndSet Error 2 + 115*32\n"); 00133 return FALSE; 00134 } 00135 00136 if (RtlFindClearBitsAndSet(BitMap, 14, 0) != 0 + 110*32) { 00137 DbgPrint("RtlFindClearBitsAndSet Error 0 + 110*32\n"); 00138 return FALSE; 00139 } 00140 if (RtlFindClearBitsAndSet(BitMap, 14, 0) != 1 + 111*32) { 00141 DbgPrint("RtlFindClearBitsAndSet Error 1 + 111*32\n"); 00142 return FALSE; 00143 } 00144 if (RtlFindClearBitsAndSet(BitMap, 14, 0) != 2 + 112*32) { 00145 DbgPrint("RtlFindClearBitsAndSet Error 2 + 112*32\n"); 00146 return FALSE; 00147 } 00148 00149 if (RtlFindClearBitsAndSet(BitMap, 10, 0) != 0 + 16*32) { 00150 DbgPrint("RtlFindClearBitsAndSet Error 0 + 16*32\n"); 00151 return FALSE; 00152 } 00153 if (RtlFindClearBitsAndSet(BitMap, 10, 0) != 4 + 17*32) { 00154 DbgPrint("RtlFindClearBitsAndSet Error 4 + 17*32\n"); 00155 return FALSE; 00156 } 00157 if (RtlFindClearBitsAndSet(BitMap, 10, 0) != 6 + 18*32) { 00158 DbgPrint("RtlFindClearBitsAndSet Error 6 + 18*32\n"); 00159 return FALSE; 00160 } 00161 if (RtlFindClearBitsAndSet(BitMap, 10, 0) != 7 + 19*32) { 00162 DbgPrint("RtlFindClearBitsAndSet Error 7 + 19*32\n"); 00163 return FALSE; 00164 } 00165 00166 if (RtlFindClearBitsAndSet(BitMap, 9, 0) != 0 + 13*32) { 00167 DbgPrint("RtlFindClearBitsAndSet Error 0 + 13*32\n"); 00168 return FALSE; 00169 } 00170 if (RtlFindClearBitsAndSet(BitMap, 9, 0) != 4 + 14*32) { 00171 DbgPrint("RtlFindClearBitsAndSet Error 4 + 14*32\n"); 00172 return FALSE; 00173 } 00174 if (RtlFindClearBitsAndSet(BitMap, 9, 0) != 7 + 15*32) { 00175 DbgPrint("RtlFindClearBitsAndSet Error 7 + 15*32\n"); 00176 return FALSE; 00177 } 00178 00179 if (RtlFindClearBitsAndSet(BitMap, 1, 0) != 0 + 10*32) { 00180 DbgPrint("RtlFindClearBitsAndSet Error 0 + 10*32\n"); 00181 return FALSE; 00182 } 00183 if (RtlFindClearBitsAndSet(BitMap, 1, 0) != 5 + 11*32) { 00184 DbgPrint("RtlFindClearBitsAndSet Error 5 + 11*32\n"); 00185 return FALSE; 00186 } 00187 if (RtlFindClearBitsAndSet(BitMap, 1, 0) != 7 + 12*32) { 00188 DbgPrint("RtlFindClearBitsAndSet Error 7 + 12*32\n"); 00189 return FALSE; 00190 } 00191 00192 if (RtlNumberOfClearBits( BitMap ) != 0) { DbgPrint("Number of Clear bits error 3\n" ); } 00193 if (RtlNumberOfSetBits( BitMap ) != 2048*8) { DbgPrint("Number of Set bits error 3\n" ); } 00194 00195 // 00196 // Now test some RtlFindClearBitsAndSet 00197 // 00198 00199 RtlSetAllBits( BitMap ); 00200 00201 RtlClearBits( BitMap, 0 + 0*32, 1 ); 00202 RtlClearBits( BitMap, 5 + 1*32, 1 ); 00203 RtlClearBits( BitMap, 7 + 2*32, 1 ); 00204 00205 RtlClearBits( BitMap, 0 + 3*32, 9 ); 00206 RtlClearBits( BitMap, 4 + 4*32, 9 ); 00207 RtlClearBits( BitMap, 7 + 5*32, 9 ); 00208 00209 RtlClearBits( BitMap, 0 + 6*32, 10 ); 00210 RtlClearBits( BitMap, 4 + 7*32, 10 ); 00211 RtlClearBits( BitMap, 6 + 8*32, 10 ); 00212 RtlClearBits( BitMap, 7 + 9*32, 10 ); 00213 00214 RtlClearBits( BitMap, 0 + 10*32, 14 ); 00215 RtlClearBits( BitMap, 1 + 11*32, 14 ); 00216 RtlClearBits( BitMap, 2 + 12*32, 14 ); 00217 00218 RtlClearBits( BitMap, 0 + 13*32, 15 ); 00219 RtlClearBits( BitMap, 1 + 14*32, 15 ); 00220 RtlClearBits( BitMap, 2 + 15*32, 15 ); 00221 00222 //DbgPrint("ClearBits = %08lx, ", RtlNumberOfClearBits( BitMap )); 00223 //DbgPrint("SetBits = %08lx\n", RtlNumberOfSetBits( BitMap )); 00224 00225 // { 00226 // ULONG i; 00227 // for (i = 0; i < 16; i++) { 00228 // DbgPrint("%2d: ", i); 00229 // DbgPrint("%08lx\n", BitMap->Buffer[i]); 00230 // } 00231 // } 00232 00233 if (RtlFindClearBitsAndSet(BitMap, 15, 0) != 0 + 13*32) { 00234 DbgPrint("RtlFindClearBitsAndSet Error 0 + 13*32\n"); 00235 return FALSE; 00236 } 00237 if (RtlFindClearBitsAndSet(BitMap, 15, 0) != 1 + 14*32) { 00238 DbgPrint("RtlFindClearBitsAndSet Error 1 + 14*32\n"); 00239 return FALSE; 00240 } 00241 if (RtlFindClearBitsAndSet(BitMap, 15, 0) != 2 + 15*32) { 00242 DbgPrint("RtlFindClearBitsAndSet Error 2 + 15*32\n"); 00243 return FALSE; 00244 } 00245 00246 if (RtlFindClearBitsAndSet(BitMap, 14, 0) != 0 + 10*32) { 00247 DbgPrint("RtlFindClearBitsAndSet Error 0 + 10*32\n"); 00248 return FALSE; 00249 } 00250 if (RtlFindClearBitsAndSet(BitMap, 14, 0) != 1 + 11*32) { 00251 DbgPrint("RtlFindClearBitsAndSet Error 1 + 11*32\n"); 00252 return FALSE; 00253 } 00254 if (RtlFindClearBitsAndSet(BitMap, 14, 0) != 2 + 12*32) { 00255 DbgPrint("RtlFindClearBitsAndSet Error 2 + 12*32\n"); 00256 return FALSE; 00257 } 00258 00259 if (RtlFindClearBitsAndSet(BitMap, 10, 0) != 0 + 6*32) { 00260 DbgPrint("RtlFindClearBitsAndSet Error 0 + 6*32\n"); 00261 return FALSE; 00262 } 00263 if (RtlFindClearBitsAndSet(BitMap, 10, 0) != 4 + 7*32) { 00264 DbgPrint("RtlFindClearBitsAndSet Error 4 + 7*32\n"); 00265 return FALSE; 00266 } 00267 if (RtlFindClearBitsAndSet(BitMap, 10, 0) != 6 + 8*32) { 00268 DbgPrint("RtlFindClearBitsAndSet Error 6 + 8*32\n"); 00269 return FALSE; 00270 } 00271 if (RtlFindClearBitsAndSet(BitMap, 10, 0) != 7 + 9*32) { 00272 DbgPrint("RtlFindClearBitsAndSet Error 7 + 9*32\n"); 00273 return FALSE; 00274 } 00275 00276 if (RtlFindClearBitsAndSet(BitMap, 9, 0) != 0 + 3*32) { 00277 DbgPrint("RtlFindClearBitsAndSet Error 0 + 3*32\n"); 00278 return FALSE; 00279 } 00280 if (RtlFindClearBitsAndSet(BitMap, 9, 0) != 4 + 4*32) { 00281 DbgPrint("RtlFindClearBitsAndSet Error 4 + 4*32\n"); 00282 return FALSE; 00283 } 00284 if (RtlFindClearBitsAndSet(BitMap, 9, 0) != 7 + 5*32) { 00285 DbgPrint("RtlFindClearBitsAndSet Error 7 + 5*32\n"); 00286 return FALSE; 00287 } 00288 00289 if (RtlFindClearBitsAndSet(BitMap, 1, 0) != 0 + 0*32) { 00290 DbgPrint("RtlFindClearBitsAndSet Error 0 + 0*32\n"); 00291 return FALSE; 00292 } 00293 if (RtlFindClearBitsAndSet(BitMap, 1, 0) != 5 + 1*32) { 00294 DbgPrint("RtlFindClearBitsAndSet Error 5 + 1*32\n"); 00295 return FALSE; 00296 } 00297 if (RtlFindClearBitsAndSet(BitMap, 1, 0) != 7 + 2*32) { 00298 DbgPrint("RtlFindClearBitsAndSet Error 7 + 2*32\n"); 00299 return FALSE; 00300 } 00301 00302 if (RtlNumberOfClearBits( BitMap ) != 0) { DbgPrint("Number of Clear bits error 4\n" ); } 00303 if (RtlNumberOfSetBits( BitMap ) != 2048*8) { DbgPrint("Number of Set bits error 4\n" ); } 00304 00305 // 00306 // Test RtlAreBitsClear and AreBitsSet 00307 // 00308 00309 DbgPrint("Start bit query tests\n"); 00310 00311 RtlClearAllBits( BitMap ); 00312 if (!RtlAreBitsClear( BitMap, 0, 2048*8 )) { DbgPrint("RtlAreBitsClear Error 0\n"); } 00313 00314 RtlSetAllBits( BitMap ); 00315 if (RtlAreBitsClear( BitMap, 8, 8 )) { DbgPrint("AreBitsClear Error 1\n"); } 00316 RtlClearBits( BitMap, 9, 6 ); 00317 if (RtlAreBitsClear( BitMap, 8, 8 )) { DbgPrint("AreBitsClear Error 2\n"); } 00318 RtlClearBits( BitMap, 8, 1 ); 00319 if (RtlAreBitsClear( BitMap, 8, 8 )) { DbgPrint("AreBitsClear Error 3\n"); } 00320 RtlClearBits( BitMap, 15, 1 ); 00321 if (!RtlAreBitsClear( BitMap, 8, 8 )) { DbgPrint("AreBitsClear Error 4\n"); } 00322 00323 RtlSetAllBits( BitMap ); 00324 if (RtlAreBitsClear( BitMap, 8, 7 )) { DbgPrint("AreBitsClear Error 5\n"); } 00325 RtlClearBits( BitMap, 9, 5 ); 00326 if (RtlAreBitsClear( BitMap, 8, 7 )) { DbgPrint("AreBitsClear Error 6\n"); } 00327 RtlClearBits( BitMap, 8, 1 ); 00328 if (RtlAreBitsClear( BitMap, 8, 7 )) { DbgPrint("AreBitsClear Error 7\n"); } 00329 RtlClearBits( BitMap, 14, 1 ); 00330 if (!RtlAreBitsClear( BitMap, 8, 7 )) { DbgPrint("AreBitsClear Error 8\n"); } 00331 00332 RtlSetAllBits( BitMap ); 00333 if (RtlAreBitsClear( BitMap, 9, 7 )) { DbgPrint("AreBitsClear Error 9\n"); } 00334 RtlClearBits( BitMap, 10, 5 ); 00335 if (RtlAreBitsClear( BitMap, 9, 7 )) { DbgPrint("AreBitsClear Error 10\n"); } 00336 RtlClearBits( BitMap, 9, 1 ); 00337 if (RtlAreBitsClear( BitMap, 9, 7 )) { DbgPrint("AreBitsClear Error 11\n"); } 00338 RtlClearBits( BitMap, 15, 1 ); 00339 if (!RtlAreBitsClear( BitMap, 9, 7 )) { DbgPrint("AreBitsClear Error 12\n"); } 00340 00341 RtlSetAllBits( BitMap ); 00342 if (RtlAreBitsClear( BitMap, 9, 5 )) { DbgPrint("AreBitsClear Error 13\n"); } 00343 RtlClearBits( BitMap, 10, 3 ); 00344 if (RtlAreBitsClear( BitMap, 9, 5 )) { DbgPrint("AreBitsClear Error 14\n"); } 00345 RtlClearBits( BitMap, 9, 1 ); 00346 if (RtlAreBitsClear( BitMap, 9, 5 )) { DbgPrint("AreBitsClear Error 15\n"); } 00347 RtlClearBits( BitMap, 13, 1 ); 00348 if (!RtlAreBitsClear( BitMap, 9, 5 )) { DbgPrint("AreBitsClear Error 16\n"); } 00349 00350 RtlSetAllBits( BitMap ); 00351 if (RtlAreBitsClear( BitMap, 8, 24 )) { DbgPrint("AreBitsClear Error 17\n"); } 00352 RtlClearBits( BitMap, 9, 22 ); 00353 if (RtlAreBitsClear( BitMap, 8, 24 )) { DbgPrint("AreBitsClear Error 18\n"); } 00354 RtlClearBits( BitMap, 8, 1 ); 00355 if (RtlAreBitsClear( BitMap, 8, 24 )) { DbgPrint("AreBitsClear Error 19\n"); } 00356 RtlClearBits( BitMap, 31, 1 ); 00357 if (!RtlAreBitsClear( BitMap, 8, 24 )) { DbgPrint("AreBitsClear Error 20\n"); } 00358 00359 RtlSetAllBits( BitMap ); 00360 if (RtlAreBitsClear( BitMap, 8, 23 )) { DbgPrint("AreBitsClear Error 21\n"); } 00361 RtlClearBits( BitMap, 9, 21 ); 00362 if (RtlAreBitsClear( BitMap, 8, 23 )) { DbgPrint("AreBitsClear Error 22\n"); } 00363 RtlClearBits( BitMap, 8, 1 ); 00364 if (RtlAreBitsClear( BitMap, 8, 23 )) { DbgPrint("AreBitsClear Error 23\n"); } 00365 RtlClearBits( BitMap, 30, 1 ); 00366 if (!RtlAreBitsClear( BitMap, 8, 23 )) { DbgPrint("AreBitsClear Error 24\n"); } 00367 00368 RtlSetAllBits( BitMap ); 00369 if (RtlAreBitsClear( BitMap, 9, 23 )) { DbgPrint("AreBitsClear Error 25\n"); } 00370 RtlClearBits( BitMap, 10, 21 ); 00371 if (RtlAreBitsClear( BitMap, 9, 23 )) { DbgPrint("AreBitsClear Error 26\n"); } 00372 RtlClearBits( BitMap, 9, 1 ); 00373 if (RtlAreBitsClear( BitMap, 9, 23 )) { DbgPrint("AreBitsClear Error 27\n"); } 00374 RtlClearBits( BitMap, 31, 1 ); 00375 if (!RtlAreBitsClear( BitMap, 9, 23 )) { DbgPrint("AreBitsClear Error 28\n"); } 00376 00377 RtlSetAllBits( BitMap ); 00378 if (RtlAreBitsClear( BitMap, 9, 21 )) { DbgPrint("AreBitsClear Error 29\n"); } 00379 RtlClearBits( BitMap, 10, 19 ); 00380 if (RtlAreBitsClear( BitMap, 9, 21 )) { DbgPrint("AreBitsClear Error 30\n"); } 00381 RtlClearBits( BitMap, 9, 1 ); 00382 if (RtlAreBitsClear( BitMap, 9, 21 )) { DbgPrint("AreBitsClear Error 31\n"); } 00383 RtlClearBits( BitMap, 29, 1 ); 00384 if (!RtlAreBitsClear( BitMap, 9, 21 )) { DbgPrint("AreBitsClear Error 32\n"); } 00385 00386 RtlSetAllBits( BitMap ); 00387 if (RtlAreBitsClear( BitMap, 10, 1 )) { DbgPrint("AreBitsClear Error 33\n"); } 00388 RtlClearBits( BitMap, 9, 1 ); 00389 if (RtlAreBitsClear( BitMap, 10, 1 )) { DbgPrint("AreBitsClear Error 34\n"); } 00390 RtlClearBits( BitMap, 11, 1 ); 00391 if (RtlAreBitsClear( BitMap, 10, 1 )) { DbgPrint("AreBitsClear Error 35\n"); } 00392 RtlClearBits( BitMap, 10, 1 ); 00393 if (!RtlAreBitsClear( BitMap, 10, 1 )) { DbgPrint("AreBitsClear Error 36\n"); } 00394 00395 00396 RtlSetAllBits( BitMap ); 00397 if (!RtlAreBitsSet( BitMap, 0, 2048*8 )) { DbgPrint("RtlAreBitsSet Error 0\n"); } 00398 00399 RtlClearAllBits( BitMap ); 00400 if (RtlAreBitsSet( BitMap, 8, 8 )) { DbgPrint("AreBitsSet Error 1\n"); } 00401 RtlSetBits( BitMap, 9, 6 ); 00402 if (RtlAreBitsSet( BitMap, 8, 8 )) { DbgPrint("AreBitsSet Error 2\n"); } 00403 RtlSetBits( BitMap, 8, 1 ); 00404 if (RtlAreBitsSet( BitMap, 8, 8 )) { DbgPrint("AreBitsSet Error 3\n"); } 00405 RtlSetBits( BitMap, 15, 1 ); 00406 if (!RtlAreBitsSet( BitMap, 8, 8 )) { DbgPrint("AreBitsSet Error 4\n"); } 00407 00408 RtlClearAllBits( BitMap ); 00409 if (RtlAreBitsSet( BitMap, 8, 7 )) { DbgPrint("AreBitsSet Error 5\n"); } 00410 RtlSetBits( BitMap, 9, 5 ); 00411 if (RtlAreBitsSet( BitMap, 8, 7 )) { DbgPrint("AreBitsSet Error 6\n"); } 00412 RtlSetBits( BitMap, 8, 1 ); 00413 if (RtlAreBitsSet( BitMap, 8, 7 )) { DbgPrint("AreBitsSet Error 7\n"); } 00414 RtlSetBits( BitMap, 14, 1 ); 00415 if (!RtlAreBitsSet( BitMap, 8, 7 )) { DbgPrint("AreBitsSet Error 8\n"); } 00416 00417 RtlClearAllBits( BitMap ); 00418 if (RtlAreBitsSet( BitMap, 9, 7 )) { DbgPrint("AreBitsSet Error 9\n"); } 00419 RtlSetBits( BitMap, 10, 5 ); 00420 if (RtlAreBitsSet( BitMap, 9, 7 )) { DbgPrint("AreBitsSet Error 10\n"); } 00421 RtlSetBits( BitMap, 9, 1 ); 00422 if (RtlAreBitsSet( BitMap, 9, 7 )) { DbgPrint("AreBitsSet Error 11\n"); } 00423 RtlSetBits( BitMap, 15, 1 ); 00424 if (!RtlAreBitsSet( BitMap, 9, 7 )) { DbgPrint("AreBitsSet Error 12\n"); } 00425 00426 RtlClearAllBits( BitMap ); 00427 if (RtlAreBitsSet( BitMap, 9, 5 )) { DbgPrint("AreBitsSet Error 13\n"); } 00428 RtlSetBits( BitMap, 10, 3 ); 00429 if (RtlAreBitsSet( BitMap, 9, 5 )) { DbgPrint("AreBitsSet Error 14\n"); } 00430 RtlSetBits( BitMap, 9, 1 ); 00431 if (RtlAreBitsSet( BitMap, 9, 5 )) { DbgPrint("AreBitsSet Error 15\n"); } 00432 RtlSetBits( BitMap, 13, 1 ); 00433 if (!RtlAreBitsSet( BitMap, 9, 5 )) { DbgPrint("AreBitsSet Error 16\n"); } 00434 00435 RtlClearAllBits( BitMap ); 00436 if (RtlAreBitsSet( BitMap, 8, 24 )) { DbgPrint("AreBitsSet Error 17\n"); } 00437 RtlSetBits( BitMap, 9, 22 ); 00438 if (RtlAreBitsSet( BitMap, 8, 24 )) { DbgPrint("AreBitsSet Error 18\n"); } 00439 RtlSetBits( BitMap, 8, 1 ); 00440 if (RtlAreBitsSet( BitMap, 8, 24 )) { DbgPrint("AreBitsSet Error 19\n"); } 00441 RtlSetBits( BitMap, 31, 1 ); 00442 if (!RtlAreBitsSet( BitMap, 8, 24 )) { DbgPrint("AreBitsSet Error 20\n"); } 00443 00444 RtlClearAllBits( BitMap ); 00445 if (RtlAreBitsSet( BitMap, 8, 23 )) { DbgPrint("AreBitsSet Error 21\n"); } 00446 RtlSetBits( BitMap, 9, 21 ); 00447 if (RtlAreBitsSet( BitMap, 8, 23 )) { DbgPrint("AreBitsSet Error 22\n"); } 00448 RtlSetBits( BitMap, 8, 1 ); 00449 if (RtlAreBitsSet( BitMap, 8, 23 )) { DbgPrint("AreBitsSet Error 23\n"); } 00450 RtlSetBits( BitMap, 30, 1 ); 00451 if (!RtlAreBitsSet( BitMap, 8, 23 )) { DbgPrint("AreBitsSet Error 24\n"); } 00452 00453 RtlClearAllBits( BitMap ); 00454 if (RtlAreBitsSet( BitMap, 9, 23 )) { DbgPrint("AreBitsSet Error 25\n"); } 00455 RtlSetBits( BitMap, 10, 21 ); 00456 if (RtlAreBitsSet( BitMap, 9, 23 )) { DbgPrint("AreBitsSet Error 26\n"); } 00457 RtlSetBits( BitMap, 9, 1 ); 00458 if (RtlAreBitsSet( BitMap, 9, 23 )) { DbgPrint("AreBitsSet Error 27\n"); } 00459 RtlSetBits( BitMap, 31, 1 ); 00460 if (!RtlAreBitsSet( BitMap, 9, 23 )) { DbgPrint("AreBitsSet Error 28\n"); } 00461 00462 RtlClearAllBits( BitMap ); 00463 if (RtlAreBitsSet( BitMap, 9, 21 )) { DbgPrint("AreBitsSet Error 29\n"); } 00464 RtlSetBits( BitMap, 10, 19 ); 00465 if (RtlAreBitsSet( BitMap, 9, 21 )) { DbgPrint("AreBitsSet Error 30\n"); } 00466 RtlSetBits( BitMap, 9, 1 ); 00467 if (RtlAreBitsSet( BitMap, 9, 21 )) { DbgPrint("AreBitsSet Error 31\n"); } 00468 RtlSetBits( BitMap, 29, 1 ); 00469 if (!RtlAreBitsSet( BitMap, 9, 21 )) { DbgPrint("AreBitsSet Error 32\n"); } 00470 00471 RtlClearAllBits( BitMap ); 00472 if (RtlAreBitsSet( BitMap, 10, 1 )) { DbgPrint("AreBitsSet Error 33\n"); } 00473 RtlSetBits( BitMap, 9, 1 ); 00474 if (RtlAreBitsSet( BitMap, 10, 1 )) { DbgPrint("AreBitsSet Error 34\n"); } 00475 RtlSetBits( BitMap, 11, 1 ); 00476 if (RtlAreBitsSet( BitMap, 10, 1 )) { DbgPrint("AreBitsSet Error 35\n"); } 00477 RtlSetBits( BitMap, 10, 1 ); 00478 if (!RtlAreBitsSet( BitMap, 10, 1 )) { DbgPrint("AreBitsSet Error 36\n"); } 00479 00480 DbgPrint("End BitMapTest()\n"); 00481 00482 return TRUE; 00483 }

Generated on Sat May 15 19:41:57 2004 for test by doxygen 1.3.7