Changeset 10753 for trunk/ippdb/tests
- Timestamp:
- Dec 15, 2006, 12:38:13 PM (20 years ago)
- Location:
- trunk/ippdb/tests
- Files:
-
- 11 edited
-
alloc.c (modified) (3 diffs)
-
createtable.c (modified) (1 diff)
-
dbcleanup.c (modified) (1 diff)
-
dbsetup.c (modified) (1 diff)
-
droptable.c (modified) (1 diff)
-
insert.c (modified) (1 diff)
-
insertfits.c (modified) (1 diff)
-
insertobject.c (modified) (1 diff)
-
metadatafromobject.c (modified) (3 diffs)
-
objectfrommetadata.c (modified) (6 diffs)
-
selectrowsfits.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/tests/alloc.c
r10748 r10753 1531 1531 1532 1532 { 1533 p4 PStackedImfileRow *object;1534 1535 object = p4 PStackedImfileRowAlloc(-32, "a string", "a string", "a string", "a string" );1533 p4StackedImfileRow *object; 1534 1535 object = p4StackedImfileRowAlloc(-32, "a string", "a string", "a string", "a string" ); 1536 1536 1537 1537 if (!object) { … … 1564 1564 1565 1565 { 1566 p4 PDiffImfileRow *object;1567 1568 object = p4 PDiffImfileRowAlloc(-32, "a string", -32, "a string", "a string", "a string", "a string" );1566 p4DiffImfileRow *object; 1567 1568 object = p4DiffImfileRowAlloc(-32, "a string", -32, "a string", "a string", "a string", "a string" ); 1569 1569 1570 1570 if (!object) { … … 1605 1605 1606 1606 { 1607 p4 PMagicMaskImfileRow *object;1608 1609 object = p4 PMagicMaskImfileRowAlloc(-32, "a string", -32, "a string", "a string" );1607 p4MagicMaskImfileRow *object; 1608 1609 object = p4MagicMaskImfileRowAlloc(-32, "a string", -32, "a string", "a string" ); 1610 1610 1611 1611 if (!object) { -
trunk/ippdb/tests/createtable.c
r10748 r10753 538 538 } 539 539 540 if(!p4 PStackedImfileCreateTable(dbh)) {541 exit(EXIT_FAILURE); 542 } 543 544 psDBCleanup(dbh); 545 } 546 547 { 548 psDB *dbh; 549 550 dbh = psDBInit("localhost", "test", NULL, "test"); 551 if (!dbh) { 552 exit(EXIT_FAILURE); 553 } 554 555 if(!p4 PDiffImfileCreateTable(dbh)) {556 exit(EXIT_FAILURE); 557 } 558 559 psDBCleanup(dbh); 560 } 561 562 { 563 psDB *dbh; 564 565 dbh = psDBInit("localhost", "test", NULL, "test"); 566 if (!dbh) { 567 exit(EXIT_FAILURE); 568 } 569 570 if(!p4 PMagicMaskImfileCreateTable(dbh)) {540 if(!p4StackedImfileCreateTable(dbh)) { 541 exit(EXIT_FAILURE); 542 } 543 544 psDBCleanup(dbh); 545 } 546 547 { 548 psDB *dbh; 549 550 dbh = psDBInit("localhost", "test", NULL, "test"); 551 if (!dbh) { 552 exit(EXIT_FAILURE); 553 } 554 555 if(!p4DiffImfileCreateTable(dbh)) { 556 exit(EXIT_FAILURE); 557 } 558 559 psDBCleanup(dbh); 560 } 561 562 { 563 psDB *dbh; 564 565 dbh = psDBInit("localhost", "test", NULL, "test"); 566 if (!dbh) { 567 exit(EXIT_FAILURE); 568 } 569 570 if(!p4MagicMaskImfileCreateTable(dbh)) { 571 571 exit(EXIT_FAILURE); 572 572 } -
trunk/ippdb/tests/dbcleanup.c
r10748 r10753 46 46 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4InputImfile"); 47 47 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4WarpedImfile"); 48 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4 PStackedImfile");49 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4 PDiffImfile");50 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4 PMagicMaskImfile");48 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4StackedImfile"); 49 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4DiffImfile"); 50 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4MagicMaskImfile"); 51 51 52 52 psDBCleanup(dbh); -
trunk/ippdb/tests/dbsetup.c
r10748 r10753 118 118 p4WarpedImfileCreateTable(dbh); 119 119 120 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4 PStackedImfile");121 p4 PStackedImfileCreateTable(dbh);120 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4StackedImfile"); 121 p4StackedImfileCreateTable(dbh); 122 122 123 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4 PDiffImfile");124 p4 PDiffImfileCreateTable(dbh);123 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4DiffImfile"); 124 p4DiffImfileCreateTable(dbh); 125 125 126 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4 PMagicMaskImfile");127 p4 PMagicMaskImfileCreateTable(dbh);126 p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p4MagicMaskImfile"); 127 p4MagicMaskImfileCreateTable(dbh); 128 128 129 129 psDBCleanup(dbh); -
trunk/ippdb/tests/droptable.c
r10748 r10753 538 538 } 539 539 540 if (!p4 PStackedImfileDropTable(dbh)) {541 exit(EXIT_FAILURE); 542 } 543 544 psDBCleanup(dbh); 545 } 546 547 { 548 psDB *dbh; 549 550 dbh = psDBInit("localhost", "test", NULL, "test"); 551 if (!dbh) { 552 exit(EXIT_FAILURE); 553 } 554 555 if (!p4 PDiffImfileDropTable(dbh)) {556 exit(EXIT_FAILURE); 557 } 558 559 psDBCleanup(dbh); 560 } 561 562 { 563 psDB *dbh; 564 565 dbh = psDBInit("localhost", "test", NULL, "test"); 566 if (!dbh) { 567 exit(EXIT_FAILURE); 568 } 569 570 if (!p4 PMagicMaskImfileDropTable(dbh)) {540 if (!p4StackedImfileDropTable(dbh)) { 541 exit(EXIT_FAILURE); 542 } 543 544 psDBCleanup(dbh); 545 } 546 547 { 548 psDB *dbh; 549 550 dbh = psDBInit("localhost", "test", NULL, "test"); 551 if (!dbh) { 552 exit(EXIT_FAILURE); 553 } 554 555 if (!p4DiffImfileDropTable(dbh)) { 556 exit(EXIT_FAILURE); 557 } 558 559 psDBCleanup(dbh); 560 } 561 562 { 563 psDB *dbh; 564 565 dbh = psDBInit("localhost", "test", NULL, "test"); 566 if (!dbh) { 567 exit(EXIT_FAILURE); 568 } 569 570 if (!p4MagicMaskImfileDropTable(dbh)) { 571 571 exit(EXIT_FAILURE); 572 572 } -
trunk/ippdb/tests/insert.c
r10748 r10753 538 538 } 539 539 540 if (!p4 PStackedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string")) {541 exit(EXIT_FAILURE); 542 } 543 544 psDBCleanup(dbh); 545 } 546 547 { 548 psDB *dbh; 549 550 dbh = psDBInit("localhost", "test", NULL, "test"); 551 if (!dbh) { 552 exit(EXIT_FAILURE); 553 } 554 555 if (!p4 PDiffImfileInsert(dbh, -32, "a string", -32, "a string", "a string", "a string", "a string")) {556 exit(EXIT_FAILURE); 557 } 558 559 psDBCleanup(dbh); 560 } 561 562 { 563 psDB *dbh; 564 565 dbh = psDBInit("localhost", "test", NULL, "test"); 566 if (!dbh) { 567 exit(EXIT_FAILURE); 568 } 569 570 if (!p4 PMagicMaskImfileInsert(dbh, -32, "a string", -32, "a string", "a string")) {540 if (!p4StackedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string")) { 541 exit(EXIT_FAILURE); 542 } 543 544 psDBCleanup(dbh); 545 } 546 547 { 548 psDB *dbh; 549 550 dbh = psDBInit("localhost", "test", NULL, "test"); 551 if (!dbh) { 552 exit(EXIT_FAILURE); 553 } 554 555 if (!p4DiffImfileInsert(dbh, -32, "a string", -32, "a string", "a string", "a string", "a string")) { 556 exit(EXIT_FAILURE); 557 } 558 559 psDBCleanup(dbh); 560 } 561 562 { 563 psDB *dbh; 564 565 dbh = psDBInit("localhost", "test", NULL, "test"); 566 if (!dbh) { 567 exit(EXIT_FAILURE); 568 } 569 570 if (!p4MagicMaskImfileInsert(dbh, -32, "a string", -32, "a string", "a string")) { 571 571 exit(EXIT_FAILURE); 572 572 } -
trunk/ippdb/tests/insertfits.c
r10748 r10753 934 934 } 935 935 936 if (!p4 PStackedImfileInsertFits(dbh, fits)) {937 exit(EXIT_FAILURE); 938 } 939 940 if (!psFitsClose(fits)) { 941 exit(EXIT_FAILURE); 942 } 943 944 psDBCleanup(dbh); 945 } 946 947 { 948 psDB *dbh; 949 psFits *fits; 950 951 dbh = psDBInit("localhost", "test", NULL, "test"); 952 if (!dbh) { 953 exit(EXIT_FAILURE); 954 } 955 956 // open a temp 957 fits = psFitsOpen(TMP_FILENAME, "r"); 958 if (!fits) { 959 exit(EXIT_FAILURE); 960 } 961 962 if (!p4 PDiffImfileInsertFits(dbh, fits)) {963 exit(EXIT_FAILURE); 964 } 965 966 if (!psFitsClose(fits)) { 967 exit(EXIT_FAILURE); 968 } 969 970 psDBCleanup(dbh); 971 } 972 973 { 974 psDB *dbh; 975 psFits *fits; 976 977 dbh = psDBInit("localhost", "test", NULL, "test"); 978 if (!dbh) { 979 exit(EXIT_FAILURE); 980 } 981 982 // open a temp 983 fits = psFitsOpen(TMP_FILENAME, "r"); 984 if (!fits) { 985 exit(EXIT_FAILURE); 986 } 987 988 if (!p4 PMagicMaskImfileInsertFits(dbh, fits)) {936 if (!p4StackedImfileInsertFits(dbh, fits)) { 937 exit(EXIT_FAILURE); 938 } 939 940 if (!psFitsClose(fits)) { 941 exit(EXIT_FAILURE); 942 } 943 944 psDBCleanup(dbh); 945 } 946 947 { 948 psDB *dbh; 949 psFits *fits; 950 951 dbh = psDBInit("localhost", "test", NULL, "test"); 952 if (!dbh) { 953 exit(EXIT_FAILURE); 954 } 955 956 // open a temp 957 fits = psFitsOpen(TMP_FILENAME, "r"); 958 if (!fits) { 959 exit(EXIT_FAILURE); 960 } 961 962 if (!p4DiffImfileInsertFits(dbh, fits)) { 963 exit(EXIT_FAILURE); 964 } 965 966 if (!psFitsClose(fits)) { 967 exit(EXIT_FAILURE); 968 } 969 970 psDBCleanup(dbh); 971 } 972 973 { 974 psDB *dbh; 975 psFits *fits; 976 977 dbh = psDBInit("localhost", "test", NULL, "test"); 978 if (!dbh) { 979 exit(EXIT_FAILURE); 980 } 981 982 // open a temp 983 fits = psFitsOpen(TMP_FILENAME, "r"); 984 if (!fits) { 985 exit(EXIT_FAILURE); 986 } 987 988 if (!p4MagicMaskImfileInsertFits(dbh, fits)) { 989 989 exit(EXIT_FAILURE); 990 990 } -
trunk/ippdb/tests/insertobject.c
r10748 r10753 777 777 { 778 778 psDB *dbh; 779 p4 PStackedImfileRow *object;780 781 dbh = psDBInit("localhost", "test", NULL, "test"); 782 if (!dbh) { 783 exit(EXIT_FAILURE); 784 } 785 786 object = p4 PStackedImfileRowAlloc(-32, "a string", "a string", "a string", "a string");787 if (!object) { 788 exit(EXIT_FAILURE); 789 } 790 791 if (!p4 PStackedImfileInsertObject(dbh, object)) {792 exit(EXIT_FAILURE); 793 } 794 795 psFree(object); 796 psDBCleanup(dbh); 797 } 798 799 { 800 psDB *dbh; 801 p4 PDiffImfileRow *object;802 803 dbh = psDBInit("localhost", "test", NULL, "test"); 804 if (!dbh) { 805 exit(EXIT_FAILURE); 806 } 807 808 object = p4 PDiffImfileRowAlloc(-32, "a string", -32, "a string", "a string", "a string", "a string");809 if (!object) { 810 exit(EXIT_FAILURE); 811 } 812 813 if (!p4 PDiffImfileInsertObject(dbh, object)) {814 exit(EXIT_FAILURE); 815 } 816 817 psFree(object); 818 psDBCleanup(dbh); 819 } 820 821 { 822 psDB *dbh; 823 p4 PMagicMaskImfileRow *object;824 825 dbh = psDBInit("localhost", "test", NULL, "test"); 826 if (!dbh) { 827 exit(EXIT_FAILURE); 828 } 829 830 object = p4 PMagicMaskImfileRowAlloc(-32, "a string", -32, "a string", "a string");831 if (!object) { 832 exit(EXIT_FAILURE); 833 } 834 835 if (!p4 PMagicMaskImfileInsertObject(dbh, object)) {779 p4StackedImfileRow *object; 780 781 dbh = psDBInit("localhost", "test", NULL, "test"); 782 if (!dbh) { 783 exit(EXIT_FAILURE); 784 } 785 786 object = p4StackedImfileRowAlloc(-32, "a string", "a string", "a string", "a string"); 787 if (!object) { 788 exit(EXIT_FAILURE); 789 } 790 791 if (!p4StackedImfileInsertObject(dbh, object)) { 792 exit(EXIT_FAILURE); 793 } 794 795 psFree(object); 796 psDBCleanup(dbh); 797 } 798 799 { 800 psDB *dbh; 801 p4DiffImfileRow *object; 802 803 dbh = psDBInit("localhost", "test", NULL, "test"); 804 if (!dbh) { 805 exit(EXIT_FAILURE); 806 } 807 808 object = p4DiffImfileRowAlloc(-32, "a string", -32, "a string", "a string", "a string", "a string"); 809 if (!object) { 810 exit(EXIT_FAILURE); 811 } 812 813 if (!p4DiffImfileInsertObject(dbh, object)) { 814 exit(EXIT_FAILURE); 815 } 816 817 psFree(object); 818 psDBCleanup(dbh); 819 } 820 821 { 822 psDB *dbh; 823 p4MagicMaskImfileRow *object; 824 825 dbh = psDBInit("localhost", "test", NULL, "test"); 826 if (!dbh) { 827 exit(EXIT_FAILURE); 828 } 829 830 object = p4MagicMaskImfileRowAlloc(-32, "a string", -32, "a string", "a string"); 831 if (!object) { 832 exit(EXIT_FAILURE); 833 } 834 835 if (!p4MagicMaskImfileInsertObject(dbh, object)) { 836 836 exit(EXIT_FAILURE); 837 837 } -
trunk/ippdb/tests/metadatafromobject.c
r10748 r10753 1812 1812 { 1813 1813 psMetadata *md; 1814 p4 PStackedImfileRow *object;1815 bool status; 1816 1817 object = p4 PStackedImfileRowAlloc(-32, "a string", "a string", "a string", "a string");1818 if (!object) { 1819 exit(EXIT_FAILURE); 1820 } 1821 1822 md = p4 PStackedImfileMetadataFromObject(object);1814 p4StackedImfileRow *object; 1815 bool status; 1816 1817 object = p4StackedImfileRowAlloc(-32, "a string", "a string", "a string", "a string"); 1818 if (!object) { 1819 exit(EXIT_FAILURE); 1820 } 1821 1822 md = p4StackedImfileMetadataFromObject(object); 1823 1823 if (!md) { 1824 1824 exit(EXIT_FAILURE); … … 1853 1853 { 1854 1854 psMetadata *md; 1855 p4 PDiffImfileRow *object;1856 bool status; 1857 1858 object = p4 PDiffImfileRowAlloc(-32, "a string", -32, "a string", "a string", "a string", "a string");1859 if (!object) { 1860 exit(EXIT_FAILURE); 1861 } 1862 1863 md = p4 PDiffImfileMetadataFromObject(object);1855 p4DiffImfileRow *object; 1856 bool status; 1857 1858 object = p4DiffImfileRowAlloc(-32, "a string", -32, "a string", "a string", "a string", "a string"); 1859 if (!object) { 1860 exit(EXIT_FAILURE); 1861 } 1862 1863 md = p4DiffImfileMetadataFromObject(object); 1864 1864 if (!md) { 1865 1865 exit(EXIT_FAILURE); … … 1902 1902 { 1903 1903 psMetadata *md; 1904 p4 PMagicMaskImfileRow *object;1905 bool status; 1906 1907 object = p4 PMagicMaskImfileRowAlloc(-32, "a string", -32, "a string", "a string");1908 if (!object) { 1909 exit(EXIT_FAILURE); 1910 } 1911 1912 md = p4 PMagicMaskImfileMetadataFromObject(object);1904 p4MagicMaskImfileRow *object; 1905 bool status; 1906 1907 object = p4MagicMaskImfileRowAlloc(-32, "a string", -32, "a string", "a string"); 1908 if (!object) { 1909 exit(EXIT_FAILURE); 1910 } 1911 1912 md = p4MagicMaskImfileMetadataFromObject(object); 1913 1913 if (!md) { 1914 1914 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r10748 r10753 2774 2774 { 2775 2775 psMetadata *md; 2776 p4 PStackedImfileRow *object;2776 p4StackedImfileRow *object; 2777 2777 2778 2778 md = psMetadataAlloc(); … … 2798 2798 } 2799 2799 2800 object = p4 PStackedImfileObjectFromMetadata(md);2800 object = p4StackedImfileObjectFromMetadata(md); 2801 2801 if (!object) { 2802 2802 psFree(md); … … 2832 2832 { 2833 2833 psMetadata *md; 2834 p4 PDiffImfileRow *object;2834 p4DiffImfileRow *object; 2835 2835 2836 2836 md = psMetadataAlloc(); … … 2864 2864 } 2865 2865 2866 object = p4 PDiffImfileObjectFromMetadata(md);2866 object = p4DiffImfileObjectFromMetadata(md); 2867 2867 if (!object) { 2868 2868 psFree(md); … … 2906 2906 { 2907 2907 psMetadata *md; 2908 p4 PMagicMaskImfileRow *object;2908 p4MagicMaskImfileRow *object; 2909 2909 2910 2910 md = psMetadataAlloc(); … … 2930 2930 } 2931 2931 2932 object = p4 PMagicMaskImfileObjectFromMetadata(md);2932 object = p4MagicMaskImfileObjectFromMetadata(md); 2933 2933 if (!object) { 2934 2934 psFree(md); -
trunk/ippdb/tests/selectrowsfits.c
r10748 r10753 791 791 } 792 792 793 if (!p4 PStackedImfileSelectRowsFits(dbh, fits, NULL, 1)) {794 exit(EXIT_FAILURE); 795 } 796 797 psFree(fits); 798 psDBCleanup(dbh); 799 } 800 801 { 802 psDB *dbh; 803 psFits *fits; 804 805 dbh = psDBInit("localhost", "test", NULL, "test"); 806 if (!dbh) { 807 exit(EXIT_FAILURE); 808 } 809 810 fits = psFitsOpen(TMP_FILENAME, "w"); 811 if (!fits) { 812 exit(EXIT_FAILURE); 813 } 814 815 if (!p4 PDiffImfileSelectRowsFits(dbh, fits, NULL, 1)) {816 exit(EXIT_FAILURE); 817 } 818 819 psFree(fits); 820 psDBCleanup(dbh); 821 } 822 823 { 824 psDB *dbh; 825 psFits *fits; 826 827 dbh = psDBInit("localhost", "test", NULL, "test"); 828 if (!dbh) { 829 exit(EXIT_FAILURE); 830 } 831 832 fits = psFitsOpen(TMP_FILENAME, "w"); 833 if (!fits) { 834 exit(EXIT_FAILURE); 835 } 836 837 if (!p4 PMagicMaskImfileSelectRowsFits(dbh, fits, NULL, 1)) {793 if (!p4StackedImfileSelectRowsFits(dbh, fits, NULL, 1)) { 794 exit(EXIT_FAILURE); 795 } 796 797 psFree(fits); 798 psDBCleanup(dbh); 799 } 800 801 { 802 psDB *dbh; 803 psFits *fits; 804 805 dbh = psDBInit("localhost", "test", NULL, "test"); 806 if (!dbh) { 807 exit(EXIT_FAILURE); 808 } 809 810 fits = psFitsOpen(TMP_FILENAME, "w"); 811 if (!fits) { 812 exit(EXIT_FAILURE); 813 } 814 815 if (!p4DiffImfileSelectRowsFits(dbh, fits, NULL, 1)) { 816 exit(EXIT_FAILURE); 817 } 818 819 psFree(fits); 820 psDBCleanup(dbh); 821 } 822 823 { 824 psDB *dbh; 825 psFits *fits; 826 827 dbh = psDBInit("localhost", "test", NULL, "test"); 828 if (!dbh) { 829 exit(EXIT_FAILURE); 830 } 831 832 fits = psFitsOpen(TMP_FILENAME, "w"); 833 if (!fits) { 834 exit(EXIT_FAILURE); 835 } 836 837 if (!p4MagicMaskImfileSelectRowsFits(dbh, fits, NULL, 1)) { 838 838 exit(EXIT_FAILURE); 839 839 }
Note:
See TracChangeset
for help on using the changeset viewer.
