MCPcopy Create free account
hub / github.com/OSGeo/PROJ / TEST

Function TEST

test/unit/test_network.cpp:90–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90TEST(networking, initial_check) {
91 CURL *hCurlHandle = curl_easy_init();
92 if (!hCurlHandle)
93 return;
94 curl_easy_setopt(hCurlHandle, CURLOPT_URL,
95 "https://cdn.proj.org/fr_ign_ntf_r93.tif");
96
97 curl_easy_setopt(hCurlHandle, CURLOPT_RANGE, "0-1");
98 curl_easy_setopt(hCurlHandle, CURLOPT_WRITEFUNCTION, noop_curl_write_func);
99
100 curl_easy_perform(hCurlHandle);
101
102 long response_code = 0;
103 curl_easy_getinfo(hCurlHandle, CURLINFO_HTTP_CODE, &response_code);
104
105 curl_easy_cleanup(hCurlHandle);
106
107 networkAccessOK = (response_code == 206);
108 if (!networkAccessOK) {
109 fprintf(stderr, "network access not working");
110 }
111}
112
113#endif
114

Callers

nothing calls this directly

Calls 15

proj_context_createFunction · 0.85
proj_log_funcFunction · 0.85
proj_createFunction · 0.85
proj_context_destroyFunction · 0.85
proj_cleanupFunction · 0.85
proj_destroyFunction · 0.85
proj_trans_genericFunction · 0.85
proj_create_crs_to_crsFunction · 0.85
proj_transFunction · 0.85

Tested by

no test coverage detected