Changeset 4394
- Timestamp:
- Jun 24, 2005, 4:45:15 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/dataIO/tst_psDB.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/dataIO/tst_psDB.c
r4391 r4394 9 9 * @author Aaron Culliney, MHPCC 10 10 * 11 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06-25 0 1:34:07$11 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-25 02:45:15 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1612 1612 switch(itemNum) { 1613 1613 case 0: 1614 if(mdItem->type != PS_META_ ARRAY) {1614 if(mdItem->type != PS_META_VEC) { 1615 1615 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d", 1616 itemNum,mdItem->type,PS_META_ ARRAY);1616 itemNum,mdItem->type,PS_META_VEC); 1617 1617 psDBDropTable(dbh,table); 1618 1618 psDBCleanup(dbh); 1619 1619 return 5*(itemNum+1); 1620 1620 } 1621 if(((psArray*)mdItem->data.V)->n != 3) { 1621 if(((psVector*)mdItem->data.V)->type.type != PS_TYPE_S32) { 1622 psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d", 1623 itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_S32); 1624 psDBDropTable(dbh,table); 1625 psDBCleanup(dbh); 1626 return 6*(itemNum+1); 1627 } 1628 if(((psVector*)mdItem->data.V)->n != 3) { 1622 1629 psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d", 1623 itemNum,((ps Array*)mdItem->data.V)->n,3);1630 itemNum,((psVector*)mdItem->data.V)->n,3); 1624 1631 psDBDropTable(dbh,table); 1625 1632 psDBCleanup(dbh); 1626 1633 return 7*(itemNum+1); 1627 1634 } 1628 if(strcmp(mdItem->name,TAB_COL_ 0_NAME) != 0) {1635 if(strcmp(mdItem->name,TAB_COL_5_NAME) != 0) { 1629 1636 psError(PS_ERR_UNKNOWN,true,"Column #%d name %s not as expected %s", 1630 itemNum,mdItem->name,TAB_COL_ 0_NAME);1637 itemNum,mdItem->name,TAB_COL_5_NAME); 1631 1638 psDBDropTable(dbh,table); 1632 1639 psDBCleanup(dbh); … … 1635 1642 break; 1636 1643 case 1: 1644 if(mdItem->type != PS_META_VEC) { 1645 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d", 1646 itemNum,mdItem->type,PS_META_VEC); 1647 psDBDropTable(dbh,table); 1648 psDBCleanup(dbh); 1649 return 5*(itemNum+1); 1650 } 1651 if(((psVector*)mdItem->data.V)->type.type != PS_TYPE_BOOL) { 1652 psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d", 1653 itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_BOOL); 1654 psDBDropTable(dbh,table); 1655 psDBCleanup(dbh); 1656 return 6*(itemNum+1); 1657 } 1658 if(((psVector*)mdItem->data.V)->n != 3) { 1659 psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d", 1660 itemNum,((psVector*)mdItem->data.V)->n,3); 1661 psDBDropTable(dbh,table); 1662 psDBCleanup(dbh); 1663 return 7*(itemNum+1); 1664 } 1665 if(strcmp(mdItem->name,TAB_COL_4_NAME) != 0) { 1666 psError(PS_ERR_UNKNOWN,true,"Column #%d name %s not as expected %s", 1667 itemNum,mdItem->name,TAB_COL_4_NAME); 1668 psDBDropTable(dbh,table); 1669 psDBCleanup(dbh); 1670 return 8*(itemNum+1); 1671 } 1672 break; 1673 case 2: 1674 if(mdItem->type != PS_META_VEC) { 1675 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d", 1676 itemNum,mdItem->type,PS_META_VEC); 1677 psDBDropTable(dbh,table); 1678 psDBCleanup(dbh); 1679 return 5*(itemNum+1); 1680 } 1681 if(((psVector*)mdItem->data.V)->type.type != PS_TYPE_F64) { 1682 psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d", 1683 itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_F64); 1684 psDBDropTable(dbh,table); 1685 psDBCleanup(dbh); 1686 return 6*(itemNum+1); 1687 } 1688 if(((psVector*)mdItem->data.V)->n != 3) { 1689 psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d", 1690 itemNum,((psVector*)mdItem->data.V)->n,3); 1691 psDBDropTable(dbh,table); 1692 psDBCleanup(dbh); 1693 return 7*(itemNum+1); 1694 } 1695 if(strcmp(mdItem->name,TAB_COL_3_NAME) != 0) { 1696 psError(PS_ERR_UNKNOWN,true,"Column #%d name %s not as expected %s", 1697 itemNum,mdItem->name,TAB_COL_3_NAME); 1698 psDBDropTable(dbh,table); 1699 psDBCleanup(dbh); 1700 return 8*(itemNum+1); 1701 } 1702 break; 1703 case 3: 1704 if(mdItem->type != PS_META_VEC) { 1705 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d", 1706 itemNum,mdItem->type,PS_META_VEC); 1707 psDBDropTable(dbh,table); 1708 psDBCleanup(dbh); 1709 return 5*(itemNum+1); 1710 } 1711 if(((psVector*)mdItem->data.V)->type.type != PS_TYPE_F32) { 1712 psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d", 1713 itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_F32); 1714 psDBDropTable(dbh,table); 1715 psDBCleanup(dbh); 1716 return 6*(itemNum+1); 1717 } 1718 if(((psVector*)mdItem->data.V)->n != 3) { 1719 psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d", 1720 itemNum,((psVector*)mdItem->data.V)->n,3); 1721 psDBDropTable(dbh,table); 1722 psDBCleanup(dbh); 1723 return 7*(itemNum+1); 1724 } 1725 if(strcmp(mdItem->name,TAB_COL_2_NAME) != 0) { 1726 psError(PS_ERR_UNKNOWN,true,"Column #%d name %s not as expected %s", 1727 itemNum,mdItem->name,TAB_COL_2_NAME); 1728 psDBDropTable(dbh,table); 1729 psDBCleanup(dbh); 1730 return 8*(itemNum+1); 1731 } 1732 break; 1733 case 4: 1637 1734 if(mdItem->type != PS_META_VEC) { 1638 1735 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d", … … 1664 1761 } 1665 1762 break; 1666 case 2:1667 if(mdItem->type != PS_META_ VEC) {1763 case 5: 1764 if(mdItem->type != PS_META_ARRAY) { 1668 1765 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d", 1669 itemNum,mdItem->type,PS_META_ VEC);1766 itemNum,mdItem->type,PS_META_ARRAY); 1670 1767 psDBDropTable(dbh,table); 1671 1768 psDBCleanup(dbh); 1672 1769 return 5*(itemNum+1); 1673 1770 } 1674 if(((psVector*)mdItem->data.V)->type.type != PS_TYPE_F32) { 1675 psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d", 1676 itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_F32); 1677 psDBDropTable(dbh,table); 1678 psDBCleanup(dbh); 1679 return 6*(itemNum+1); 1680 } 1681 if(((psVector*)mdItem->data.V)->n != 3) { 1771 if(((psArray*)mdItem->data.V)->n != 3) { 1682 1772 psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d", 1683 itemNum,((ps Vector*)mdItem->data.V)->n,3);1773 itemNum,((psArray*)mdItem->data.V)->n,3); 1684 1774 psDBDropTable(dbh,table); 1685 1775 psDBCleanup(dbh); 1686 1776 return 7*(itemNum+1); 1687 1777 } 1688 if(strcmp(mdItem->name,TAB_COL_ 2_NAME) != 0) {1778 if(strcmp(mdItem->name,TAB_COL_0_NAME) != 0) { 1689 1779 psError(PS_ERR_UNKNOWN,true,"Column #%d name %s not as expected %s", 1690 itemNum,mdItem->name,TAB_COL_ 2_NAME);1780 itemNum,mdItem->name,TAB_COL_0_NAME); 1691 1781 psDBDropTable(dbh,table); 1692 1782 psDBCleanup(dbh); 1693 1783 return 8*(itemNum+1); 1694 1784 } 1695 break;1696 case 3:1697 if(mdItem->type != PS_META_VEC) {1698 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d",1699 itemNum,mdItem->type,PS_META_VEC);1700 psDBDropTable(dbh,table);1701 psDBCleanup(dbh);1702 return 5*(itemNum+1);1703 }1704 if(((psVector*)mdItem->data.V)->type.type != PS_TYPE_F64) {1705 psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d",1706 itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_F64);1707 psDBDropTable(dbh,table);1708 psDBCleanup(dbh);1709 return 6*(itemNum+1);1710 }1711 if(((psVector*)mdItem->data.V)->n != 3) {1712 psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d",1713 itemNum,((psVector*)mdItem->data.V)->n,3);1714 psDBDropTable(dbh,table);1715 psDBCleanup(dbh);1716 return 7*(itemNum+1);1717 }1718 if(strcmp(mdItem->name,TAB_COL_3_NAME) != 0) {1719 psError(PS_ERR_UNKNOWN,true,"Column #%d name %s not as expected %s",1720 itemNum,mdItem->name,TAB_COL_3_NAME);1721 psDBDropTable(dbh,table);1722 psDBCleanup(dbh);1723 return 8*(itemNum+1);1724 }1725 break;1726 case 4:1727 if(mdItem->type != PS_META_VEC) {1728 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d",1729 itemNum,mdItem->type,PS_META_VEC);1730 psDBDropTable(dbh,table);1731 psDBCleanup(dbh);1732 return 5*(itemNum+1);1733 }1734 if(((psVector*)mdItem->data.V)->type.type != PS_TYPE_BOOL) {1735 psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d",1736 itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_BOOL);1737 psDBDropTable(dbh,table);1738 psDBCleanup(dbh);1739 return 6*(itemNum+1);1740 }1741 if(((psVector*)mdItem->data.V)->n != 3) {1742 psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d",1743 itemNum,((psVector*)mdItem->data.V)->n,3);1744 psDBDropTable(dbh,table);1745 psDBCleanup(dbh);1746 return 7*(itemNum+1);1747 }1748 if(strcmp(mdItem->name,TAB_COL_4_NAME) != 0) {1749 psError(PS_ERR_UNKNOWN,true,"Column #%d name %s not as expected %s",1750 itemNum,mdItem->name,TAB_COL_4_NAME);1751 psDBDropTable(dbh,table);1752 psDBCleanup(dbh);1753 return 8*(itemNum+1);1754 }1755 break;1756 case 5:1757 if(mdItem->type != PS_META_VEC) {1758 psError(PS_ERR_UNKNOWN,true,"Column #%d type %d not as expected %d",1759 itemNum,mdItem->type,PS_META_VEC);1760 psDBDropTable(dbh,table);1761 psDBCleanup(dbh);1762 return 5*(itemNum+1);1763 }1764 if(((psVector*)mdItem->data.V)->type.type != PS_TYPE_S32) {1765 psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d",1766 itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_S32);1767 psDBDropTable(dbh,table);1768 psDBCleanup(dbh);1769 return 6*(itemNum+1);1770 }1771 if(((psVector*)mdItem->data.V)->n != 3) {1772 psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d",1773 itemNum,((psVector*)mdItem->data.V)->n,3);1774 psDBDropTable(dbh,table);1775 psDBCleanup(dbh);1776 return 7*(itemNum+1);1777 }1778 if(strcmp(mdItem->name,TAB_COL_5_NAME) != 0) {1779 psError(PS_ERR_UNKNOWN,true,"Column #%d name %s not as expected %s",1780 itemNum,mdItem->name,TAB_COL_5_NAME);1781 psDBDropTable(dbh,table);1782 psDBCleanup(dbh);1783 return 8*(itemNum+1);1784 }1785 break;1786 1785 break; 1787 1786
Note:
See TracChangeset
for help on using the changeset viewer.
