Changeset 9054 for trunk/ippdb/tests
- Timestamp:
- Sep 28, 2006, 5:16:20 PM (20 years ago)
- Location:
- trunk/ippdb/tests
- Files:
-
- 6 edited
-
alloc.c (modified) (17 diffs)
-
insert.c (modified) (1 diff)
-
insertobject.c (modified) (2 diffs)
-
metadatafromobject.c (modified) (18 diffs)
-
objectfrommetadata.c (modified) (32 diffs)
-
pop.c (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/tests/alloc.c
r9044 r9054 384 384 pzPendingImfileRow *object; 385 385 386 object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string", "a string" );386 object = pzPendingImfileRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", "a string" ); 387 387 388 388 if (!object) { … … 394 394 exit(EXIT_FAILURE); 395 395 } 396 if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) { 397 psFree(object); 398 exit(EXIT_FAILURE); 399 } 400 if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) { 401 psFree(object); 402 exit(EXIT_FAILURE); 403 } 396 404 if (!object->bytes == -32) { 397 405 psFree(object); … … 421 429 newExpRow *object; 422 430 423 object = newExpRowAlloc("a string", "a string", "a string", "a string", -32 ); 424 425 if (!object) { 426 exit(EXIT_FAILURE); 427 } 428 431 object = newExpRowAlloc("a string", "a string", "a string", "a string", "a string", -32 ); 432 433 if (!object) { 434 exit(EXIT_FAILURE); 435 } 436 437 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 438 psFree(object); 439 exit(EXIT_FAILURE); 440 } 429 441 if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) { 430 442 psFree(object); … … 460 472 } 461 473 462 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {474 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 463 475 psFree(object); 464 476 exit(EXIT_FAILURE); … … 489 501 } 490 502 491 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {503 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 492 504 psFree(object); 493 505 exit(EXIT_FAILURE); … … 570 582 } 571 583 572 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {584 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 573 585 psFree(object); 574 586 exit(EXIT_FAILURE); … … 651 663 } 652 664 653 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {665 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 654 666 psFree(object); 655 667 exit(EXIT_FAILURE); … … 732 744 } 733 745 734 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {746 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 735 747 psFree(object); 736 748 exit(EXIT_FAILURE); … … 757 769 } 758 770 759 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {771 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 760 772 psFree(object); 761 773 exit(EXIT_FAILURE); … … 786 798 } 787 799 788 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {800 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 789 801 psFree(object); 790 802 exit(EXIT_FAILURE); … … 823 835 } 824 836 825 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {837 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 826 838 psFree(object); 827 839 exit(EXIT_FAILURE); … … 848 860 } 849 861 850 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {862 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 851 863 psFree(object); 852 864 exit(EXIT_FAILURE); … … 905 917 } 906 918 907 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {919 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 908 920 psFree(object); 909 921 exit(EXIT_FAILURE); … … 959 971 exit(EXIT_FAILURE); 960 972 } 961 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {973 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 962 974 psFree(object); 963 975 exit(EXIT_FAILURE); … … 984 996 exit(EXIT_FAILURE); 985 997 } 986 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {998 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 987 999 psFree(object); 988 1000 exit(EXIT_FAILURE); … … 1202 1214 exit(EXIT_FAILURE); 1203 1215 } 1204 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1216 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1205 1217 psFree(object); 1206 1218 exit(EXIT_FAILURE); … … 1259 1271 exit(EXIT_FAILURE); 1260 1272 } 1261 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1273 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1262 1274 psFree(object); 1263 1275 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r9044 r9054 163 163 } 164 164 165 if (!pzPendingImfileInsert(dbh, "a string", -32, "a string", "a string", "a string", "a string")) {166 exit(EXIT_FAILURE); 167 } 168 169 psDBCleanup(dbh); 170 } 171 172 { 173 psDB *dbh; 174 175 dbh = psDBInit("localhost", "test", NULL, "test"); 176 if (!dbh) { 177 exit(EXIT_FAILURE); 178 } 179 180 if (!newExpInsert(dbh, "a string", "a string", "a string", "a string", -32)) {165 if (!pzPendingImfileInsert(dbh, "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string")) { 166 exit(EXIT_FAILURE); 167 } 168 169 psDBCleanup(dbh); 170 } 171 172 { 173 psDB *dbh; 174 175 dbh = psDBInit("localhost", "test", NULL, "test"); 176 if (!dbh) { 177 exit(EXIT_FAILURE); 178 } 179 180 if (!newExpInsert(dbh, "a string", "a string", "a string", "a string", "a string", -32)) { 181 181 exit(EXIT_FAILURE); 182 182 } -
trunk/ippdb/tests/insertobject.c
r9044 r9054 234 234 } 235 235 236 object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string", "a string");236 object = pzPendingImfileRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", "a string"); 237 237 if (!object) { 238 238 exit(EXIT_FAILURE); … … 256 256 } 257 257 258 object = newExpRowAlloc("a string", "a string", "a string", "a string", -32);258 object = newExpRowAlloc("a string", "a string", "a string", "a string", "a string", -32); 259 259 if (!object) { 260 260 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r9044 r9054 467 467 bool status; 468 468 469 object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string", "a string");469 object = pzPendingImfileRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", "a string"); 470 470 if (!object) { 471 471 exit(EXIT_FAILURE); … … 483 483 exit(EXIT_FAILURE); 484 484 } 485 if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) { 486 psFree(md); 487 exit(EXIT_FAILURE); 488 } 489 if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) { 490 psFree(md); 491 exit(EXIT_FAILURE); 492 } 485 493 if (!psMetadataLookupS32(&status, md, "bytes") == -32) { 486 494 psFree(md); … … 512 520 bool status; 513 521 514 object = newExpRowAlloc("a string", "a string", "a string", "a string", -32);522 object = newExpRowAlloc("a string", "a string", "a string", "a string", "a string", -32); 515 523 if (!object) { 516 524 exit(EXIT_FAILURE); … … 524 532 psFree(object); 525 533 534 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 535 psFree(md); 536 exit(EXIT_FAILURE); 537 } 526 538 if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) { 527 539 psFree(md); … … 565 577 psFree(object); 566 578 567 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {579 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 568 580 psFree(md); 569 581 exit(EXIT_FAILURE); … … 602 614 psFree(object); 603 615 604 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {616 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 605 617 psFree(md); 606 618 exit(EXIT_FAILURE); … … 691 703 psFree(object); 692 704 693 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {705 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 694 706 psFree(md); 695 707 exit(EXIT_FAILURE); … … 780 792 psFree(object); 781 793 782 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {794 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 783 795 psFree(md); 784 796 exit(EXIT_FAILURE); … … 869 881 psFree(object); 870 882 871 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {883 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 872 884 psFree(md); 873 885 exit(EXIT_FAILURE); … … 902 914 psFree(object); 903 915 904 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {916 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 905 917 psFree(md); 906 918 exit(EXIT_FAILURE); … … 939 951 psFree(object); 940 952 941 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {953 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 942 954 psFree(md); 943 955 exit(EXIT_FAILURE); … … 984 996 psFree(object); 985 997 986 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {998 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 987 999 psFree(md); 988 1000 exit(EXIT_FAILURE); … … 1017 1029 psFree(object); 1018 1030 1019 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {1031 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 1020 1032 psFree(md); 1021 1033 exit(EXIT_FAILURE); … … 1082 1094 psFree(object); 1083 1095 1084 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {1096 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 1085 1097 psFree(md); 1086 1098 exit(EXIT_FAILURE); … … 1152 1164 exit(EXIT_FAILURE); 1153 1165 } 1154 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {1166 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 1155 1167 psFree(md); 1156 1168 exit(EXIT_FAILURE); … … 1185 1197 exit(EXIT_FAILURE); 1186 1198 } 1187 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {1199 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 1188 1200 psFree(md); 1189 1201 exit(EXIT_FAILURE); … … 1451 1463 exit(EXIT_FAILURE); 1452 1464 } 1453 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {1465 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 1454 1466 psFree(md); 1455 1467 exit(EXIT_FAILURE); … … 1516 1528 exit(EXIT_FAILURE); 1517 1529 } 1518 if (strncmp(psMetadataLookupPtr(&status, md, "exp_ id"), "a string", MAX_STRING_LENGTH)) {1530 if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) { 1519 1531 psFree(md); 1520 1532 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r9044 r9054 685 685 exit(EXIT_FAILURE); 686 686 } 687 if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) { 688 psFree(md); 689 exit(EXIT_FAILURE); 690 } 691 if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) { 692 psFree(md); 693 exit(EXIT_FAILURE); 694 } 687 695 if (!psMetadataAddS32(md, PS_LIST_TAIL, "bytes", 0, NULL, -32)) { 688 696 psFree(md); … … 718 726 exit(EXIT_FAILURE); 719 727 } 728 if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) { 729 psFree(object); 730 exit(EXIT_FAILURE); 731 } 732 if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) { 733 psFree(object); 734 exit(EXIT_FAILURE); 735 } 720 736 if (!object->bytes == -32) { 721 737 psFree(object); … … 747 763 748 764 md = psMetadataAlloc(); 765 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 766 psFree(md); 767 exit(EXIT_FAILURE); 768 } 749 769 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) { 750 770 psFree(md); … … 776 796 psFree(md); 777 797 798 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 799 psFree(object); 800 exit(EXIT_FAILURE); 801 } 778 802 if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) { 779 803 psFree(object); … … 805 829 806 830 md = psMetadataAlloc(); 807 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {831 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 808 832 psFree(md); 809 833 exit(EXIT_FAILURE); … … 830 854 psFree(md); 831 855 832 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {856 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 833 857 psFree(object); 834 858 exit(EXIT_FAILURE); … … 855 879 856 880 md = psMetadataAlloc(); 857 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {881 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 858 882 psFree(md); 859 883 exit(EXIT_FAILURE); … … 932 956 psFree(md); 933 957 934 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {958 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 935 959 psFree(object); 936 960 exit(EXIT_FAILURE); … … 1009 1033 1010 1034 md = psMetadataAlloc(); 1011 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1035 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1012 1036 psFree(md); 1013 1037 exit(EXIT_FAILURE); … … 1086 1110 psFree(md); 1087 1111 1088 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1112 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1089 1113 psFree(object); 1090 1114 exit(EXIT_FAILURE); … … 1163 1187 1164 1188 md = psMetadataAlloc(); 1165 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1189 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1166 1190 psFree(md); 1167 1191 exit(EXIT_FAILURE); … … 1240 1264 psFree(md); 1241 1265 1242 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1266 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1243 1267 psFree(object); 1244 1268 exit(EXIT_FAILURE); … … 1317 1341 1318 1342 md = psMetadataAlloc(); 1319 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1343 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1320 1344 psFree(md); 1321 1345 exit(EXIT_FAILURE); … … 1338 1362 psFree(md); 1339 1363 1340 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1364 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1341 1365 psFree(object); 1342 1366 exit(EXIT_FAILURE); … … 1359 1383 1360 1384 md = psMetadataAlloc(); 1361 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1385 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1362 1386 psFree(md); 1363 1387 exit(EXIT_FAILURE); … … 1384 1408 psFree(md); 1385 1409 1386 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1410 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1387 1411 psFree(object); 1388 1412 exit(EXIT_FAILURE); … … 1409 1433 1410 1434 md = psMetadataAlloc(); 1411 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1435 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1412 1436 psFree(md); 1413 1437 exit(EXIT_FAILURE); … … 1442 1466 psFree(md); 1443 1467 1444 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1468 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1445 1469 psFree(object); 1446 1470 exit(EXIT_FAILURE); … … 1475 1499 1476 1500 md = psMetadataAlloc(); 1477 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1501 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1478 1502 psFree(md); 1479 1503 exit(EXIT_FAILURE); … … 1496 1520 psFree(md); 1497 1521 1498 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1522 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1499 1523 psFree(object); 1500 1524 exit(EXIT_FAILURE); … … 1517 1541 1518 1542 md = psMetadataAlloc(); 1519 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1543 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1520 1544 psFree(md); 1521 1545 exit(EXIT_FAILURE); … … 1570 1594 psFree(md); 1571 1595 1572 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1596 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1573 1597 psFree(object); 1574 1598 exit(EXIT_FAILURE); … … 1623 1647 1624 1648 md = psMetadataAlloc(); 1625 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1649 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1626 1650 psFree(md); 1627 1651 exit(EXIT_FAILURE); … … 1644 1668 psFree(md); 1645 1669 1646 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1670 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1647 1671 psFree(object); 1648 1672 exit(EXIT_FAILURE); … … 1707 1731 exit(EXIT_FAILURE); 1708 1732 } 1709 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1733 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1710 1734 psFree(md); 1711 1735 exit(EXIT_FAILURE); … … 1732 1756 exit(EXIT_FAILURE); 1733 1757 } 1734 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1758 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1735 1759 psFree(object); 1736 1760 exit(EXIT_FAILURE); … … 1753 1777 exit(EXIT_FAILURE); 1754 1778 } 1755 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {1779 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 1756 1780 psFree(md); 1757 1781 exit(EXIT_FAILURE); … … 1802 1826 exit(EXIT_FAILURE); 1803 1827 } 1804 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {1828 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 1805 1829 psFree(object); 1806 1830 exit(EXIT_FAILURE); … … 2137 2161 exit(EXIT_FAILURE); 2138 2162 } 2139 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {2163 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 2140 2164 psFree(md); 2141 2165 exit(EXIT_FAILURE); … … 2190 2214 exit(EXIT_FAILURE); 2191 2215 } 2192 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {2216 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 2193 2217 psFree(object); 2194 2218 exit(EXIT_FAILURE); … … 2243 2267 exit(EXIT_FAILURE); 2244 2268 } 2245 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_ id", 0, NULL, "a string")) {2269 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) { 2246 2270 psFree(md); 2247 2271 exit(EXIT_FAILURE); … … 2292 2316 exit(EXIT_FAILURE); 2293 2317 } 2294 if (strncmp(object->exp_ id, "a string", MAX_STRING_LENGTH)) {2318 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 2295 2319 psFree(object); 2296 2320 exit(EXIT_FAILURE); -
trunk/ippdb/tests/pop.c
r9044 r9054 219 219 psDB *dbh; 220 220 char exp_id[256]; 221 char camera[256]; 222 char telescope[256]; 221 223 psS32 bytes; 222 224 char md5sum[256]; … … 230 232 } 231 233 232 if (!pzPendingImfilePop(dbh, (char **)&exp_id, &bytes, (char **)&md5sum, (char **)&class, (char **)&class_id, (char **)&uri)) { 233 exit(EXIT_FAILURE); 234 } 235 236 psDBCleanup(dbh); 237 } 238 239 { 240 psDB *dbh; 234 if (!pzPendingImfilePop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, &bytes, (char **)&md5sum, (char **)&class, (char **)&class_id, (char **)&uri)) { 235 exit(EXIT_FAILURE); 236 } 237 238 psDBCleanup(dbh); 239 } 240 241 { 242 psDB *dbh; 243 char exp_tag[256]; 241 244 char exp_id[256]; 242 245 char camera[256]; … … 250 253 } 251 254 252 if (!newExpPop(dbh, (char **)&exp_ id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles)) {253 exit(EXIT_FAILURE); 254 } 255 256 psDBCleanup(dbh); 257 } 258 259 { 260 psDB *dbh; 261 char exp_ id[256];255 if (!newExpPop(dbh, (char **)&exp_tag, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles)) { 256 exit(EXIT_FAILURE); 257 } 258 259 psDBCleanup(dbh); 260 } 261 262 { 263 psDB *dbh; 264 char exp_tag[256]; 262 265 char class[256]; 263 266 char class_id[256]; … … 269 272 } 270 273 271 if (!newImfilePop(dbh, (char **)&exp_ id, (char **)&class, (char **)&class_id, (char **)&uri)) {272 exit(EXIT_FAILURE); 273 } 274 275 psDBCleanup(dbh); 276 } 277 278 { 279 psDB *dbh; 280 char exp_ id[256];274 if (!newImfilePop(dbh, (char **)&exp_tag, (char **)&class, (char **)&class_id, (char **)&uri)) { 275 exit(EXIT_FAILURE); 276 } 277 278 psDBCleanup(dbh); 279 } 280 281 { 282 psDB *dbh; 283 char exp_tag[256]; 281 284 char camera[256]; 282 285 char telescope[256]; … … 301 304 } 302 305 303 if (!rawDetrendExpPop(dbh, (char **)&exp_ id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) {304 exit(EXIT_FAILURE); 305 } 306 307 psDBCleanup(dbh); 308 } 309 310 { 311 psDB *dbh; 312 char exp_ id[256];306 if (!rawDetrendExpPop(dbh, (char **)&exp_tag, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) { 307 exit(EXIT_FAILURE); 308 } 309 310 psDBCleanup(dbh); 311 } 312 313 { 314 psDB *dbh; 315 char exp_tag[256]; 313 316 char camera[256]; 314 317 char telescope[256]; … … 333 336 } 334 337 335 if (!rawScienceExpPop(dbh, (char **)&exp_ id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) {336 exit(EXIT_FAILURE); 337 } 338 339 psDBCleanup(dbh); 340 } 341 342 { 343 psDB *dbh; 344 char exp_ id[256];338 if (!rawScienceExpPop(dbh, (char **)&exp_tag, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) { 339 exit(EXIT_FAILURE); 340 } 341 342 psDBCleanup(dbh); 343 } 344 345 { 346 psDB *dbh; 347 char exp_tag[256]; 345 348 char class[256]; 346 349 char class_id[256]; … … 365 368 } 366 369 367 if (!rawImfilePop(dbh, (char **)&exp_ id, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&exp_type, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) {368 exit(EXIT_FAILURE); 369 } 370 371 psDBCleanup(dbh); 372 } 373 374 { 375 psDB *dbh; 376 char exp_ id[256];370 if (!rawImfilePop(dbh, (char **)&exp_tag, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&exp_type, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) { 371 exit(EXIT_FAILURE); 372 } 373 374 psDBCleanup(dbh); 375 } 376 377 { 378 psDB *dbh; 379 char exp_tag[256]; 377 380 char recipe[256]; 378 381 psS32 p1_version; … … 383 386 } 384 387 385 if (!p1PendingExpPop(dbh, (char **)&exp_ id, (char **)&recipe, &p1_version)) {386 exit(EXIT_FAILURE); 387 } 388 389 psDBCleanup(dbh); 390 } 391 392 { 393 psDB *dbh; 394 char exp_ id[256];388 if (!p1PendingExpPop(dbh, (char **)&exp_tag, (char **)&recipe, &p1_version)) { 389 exit(EXIT_FAILURE); 390 } 391 392 psDBCleanup(dbh); 393 } 394 395 { 396 psDB *dbh; 397 char exp_tag[256]; 395 398 char recipe[256]; 396 399 psS32 p1_version; … … 402 405 } 403 406 404 if (!p2PendingExpPop(dbh, (char **)&exp_ id, (char **)&recipe, &p1_version, &p2_version)) {405 exit(EXIT_FAILURE); 406 } 407 408 psDBCleanup(dbh); 409 } 410 411 { 412 psDB *dbh; 413 char exp_ id[256];407 if (!p2PendingExpPop(dbh, (char **)&exp_tag, (char **)&recipe, &p1_version, &p2_version)) { 408 exit(EXIT_FAILURE); 409 } 410 411 psDBCleanup(dbh); 412 } 413 414 { 415 psDB *dbh; 416 char exp_tag[256]; 414 417 char class_id[256]; 415 418 char uri[256]; … … 423 426 } 424 427 425 if (!p2PendingImfilePop(dbh, (char **)&exp_ id, (char **)&class_id, (char **)&uri, (char **)&recipe, &p1_version, &p2_version)) {426 exit(EXIT_FAILURE); 427 } 428 429 psDBCleanup(dbh); 430 } 431 432 { 433 psDB *dbh; 434 char exp_ id[256];428 if (!p2PendingImfilePop(dbh, (char **)&exp_tag, (char **)&class_id, (char **)&uri, (char **)&recipe, &p1_version, &p2_version)) { 429 exit(EXIT_FAILURE); 430 } 431 432 psDBCleanup(dbh); 433 } 434 435 { 436 psDB *dbh; 437 char exp_tag[256]; 435 438 psS32 p1_version; 436 439 psS32 p2_version; … … 441 444 } 442 445 443 if (!p2ProcessedExpPop(dbh, (char **)&exp_ id, &p1_version, &p2_version)) {444 exit(EXIT_FAILURE); 445 } 446 447 psDBCleanup(dbh); 448 } 449 450 { 451 psDB *dbh; 452 char exp_ id[256];446 if (!p2ProcessedExpPop(dbh, (char **)&exp_tag, &p1_version, &p2_version)) { 447 exit(EXIT_FAILURE); 448 } 449 450 psDBCleanup(dbh); 451 } 452 453 { 454 psDB *dbh; 455 char exp_tag[256]; 453 456 char class_id[256]; 454 457 char uri[256]; … … 467 470 } 468 471 469 if (!p2ProcessedImfilePop(dbh, (char **)&exp_ id, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri, &p1_version, &p2_version)) {470 exit(EXIT_FAILURE); 471 } 472 473 psDBCleanup(dbh); 474 } 475 476 { 477 psDB *dbh; 478 char exp_ id[256];472 if (!p2ProcessedImfilePop(dbh, (char **)&exp_tag, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri, &p1_version, &p2_version)) { 473 exit(EXIT_FAILURE); 474 } 475 476 psDBCleanup(dbh); 477 } 478 479 { 480 psDB *dbh; 481 char exp_tag[256]; 479 482 psS32 p2_version; 480 483 psS32 p3_version; … … 485 488 } 486 489 487 if (!p3PendingExpPop(dbh, (char **)&exp_ id, &p2_version, &p3_version)) {490 if (!p3PendingExpPop(dbh, (char **)&exp_tag, &p2_version, &p3_version)) { 488 491 exit(EXIT_FAILURE); 489 492 } … … 513 516 psS32 det_id; 514 517 psS32 iteration; 515 char exp_ id[256];518 char exp_tag[256]; 516 519 bool include; 517 520 … … 521 524 } 522 525 523 if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_ id, &include)) {524 exit(EXIT_FAILURE); 525 } 526 527 psDBCleanup(dbh); 528 } 529 530 { 531 psDB *dbh; 532 psS32 det_id; 533 char exp_ id[256];526 if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_tag, &include)) { 527 exit(EXIT_FAILURE); 528 } 529 530 psDBCleanup(dbh); 531 } 532 533 { 534 psDB *dbh; 535 psS32 det_id; 536 char exp_tag[256]; 534 537 char class_id[256]; 535 538 char uri[256]; … … 546 549 } 547 550 548 if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_ id, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri)) {551 if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_tag, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri)) { 549 552 exit(EXIT_FAILURE); 550 553 } … … 656 659 psS32 det_id; 657 660 psS32 iteration; 658 char exp_ id[256];661 char exp_tag[256]; 659 662 char class_id[256]; 660 663 char uri[256]; … … 671 674 } 672 675 673 if (!detResidImfilePop(dbh, &det_id, &iteration, (char **)&exp_ id, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri)) {674 exit(EXIT_FAILURE); 675 } 676 677 psDBCleanup(dbh); 678 } 679 680 { 681 psDB *dbh; 682 psS32 det_id; 683 psS32 iteration; 684 char exp_ id[256];676 if (!detResidImfilePop(dbh, &det_id, &iteration, (char **)&exp_tag, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri)) { 677 exit(EXIT_FAILURE); 678 } 679 680 psDBCleanup(dbh); 681 } 682 683 { 684 psDB *dbh; 685 psS32 det_id; 686 psS32 iteration; 687 char exp_tag[256]; 685 688 char recipe[256]; 686 689 psF64 bg; … … 696 699 } 697 700 698 if (!detResidExpPop(dbh, &det_id, &iteration, (char **)&exp_ id, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri, &accept)) {701 if (!detResidExpPop(dbh, &det_id, &iteration, (char **)&exp_tag, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri, &accept)) { 699 702 exit(EXIT_FAILURE); 700 703 }
Note:
See TracChangeset
for help on using the changeset viewer.
