MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / main

Function main

src/testapi_userdataset.c:241–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241int main (int argc, char *argv[]) {
242 unsigned int in, answer, out, bad = 0, n = 0, V = (argc > 1), Q = (argc > 2);
243 unsigned int quiet = (argc == 2 && !strcmp (argv[1], "-q"));
244 char *passfail[2] = {"PASS", "FAIL"};
245 if (quiet) V = 0;
246 for (in = GMT_CHAR; in <= GMT_DOUBLE; in++) {
247 for (out = GMT_CHAR; out <= GMT_DOUBLE; out++) {
248 if (!quiet) printf ("Test matrix/dataset/matrix(prealloc) for Input = index [%s], output = 10*input + 1 [%s] :", type[in], type[out]);
249 answer = deploy_test (in, out, 1, V);
250 if (!quiet || answer) printf ("%s\n", passfail[answer]);
251 bad += answer;
252 n ++;
253 if (Q) out = in = GMT_DOUBLE;
254 }
255 }
256 if (bad && !quiet) printf ("%d of %d combinations with preallocated output memory failed the test\n", bad, n);
257 for (in = GMT_CHAR, bad = 0; in <= GMT_DOUBLE; in++) {
258 for (out = GMT_CHAR; out <= GMT_DOUBLE; out++) {
259 if (!quiet) printf ("Test matrix/dataset/matrix(GMT alloc) for Input = index [%s], output = 10*input + 1 [%s]", type[in], type[out]);
260 answer = deploy_test (in, out, 0, V);
261 if (!quiet || answer) printf (" :%s\n", passfail[answer]);
262 bad += answer;
263 n ++;
264 if (Q) out = in = GMT_DOUBLE;
265 }
266 }
267 if (bad && !quiet) printf ("%d of %d combinations with GMT-allocated output memory failed the test\n", bad, n);
268 exit (0);
269}

Callers

nothing calls this directly

Calls 1

deploy_testFunction · 0.70

Tested by

no test coverage detected