Changeset 12026 for trunk/ippdb/tests/metadatafromobject.c
- Timestamp:
- Feb 23, 2007, 4:28:07 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/tests/metadatafromobject.c (modified) (27 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/tests/metadatafromobject.c
r11988 r12026 591 591 { 592 592 psMetadata *md; 593 p1PendingExpRow *object;594 bool status; 595 596 object = p1PendingExpRowAlloc("a string", -32, "a string");597 if (!object) { 598 exit(EXIT_FAILURE); 599 } 600 601 md = p1PendingExpMetadataFromObject(object);593 guidePendingExpRow *object; 594 bool status; 595 596 object = guidePendingExpRowAlloc("a string", -32, "a string"); 597 if (!object) { 598 exit(EXIT_FAILURE); 599 } 600 601 md = guidePendingExpMetadataFromObject(object); 602 602 if (!md) { 603 603 exit(EXIT_FAILURE); … … 610 610 exit(EXIT_FAILURE); 611 611 } 612 if (!psMetadataLookupS32(&status, md, " p1_version") == -32) {612 if (!psMetadataLookupS32(&status, md, "guide_version") == -32) { 613 613 psFree(md); 614 614 exit(EXIT_FAILURE); … … 624 624 { 625 625 psMetadata *md; 626 p2PendingExpRow *object;627 bool status; 628 629 object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", "a string");630 if (!object) { 631 exit(EXIT_FAILURE); 632 } 633 634 md = p2PendingExpMetadataFromObject(object);626 chipPendingExpRow *object; 627 bool status; 628 629 object = chipPendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", "a string"); 630 if (!object) { 631 exit(EXIT_FAILURE); 632 } 633 634 md = chipPendingExpMetadataFromObject(object); 635 635 if (!md) { 636 636 exit(EXIT_FAILURE); … … 643 643 exit(EXIT_FAILURE); 644 644 } 645 if (!psMetadataLookupS32(&status, md, " p2_version") == -32) {646 psFree(md); 647 exit(EXIT_FAILURE); 648 } 649 if (!psMetadataLookupS32(&status, md, " p1_version") == -32) {645 if (!psMetadataLookupS32(&status, md, "chip_version") == -32) { 646 psFree(md); 647 exit(EXIT_FAILURE); 648 } 649 if (!psMetadataLookupS32(&status, md, "guide_version") == -32) { 650 650 psFree(md); 651 651 exit(EXIT_FAILURE); … … 673 673 { 674 674 psMetadata *md; 675 p2PendingImfileRow *object;676 bool status; 677 678 object = p2PendingImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string");679 if (!object) { 680 exit(EXIT_FAILURE); 681 } 682 683 md = p2PendingImfileMetadataFromObject(object);675 chipPendingImfileRow *object; 676 bool status; 677 678 object = chipPendingImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 679 if (!object) { 680 exit(EXIT_FAILURE); 681 } 682 683 md = chipPendingImfileMetadataFromObject(object); 684 684 if (!md) { 685 685 exit(EXIT_FAILURE); … … 692 692 exit(EXIT_FAILURE); 693 693 } 694 if (!psMetadataLookupS32(&status, md, " p2_version") == -32) {695 psFree(md); 696 exit(EXIT_FAILURE); 697 } 698 if (!psMetadataLookupS32(&status, md, " p1_version") == -32) {694 if (!psMetadataLookupS32(&status, md, "chip_version") == -32) { 695 psFree(md); 696 exit(EXIT_FAILURE); 697 } 698 if (!psMetadataLookupS32(&status, md, "guide_version") == -32) { 699 699 psFree(md); 700 700 exit(EXIT_FAILURE); … … 718 718 { 719 719 psMetadata *md; 720 p2ProcessedExpRow *object;721 bool status; 722 723 object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string");724 if (!object) { 725 exit(EXIT_FAILURE); 726 } 727 728 md = p2ProcessedExpMetadataFromObject(object);720 chipProcessedExpRow *object; 721 bool status; 722 723 object = chipProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 724 if (!object) { 725 exit(EXIT_FAILURE); 726 } 727 728 md = chipProcessedExpMetadataFromObject(object); 729 729 if (!md) { 730 730 exit(EXIT_FAILURE); … … 737 737 exit(EXIT_FAILURE); 738 738 } 739 if (!psMetadataLookupS32(&status, md, " p2_version") == -32) {740 psFree(md); 741 exit(EXIT_FAILURE); 742 } 743 if (!psMetadataLookupS32(&status, md, " p1_version") == -32) {739 if (!psMetadataLookupS32(&status, md, "chip_version") == -32) { 740 psFree(md); 741 exit(EXIT_FAILURE); 742 } 743 if (!psMetadataLookupS32(&status, md, "guide_version") == -32) { 744 744 psFree(md); 745 745 exit(EXIT_FAILURE); … … 763 763 { 764 764 psMetadata *md; 765 p2MaskRow*object;766 bool status; 767 768 object = p2MaskRowAlloc("a string");769 if (!object) { 770 exit(EXIT_FAILURE); 771 } 772 773 md = p2MaskMetadataFromObject(object);765 chipMaskRow *object; 766 bool status; 767 768 object = chipMaskRowAlloc("a string"); 769 if (!object) { 770 exit(EXIT_FAILURE); 771 } 772 773 md = chipMaskMetadataFromObject(object); 774 774 if (!md) { 775 775 exit(EXIT_FAILURE); … … 788 788 { 789 789 psMetadata *md; 790 p2ProcessedImfileRow *object;791 bool status; 792 793 object = p2ProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);794 if (!object) { 795 exit(EXIT_FAILURE); 796 } 797 798 md = p2ProcessedImfileMetadataFromObject(object);790 chipProcessedImfileRow *object; 791 bool status; 792 793 object = chipProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16); 794 if (!object) { 795 exit(EXIT_FAILURE); 796 } 797 798 md = chipProcessedImfileMetadataFromObject(object); 799 799 if (!md) { 800 800 exit(EXIT_FAILURE); … … 807 807 exit(EXIT_FAILURE); 808 808 } 809 if (!psMetadataLookupS32(&status, md, " p2_version") == -32) {810 psFree(md); 811 exit(EXIT_FAILURE); 812 } 813 if (!psMetadataLookupS32(&status, md, " p1_version") == -32) {809 if (!psMetadataLookupS32(&status, md, "chip_version") == -32) { 810 psFree(md); 811 exit(EXIT_FAILURE); 812 } 813 if (!psMetadataLookupS32(&status, md, "guide_version") == -32) { 814 814 psFree(md); 815 815 exit(EXIT_FAILURE); … … 856 856 { 857 857 psMetadata *md; 858 p3PendingExpRow *object;859 bool status; 860 861 object = p3PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string");862 if (!object) { 863 exit(EXIT_FAILURE); 864 } 865 866 md = p3PendingExpMetadataFromObject(object);858 camPendingExpRow *object; 859 bool status; 860 861 object = camPendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 862 if (!object) { 863 exit(EXIT_FAILURE); 864 } 865 866 md = camPendingExpMetadataFromObject(object); 867 867 if (!md) { 868 868 exit(EXIT_FAILURE); … … 875 875 exit(EXIT_FAILURE); 876 876 } 877 if (!psMetadataLookupS32(&status, md, " p3_version") == -32) {878 psFree(md); 879 exit(EXIT_FAILURE); 880 } 881 if (!psMetadataLookupS32(&status, md, " p2_version") == -32) {877 if (!psMetadataLookupS32(&status, md, "cam_version") == -32) { 878 psFree(md); 879 exit(EXIT_FAILURE); 880 } 881 if (!psMetadataLookupS32(&status, md, "chip_version") == -32) { 882 882 psFree(md); 883 883 exit(EXIT_FAILURE); … … 901 901 { 902 902 psMetadata *md; 903 p3ProcessedExpRow *object;904 bool status; 905 906 object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16, "a string", "a string");907 if (!object) { 908 exit(EXIT_FAILURE); 909 } 910 911 md = p3ProcessedExpMetadataFromObject(object);903 camProcessedExpRow *object; 904 bool status; 905 906 object = camProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16, "a string", "a string"); 907 if (!object) { 908 exit(EXIT_FAILURE); 909 } 910 911 md = camProcessedExpMetadataFromObject(object); 912 912 if (!md) { 913 913 exit(EXIT_FAILURE); … … 920 920 exit(EXIT_FAILURE); 921 921 } 922 if (!psMetadataLookupS32(&status, md, " p3_version") == -32) {923 psFree(md); 924 exit(EXIT_FAILURE); 925 } 926 if (!psMetadataLookupS32(&status, md, " p2_version") == -32) {922 if (!psMetadataLookupS32(&status, md, "cam_version") == -32) { 923 psFree(md); 924 exit(EXIT_FAILURE); 925 } 926 if (!psMetadataLookupS32(&status, md, "chip_version") == -32) { 927 927 psFree(md); 928 928 exit(EXIT_FAILURE); … … 997 997 { 998 998 psMetadata *md; 999 p3MaskRow*object;1000 bool status; 1001 1002 object = p3MaskRowAlloc("a string");1003 if (!object) { 1004 exit(EXIT_FAILURE); 1005 } 1006 1007 md = p3MaskMetadataFromObject(object);999 camMaskRow *object; 1000 bool status; 1001 1002 object = camMaskRowAlloc("a string"); 1003 if (!object) { 1004 exit(EXIT_FAILURE); 1005 } 1006 1007 md = camMaskMetadataFromObject(object); 1008 1008 if (!md) { 1009 1009 exit(EXIT_FAILURE); … … 1695 1695 { 1696 1696 psMetadata *md; 1697 p4RunRow*object;1698 bool status; 1699 1700 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");1701 if (!object) { 1702 exit(EXIT_FAILURE); 1703 } 1704 1705 md = p4RunMetadataFromObject(object);1706 if (!md) { 1707 exit(EXIT_FAILURE); 1708 } 1709 1710 psFree(object); 1711 1712 if (!psMetadataLookupS32(&status, md, " p4_id") == -32) {1697 warpRunRow *object; 1698 bool status; 1699 1700 object = warpRunRowAlloc(-32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"); 1701 if (!object) { 1702 exit(EXIT_FAILURE); 1703 } 1704 1705 md = warpRunMetadataFromObject(object); 1706 if (!md) { 1707 exit(EXIT_FAILURE); 1708 } 1709 1710 psFree(object); 1711 1712 if (!psMetadataLookupS32(&status, md, "warp_id") == -32) { 1713 1713 psFree(md); 1714 1714 exit(EXIT_FAILURE); … … 1739 1739 { 1740 1740 psMetadata *md; 1741 p4InputExpRow*object;1742 bool status; 1743 1744 object = p4InputExpRowAlloc(-32, "a string", -32, true);1745 if (!object) { 1746 exit(EXIT_FAILURE); 1747 } 1748 1749 md = p4InputExpMetadataFromObject(object);1750 if (!md) { 1751 exit(EXIT_FAILURE); 1752 } 1753 1754 psFree(object); 1755 1756 if (!psMetadataLookupS32(&status, md, " p4_id") == -32) {1741 warpInputExpRow *object; 1742 bool status; 1743 1744 object = warpInputExpRowAlloc(-32, "a string", -32, true); 1745 if (!object) { 1746 exit(EXIT_FAILURE); 1747 } 1748 1749 md = warpInputExpMetadataFromObject(object); 1750 if (!md) { 1751 exit(EXIT_FAILURE); 1752 } 1753 1754 psFree(object); 1755 1756 if (!psMetadataLookupS32(&status, md, "warp_id") == -32) { 1757 1757 psFree(md); 1758 1758 exit(EXIT_FAILURE); … … 1762 1762 exit(EXIT_FAILURE); 1763 1763 } 1764 if (!psMetadataLookupS32(&status, md, " p3_version") == -32) {1764 if (!psMetadataLookupS32(&status, md, "cam_version") == -32) { 1765 1765 psFree(md); 1766 1766 exit(EXIT_FAILURE); … … 1776 1776 { 1777 1777 psMetadata *md; 1778 p4SkyCellMapRow *object;1779 bool status; 1780 1781 object = p4SkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string");1782 if (!object) { 1783 exit(EXIT_FAILURE); 1784 } 1785 1786 md = p4SkyCellMapMetadataFromObject(object);1787 if (!md) { 1788 exit(EXIT_FAILURE); 1789 } 1790 1791 psFree(object); 1792 1793 if (!psMetadataLookupS32(&status, md, " p4_id") == -32) {1778 warpSkyCellMapRow *object; 1779 bool status; 1780 1781 object = warpSkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string"); 1782 if (!object) { 1783 exit(EXIT_FAILURE); 1784 } 1785 1786 md = warpSkyCellMapMetadataFromObject(object); 1787 if (!md) { 1788 exit(EXIT_FAILURE); 1789 } 1790 1791 psFree(object); 1792 1793 if (!psMetadataLookupS32(&status, md, "warp_id") == -32) { 1794 1794 psFree(md); 1795 1795 exit(EXIT_FAILURE); … … 1807 1807 exit(EXIT_FAILURE); 1808 1808 } 1809 if (!psMetadataLookupS32(&status, md, " p3_version") == -32) {1809 if (!psMetadataLookupS32(&status, md, "cam_version") == -32) { 1810 1810 psFree(md); 1811 1811 exit(EXIT_FAILURE); … … 1821 1821 { 1822 1822 psMetadata *md; 1823 p4SkyfileRow*object;1824 bool status; 1825 1826 object = p4SkyfileRowAlloc(-32, "a string", "a string", "a string", 64.64, 64.64);1827 if (!object) { 1828 exit(EXIT_FAILURE); 1829 } 1830 1831 md = p4SkyfileMetadataFromObject(object);1832 if (!md) { 1833 exit(EXIT_FAILURE); 1834 } 1835 1836 psFree(object); 1837 1838 if (!psMetadataLookupS32(&status, md, " p4_id") == -32) {1823 warpSkyfileRow *object; 1824 bool status; 1825 1826 object = warpSkyfileRowAlloc(-32, "a string", "a string", "a string", 64.64, 64.64); 1827 if (!object) { 1828 exit(EXIT_FAILURE); 1829 } 1830 1831 md = warpSkyfileMetadataFromObject(object); 1832 if (!md) { 1833 exit(EXIT_FAILURE); 1834 } 1835 1836 psFree(object); 1837 1838 if (!psMetadataLookupS32(&status, md, "warp_id") == -32) { 1839 1839 psFree(md); 1840 1840 exit(EXIT_FAILURE); … … 1866 1866 { 1867 1867 psMetadata *md; 1868 p5RunRow*object;1869 bool status; 1870 1871 object = p5RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");1872 if (!object) { 1873 exit(EXIT_FAILURE); 1874 } 1875 1876 md = p5RunMetadataFromObject(object);1877 if (!md) { 1878 exit(EXIT_FAILURE); 1879 } 1880 1881 psFree(object); 1882 1883 if (!psMetadataLookupS32(&status, md, " p5_id") == -32) {1868 diffRunRow *object; 1869 bool status; 1870 1871 object = diffRunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string"); 1872 if (!object) { 1873 exit(EXIT_FAILURE); 1874 } 1875 1876 md = diffRunMetadataFromObject(object); 1877 if (!md) { 1878 exit(EXIT_FAILURE); 1879 } 1880 1881 psFree(object); 1882 1883 if (!psMetadataLookupS32(&status, md, "diff_id") == -32) { 1884 1884 psFree(md); 1885 1885 exit(EXIT_FAILURE); … … 1914 1914 { 1915 1915 psMetadata *md; 1916 p5InputSkyfileRow *object;1917 bool status; 1918 1919 object = p5InputSkyfileRowAlloc(-32, -32, "a string", "a string", "a string", true);1920 if (!object) { 1921 exit(EXIT_FAILURE); 1922 } 1923 1924 md = p5InputSkyfileMetadataFromObject(object);1925 if (!md) { 1926 exit(EXIT_FAILURE); 1927 } 1928 1929 psFree(object); 1930 1931 if (!psMetadataLookupS32(&status, md, " p5_id") == -32) {1932 psFree(md); 1933 exit(EXIT_FAILURE); 1934 } 1935 if (!psMetadataLookupS32(&status, md, " p4_id") == -32) {1916 diffInputSkyfileRow *object; 1917 bool status; 1918 1919 object = diffInputSkyfileRowAlloc(-32, -32, "a string", "a string", "a string", true); 1920 if (!object) { 1921 exit(EXIT_FAILURE); 1922 } 1923 1924 md = diffInputSkyfileMetadataFromObject(object); 1925 if (!md) { 1926 exit(EXIT_FAILURE); 1927 } 1928 1929 psFree(object); 1930 1931 if (!psMetadataLookupS32(&status, md, "diff_id") == -32) { 1932 psFree(md); 1933 exit(EXIT_FAILURE); 1934 } 1935 if (!psMetadataLookupS32(&status, md, "warp_id") == -32) { 1936 1936 psFree(md); 1937 1937 exit(EXIT_FAILURE); … … 1959 1959 { 1960 1960 psMetadata *md; 1961 p5DiffSkyfileRow*object;1962 bool status; 1963 1964 object = p5DiffSkyfileRowAlloc(-32, "a string", 64.64, 64.64);1965 if (!object) { 1966 exit(EXIT_FAILURE); 1967 } 1968 1969 md = p5DiffSkyfileMetadataFromObject(object);1970 if (!md) { 1971 exit(EXIT_FAILURE); 1972 } 1973 1974 psFree(object); 1975 1976 if (!psMetadataLookupS32(&status, md, " p5_id") == -32) {1961 diffSkyfileRow *object; 1962 bool status; 1963 1964 object = diffSkyfileRowAlloc(-32, "a string", 64.64, 64.64); 1965 if (!object) { 1966 exit(EXIT_FAILURE); 1967 } 1968 1969 md = diffSkyfileMetadataFromObject(object); 1970 if (!md) { 1971 exit(EXIT_FAILURE); 1972 } 1973 1974 psFree(object); 1975 1976 if (!psMetadataLookupS32(&status, md, "diff_id") == -32) { 1977 1977 psFree(md); 1978 1978 exit(EXIT_FAILURE); … … 1996 1996 { 1997 1997 psMetadata *md; 1998 p6RunRow*object;1999 bool status; 2000 2001 object = p6RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");2002 if (!object) { 2003 exit(EXIT_FAILURE); 2004 } 2005 2006 md = p6RunMetadataFromObject(object);2007 if (!md) { 2008 exit(EXIT_FAILURE); 2009 } 2010 2011 psFree(object); 2012 2013 if (!psMetadataLookupS32(&status, md, " p6_id") == -32) {1998 stackRunRow *object; 1999 bool status; 2000 2001 object = stackRunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string"); 2002 if (!object) { 2003 exit(EXIT_FAILURE); 2004 } 2005 2006 md = stackRunMetadataFromObject(object); 2007 if (!md) { 2008 exit(EXIT_FAILURE); 2009 } 2010 2011 psFree(object); 2012 2013 if (!psMetadataLookupS32(&status, md, "stack_id") == -32) { 2014 2014 psFree(md); 2015 2015 exit(EXIT_FAILURE); … … 2044 2044 { 2045 2045 psMetadata *md; 2046 p6InputSkyfileRow *object;2047 bool status; 2048 2049 object = p6InputSkyfileRowAlloc(-32, -32);2050 if (!object) { 2051 exit(EXIT_FAILURE); 2052 } 2053 2054 md = p6InputSkyfileMetadataFromObject(object);2055 if (!md) { 2056 exit(EXIT_FAILURE); 2057 } 2058 2059 psFree(object); 2060 2061 if (!psMetadataLookupS32(&status, md, " p6_id") == -32) {2062 psFree(md); 2063 exit(EXIT_FAILURE); 2064 } 2065 if (!psMetadataLookupS32(&status, md, " p4_id") == -32) {2066 psFree(md); 2067 exit(EXIT_FAILURE); 2068 } 2069 2070 psFree(md); 2071 } 2072 2073 { 2074 psMetadata *md; 2075 p6SumSkyfileRow *object;2076 bool status; 2077 2078 object = p6SumSkyfileRowAlloc(-32, "a string", 64.64, 64.64);2079 if (!object) { 2080 exit(EXIT_FAILURE); 2081 } 2082 2083 md = p6SumSkyfileMetadataFromObject(object);2084 if (!md) { 2085 exit(EXIT_FAILURE); 2086 } 2087 2088 psFree(object); 2089 2090 if (!psMetadataLookupS32(&status, md, " p6_id") == -32) {2046 stackInputSkyfileRow *object; 2047 bool status; 2048 2049 object = stackInputSkyfileRowAlloc(-32, -32); 2050 if (!object) { 2051 exit(EXIT_FAILURE); 2052 } 2053 2054 md = stackInputSkyfileMetadataFromObject(object); 2055 if (!md) { 2056 exit(EXIT_FAILURE); 2057 } 2058 2059 psFree(object); 2060 2061 if (!psMetadataLookupS32(&status, md, "stack_id") == -32) { 2062 psFree(md); 2063 exit(EXIT_FAILURE); 2064 } 2065 if (!psMetadataLookupS32(&status, md, "warp_id") == -32) { 2066 psFree(md); 2067 exit(EXIT_FAILURE); 2068 } 2069 2070 psFree(md); 2071 } 2072 2073 { 2074 psMetadata *md; 2075 stackSumSkyfileRow *object; 2076 bool status; 2077 2078 object = stackSumSkyfileRowAlloc(-32, "a string", 64.64, 64.64); 2079 if (!object) { 2080 exit(EXIT_FAILURE); 2081 } 2082 2083 md = stackSumSkyfileMetadataFromObject(object); 2084 if (!md) { 2085 exit(EXIT_FAILURE); 2086 } 2087 2088 psFree(object); 2089 2090 if (!psMetadataLookupS32(&status, md, "stack_id") == -32) { 2091 2091 psFree(md); 2092 2092 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
