mirror of
https://github.com/curl/curl.git
synced 2026-07-23 03:07:15 +03:00
tests: constify, make consts static
- lib509: constify an input string. - add `static` to const data, where missing. - tool1394: fix indentation. Closes #17736
This commit is contained in:
parent
db512ee267
commit
1ec0da0149
14 changed files with 33 additions and 32 deletions
|
|
@ -34,7 +34,7 @@ static CURLcode test_unit1398(char *arg)
|
|||
|
||||
int rc;
|
||||
char buf[3] = {'b', 'u', 'g'};
|
||||
const char *str = "bug";
|
||||
static const char *str = "bug";
|
||||
int width = 3;
|
||||
char output[130];
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ static CURLcode test_unit1601(char *arg)
|
|||
#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \
|
||||
|| !defined(CURL_DISABLE_DIGEST_AUTH)
|
||||
|
||||
const char string1[] = "1";
|
||||
const char string2[] = "hello-you-fool";
|
||||
static const char string1[] = "1";
|
||||
static const char string2[] = "hello-you-fool";
|
||||
unsigned char output[MD5_DIGEST_LEN];
|
||||
unsigned char *testp = output;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ static CURLcode test_unit1610(char *arg)
|
|||
#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \
|
||||
|| defined(USE_LIBSSH2)
|
||||
|
||||
const char string1[] = "1";
|
||||
const char string2[] = "hello-you-fool";
|
||||
static const char string1[] = "1";
|
||||
static const char string2[] = "hello-you-fool";
|
||||
unsigned char output[CURL_SHA256_DIGEST_LENGTH];
|
||||
unsigned char *testp = output;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ static CURLcode test_unit1611(char *arg)
|
|||
UNITTEST_BEGIN_SIMPLE
|
||||
|
||||
#ifdef USE_CURL_NTLM_CORE
|
||||
const char string1[] = "1";
|
||||
const char string2[] = "hello-you-fool";
|
||||
static const char string1[] = "1";
|
||||
static const char string2[] = "hello-you-fool";
|
||||
unsigned char output[MD4_DIGEST_LENGTH];
|
||||
unsigned char *testp = output;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ static CURLcode test_unit1612(char *arg)
|
|||
#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \
|
||||
|| !defined(CURL_DISABLE_DIGEST_AUTH)
|
||||
|
||||
const char password[] = "Pa55worD";
|
||||
const char string1[] = "1";
|
||||
const char string2[] = "hello-you-fool";
|
||||
static const char password[] = "Pa55worD";
|
||||
static const char string1[] = "1";
|
||||
static const char string2[] = "hello-you-fool";
|
||||
unsigned char output[HMAC_MD5_LENGTH];
|
||||
unsigned char *testp = output;
|
||||
|
||||
|
|
|
|||
|
|
@ -135,9 +135,9 @@ static CURLcode test_unit1655(char *arg)
|
|||
const size_t buflen = sizeof(buffer);
|
||||
const size_t magic1 = 9765;
|
||||
size_t olen1 = magic1;
|
||||
const char *sunshine1 = "a.com";
|
||||
const char *dotshine1 = "a.com.";
|
||||
const char *sunshine2 = "aa.com";
|
||||
static const char *sunshine1 = "a.com";
|
||||
static const char *dotshine1 = "a.com.";
|
||||
static const char *sunshine2 = "aa.com";
|
||||
size_t olen2;
|
||||
DOHcode ret2;
|
||||
size_t olen;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue