Changeset 11136 for trunk/ippdb/tests
- Timestamp:
- Jan 18, 2007, 2:14:55 PM (20 years ago)
- Location:
- trunk/ippdb/tests
- Files:
-
- 5 edited
-
alloc.c (modified) (10 diffs)
-
insert.c (modified) (4 diffs)
-
insertobject.c (modified) (4 diffs)
-
metadatafromobject.c (modified) (11 diffs)
-
objectfrommetadata.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/tests/alloc.c
r11113 r11136 244 244 newExpRow *object; 245 245 246 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32 );246 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string" ); 247 247 248 248 if (!object) { … … 277 277 exit(EXIT_FAILURE); 278 278 } 279 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 280 psFree(object); 281 exit(EXIT_FAILURE); 282 } 279 283 280 284 psFree(object); … … 313 317 rawExpRow *object; 314 318 315 object = rawExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16 ); 316 317 if (!object) { 318 exit(EXIT_FAILURE); 319 } 320 321 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 319 object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", -16 ); 320 321 if (!object) { 322 exit(EXIT_FAILURE); 323 } 324 325 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 326 psFree(object); 327 exit(EXIT_FAILURE); 328 } 329 if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) { 322 330 psFree(object); 323 331 exit(EXIT_FAILURE); … … 331 339 exit(EXIT_FAILURE); 332 340 } 341 psFree(object); 342 exit(EXIT_FAILURE); 343 } 333 344 if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) { 334 345 psFree(object); … … 339 350 exit(EXIT_FAILURE); 340 351 } 352 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 353 psFree(object); 354 exit(EXIT_FAILURE); 355 } 341 356 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 342 357 psFree(object); … … 394 409 exit(EXIT_FAILURE); 395 410 } 396 psFree(object);397 exit(EXIT_FAILURE);398 }399 411 400 412 psFree(object); … … 822 834 detRunRow *object; 823 835 824 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z" );836 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z" ); 825 837 826 838 if (!object) { … … 852 864 exit(EXIT_FAILURE); 853 865 } 866 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 867 psFree(object); 868 exit(EXIT_FAILURE); 869 } 854 870 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 855 871 psFree(object); … … 1361 1377 p4RunRow *object; 1362 1378 1363 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string" );1379 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string" ); 1364 1380 1365 1381 if (!object) { … … 1376 1392 } 1377 1393 if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) { 1394 psFree(object); 1395 exit(EXIT_FAILURE); 1396 } 1397 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 1378 1398 psFree(object); 1379 1399 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r11113 r11136 118 118 } 119 119 120 if (!newExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32 )) {120 if (!newExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string")) { 121 121 exit(EXIT_FAILURE); 122 122 } … … 148 148 } 149 149 150 if (!rawExpInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16)) {150 if (!rawExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", -16)) { 151 151 exit(EXIT_FAILURE); 152 152 } … … 313 313 } 314 314 315 if (!detRunInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z")) {315 if (!detRunInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z")) { 316 316 exit(EXIT_FAILURE); 317 317 } … … 478 478 } 479 479 480 if (!p4RunInsert(dbh, -32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string")) {480 if (!p4RunInsert(dbh, -32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string")) { 481 481 exit(EXIT_FAILURE); 482 482 } -
trunk/ippdb/tests/insertobject.c
r11113 r11136 168 168 } 169 169 170 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32 );170 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string"); 171 171 if (!object) { 172 172 exit(EXIT_FAILURE); … … 212 212 } 213 213 214 object = rawExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16);214 object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", -16); 215 215 if (!object) { 216 216 exit(EXIT_FAILURE); … … 454 454 } 455 455 456 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z");456 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z"); 457 457 if (!object) { 458 458 exit(EXIT_FAILURE); … … 696 696 } 697 697 698 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string");698 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string"); 699 699 if (!object) { 700 700 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r11113 r11136 302 302 bool status; 303 303 304 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32 );304 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string"); 305 305 if (!object) { 306 306 exit(EXIT_FAILURE); … … 341 341 exit(EXIT_FAILURE); 342 342 } 343 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 344 psFree(md); 345 exit(EXIT_FAILURE); 346 } 343 347 344 348 psFree(md); … … 387 391 bool status; 388 392 389 object = rawExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16);393 object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", -16); 390 394 if (!object) { 391 395 exit(EXIT_FAILURE); … … 403 407 exit(EXIT_FAILURE); 404 408 } 409 if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) { 410 psFree(md); 411 exit(EXIT_FAILURE); 412 } 405 413 if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) { 406 414 psFree(md); … … 411 419 exit(EXIT_FAILURE); 412 420 } 421 psFree(md); 422 exit(EXIT_FAILURE); 423 } 413 424 if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) { 414 425 psFree(md); … … 419 430 exit(EXIT_FAILURE); 420 431 } 432 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 433 psFree(md); 434 exit(EXIT_FAILURE); 435 } 421 436 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) { 422 437 psFree(md); … … 474 489 exit(EXIT_FAILURE); 475 490 } 476 psFree(md);477 exit(EXIT_FAILURE);478 }479 491 480 492 psFree(md); … … 984 996 bool status; 985 997 986 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z");998 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z"); 987 999 if (!object) { 988 1000 exit(EXIT_FAILURE); … … 1020 1032 exit(EXIT_FAILURE); 1021 1033 } 1034 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 1035 psFree(md); 1036 exit(EXIT_FAILURE); 1037 } 1022 1038 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) { 1023 1039 psFree(md); … … 1611 1627 bool status; 1612 1628 1613 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string");1629 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string"); 1614 1630 if (!object) { 1615 1631 exit(EXIT_FAILURE); … … 1632 1648 } 1633 1649 if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) { 1650 psFree(md); 1651 exit(EXIT_FAILURE); 1652 } 1653 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 1634 1654 psFree(md); 1635 1655 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r11113 r11136 450 450 exit(EXIT_FAILURE); 451 451 } 452 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 453 psFree(md); 454 exit(EXIT_FAILURE); 455 } 452 456 453 457 object = newExpObjectFromMetadata(md); … … 486 490 exit(EXIT_FAILURE); 487 491 } 492 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 493 psFree(object); 494 exit(EXIT_FAILURE); 495 } 488 496 489 497 psFree(object); … … 549 557 exit(EXIT_FAILURE); 550 558 } 559 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) { 560 psFree(md); 561 exit(EXIT_FAILURE); 562 } 551 563 if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) { 552 564 psFree(md); … … 557 569 exit(EXIT_FAILURE); 558 570 } 571 psFree(md); 572 exit(EXIT_FAILURE); 573 } 559 574 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_type", 0, NULL, "a string")) { 560 575 psFree(md); … … 565 580 exit(EXIT_FAILURE); 566 581 } 582 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 583 psFree(md); 584 exit(EXIT_FAILURE); 585 } 567 586 if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) { 568 587 psFree(md); … … 620 639 exit(EXIT_FAILURE); 621 640 } 622 psFree(md);623 exit(EXIT_FAILURE);624 }625 641 626 642 object = rawExpObjectFromMetadata(md); … … 636 652 exit(EXIT_FAILURE); 637 653 } 654 if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) { 655 psFree(object); 656 exit(EXIT_FAILURE); 657 } 638 658 if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) { 639 659 psFree(object); … … 644 664 exit(EXIT_FAILURE); 645 665 } 666 psFree(object); 667 exit(EXIT_FAILURE); 668 } 646 669 if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) { 647 670 psFree(object); … … 652 675 exit(EXIT_FAILURE); 653 676 } 677 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 678 psFree(object); 679 exit(EXIT_FAILURE); 680 } 654 681 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 655 682 psFree(object); … … 707 734 exit(EXIT_FAILURE); 708 735 } 709 psFree(object);710 exit(EXIT_FAILURE);711 }712 736 713 737 psFree(object); … … 1499 1523 exit(EXIT_FAILURE); 1500 1524 } 1525 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 1526 psFree(md); 1527 exit(EXIT_FAILURE); 1528 } 1501 1529 if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) { 1502 1530 psFree(md); … … 1565 1593 exit(EXIT_FAILURE); 1566 1594 } 1595 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 1596 psFree(object); 1597 exit(EXIT_FAILURE); 1598 } 1567 1599 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 1568 1600 psFree(object); … … 2477 2509 exit(EXIT_FAILURE); 2478 2510 } 2511 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 2512 psFree(md); 2513 exit(EXIT_FAILURE); 2514 } 2479 2515 if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) { 2480 2516 psFree(md); … … 2523 2559 } 2524 2560 if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) { 2561 psFree(object); 2562 exit(EXIT_FAILURE); 2563 } 2564 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 2525 2565 psFree(object); 2526 2566 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
