Changeset 8283 for trunk/ippdb/tests/metadatafromobject.c
- Timestamp:
- Aug 10, 2006, 3:34:31 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/tests/metadatafromobject.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/tests/metadatafromobject.c
r8266 r8283 590 590 bool status; 591 591 592 object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64 );592 object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64); 593 593 if (!object) { 594 594 exit(EXIT_FAILURE); … … 642 642 exit(EXIT_FAILURE); 643 643 } 644 if (!psMetadataLookupF64(&status, md, "background") == 64.64) { 644 if (!psMetadataLookupF64(&status, md, "bg") == 64.64) { 645 psFree(md); 646 exit(EXIT_FAILURE); 647 } 648 if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) { 649 psFree(md); 650 exit(EXIT_FAILURE); 651 } 652 if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) { 653 psFree(md); 654 exit(EXIT_FAILURE); 655 } 656 if (!psMetadataLookupF64(&status, md, "alt") == 64.64) { 657 psFree(md); 658 exit(EXIT_FAILURE); 659 } 660 if (!psMetadataLookupF64(&status, md, "az") == 64.64) { 661 psFree(md); 662 exit(EXIT_FAILURE); 663 } 664 if (!psMetadataLookupF32(&status, md, "ccd_temp") == 32.32) { 665 psFree(md); 666 exit(EXIT_FAILURE); 667 } 668 if (!psMetadataLookupF64(&status, md, "posang") == 64.64) { 645 669 psFree(md); 646 670 exit(EXIT_FAILURE); … … 655 679 bool status; 656 680 657 object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64 );681 object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64); 658 682 if (!object) { 659 683 exit(EXIT_FAILURE); … … 707 731 exit(EXIT_FAILURE); 708 732 } 709 if (!psMetadataLookupF64(&status, md, "background") == 64.64) { 733 if (!psMetadataLookupF64(&status, md, "bg") == 64.64) { 734 psFree(md); 735 exit(EXIT_FAILURE); 736 } 737 if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) { 738 psFree(md); 739 exit(EXIT_FAILURE); 740 } 741 if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) { 742 psFree(md); 743 exit(EXIT_FAILURE); 744 } 745 if (!psMetadataLookupF64(&status, md, "alt") == 64.64) { 746 psFree(md); 747 exit(EXIT_FAILURE); 748 } 749 if (!psMetadataLookupF64(&status, md, "az") == 64.64) { 750 psFree(md); 751 exit(EXIT_FAILURE); 752 } 753 if (!psMetadataLookupF32(&status, md, "ccd_temp") == 32.32) { 754 psFree(md); 755 exit(EXIT_FAILURE); 756 } 757 if (!psMetadataLookupF64(&status, md, "posang") == 64.64) { 710 758 psFree(md); 711 759 exit(EXIT_FAILURE); … … 805 853 bool status; 806 854 807 object = p1PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, "a string",-32);855 object = p1PendingExpRowAlloc("a string", "a string", -32); 808 856 if (!object) { 809 857 exit(EXIT_FAILURE); … … 821 869 exit(EXIT_FAILURE); 822 870 } 823 if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {824 psFree(md);825 exit(EXIT_FAILURE);826 }827 if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {828 psFree(md);829 exit(EXIT_FAILURE);830 }831 if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {832 psFree(md);833 exit(EXIT_FAILURE);834 }835 if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {836 psFree(md);837 exit(EXIT_FAILURE);838 }839 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {840 psFree(md);841 exit(EXIT_FAILURE);842 }843 if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {844 psFree(md);845 exit(EXIT_FAILURE);846 }847 if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {848 psFree(md);849 exit(EXIT_FAILURE);850 }851 if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {852 psFree(md);853 exit(EXIT_FAILURE);854 }855 if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {856 psFree(md);857 exit(EXIT_FAILURE);858 }859 if (!psMetadataLookupF64(&status, md, "background") == 64.64) {860 psFree(md);861 exit(EXIT_FAILURE);862 }863 871 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 864 872 psFree(md); … … 878 886 bool status; 879 887 880 object = p2PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 32.32, 64.64, 64.64, 64.64, "a string",-32, -32);888 object = p2PendingExpRowAlloc("a string", "a string", -32, -32); 881 889 if (!object) { 882 890 exit(EXIT_FAILURE); … … 894 902 exit(EXIT_FAILURE); 895 903 } 896 if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {897 psFree(md);898 exit(EXIT_FAILURE);899 }900 if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {901 psFree(md);902 exit(EXIT_FAILURE);903 }904 if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {905 psFree(md);906 exit(EXIT_FAILURE);907 }908 if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {909 psFree(md);910 exit(EXIT_FAILURE);911 }912 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {913 psFree(md);914 exit(EXIT_FAILURE);915 }916 if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {917 psFree(md);918 exit(EXIT_FAILURE);919 }920 if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {921 psFree(md);922 exit(EXIT_FAILURE);923 }924 if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {925 psFree(md);926 exit(EXIT_FAILURE);927 }928 if (!psMetadataLookupF64(&status, md, "exp_time") == 64.64) {929 psFree(md);930 exit(EXIT_FAILURE);931 }932 if (!psMetadataLookupF64(&status, md, "background") == 64.64) {933 psFree(md);934 exit(EXIT_FAILURE);935 }936 904 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 937 905 psFree(md); … … 1000 968 bool status; 1001 969 1002 object = p2DoneExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, "a string",-32, -32);970 object = p2DoneExpRowAlloc("a string", "a string", -32, -32); 1003 971 if (!object) { 1004 972 exit(EXIT_FAILURE); … … 1016 984 exit(EXIT_FAILURE); 1017 985 } 1018 if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {1019 psFree(md);1020 exit(EXIT_FAILURE);1021 }1022 if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {1023 psFree(md);1024 exit(EXIT_FAILURE);1025 }1026 if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {1027 psFree(md);1028 exit(EXIT_FAILURE);1029 }1030 if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {1031 psFree(md);1032 exit(EXIT_FAILURE);1033 }1034 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {1035 psFree(md);1036 exit(EXIT_FAILURE);1037 }1038 if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {1039 psFree(md);1040 exit(EXIT_FAILURE);1041 }1042 if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {1043 psFree(md);1044 exit(EXIT_FAILURE);1045 }1046 if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {1047 psFree(md);1048 exit(EXIT_FAILURE);1049 }1050 if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {1051 psFree(md);1052 exit(EXIT_FAILURE);1053 }1054 if (!psMetadataLookupF64(&status, md, "background") == 64.64) {1055 psFree(md);1056 exit(EXIT_FAILURE);1057 }1058 986 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 1059 987 psFree(md); … … 1122 1050 bool status; 1123 1051 1124 object = p3PendingExpRowAlloc("a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, "a string",-32, -32);1052 object = p3PendingExpRowAlloc("a string", "a string", -32, -32); 1125 1053 if (!object) { 1126 1054 exit(EXIT_FAILURE); … … 1138 1066 exit(EXIT_FAILURE); 1139 1067 } 1140 if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {1141 psFree(md);1142 exit(EXIT_FAILURE);1143 }1144 if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {1145 psFree(md);1146 exit(EXIT_FAILURE);1147 }1148 if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {1149 psFree(md);1150 exit(EXIT_FAILURE);1151 }1152 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {1153 psFree(md);1154 exit(EXIT_FAILURE);1155 }1156 if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {1157 psFree(md);1158 exit(EXIT_FAILURE);1159 }1160 if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {1161 psFree(md);1162 exit(EXIT_FAILURE);1163 }1164 if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {1165 psFree(md);1166 exit(EXIT_FAILURE);1167 }1168 if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {1169 psFree(md);1170 exit(EXIT_FAILURE);1171 }1172 if (!psMetadataLookupF64(&status, md, "background") == 64.64) {1173 psFree(md);1174 exit(EXIT_FAILURE);1175 }1176 1068 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 1177 1069 psFree(md); … … 1224 1116 bool status; 1225 1117 1226 object = detInputExpRowAlloc(-32, -32, "a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64);1118 object = detInputExpRowAlloc(-32, -32, "a string", true, true); 1227 1119 if (!object) { 1228 1120 exit(EXIT_FAILURE); … … 1248 1140 exit(EXIT_FAILURE); 1249 1141 } 1250 if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) { 1251 psFree(md); 1252 exit(EXIT_FAILURE); 1253 } 1254 if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) { 1255 psFree(md); 1256 exit(EXIT_FAILURE); 1257 } 1258 if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) { 1259 psFree(md); 1260 exit(EXIT_FAILURE); 1261 } 1262 if (!psMetadataLookupS32(&status, md, "imfiles") == -32) { 1263 psFree(md); 1264 exit(EXIT_FAILURE); 1265 } 1266 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) { 1267 psFree(md); 1268 exit(EXIT_FAILURE); 1269 } 1270 if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) { 1271 psFree(md); 1272 exit(EXIT_FAILURE); 1273 } 1274 if (!psMetadataLookupF64(&status, md, "ra") == 64.64) { 1275 psFree(md); 1276 exit(EXIT_FAILURE); 1277 } 1278 if (!psMetadataLookupF64(&status, md, "decl") == 64.64) { 1279 psFree(md); 1280 exit(EXIT_FAILURE); 1281 } 1282 if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) { 1283 psFree(md); 1284 exit(EXIT_FAILURE); 1285 } 1286 if (!psMetadataLookupF64(&status, md, "background") == 64.64) { 1142 if (!psMetadataLookupBool(&status, md, "include") == true) { 1143 psFree(md); 1144 exit(EXIT_FAILURE); 1145 } 1146 if (!psMetadataLookupBool(&status, md, "accept") == true) { 1287 1147 psFree(md); 1288 1148 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
