Annotation of gpl/axl/test/test_03a.c, revision 1.1.1.2

1.1       misho       1: #include <axl.h>
                      2: #include <stdio.h>
                      3: 
                      4: /* the lookup function  */
                      5: int lookups = 0;
                      6: 
                      7: axl_bool __find_item (axlPointer _element, axlPointer data)
                      8: {
                      9:        char * value = _element;
                     10:        char * name  = data;
                     11: 
                     12:         /* check the name  */
                     13:         if (axl_cmp (value, name))
                     14:                 return axl_true;
                     15: 
                     16:         /* it is not the element */
                     17:         return axl_false;
                     18: }
                     19: 
                     20: void test_01_check_key (axlList * list, char * key)
                     21: {
                     22:        /* find the item */
                     23:        char * value = axl_list_lookup (list, __find_item, key);
                     24:        
                     25:        if (! axl_cmp (value, key)) {
                     26:                printf ("ERROR: unable to find %s value, found %s in the list!!!\n", key, value);
                     27:                exit (-1);
                     28:        }
                     29: 
                     30:        lookups++;
                     31: 
                     32:        return;
                     33: }
                     34: 
                     35: /** 
                     36:  * @brief Test current libaxl hash implementation.
                     37:  *
                     38:  * @return axl_true if it works properly or axl_false if not.
                     39:  */
