Changeset 16587 for trunk/ippdb/tests/insertobject.c
- Timestamp:
- Feb 21, 2008, 6:09:25 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/tests/insertobject.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/tests/insertobject.c
r16177 r16587 73 73 { 74 74 psDB *dbh; 75 pzPendingExpRow *object; 76 77 dbh = psDBInit("localhost", "test", NULL, "test"); 78 if (!dbh) { 79 exit(EXIT_FAILURE); 80 } 81 82 object = pzPendingExpRowAlloc("a string", "a string", "a string"); 83 if (!object) { 84 exit(EXIT_FAILURE); 85 } 86 87 if (!pzPendingExpInsertObject(dbh, object)) { 88 exit(EXIT_FAILURE); 89 } 90 91 psFree(object); 92 psDBCleanup(dbh); 93 } 94 95 { 96 psDB *dbh; 97 pzPendingImfileRow *object; 98 99 dbh = psDBInit("localhost", "test", NULL, "test"); 100 if (!dbh) { 101 exit(EXIT_FAILURE); 102 } 103 104 object = pzPendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string"); 105 if (!object) { 106 exit(EXIT_FAILURE); 107 } 108 109 if (!pzPendingImfileInsertObject(dbh, object)) { 110 exit(EXIT_FAILURE); 111 } 112 113 psFree(object); 114 psDBCleanup(dbh); 115 } 116 117 { 118 psDB *dbh; 119 pzDoneExpRow *object; 120 121 dbh = psDBInit("localhost", "test", NULL, "test"); 122 if (!dbh) { 123 exit(EXIT_FAILURE); 124 } 125 126 object = pzDoneExpRowAlloc("a string", "a string", "a string"); 127 if (!object) { 128 exit(EXIT_FAILURE); 129 } 130 131 if (!pzDoneExpInsertObject(dbh, object)) { 132 exit(EXIT_FAILURE); 133 } 134 135 psFree(object); 136 psDBCleanup(dbh); 137 } 138 139 { 140 psDB *dbh; 141 pzDoneImfileRow *object; 142 143 dbh = psDBInit("localhost", "test", NULL, "test"); 144 if (!dbh) { 145 exit(EXIT_FAILURE); 146 } 147 148 object = pzDoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string"); 149 if (!object) { 150 exit(EXIT_FAILURE); 151 } 152 153 if (!pzDoneImfileInsertObject(dbh, object)) { 75 pzDownloadExpRow *object; 76 77 dbh = psDBInit("localhost", "test", NULL, "test"); 78 if (!dbh) { 79 exit(EXIT_FAILURE); 80 } 81 82 object = pzDownloadExpRowAlloc("a string", "a string", "a string", "a string"); 83 if (!object) { 84 exit(EXIT_FAILURE); 85 } 86 87 if (!pzDownloadExpInsertObject(dbh, object)) { 88 exit(EXIT_FAILURE); 89 } 90 91 psFree(object); 92 psDBCleanup(dbh); 93 } 94 95 { 96 psDB *dbh; 97 pzDownloadImfileRow *object; 98 99 dbh = psDBInit("localhost", "test", NULL, "test"); 100 if (!dbh) { 101 exit(EXIT_FAILURE); 102 } 103 104 object = pzDownloadImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", -16); 105 if (!object) { 106 exit(EXIT_FAILURE); 107 } 108 109 if (!pzDownloadImfileInsertObject(dbh, object)) { 154 110 exit(EXIT_FAILURE); 155 111 } … … 168 124 } 169 125 170 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string" );126 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 171 127 if (!object) { 172 128 exit(EXIT_FAILURE); … … 300 256 } 301 257 302 object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, -32, -32, -32, "a string", -16);258 object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16); 303 259 if (!object) { 304 260 exit(EXIT_FAILURE); … … 366 322 } 367 323 368 object = camProcessedExpRowAlloc(-64, -64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, -32, -32, -32, "a string", -16);324 object = camProcessedExpRowAlloc(-64, -64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16); 369 325 if (!object) { 370 326 exit(EXIT_FAILURE); … … 476 432 } 477 433 478 object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, true, -16);434 object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, true, -16); 479 435 if (!object) { 480 436 exit(EXIT_FAILURE); … … 542 498 } 543 499 544 object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 64.64, -16);500 object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -16); 545 501 if (!object) { 546 502 exit(EXIT_FAILURE); … … 608 564 } 609 565 610 object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 64.64, -16);566 object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -16); 611 567 if (!object) { 612 568 exit(EXIT_FAILURE); … … 1114 1070 } 1115 1071 1116 object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string" );1072 object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string"); 1117 1073 if (!object) { 1118 1074 exit(EXIT_FAILURE); … … 1142 1098 1143 1099 if (!flatcorrExpInsertObject(dbh, object)) { 1100 exit(EXIT_FAILURE); 1101 } 1102 1103 psFree(object); 1104 psDBCleanup(dbh); 1105 } 1106 1107 { 1108 psDB *dbh; 1109 pstampDataStoreRow *object; 1110 1111 dbh = psDBInit("localhost", "test", NULL, "test"); 1112 if (!dbh) { 1113 exit(EXIT_FAILURE); 1114 } 1115 1116 object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string"); 1117 if (!object) { 1118 exit(EXIT_FAILURE); 1119 } 1120 1121 if (!pstampDataStoreInsertObject(dbh, object)) { 1122 exit(EXIT_FAILURE); 1123 } 1124 1125 psFree(object); 1126 psDBCleanup(dbh); 1127 } 1128 1129 { 1130 psDB *dbh; 1131 pstampRequestRow *object; 1132 1133 dbh = psDBInit("localhost", "test", NULL, "test"); 1134 if (!dbh) { 1135 exit(EXIT_FAILURE); 1136 } 1137 1138 object = pstampRequestRowAlloc(-64, -64, "a string", "a string"); 1139 if (!object) { 1140 exit(EXIT_FAILURE); 1141 } 1142 1143 if (!pstampRequestInsertObject(dbh, object)) { 1144 exit(EXIT_FAILURE); 1145 } 1146 1147 psFree(object); 1148 psDBCleanup(dbh); 1149 } 1150 1151 { 1152 psDB *dbh; 1153 pstampJobRow *object; 1154 1155 dbh = psDBInit("localhost", "test", NULL, "test"); 1156 if (!dbh) { 1157 exit(EXIT_FAILURE); 1158 } 1159 1160 object = pstampJobRowAlloc(-64, -64, "a string", -32, "a string", "a string", "a string"); 1161 if (!object) { 1162 exit(EXIT_FAILURE); 1163 } 1164 1165 if (!pstampJobInsertObject(dbh, object)) { 1144 1166 exit(EXIT_FAILURE); 1145 1167 }
Note:
See TracChangeset
for help on using the changeset viewer.
