aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-05-19 14:27:41 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-06-01 11:21:52 +0300
commit4fc2b96bb867b8c4b397479b1e48b6676a2c6515 (patch)
treefb034348af206da7bbff9b8085ad0cb7e0e27af9
parent4973c6cff0166f66a57667d29ec5a12580ef9ba5 (diff)
downloadlibmicrohttpd-4fc2b96bb867b8c4b397479b1e48b6676a2c6515.tar.gz
libmicrohttpd-4fc2b96bb867b8c4b397479b1e48b6676a2c6515.zip
tests: unified use of function name macros
-rw-r--r--src/microhttpd/test_md5.c12
-rw-r--r--src/microhttpd/test_sha1.c10
-rw-r--r--src/microhttpd/test_sha256.c12
3 files changed, 17 insertions, 17 deletions
diff --git a/src/microhttpd/test_md5.c b/src/microhttpd/test_md5.c
index e6addab3..e3bb0ce3 100644
--- a/src/microhttpd/test_md5.c
+++ b/src/microhttpd/test_md5.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2019-2022 Evgeny Grin (Karlson2k) 3 Copyright (C) 2019-2023 Evgeny Grin (Karlson2k)
4 4
5 This test tool is free software; you can redistribute it and/or 5 This test tool is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as 6 modify it under the terms of the GNU General Public License as
@@ -335,7 +335,7 @@ test1_str (void)
335 exit (99); 335 exit (99);
336 } 336 }
337#endif 337#endif
338 num_failed += check_result (__FUNCTION__, i, digest, 338 num_failed += check_result (MHD_FUNC_, i, digest,
339 data_units1[i].digest); 339 data_units1[i].digest);
340 } 340 }
341 MHD_MD5_deinit (&ctx); 341 MHD_MD5_deinit (&ctx);
@@ -365,7 +365,7 @@ test1_bin (void)
365 exit (99); 365 exit (99);
366 } 366 }
367#endif 367#endif
368 num_failed += check_result (__FUNCTION__, i, digest, 368 num_failed += check_result (MHD_FUNC_, i, digest,
369 data_units2[i].digest); 369 data_units2[i].digest);
370 } 370 }
371 MHD_MD5_deinit (&ctx); 371 MHD_MD5_deinit (&ctx);
@@ -402,7 +402,7 @@ test2_str (void)
402 exit (99); 402 exit (99);
403 } 403 }
404#endif 404#endif
405 num_failed += check_result (__FUNCTION__, i, digest, 405 num_failed += check_result (MHD_FUNC_, i, digest,
406 data_units1[i].digest); 406 data_units1[i].digest);
407 } 407 }
408 MHD_MD5_deinit (&ctx); 408 MHD_MD5_deinit (&ctx);
@@ -436,7 +436,7 @@ test2_bin (void)
436 exit (99); 436 exit (99);
437 } 437 }
438#endif 438#endif
439 num_failed += check_result (__FUNCTION__, i, digest, 439 num_failed += check_result (MHD_FUNC_, i, digest,
440 data_units2[i].digest); 440 data_units2[i].digest);
441 } 441 }
442 MHD_MD5_deinit (&ctx); 442 MHD_MD5_deinit (&ctx);
@@ -485,7 +485,7 @@ test_unaligned (void)
485 exit (99); 485 exit (99);
486 } 486 }
487#endif 487#endif
488 num_failed += check_result (__FUNCTION__, MAX_OFFSET - offset, 488 num_failed += check_result (MHD_FUNC_, MAX_OFFSET - offset,
489 unaligned_digest, tdata->digest); 489 unaligned_digest, tdata->digest);
490 } 490 }
491 MHD_MD5_deinit (&ctx); 491 MHD_MD5_deinit (&ctx);
diff --git a/src/microhttpd/test_sha1.c b/src/microhttpd/test_sha1.c
index c90f8918..3d412c25 100644
--- a/src/microhttpd/test_sha1.c
+++ b/src/microhttpd/test_sha1.c
@@ -278,7 +278,7 @@ test1_str (void)
278 MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str, 278 MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str,
279 data_units1[i].str_l.len); 279 data_units1[i].str_l.len);
280 MHD_SHA1_finish (&ctx, digest); 280 MHD_SHA1_finish (&ctx, digest);
281 num_failed += check_result (__FUNCTION__, i, digest, 281 num_failed += check_result (MHD_FUNC_, i, digest,
282 data_units1[i].digest); 282 data_units1[i].digest);
283 } 283 }
284 return num_failed; 284 return num_failed;
@@ -300,7 +300,7 @@ test1_bin (void)
300 MHD_SHA1_update (&ctx, data_units2[i].bin_l.bin, 300 MHD_SHA1_update (&ctx, data_units2[i].bin_l.bin,
301 data_units2[i].bin_l.len); 301 data_units2[i].bin_l.len);
302 MHD_SHA1_finish (&ctx, digest); 302 MHD_SHA1_finish (&ctx, digest);
303 num_failed += check_result (__FUNCTION__, i, digest, 303 num_failed += check_result (MHD_FUNC_, i, digest,
304 data_units2[i].digest); 304 data_units2[i].digest);
305 } 305 }
306 return num_failed; 306 return num_failed;
@@ -325,7 +325,7 @@ test2_str (void)
325 MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str + part_s, 325 MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str + part_s,
326 data_units1[i].str_l.len - part_s); 326 data_units1[i].str_l.len - part_s);
327 MHD_SHA1_finish (&ctx, digest); 327 MHD_SHA1_finish (&ctx, digest);
328 num_failed += check_result (__FUNCTION__, i, digest, 328 num_failed += check_result (MHD_FUNC_, i, digest,
329 data_units1[i].digest); 329 data_units1[i].digest);
330 } 330 }
331 return num_failed; 331 return num_failed;
@@ -349,7 +349,7 @@ test2_bin (void)
349 MHD_SHA1_update (&ctx, data_units2[i].bin_l.bin + part_s, 349 MHD_SHA1_update (&ctx, data_units2[i].bin_l.bin + part_s,
350 data_units2[i].bin_l.len - part_s); 350 data_units2[i].bin_l.len - part_s);
351 MHD_SHA1_finish (&ctx, digest); 351 MHD_SHA1_finish (&ctx, digest);
352 num_failed += check_result (__FUNCTION__, i, digest, 352 num_failed += check_result (MHD_FUNC_, i, digest,
353 data_units2[i].digest); 353 data_units2[i].digest);
354 } 354 }
355 return num_failed; 355 return num_failed;
@@ -389,7 +389,7 @@ test_unaligned (void)
389 MHD_SHA1_init (&ctx); 389 MHD_SHA1_init (&ctx);
390 MHD_SHA1_update (&ctx, unaligned_buf, tdata->bin_l.len); 390 MHD_SHA1_update (&ctx, unaligned_buf, tdata->bin_l.len);
391 MHD_SHA1_finish (&ctx, unaligned_digest); 391 MHD_SHA1_finish (&ctx, unaligned_digest);
392 num_failed += check_result (__FUNCTION__, MAX_OFFSET - offset, 392 num_failed += check_result (MHD_FUNC_, MAX_OFFSET - offset,
393 unaligned_digest, tdata->digest); 393 unaligned_digest, tdata->digest);
394 } 394 }
395 free (digest_buf); 395 free (digest_buf);
diff --git a/src/microhttpd/test_sha256.c b/src/microhttpd/test_sha256.c
index 5f6559e2..e6ccc7ca 100644
--- a/src/microhttpd/test_sha256.c
+++ b/src/microhttpd/test_sha256.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2019-2022 Evgeny Grin (Karlson2k) 3 Copyright (C) 2019-2023 Evgeny Grin (Karlson2k)
4 4
5 This test tool is free software; you can redistribute it and/or 5 This test tool is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as 6 modify it under the terms of the GNU General Public License as
@@ -361,7 +361,7 @@ test1_str (void)
361 exit (99); 361 exit (99);
362 } 362 }
363#endif /* MHD_SHA256_HAS_EXT_ERROR */ 363#endif /* MHD_SHA256_HAS_EXT_ERROR */
364 num_failed += check_result (__FUNCTION__, i, digest, 364 num_failed += check_result (MHD_FUNC_, i, digest,
365 data_units1[i].digest); 365 data_units1[i].digest);
366 } 366 }
367 MHD_SHA256_deinit (&ctx); 367 MHD_SHA256_deinit (&ctx);
@@ -391,7 +391,7 @@ test1_bin (void)
391 exit (99); 391 exit (99);
392 } 392 }
393#endif /* MHD_SHA256_HAS_EXT_ERROR */ 393#endif /* MHD_SHA256_HAS_EXT_ERROR */
394 num_failed += check_result (__FUNCTION__, i, digest, 394 num_failed += check_result (MHD_FUNC_, i, digest,
395 data_units2[i].digest); 395 data_units2[i].digest);
396 } 396 }
397 MHD_SHA256_deinit (&ctx); 397 MHD_SHA256_deinit (&ctx);
@@ -429,7 +429,7 @@ test2_str (void)
429 exit (99); 429 exit (99);
430 } 430 }
431#endif /* MHD_SHA256_HAS_EXT_ERROR */ 431#endif /* MHD_SHA256_HAS_EXT_ERROR */
432 num_failed += check_result (__FUNCTION__, i, digest, 432 num_failed += check_result (MHD_FUNC_, i, digest,
433 data_units1[i].digest); 433 data_units1[i].digest);
434 } 434 }
435 MHD_SHA256_deinit (&ctx); 435 MHD_SHA256_deinit (&ctx);
@@ -462,7 +462,7 @@ test2_bin (void)
462 exit (99); 462 exit (99);
463 } 463 }
464#endif /* MHD_SHA256_HAS_EXT_ERROR */ 464#endif /* MHD_SHA256_HAS_EXT_ERROR */
465 num_failed += check_result (__FUNCTION__, i, digest, 465 num_failed += check_result (MHD_FUNC_, i, digest,
466 data_units2[i].digest); 466 data_units2[i].digest);
467 } 467 }
468 MHD_SHA256_deinit (&ctx); 468 MHD_SHA256_deinit (&ctx);
@@ -510,7 +510,7 @@ test_unaligned (void)
510 exit (99); 510 exit (99);
511 } 511 }
512#endif /* MHD_SHA256_HAS_EXT_ERROR */ 512#endif /* MHD_SHA256_HAS_EXT_ERROR */
513 num_failed += check_result (__FUNCTION__, MAX_OFFSET - offset, 513 num_failed += check_result (MHD_FUNC_, MAX_OFFSET - offset,
514 unaligned_digest, tdata->digest); 514 unaligned_digest, tdata->digest);
515 } 515 }
516 free (digest_buf); 516 free (digest_buf);