1.1.1.2 ! misho      40: axl_bool test_01 (void) 
1.1       misho      41: {
                     42:        axlList * list;
                     43:        int       iterator;
                     44: 
                     45:        /* create the hash */
                     46:        list = axl_list_new (axl_hash_equal_string, NULL);
                     47:        
                     48:        /* insert data */
                     49:        axl_list_add (list, "sword"); 
                     50:        axl_list_add (list, "mace");
                     51:        axl_list_add (list, "axe");
                     52:        axl_list_add (list, "arrow");
                     53:        axl_list_add (list, "shield");
                     54:        axl_list_add (list, "bag");
                     55:        axl_list_add (list, "stone");
                     56:        axl_list_add (list, "key");
                     57:        axl_list_add (list, "skull");
                     58:        axl_list_add (list, "jar");
                     59:        axl_list_add (list, "bottle");
                     60:        axl_list_add (list, "fairy");
                     61:        axl_list_add (list, "potion");
                     62:        axl_list_add (list, "water");
                     63:        axl_list_add (list, "spoon");
                     64:        axl_list_add (list, "book");
                     65:        axl_list_add (list, "spear");
                     66:        axl_list_add (list, "dagger");
                     67:        axl_list_add (list, "katana");
                     68:        axl_list_add (list, "helmet");
                     69:        axl_list_add (list, "chain");
                     70:        axl_list_add (list, "halberd");
                     71:        axl_list_add (list, "pipe");
                     72:        axl_list_add (list, "hat");
                     73:        axl_list_add (list, "eyeofnewt");
                     74:        axl_list_add (list, "soup");
                     75:        axl_list_add (list, "wolfbane");
                     76:        axl_list_add (list, "instantcoffee");
                     77:        axl_list_add (list, "bugspray");
                     78:        axl_list_add (list, "flint");
                     79:        axl_list_add (list, "soap");
                     80:        axl_list_add (list, "bones");
                     81:        axl_list_add (list, "orb");
                     82:        axl_list_add (list, "gold");
                     83:        axl_list_add (list, "silver");
                     84:        axl_list_add (list, "wine");
                     85:        axl_list_add (list, "bread");
                     86: 
                     87:        axl_list_add (list, "sword01"); 
                     88:        axl_list_add (list, "mace01");
                     89:        axl_list_add (list, "axe01");
                     90:        axl_list_add (list, "arrow01");
                     91:        axl_list_add (list, "shield01");
                     92:        axl_list_add (list, "bag01");
                     93:        axl_list_add (list, "stone01");
                     94:        axl_list_add (list, "key01");
                     95:        axl_list_add (list, "skull01");
                     96:        axl_list_add (list, "jar01");
                     97:        axl_list_add (list, "bottle01");
                     98:        axl_list_add (list, "fairy01");
                     99:        axl_list_add (list, "potion01");
                    100:        axl_list_add (list, "water01");
                    101:        axl_list_add (list, "spoon01");
                    102:        axl_list_add (list, "book01");
                    103:        axl_list_add (list, "spear01");
                    104:        axl_list_add (list, "dagger01");
                    105:        axl_list_add (list, "katana01");
                    106:        axl_list_add (list, "helmet01");
                    107:        axl_list_add (list, "chain01");
                    108:        axl_list_add (list, "halberd01");
                    109:        axl_list_add (list, "pipe01");
                    110:        axl_list_add (list, "hat01");
                    111:        axl_list_add (list, "eyeofnewt01");
                    112:        axl_list_add (list, "soup01");
                    113:        axl_list_add (list, "wolfbane01");
                    114:        axl_list_add (list, "instantcoffee01");
                    115:        axl_list_add (list, "bugspray01");
                    116:        axl_list_add (list, "flint01");
                    117:        axl_list_add (list, "soap01");
                    118:        axl_list_add (list, "bones01");
                    119:        axl_list_add (list, "orb01");
                    120:        axl_list_add (list, "gold01");
                    121:        axl_list_add (list, "silver01");
                    122:        axl_list_add (list, "wine01");
                    123:        axl_list_add (list, "bread01");
                    124: 
                    125:        axl_list_add (list, "sword02"); 
                    126:        axl_list_add (list, "mace02");
                    127:        axl_list_add (list, "axe02");
                    128:        axl_list_add (list, "arrow02");
                    129:        axl_list_add (list, "shield02");
                    130:        axl_list_add (list, "bag02");
                    131:        axl_list_add (list, "stone02");
                    132:        axl_list_add (list, "key02");
                    133:        axl_list_add (list, "skull02");
                    134:        axl_list_add (list, "jar02");
                    135:        axl_list_add (list, "bottle02");
                    136:        axl_list_add (list, "fairy02");
                    137:        axl_list_add (list, "potion02");
                    138:        axl_list_add (list, "water02");
                    139:        axl_list_add (list, "spoon02");
                    140:        axl_list_add (list, "book02");
                    141:        axl_list_add (list, "spear02");
                    142:        axl_list_add (list, "dagger02");
                    143:        axl_list_add (list, "katana02");
                    144:        axl_list_add (list, "helmet02");
                    145:        axl_list_add (list, "chain02");
                    146:        axl_list_add (list, "halberd02");
                    147:        axl_list_add (list, "pipe02");
                    148:        axl_list_add (list, "hat02");
                    149:        axl_list_add (list, "eyeofnewt02");
                    150:        axl_list_add (list, "soup02");
                    151:        axl_list_add (list, "wolfbane02");
                    152:        axl_list_add (list, "instantcoffee02");
                    153:        axl_list_add (list, "bugspray02");
                    154:        axl_list_add (list, "flint02");
                    155:        axl_list_add (list, "soap02");
                    156:        axl_list_add (list, "bones02");
                    157:        axl_list_add (list, "orb02");
                    158:        axl_list_add (list, "gold02");
                    159:        axl_list_add (list, "silver02");
                    160:        axl_list_add (list, "wine02");
                    161:        axl_list_add (list, "bread02");
                    162: 
                    163:        axl_list_add (list, "sword03"); 
                    164:        axl_list_add (list, "mace03");
                    165:        axl_list_add (list, "axe03");
                    166:        axl_list_add (list, "arrow03");
                    167:        axl_list_add (list, "shield03");
                    168:        axl_list_add (list, "bag03");
                    169:        axl_list_add (list, "stone03");
                    170:        axl_list_add (list, "key03");
                    171:        axl_list_add (list, "skull03");
                    172:        axl_list_add (list, "jar03");
                    173:        axl_list_add (list, "bottle03");
                    174:        axl_list_add (list, "fairy03");
                    175:        axl_list_add (list, "potion03");
                    176:        axl_list_add (list, "water03");
                    177:        axl_list_add (list, "spoon03");
                    178:        axl_list_add (list, "book03");
                    179:        axl_list_add (list, "spear03");
                    180:        axl_list_add (list, "dagger03");
                    181:        axl_list_add (list, "katana03");
                    182:        axl_list_add (list, "helmet03");
                    183:        axl_list_add (list, "chain03");
                    184:        axl_list_add (list, "halberd03");
                    185:        axl_list_add (list, "pipe03");
                    186:        axl_list_add (list, "hat03");
                    187:        axl_list_add (list, "eyeofnewt03");
                    188:        axl_list_add (list, "soup03");
                    189:        axl_list_add (list, "wolfbane03");
                    190:        axl_list_add (list, "instantcoffee03");
                    191:        axl_list_add (list, "bugspray03");
                    192:        axl_list_add (list, "flint03");
                    193:        axl_list_add (list, "soap03");
                    194:        axl_list_add (list, "bones03");
                    195:        axl_list_add (list, "orb03");
                    196:        axl_list_add (list, "gold03");
                    197:        axl_list_add (list, "silver03");
                    198:        axl_list_add (list, "wine03");
                    199:        axl_list_add (list, "bread03");
                    200: 
                    201:        axl_list_add (list, "sword04"); 
                    202:        axl_list_add (list, "mace04");
                    203:        axl_list_add (list, "axe04");
                    204:        axl_list_add (list, "arrow04");
                    205:        axl_list_add (list, "shield04");
                    206:        axl_list_add (list, "bag04");
                    207:        axl_list_add (list, "stone04");
                    208:        axl_list_add (list, "key04");
                    209:        axl_list_add (list, "skull04");
                    210:        axl_list_add (list, "jar04");
                    211:        axl_list_add (list, "bottle04");
                    212:        axl_list_add (list, "fairy04");
                    213:        axl_list_add (list, "potion04");
                    214:        axl_list_add (list, "water04");
                    215:        axl_list_add (list, "spoon04");
                    216:        axl_list_add (list, "book04");
                    217:        axl_list_add (list, "spear04");
                    218:        axl_list_add (list, "dagger04");
                    219:        axl_list_add (list, "katana04");
                    220:        axl_list_add (list, "helmet04");
                    221:        axl_list_add (list, "chain04");
                    222:        axl_list_add (list, "halberd04");
                    223:        axl_list_add (list, "pipe04");
                    224:        axl_list_add (list, "hat04");
                    225:        axl_list_add (list, "eyeofnewt04");
                    226:        axl_list_add (list, "soup04");
                    227:        axl_list_add (list, "wolfbane04");
                    228:        axl_list_add (list, "instantcoffee04");
                    229:        axl_list_add (list, "bugspray04");
                    230:        axl_list_add (list, "flint04");
                    231:        axl_list_add (list, "soap04");
                    232:        axl_list_add (list, "bones04");
                    233:        axl_list_add (list, "orb04");
                    234:        axl_list_add (list, "gold04");
                    235:        axl_list_add (list, "silver04");
                    236:        axl_list_add (list, "wine04");
                    237:        axl_list_add (list, "bread04");
                    238: 
                    239:        axl_list_add (list, "sword05"); 
                    240:        axl_list_add (list, "mace05");
                    241:        axl_list_add (list, "axe05");
                    242:        axl_list_add (list, "arrow05");
                    243:        axl_list_add (list, "shield05");
                    244:        axl_list_add (list, "bag05");
                    245:        axl_list_add (list, "stone05");
                    246:        axl_list_add (list, "key05");
                    247:        axl_list_add (list, "skull05");
                    248:        axl_list_add (list, "jar05");
                    249:        axl_list_add (list, "bottle05");
                    250:        axl_list_add (list, "fairy05");
                    251:        axl_list_add (list, "potion05");
                    252:        axl_list_add (list, "water05");
                    253:        axl_list_add (list, "spoon05");
                    254:        axl_list_add (list, "book05");
                    255:        axl_list_add (list, "spear05");
                    256:        axl_list_add (list, "dagger05");
                    257:        axl_list_add (list, "katana05");
                    258:        axl_list_add (list, "helmet05");
                    259:        axl_list_add (list, "chain05");
                    260:        axl_list_add (list, "halberd05");
                    261:        axl_list_add (list, "pipe05");
                    262:        axl_list_add (list, "hat05");
                    263:        axl_list_add (list, "eyeofnewt05");
                    264:        axl_list_add (list, "soup05");
                    265:        axl_list_add (list, "wolfbane05");
                    266:        axl_list_add (list, "instantcoffee05");
                    267:        axl_list_add (list, "bugspray05");
                    268:        axl_list_add (list, "flint05");
                    269:        axl_list_add (list, "soap05");
                    270:        axl_list_add (list, "bones05");
                    271:        axl_list_add (list, "orb05");
                    272:        axl_list_add (list, "gold05");
                    273:        axl_list_add (list, "silver05");
                    274:        axl_list_add (list, "wine05");
                    275:        axl_list_add (list, "bread05");
                    276: 
                    277:        axl_list_add (list, "sword06"); 
                    278:        axl_list_add (list, "mace06");
                    279:        axl_list_add (list, "axe06");
                    280:        axl_list_add (list, "arrow06");
                    281:        axl_list_add (list, "shield06");
                    282:        axl_list_add (list, "bag06");
                    283:        axl_list_add (list, "stone06");
                    284:        axl_list_add (list, "key06");
                    285:        axl_list_add (list, "skull06");
                    286:        axl_list_add (list, "jar06");
                    287:        axl_list_add (list, "bottle06");
                    288:        axl_list_add (list, "fairy06");
                    289:        axl_list_add (list, "potion06");
                    290:        axl_list_add (list, "water06");
                    291:        axl_list_add (list, "spoon06");
                    292:        axl_list_add (list, "book06");
                    293:        axl_list_add (list, "spear06");
                    294:        axl_list_add (list, "dagger06");
                    295:        axl_list_add (list, "katana06");
                    296:        axl_list_add (list, "helmet06");
                    297:        axl_list_add (list, "chain06");
                    298:        axl_list_add (list, "halberd06");
                    299:        axl_list_add (list, "pipe06");
                    300:        axl_list_add (list, "hat06");
                    301:        axl_list_add (list, "eyeofnewt06");
                    302:        axl_list_add (list, "soup06");
                    303:        axl_list_add (list, "wolfbane06");
                    304:        axl_list_add (list, "instantcoffee06");
                    305:        axl_list_add (list, "bugspray06");
                    306:        axl_list_add (list, "flint06");
                    307:        axl_list_add (list, "soap06");
                    308:        axl_list_add (list, "bones06");
                    309:        axl_list_add (list, "orb06");
                    310:        axl_list_add (list, "gold06");
                    311:        axl_list_add (list, "silver06");
                    312:        axl_list_add (list, "wine06");
                    313:        axl_list_add (list, "bread06");
                    314: 
                    315:        axl_list_add (list, "sword07"); 
                    316:        axl_list_add (list, "mace07");
                    317:        axl_list_add (list, "axe07");
                    318:        axl_list_add (list, "arrow07");
                    319:        axl_list_add (list, "shield07");
                    320:        axl_list_add (list, "bag07");
                    321:        axl_list_add (list, "stone07");
                    322:        axl_list_add (list, "key07");
                    323:        axl_list_add (list, "skull07");
                    324:        axl_list_add (list, "jar07");
                    325:        axl_list_add (list, "bottle07");
                    326:        axl_list_add (list, "fairy07");
                    327:        axl_list_add (list, "potion07");
                    328:        axl_list_add (list, "water07");
                    329:        axl_list_add (list, "spoon07");
                    330:        axl_list_add (list, "book07");
                    331:        axl_list_add (list, "spear07");
                    332:        axl_list_add (list, "dagger07");
                    333:        axl_list_add (list, "katana07");
                    334:        axl_list_add (list, "helmet07");
                    335:        axl_list_add (list, "chain07");
                    336:        axl_list_add (list, "halberd07");
                    337:        axl_list_add (list, "pipe07");
                    338:        axl_list_add (list, "hat07");
                    339:        axl_list_add (list, "eyeofnewt07");
                    340:        axl_list_add (list, "soup07");
                    341:        axl_list_add (list, "wolfbane07");
                    342:        axl_list_add (list, "instantcoffee07");
                    343:        axl_list_add (list, "bugspray07");
                    344:        axl_list_add (list, "flint07");
                    345:        axl_list_add (list, "soap07");
                    346:        axl_list_add (list, "bones07");
                    347:        axl_list_add (list, "orb07");
                    348:        axl_list_add (list, "gold07");
                    349:        axl_list_add (list, "silver07");
                    350:        axl_list_add (list, "wine07");
                    351:        axl_list_add (list, "bread07");
                    352: 
                    353:        axl_list_add (list, "sword08"); 
                    354:        axl_list_add (list, "mace08");
                    355:        axl_list_add (list, "axe08");
                    356:        axl_list_add (list, "arrow08");
                    357:        axl_list_add (list, "shield08");
                    358:        axl_list_add (list, "bag08");
                    359:        axl_list_add (list, "stone08");
                    360:        axl_list_add (list, "key08");
                    361:        axl_list_add (list, "skull08");
                    362:        axl_list_add (list, "jar08");
                    363:        axl_list_add (list, "bottle08");
                    364:        axl_list_add (list, "fairy08");
                    365:        axl_list_add (list, "potion08");
                    366:        axl_list_add (list, "water08");
                    367:        axl_list_add (list, "spoon08");
                    368:        axl_list_add (list, "book08");
                    369:        axl_list_add (list, "spear08");
                    370:        axl_list_add (list, "dagger08");
                    371:        axl_list_add (list, "katana08");
                    372:        axl_list_add (list, "helmet08");
                    373:        axl_list_add (list, "chain08");
                    374:        axl_list_add (list, "halberd08");
                    375:        axl_list_add (list, "pipe08");
                    376:        axl_list_add (list, "hat08");
                    377:        axl_list_add (list, "eyeofnewt08");
                    378:        axl_list_add (list, "soup08");
                    379:        axl_list_add (list, "wolfbane08");
                    380:        axl_list_add (list, "instantcoffee08");
                    381:        axl_list_add (list, "bugspray08");
                    382:        axl_list_add (list, "flint08");
                    383:        axl_list_add (list, "soap08");
                    384:        axl_list_add (list, "bones08");
                    385:        axl_list_add (list, "orb08");
                    386:        axl_list_add (list, "gold08");
                    387:        axl_list_add (list, "silver08");
                    388:        axl_list_add (list, "wine08");
                    389:        axl_list_add (list, "bread08");
                    390: 
                    391:        axl_list_add (list, "sword09"); 
                    392:        axl_list_add (list, "mace09");
                    393:        axl_list_add (list, "axe09");
                    394:        axl_list_add (list, "arrow09");
                    395:        axl_list_add (list, "shield09");
                    396:        axl_list_add (list, "bag09");
                    397:        axl_list_add (list, "stone09");
                    398:        axl_list_add (list, "key09");
                    399:        axl_list_add (list, "skull09");
                    400:        axl_list_add (list, "jar09");
                    401:        axl_list_add (list, "bottle09");
                    402:        axl_list_add (list, "fairy09");
                    403:        axl_list_add (list, "potion09");
                    404:        axl_list_add (list, "water09");
                    405:        axl_list_add (list, "spoon09");
                    406:        axl_list_add (list, "book09");
                    407:        axl_list_add (list, "spear09");
                    408:        axl_list_add (list, "dagger09");
                    409:        axl_list_add (list, "katana09");
                    410:        axl_list_add (list, "helmet09");
                    411:        axl_list_add (list, "chain09");
                    412:        axl_list_add (list, "halberd09");
                    413:        axl_list_add (list, "pipe09");
                    414:        axl_list_add (list, "hat09");
                    415:        axl_list_add (list, "eyeofnewt09");
                    416:        axl_list_add (list, "soup09");
                    417:        axl_list_add (list, "wolfbane09");
                    418:        axl_list_add (list, "instantcoffee09");
                    419:        axl_list_add (list, "bugspray09");
                    420:        axl_list_add (list, "flint09");
                    421:        axl_list_add (list, "soap09");
                    422:        axl_list_add (list, "bones09");
                    423:        axl_list_add (list, "orb09");
                    424:        axl_list_add (list, "gold09");
                    425:        axl_list_add (list, "silver09");
                    426:        axl_list_add (list, "wine09");
                    427:        axl_list_add (list, "bread09");
                    428: 
                    429:        axl_list_add (list, "sword10"); 
                    430:        axl_list_add (list, "mace10");
                    431:        axl_list_add (list, "axe10");
                    432:        axl_list_add (list, "arrow10");
                    433:        axl_list_add (list, "shield10");
                    434:        axl_list_add (list, "bag10");
                    435:        axl_list_add (list, "stone10");
                    436:        axl_list_add (list, "key10");
                    437:        axl_list_add (list, "skull10");
                    438:        axl_list_add (list, "jar10");
                    439:        axl_list_add (list, "bottle10");
                    440:        axl_list_add (list, "fairy10");
                    441:        axl_list_add (list, "potion10");
                    442:        axl_list_add (list, "water10");
                    443:        axl_list_add (list, "spoon10");
                    444:        axl_list_add (list, "book10");
                    445:        axl_list_add (list, "spear10");
                    446:        axl_list_add (list, "dagger10");
                    447:        axl_list_add (list, "katana10");
                    448:        axl_list_add (list, "helmet10");
                    449:        axl_list_add (list, "chain10");
                    450:        axl_list_add (list, "halberd10");
                    451:        axl_list_add (list, "pipe10");
                    452:        axl_list_add (list, "hat10");
                    453:        axl_list_add (list, "eyeofnewt10");
                    454:        axl_list_add (list, "soup10");
                    455:        axl_list_add (list, "wolfbane10");
                    456:        axl_list_add (list, "instantcoffee10");
                    457:        axl_list_add (list, "bugspray10");
                    458:        axl_list_add (list, "flint10");
                    459:        axl_list_add (list, "soap10");
                    460:        axl_list_add (list, "bones10");
                    461:        axl_list_add (list, "orb10");
                    462:        axl_list_add (list, "gold10");
                    463:        axl_list_add (list, "silver10");
                    464:        axl_list_add (list, "wine10");
                    465:        axl_list_add (list, "bread10");
                    466: 
                    467:        axl_list_add (list, "sword11"); 
                    468:        axl_list_add (list, "mace11");
                    469:        axl_list_add (list, "axe11");
                    470:        axl_list_add (list, "arrow11");
                    471:        axl_list_add (list, "shield11");
                    472:        axl_list_add (list, "bag11");
                    473:        axl_list_add (list, "stone11");
                    474:        axl_list_add (list, "key11");
                    475:        axl_list_add (list, "skull11");
                    476:        axl_list_add (list, "jar11");
                    477:        axl_list_add (list, "bottle11");
                    478:        axl_list_add (list, "fairy11");
                    479:        axl_list_add (list, "potion11");
                    480:        axl_list_add (list, "water11");
                    481:        axl_list_add (list, "spoon11");
                    482:        axl_list_add (list, "book11");
                    483:        axl_list_add (list, "spear11");
                    484:        axl_list_add (list, "dagger11");
                    485:        axl_list_add (list, "katana11");
                    486:        axl_list_add (list, "helmet11");
                    487:        axl_list_add (list, "chain11");
                    488:        axl_list_add (list, "halberd11");
                    489:        axl_list_add (list, "pipe11");
                    490:        axl_list_add (list, "hat11");
                    491:        axl_list_add (list, "eyeofnewt11");
                    492:        axl_list_add (list, "soup11");
                    493:        axl_list_add (list, "wolfbane11");
                    494:        axl_list_add (list, "instantcoffee11");
                    495:        axl_list_add (list, "bugspray11");
                    496:        axl_list_add (list, "flint11");
                    497:        axl_list_add (list, "soap11");
                    498:        axl_list_add (list, "bones11");
                    499:        axl_list_add (list, "orb11");
                    500:        axl_list_add (list, "gold11");
                    501:        axl_list_add (list, "silver11");
                    502:        axl_list_add (list, "wine11");
                    503:        axl_list_add (list, "bread11");
                    504: 
                    505:        /* perform checks */
                    506:        iterator = 0;
                    507:        while (iterator < 1000) {
                    508: 
                    509:                /* get values and check them */
                    510:                test_01_check_key (list, "bag");
                    511:                test_01_check_key (list, "sword"); 
                    512:                test_01_check_key (list, "mace");
                    513:                test_01_check_key (list, "axe");
                    514:                test_01_check_key (list, "arrow");
                    515:                test_01_check_key (list, "shield");
                    516:                test_01_check_key (list, "bag");
                    517:                test_01_check_key (list, "stone");
                    518:                test_01_check_key (list, "key");
                    519:                test_01_check_key (list, "skull");
                    520:                test_01_check_key (list, "jar");
                    521:                test_01_check_key (list, "bottle");
                    522:                test_01_check_key (list, "fairy");
                    523:                test_01_check_key (list, "potion");
                    524:                test_01_check_key (list, "water");
                    525:                test_01_check_key (list, "spoon");
                    526:                test_01_check_key (list, "book");
                    527:                test_01_check_key (list, "spear");
                    528:                test_01_check_key (list, "dagger");
                    529:                test_01_check_key (list, "katana");
                    530:                test_01_check_key (list, "helmet");
                    531:                test_01_check_key (list, "chain");
                    532:                test_01_check_key (list, "halberd");
                    533:                test_01_check_key (list, "pipe");
                    534:                test_01_check_key (list, "hat");
                    535:                test_01_check_key (list, "eyeofnewt");
                    536:                test_01_check_key (list, "soup");
                    537:                test_01_check_key (list, "wolfbane");
                    538:                test_01_check_key (list, "instantcoffee");
                    539:                test_01_check_key (list, "bugspray");
                    540:                test_01_check_key (list, "flint");
                    541:                test_01_check_key (list, "soap");
                    542:                test_01_check_key (list, "bones");
                    543:                test_01_check_key (list, "orb");
                    544:                test_01_check_key (list, "gold");
                    545:                test_01_check_key (list, "silver");
                    546:                test_01_check_key (list, "wine");
                    547:                test_01_check_key (list, "bread");
                    548: 
                    549:                test_01_check_key (list, "bag01");
                    550:                test_01_check_key (list, "sword01"); 
                    551:                test_01_check_key (list, "mace01");
                    552:                test_01_check_key (list, "axe01");
                    553:                test_01_check_key (list, "arrow01");
                    554:                test_01_check_key (list, "shield01");
                    555:                test_01_check_key (list, "bag01");
                    556:                test_01_check_key (list, "stone01");
                    557:                test_01_check_key (list, "key01");
                    558:                test_01_check_key (list, "skull01");
                    559:                test_01_check_key (list, "jar01");
                    560:                test_01_check_key (list, "bottle01");
                    561:                test_01_check_key (list, "fairy01");
                    562:                test_01_check_key (list, "potion01");
                    563:                test_01_check_key (list, "water01");
                    564:                test_01_check_key (list, "spoon01");
                    565:                test_01_check_key (list, "book01");
                    566:                test_01_check_key (list, "spear01");
                    567:                test_01_check_key (list, "dagger01");
                    568:                test_01_check_key (list, "katana01");
                    569:                test_01_check_key (list, "helmet01");
                    570:                test_01_check_key (list, "chain01");
                    571:                test_01_check_key (list, "halberd01");
                    572:                test_01_check_key (list, "pipe01");
                    573:                test_01_check_key (list, "hat01");
                    574:                test_01_check_key (list, "eyeofnewt01");
                    575:                test_01_check_key (list, "soup01");
                    576:                test_01_check_key (list, "wolfbane01");
                    577:                test_01_check_key (list, "instantcoffee01");
                    578:                test_01_check_key (list, "bugspray01");
                    579:                test_01_check_key (list, "flint01");
                    580:                test_01_check_key (list, "soap01");
                    581:                test_01_check_key (list, "bones01");
                    582:                test_01_check_key (list, "orb01");
                    583:                test_01_check_key (list, "gold01");
                    584:                test_01_check_key (list, "silver01");
                    585:                test_01_check_key (list, "wine01");
                    586:                test_01_check_key (list, "bread01");
                    587: 
                    588:                test_01_check_key (list, "bag02");
                    589:                test_01_check_key (list, "sword02"); 
                    590:                test_01_check_key (list, "mace02");
                    591:                test_01_check_key (list, "axe02");
                    592:                test_01_check_key (list, "arrow02");
                    593:                test_01_check_key (list, "shield02");
                    594:                test_01_check_key (list, "bag02");
                    595:                test_01_check_key (list, "stone02");
                    596:                test_01_check_key (list, "key02");
                    597:                test_01_check_key (list, "skull02");
                    598:                test_01_check_key (list, "jar02");
                    599:                test_01_check_key (list, "bottle02");
                    600:                test_01_check_key (list, "fairy02");
                    601:                test_01_check_key (list, "potion02");
                    602:                test_01_check_key (list, "water02");
                    603:                test_01_check_key (list, "spoon02");
                    604:                test_01_check_key (list, "book02");
                    605:                test_01_check_key (list, "spear02");
                    606:                test_01_check_key (list, "dagger02");
                    607:                test_01_check_key (list, "katana02");
                    608:                test_01_check_key (list, "helmet02");
                    609:                test_01_check_key (list, "chain02");
                    610:                test_01_check_key (list, "halberd02");
                    611:                test_01_check_key (list, "pipe02");
                    612:                test_01_check_key (list, "hat02");
                    613:                test_01_check_key (list, "eyeofnewt02");
                    614:                test_01_check_key (list, "soup02");
                    615:                test_01_check_key (list, "wolfbane02");
                    616:                test_01_check_key (list, "instantcoffee02");
                    617:                test_01_check_key (list, "bugspray02");
                    618:                test_01_check_key (list, "flint02");
                    619:                test_01_check_key (list, "soap02");
                    620:                test_01_check_key (list, "bones02");
                    621:                test_01_check_key (list, "orb02");
                    622:                test_01_check_key (list, "gold02");
                    623:                test_01_check_key (list, "silver02");
                    624:                test_01_check_key (list, "wine02");
                    625:                test_01_check_key (list, "bread02");    
                    626: 
                    627:                test_01_check_key (list, "bag03");
                    628:                test_01_check_key (list, "sword03"); 
                    629:                test_01_check_key (list, "mace03");
                    630:                test_01_check_key (list, "axe03");
                    631:                test_01_check_key (list, "arrow03");
                    632:                test_01_check_key (list, "shield03");
                    633:                test_01_check_key (list, "bag03");
                    634:                test_01_check_key (list, "stone03");
                    635:                test_01_check_key (list, "key03");
                    636:                test_01_check_key (list, "skull03");
                    637:                test_01_check_key (list, "jar03");
                    638:                test_01_check_key (list, "bottle03");
                    639:                test_01_check_key (list, "fairy03");
                    640:                test_01_check_key (list, "potion03");
                    641:                test_01_check_key (list, "water03");
                    642:                test_01_check_key (list, "spoon03");
                    643:                test_01_check_key (list, "book03");
                    644:                test_01_check_key (list, "spear03");
                    645:                test_01_check_key (list, "dagger03");
                    646:                test_01_check_key (list, "katana03");
                    647:                test_01_check_key (list, "helmet03");
                    648:                test_01_check_key (list, "chain03");
                    649:                test_01_check_key (list, "halberd03");
                    650:                test_01_check_key (list, "pipe03");
                    651:                test_01_check_key (list, "hat03");
                    652:                test_01_check_key (list, "eyeofnewt03");
                    653:                test_01_check_key (list, "soup03");
                    654:                test_01_check_key (list, "wolfbane03");
                    655:                test_01_check_key (list, "instantcoffee03");
                    656:                test_01_check_key (list, "bugspray03");
                    657:                test_01_check_key (list, "flint03");
                    658:                test_01_check_key (list, "soap03");
                    659:                test_01_check_key (list, "bones03");
                    660:                test_01_check_key (list, "orb03");
                    661:                test_01_check_key (list, "gold03");
                    662:                test_01_check_key (list, "silver03");
                    663:                test_01_check_key (list, "wine03");
                    664:                test_01_check_key (list, "bread03");    
                    665: 
                    666:                test_01_check_key (list, "bag04");
                    667:                test_01_check_key (list, "sword04"); 
                    668:                test_01_check_key (list, "mace04");
                    669:                test_01_check_key (list, "axe04");
                    670:                test_01_check_key (list, "arrow04");
                    671:                test_01_check_key (list, "shield04");
                    672:                test_01_check_key (list, "bag04");
                    673:                test_01_check_key (list, "stone04");
                    674:                test_01_check_key (list, "key04");
                    675:                test_01_check_key (list, "skull04");
                    676:                test_01_check_key (list, "jar04");
                    677:                test_01_check_key (list, "bottle04");
                    678:                test_01_check_key (list, "fairy04");
                    679:                test_01_check_key (list, "potion04");
                    680:                test_01_check_key (list, "water04");
                    681:                test_01_check_key (list, "spoon04");
                    682:                test_01_check_key (list, "book04");
                    683:                test_01_check_key (list, "spear04");
                    684:                test_01_check_key (list, "dagger04");
                    685:                test_01_check_key (list, "katana04");
                    686:                test_01_check_key (list, "helmet04");
                    687:                test_01_check_key (list, "chain04");
                    688:                test_01_check_key (list, "halberd04");
                    689:                test_01_check_key (list, "pipe04");
                    690:                test_01_check_key (list, "hat04");
                    691:                test_01_check_key (list, "eyeofnewt04");
                    692:                test_01_check_key (list, "soup04");
                    693:                test_01_check_key (list, "wolfbane04");
                    694:                test_01_check_key (list, "instantcoffee04");
                    695:                test_01_check_key (list, "bugspray04");
                    696:                test_01_check_key (list, "flint04");
                    697:                test_01_check_key (list, "soap04");
                    698:                test_01_check_key (list, "bones04");
                    699:                test_01_check_key (list, "orb04");
                    700:                test_01_check_key (list, "gold04");
                    701:                test_01_check_key (list, "silver04");
                    702:                test_01_check_key (list, "wine04");
                    703:                test_01_check_key (list, "bread04");    
                    704: 
                    705:                test_01_check_key (list, "bag05");
                    706:                test_01_check_key (list, "sword05"); 
                    707:                test_01_check_key (list, "mace05");
                    708:                test_01_check_key (list, "axe05");
                    709:                test_01_check_key (list, "arrow05");
                    710:                test_01_check_key (list, "shield05");
                    711:                test_01_check_key (list, "bag05");
                    712:                test_01_check_key (list, "stone05");
                    713:                test_01_check_key (list, "key05");
                    714:                test_01_check_key (list, "skull05");
                    715:                test_01_check_key (list, "jar05");
                    716:                test_01_check_key (list, "bottle05");
                    717:                test_01_check_key (list, "fairy05");
                    718:                test_01_check_key (list, "potion05");
                    719:                test_01_check_key (list, "water05");
                    720:                test_01_check_key (list, "spoon05");
                    721:                test_01_check_key (list, "book05");
                    722:                test_01_check_key (list, "spear05");
                    723:                test_01_check_key (list, "dagger05");
                    724:                test_01_check_key (list, "katana05");
                    725:                test_01_check_key (list, "helmet05");
                    726:                test_01_check_key (list, "chain05");
                    727:                test_01_check_key (list, "halberd05");
                    728:                test_01_check_key (list, "pipe05");
                    729:                test_01_check_key (list, "hat05");
                    730:                test_01_check_key (list, "eyeofnewt05");
                    731:                test_01_check_key (list, "soup05");
                    732:                test_01_check_key (list, "wolfbane05");
                    733:                test_01_check_key (list, "instantcoffee05");
                    734:                test_01_check_key (list, "bugspray05");
                    735:                test_01_check_key (list, "flint05");
                    736:                test_01_check_key (list, "soap05");
                    737:                test_01_check_key (list, "bones05");
                    738:                test_01_check_key (list, "orb05");
                    739:                test_01_check_key (list, "gold05");
                    740:                test_01_check_key (list, "silver05");
                    741:                test_01_check_key (list, "wine05");
                    742:                test_01_check_key (list, "bread05");    
                    743: 
                    744:                test_01_check_key (list, "bag06");
                    745:                test_01_check_key (list, "sword06"); 
                    746:                test_01_check_key (list, "mace06");
                    747:                test_01_check_key (list, "axe06");
                    748:                test_01_check_key (list, "arrow06");
                    749:                test_01_check_key (list, "shield06");
                    750:                test_01_check_key (list, "bag06");
                    751:                test_01_check_key (list, "stone06");
                    752:                test_01_check_key (list, "key06");
                    753:                test_01_check_key (list, "skull06");
                    754:                test_01_check_key (list, "jar06");
                    755:                test_01_check_key (list, "bottle06");
                    756:                test_01_check_key (list, "fairy06");
                    757:                test_01_check_key (list, "potion06");
                    758:                test_01_check_key (list, "water06");
                    759:                test_01_check_key (list, "spoon06");
                    760:                test_01_check_key (list, "book06");
                    761:                test_01_check_key (list, "spear06");
                    762:                test_01_check_key (list, "dagger06");
                    763:                test_01_check_key (list, "katana06");
                    764:                test_01_check_key (list, "helmet06");
                    765:                test_01_check_key (list, "chain06");
                    766:                test_01_check_key (list, "halberd06");
                    767:                test_01_check_key (list, "pipe06");
                    768:                test_01_check_key (list, "hat06");
                    769:                test_01_check_key (list, "eyeofnewt06");
                    770:                test_01_check_key (list, "soup06");
                    771:                test_01_check_key (list, "wolfbane06");
                    772:                test_01_check_key (list, "instantcoffee06");
                    773:                test_01_check_key (list, "bugspray06");
                    774:                test_01_check_key (list, "flint06");
                    775:                test_01_check_key (list, "soap06");
                    776:                test_01_check_key (list, "bones06");
                    777:                test_01_check_key (list, "orb06");
                    778:                test_01_check_key (list, "gold06");
                    779:                test_01_check_key (list, "silver06");
                    780:                test_01_check_key (list, "wine06");
                    781:                test_01_check_key (list, "bread06");    
                    782: 
                    783:                test_01_check_key (list, "bag07");
                    784:                test_01_check_key (list, "sword07"); 
                    785:                test_01_check_key (list, "mace07");
                    786:                test_01_check_key (list, "axe07");
                    787:                test_01_check_key (list, "arrow07");
                    788:                test_01_check_key (list, "shield07");
                    789:                test_01_check_key (list, "bag07");
                    790:                test_01_check_key (list, "stone07");
                    791:                test_01_check_key (list, "key07");
                    792:                test_01_check_key (list, "skull07");
                    793:                test_01_check_key (list, "jar07");
                    794:                test_01_check_key (list, "bottle07");
                    795:                test_01_check_key (list, "fairy07");
                    796:                test_01_check_key (list, "potion07");
                    797:                test_01_check_key (list, "water07");
                    798:                test_01_check_key (list, "spoon07");
                    799:                test_01_check_key (list, "book07");
                    800:                test_01_check_key (list, "spear07");
                    801:                test_01_check_key (list, "dagger07");
                    802:                test_01_check_key (list, "katana07");
                    803:                test_01_check_key (list, "helmet07");
                    804:                test_01_check_key (list, "chain07");
                    805:                test_01_check_key (list, "halberd07");
                    806:                test_01_check_key (list, "pipe07");
                    807:                test_01_check_key (list, "hat07");
                    808:                test_01_check_key (list, "eyeofnewt07");
                    809:                test_01_check_key (list, "soup07");
                    810:                test_01_check_key (list, "wolfbane07");
                    811:                test_01_check_key (list, "instantcoffee07");
                    812:                test_01_check_key (list, "bugspray07");
                    813:                test_01_check_key (list, "flint07");
                    814:                test_01_check_key (list, "soap07");
                    815:                test_01_check_key (list, "bones07");
                    816:                test_01_check_key (list, "orb07");
                    817:                test_01_check_key (list, "gold07");
                    818:                test_01_check_key (list, "silver07");
                    819:                test_01_check_key (list, "wine07");
                    820:                test_01_check_key (list, "bread07");    
                    821: 
                    822:                test_01_check_key (list, "bag08");
                    823:                test_01_check_key (list, "sword08"); 
                    824:                test_01_check_key (list, "mace08");
                    825:                test_01_check_key (list, "axe08");
                    826:                test_01_check_key (list, "arrow08");
                    827:                test_01_check_key (list, "shield08");
                    828:                test_01_check_key (list, "bag08");
                    829:                test_01_check_key (list, "stone08");
                    830:                test_01_check_key (list, "key08");
                    831:                test_01_check_key (list, "skull08");
                    832:                test_01_check_key (list, "jar08");
                    833:                test_01_check_key (list, "bottle08");
                    834:                test_01_check_key (list, "fairy08");
                    835:                test_01_check_key (list, "potion08");
                    836:                test_01_check_key (list, "water08");
                    837:                test_01_check_key (list, "spoon08");
                    838:                test_01_check_key (list, "book08");
                    839:                test_01_check_key (list, "spear08");
                    840:                test_01_check_key (list, "dagger08");
                    841:                test_01_check_key (list, "katana08");
                    842:                test_01_check_key (list, "helmet08");
                    843:                test_01_check_key (list, "chain08");
                    844:                test_01_check_key (list, "halberd08");
                    845:                test_01_check_key (list, "pipe08");
                    846:                test_01_check_key (list, "hat08");
                    847:                test_01_check_key (list, "eyeofnewt08");
                    848:                test_01_check_key (list, "soup08");
                    849:                test_01_check_key (list, "wolfbane08");
                    850:                test_01_check_key (list, "instantcoffee08");
                    851:                test_01_check_key (list, "bugspray08");
                    852:                test_01_check_key (list, "flint08");
                    853:                test_01_check_key (list, "soap08");
                    854:                test_01_check_key (list, "bones08");
                    855:                test_01_check_key (list, "orb08");
                    856:                test_01_check_key (list, "gold08");
                    857:                test_01_check_key (list, "silver08");
                    858:                test_01_check_key (list, "wine08");
                    859:                test_01_check_key (list, "bread08");    
                    860: 
                    861:                test_01_check_key (list, "bag09");
                    862:                test_01_check_key (list, "sword09"); 
                    863:                test_01_check_key (list, "mace09");
                    864:                test_01_check_key (list, "axe09");
                    865:                test_01_check_key (list, "arrow09");
                    866:                test_01_check_key (list, "shield09");
                    867:                test_01_check_key (list, "bag09");
                    868:                test_01_check_key (list, "stone09");
                    869:                test_01_check_key (list, "key09");
                    870:                test_01_check_key (list, "skull09");
                    871:                test_01_check_key (list, "jar09");
                    872:                test_01_check_key (list, "bottle09");
                    873:                test_01_check_key (list, "fairy09");
                    874:                test_01_check_key (list, "potion09");
                    875:                test_01_check_key (list, "water09");
                    876:                test_01_check_key (list, "spoon09");
                    877:                test_01_check_key (list, "book09");
                    878:                test_01_check_key (list, "spear09");
                    879:                test_01_check_key (list, "dagger09");
                    880:                test_01_check_key (list, "katana09");
                    881:                test_01_check_key (list, "helmet09");
                    882:                test_01_check_key (list, "chain09");
                    883:                test_01_check_key (list, "halberd09");
                    884:                test_01_check_key (list, "pipe09");
                    885:                test_01_check_key (list, "hat09");
                    886:                test_01_check_key (list, "eyeofnewt09");
                    887:                test_01_check_key (list, "soup09");
                    888:                test_01_check_key (list, "wolfbane09");
                    889:                test_01_check_key (list, "instantcoffee09");
                    890:                test_01_check_key (list, "bugspray09");
                    891:                test_01_check_key (list, "flint09");
                    892:                test_01_check_key (list, "soap09");
                    893:                test_01_check_key (list, "bones09");
                    894:                test_01_check_key (list, "orb09");
                    895:                test_01_check_key (list, "gold09");
                    896:                test_01_check_key (list, "silver09");
                    897:                test_01_check_key (list, "wine09");
                    898:                test_01_check_key (list, "bread09");    
                    899: 
                    900:                test_01_check_key (list, "bag10");
                    901:                test_01_check_key (list, "sword10"); 
                    902:                test_01_check_key (list, "mace10");
                    903:                test_01_check_key (list, "axe10");
                    904:                test_01_check_key (list, "arrow10");
                    905:                test_01_check_key (list, "shield10");
                    906:                test_01_check_key (list, "bag10");
                    907:                test_01_check_key (list, "stone10");
                    908:                test_01_check_key (list, "key10");
                    909:                test_01_check_key (list, "skull10");
                    910:                test_01_check_key (list, "jar10");
                    911:                test_01_check_key (list, "bottle10");
                    912:                test_01_check_key (list, "fairy10");
                    913:                test_01_check_key (list, "potion10");
                    914:                test_01_check_key (list, "water10");
                    915:                test_01_check_key (list, "spoon10");
                    916:                test_01_check_key (list, "book10");
                    917:                test_01_check_key (list, "spear10");
                    918:                test_01_check_key (list, "dagger10");
                    919:                test_01_check_key (list, "katana10");
                    920:                test_01_check_key (list, "helmet10");
                    921:                test_01_check_key (list, "chain10");
                    922:                test_01_check_key (list, "halberd10");
                    923:                test_01_check_key (list, "pipe10");
                    924:                test_01_check_key (list, "hat10");
                    925:                test_01_check_key (list, "eyeofnewt10");
                    926:                test_01_check_key (list, "soup10");
                    927:                test_01_check_key (list, "wolfbane10");
                    928:                test_01_check_key (list, "instantcoffee10");
                    929:                test_01_check_key (list, "bugspray10");
                    930:                test_01_check_key (list, "flint10");
                    931:                test_01_check_key (list, "soap10");
                    932:                test_01_check_key (list, "bones10");
                    933:                test_01_check_key (list, "orb10");
                    934:                test_01_check_key (list, "gold10");
                    935:                test_01_check_key (list, "silver10");
                    936:                test_01_check_key (list, "wine10");
                    937:                test_01_check_key (list, "bread10");    
                    938: 
                    939:                test_01_check_key (list, "bag11");
                    940:                test_01_check_key (list, "sword11"); 
                    941:                test_01_check_key (list, "mace11");
                    942:                test_01_check_key (list, "axe11");
                    943:                test_01_check_key (list, "arrow11");
                    944:                test_01_check_key (list, "shield11");
                    945:                test_01_check_key (list, "bag11");
                    946:                test_01_check_key (list, "stone11");
                    947:                test_01_check_key (list, "key11");
                    948:                test_01_check_key (list, "skull11");
                    949:                test_01_check_key (list, "jar11");
                    950:                test_01_check_key (list, "bottle11");
                    951:                test_01_check_key (list, "fairy11");
                    952:                test_01_check_key (list, "potion11");
                    953:                test_01_check_key (list, "water11");
                    954:                test_01_check_key (list, "spoon11");
                    955:                test_01_check_key (list, "book11");
                    956:                test_01_check_key (list, "spear11");
                    957:                test_01_check_key (list, "dagger11");
                    958:                test_01_check_key (list, "katana11");
                    959:                test_01_check_key (list, "helmet11");
                    960:                test_01_check_key (list, "chain11");
                    961:                test_01_check_key (list, "halberd11");
                    962:                test_01_check_key (list, "pipe11");
                    963:                test_01_check_key (list, "hat11");
                    964:                test_01_check_key (list, "eyeofnewt11");
                    965:                test_01_check_key (list, "soup11");
                    966:                test_01_check_key (list, "wolfbane11");
                    967:                test_01_check_key (list, "instantcoffee11");
                    968:                test_01_check_key (list, "bugspray11");
                    969:                test_01_check_key (list, "flint11");
                    970:                test_01_check_key (list, "soap11");
                    971:                test_01_check_key (list, "bones11");
                    972:                test_01_check_key (list, "orb11");
                    973:                test_01_check_key (list, "gold11");
                    974:                test_01_check_key (list, "silver11");
                    975:                test_01_check_key (list, "wine11");
                    976:                test_01_check_key (list, "bread11");    
                    977: 
                    978:                /* update iterator */
                    979:                iterator++;
                    980:        }
                    981: 
                    982:        printf ("Performed %d lookups on a list with %d items\n", lookups, axl_list_length (list));
                    983: 
                    984:        /* destroy the hash */
                    985:        axl_list_free (list);
                    986: 
                    987:        /* terminated test */
                    988:        return axl_true;
                    989: }
                    990: 
                    991: /** 
                    992:  * @brief Perform some operations using some interfaces provided by
                    993:  * the libaxl library.
                    994:  */
                    995: int main (int argc, char ** argv) 
                    996: {
                    997:        if (test_01 ()) {
                    998:                printf ("LibAxl list comparison with hash implementation [   OK   ]\n");
                    999:        }else {
                   1000:                printf ("LibAxl list comparison with hash implementation [ FAILED ]\n");
                   1001:        }
                   1002: 
                   1003:        return 0;
                   1004: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>