Changeset 15421 for trunk/ippdb/tests/insertobject.c
- Timestamp:
- Oct 30, 2007, 4:45:31 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/tests/insertobject.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/tests/insertobject.c
r15420 r15421 7 7 { 8 8 psDB *dbh; 9 pzDataStoreRow *object; 10 11 dbh = psDBInit("localhost", "test", NULL, "test"); 12 if (!dbh) { 13 exit(EXIT_FAILURE); 14 } 15 16 object = pzDataStoreRowAlloc("a string", "a string", "a string"); 17 if (!object) { 18 exit(EXIT_FAILURE); 19 } 20 21 if (!pzDataStoreInsertObject(dbh, object)) { 22 exit(EXIT_FAILURE); 23 } 24 25 psFree(object); 26 psDBCleanup(dbh); 27 } 28 29 { 30 psDB *dbh; 9 31 summitExpRow *object; 10 32 … … 80 102 } 81 103 82 object = pzPendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string" , -64);104 object = pzPendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string"); 83 105 if (!object) { 84 106 exit(EXIT_FAILURE); … … 124 146 } 125 147 126 object = pzDoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string", -64,"a string");148 object = pzDoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string"); 127 149 if (!object) { 128 150 exit(EXIT_FAILURE); … … 146 168 } 147 169 148 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", -32, "a string", "a string");170 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 149 171 if (!object) { 150 172 exit(EXIT_FAILURE); … … 190 212 } 191 213 192 object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16);214 object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16); 193 215 if (!object) { 194 216 exit(EXIT_FAILURE); … … 256 278 } 257 279 258 object = chipRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string");280 object = chipRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 259 281 if (!object) { 260 282 exit(EXIT_FAILURE); … … 271 293 { 272 294 psDB *dbh; 273 chipInputImfileRow *object;274 275 dbh = psDBInit("localhost", "test", NULL, "test");276 if (!dbh) {277 exit(EXIT_FAILURE);278 }279 280 object = chipInputImfileRowAlloc(-64, -64, "a string");281 if (!object) {282 exit(EXIT_FAILURE);283 }284 285 if (!chipInputImfileInsertObject(dbh, object)) {286 exit(EXIT_FAILURE);287 }288 289 psFree(object);290 psDBCleanup(dbh);291 }292 293 {294 psDB *dbh;295 295 chipProcessedImfileRow *object; 296 296 … … 476 476 } 477 477 478 object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64 );478 object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, -16); 479 479 if (!object) { 480 480 exit(EXIT_FAILURE); … … 520 520 } 521 521 522 object = diffInputSkyfileRowAlloc(-64, -64, "a string", "a string", "a string", true);522 object = diffInputSkyfileRowAlloc(-64, true, -64, -64, "a string", "a string", "a string"); 523 523 if (!object) { 524 524 exit(EXIT_FAILURE); … … 542 542 } 543 543 544 object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64 );544 object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 64.64, -16); 545 545 if (!object) { 546 546 exit(EXIT_FAILURE); … … 608 608 } 609 609 610 object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64 );610 object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 64.64, -16); 611 611 if (!object) { 612 612 exit(EXIT_FAILURE); … … 806 806 } 807 807 808 object = detResidImfileRowAlloc(-64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);808 object = detResidImfileRowAlloc(-64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16); 809 809 if (!object) { 810 810 exit(EXIT_FAILURE); … … 828 828 } 829 829 830 object = detResidExpRowAlloc(-64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", true, -16);830 object = detResidExpRowAlloc(-64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", true, -16); 831 831 if (!object) { 832 832 exit(EXIT_FAILURE); … … 856 856 857 857 if (!detRunSummaryInsertObject(dbh, object)) { 858 exit(EXIT_FAILURE); 859 } 860 861 psFree(object); 862 psDBCleanup(dbh); 863 } 864 865 { 866 psDB *dbh; 867 detRegisteredImfileRow *object; 868 869 dbh = psDBInit("localhost", "test", NULL, "test"); 870 if (!dbh) { 871 exit(EXIT_FAILURE); 872 } 873 874 object = detRegisteredImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16); 875 if (!object) { 876 exit(EXIT_FAILURE); 877 } 878 879 if (!detRegisteredImfileInsertObject(dbh, object)) { 880 exit(EXIT_FAILURE); 881 } 882 883 psFree(object); 884 psDBCleanup(dbh); 885 } 886 887 { 888 psDB *dbh; 889 detCorrectedExpRow *object; 890 891 dbh = psDBInit("localhost", "test", NULL, "test"); 892 if (!dbh) { 893 exit(EXIT_FAILURE); 894 } 895 896 object = detCorrectedExpRowAlloc(-64, -64, "a string", -64, "a string", "a string", "a string", -16); 897 if (!object) { 898 exit(EXIT_FAILURE); 899 } 900 901 if (!detCorrectedExpInsertObject(dbh, object)) { 902 exit(EXIT_FAILURE); 903 } 904 905 psFree(object); 906 psDBCleanup(dbh); 907 } 908 909 { 910 psDB *dbh; 911 detCorrectedImfileRow *object; 912 913 dbh = psDBInit("localhost", "test", NULL, "test"); 914 if (!dbh) { 915 exit(EXIT_FAILURE); 916 } 917 918 object = detCorrectedImfileRowAlloc(-64, -64, "a string", "a string", "a string", -16); 919 if (!object) { 920 exit(EXIT_FAILURE); 921 } 922 923 if (!detCorrectedImfileInsertObject(dbh, object)) { 924 exit(EXIT_FAILURE); 925 } 926 927 psFree(object); 928 psDBCleanup(dbh); 929 } 930 931 { 932 psDB *dbh; 933 magicRunRow *object; 934 935 dbh = psDBInit("localhost", "test", NULL, "test"); 936 if (!dbh) { 937 exit(EXIT_FAILURE); 938 } 939 940 object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"); 941 if (!object) { 942 exit(EXIT_FAILURE); 943 } 944 945 if (!magicRunInsertObject(dbh, object)) { 946 exit(EXIT_FAILURE); 947 } 948 949 psFree(object); 950 psDBCleanup(dbh); 951 } 952 953 { 954 psDB *dbh; 955 magicInputSkyfileRow *object; 956 957 dbh = psDBInit("localhost", "test", NULL, "test"); 958 if (!dbh) { 959 exit(EXIT_FAILURE); 960 } 961 962 object = magicInputSkyfileRowAlloc(-64, -64, "a string"); 963 if (!object) { 964 exit(EXIT_FAILURE); 965 } 966 967 if (!magicInputSkyfileInsertObject(dbh, object)) { 968 exit(EXIT_FAILURE); 969 } 970 971 psFree(object); 972 psDBCleanup(dbh); 973 } 974 975 { 976 psDB *dbh; 977 magicTreeRow *object; 978 979 dbh = psDBInit("localhost", "test", NULL, "test"); 980 if (!dbh) { 981 exit(EXIT_FAILURE); 982 } 983 984 object = magicTreeRowAlloc(-64, "a string", "a string"); 985 if (!object) { 986 exit(EXIT_FAILURE); 987 } 988 989 if (!magicTreeInsertObject(dbh, object)) { 990 exit(EXIT_FAILURE); 991 } 992 993 psFree(object); 994 psDBCleanup(dbh); 995 } 996 997 { 998 psDB *dbh; 999 magicNodeResultRow *object; 1000 1001 dbh = psDBInit("localhost", "test", NULL, "test"); 1002 if (!dbh) { 1003 exit(EXIT_FAILURE); 1004 } 1005 1006 object = magicNodeResultRowAlloc(-64, "a string", "a string"); 1007 if (!object) { 1008 exit(EXIT_FAILURE); 1009 } 1010 1011 if (!magicNodeResultInsertObject(dbh, object)) { 1012 exit(EXIT_FAILURE); 1013 } 1014 1015 psFree(object); 1016 psDBCleanup(dbh); 1017 } 1018 1019 { 1020 psDB *dbh; 1021 magicMaskRow *object; 1022 1023 dbh = psDBInit("localhost", "test", NULL, "test"); 1024 if (!dbh) { 1025 exit(EXIT_FAILURE); 1026 } 1027 1028 object = magicMaskRowAlloc(-64, "a string"); 1029 if (!object) { 1030 exit(EXIT_FAILURE); 1031 } 1032 1033 if (!magicMaskInsertObject(dbh, object)) { 1034 exit(EXIT_FAILURE); 1035 } 1036 1037 psFree(object); 1038 psDBCleanup(dbh); 1039 } 1040 1041 { 1042 psDB *dbh; 1043 magicSkyfileMaskRow *object; 1044 1045 dbh = psDBInit("localhost", "test", NULL, "test"); 1046 if (!dbh) { 1047 exit(EXIT_FAILURE); 1048 } 1049 1050 object = magicSkyfileMaskRowAlloc(-64, -64, "a string"); 1051 if (!object) { 1052 exit(EXIT_FAILURE); 1053 } 1054 1055 if (!magicSkyfileMaskInsertObject(dbh, object)) { 858 1056 exit(EXIT_FAILURE); 859 1057 }
Note:
See TracChangeset
for help on using the changeset viewer.
