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

Function main

src/testapi_usergrid.c:264–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264int main (int argc, char *argv[]) {
265 unsigned int in, mem_mode, def_mode, answer, out, bad = 0, n = 0, V = (argc > 1), Q = (argc > 2);
266 char *passfail[2] = {"PASS", "FAIL"}, *kind[2] = {"prealloc", "GMTalloc"}, *def[2] = {"dim", "R/I"};
267 unsigned int quiet = (argc == 2 && !strcmp (argv[1], "-q"));
268 if (quiet) V = 0;
269 for (def_mode = 0; def_mode < 2; def_mode++) {
270 for (mem_mode = 0; mem_mode < 2; mem_mode++) {
271 for (in = GMT_CHAR; in <= GMT_DOUBLE; in++) {
272 for (out = GMT_CHAR; out <= GMT_DOUBLE; out++) {
273 if (!quiet) printf ("[%s] Test matrix/grid/matrix(%s) for Input = index [%6s], output = 10*input + 1 [%6s] : ", def[def_mode], kind[mem_mode], type[in], type[out]);
274 answer = deploy_test (in, out, mem_mode, def_mode, V);
275 if (!quiet || answer) printf ("%s\n", passfail[answer]);
276 bad += answer;
277 n ++;
278 if (Q) out = in = GMT_DOUBLE;
279 }
280 }
281 if (bad && !quiet) printf ("%d of %d combinations with %sed output memory failed the test\n", bad, n, kind[mem_mode]);
282 }
283 }
284 exit (0);
285}

Callers

nothing calls this directly

Calls 1

deploy_testFunction · 0.70

Tested by

no test coverage detected