Skip to content

Commit b32ff0b

Browse files
committed
Rename utils.c to utils.h
This better signals that this file is meant to be included directly in testing programs and also plays better with my IDE.
1 parent 975047b commit b32ff0b

4 files changed

Lines changed: 4 additions & 14 deletions

File tree

tests/api.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@
382382
#endif
383383
#include <wolfssl/certs_test.h>
384384

385-
#define WOLFSSL_TEST_UTILS_INCLUDED
386-
#include "tests/utils.c"
385+
#include "tests/utils.h"
387386

388387
#ifndef WOLFSSL_HAVE_ECC_KEY_GET_PRIV
389388
/* FIPS build has replaced ecc.h. */

tests/include.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ EXTRA_DIST += tests/unit.h \
7070
tests/NCONF_test.cnf \
7171
tests/test-tls-downgrade.conf \
7272
tests/TXT_DB.txt \
73-
tests/utils.c
73+
tests/utils.h
7474
DISTCLEANFILES+= tests/.libs/unit.test

tests/utils.c renamed to tests/utils.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* utils.c
1+
/* utils.h
22
*
33
* Copyright (C) 2006-2023 wolfSSL Inc.
44
*
@@ -25,12 +25,6 @@
2525
#include <wolfssl/wolfcrypt/settings.h>
2626
#include <tests/unit.h>
2727

28-
#if !defined(WOLFSSL_TEST_UTILS_INCLUDED)
29-
#ifndef WOLFSSL_IGNORE_FILE_WARN
30-
#warning utils.c does not need to be compiled separately
31-
#endif
32-
#else
33-
3428
#ifndef NO_FILESYSTEM
3529

3630
#ifdef _MSC_VER
@@ -365,5 +359,3 @@ void join_thread(THREAD_TYPE thread)
365359
THREAD_CHECK_RET(wolfSSL_JoinThread(thread));
366360
}
367361
#endif /* SINGLE_THREADED */
368-
369-
#endif /* WOLFSSL_TEST_UTILS_INCLUDED */

testsuite/testsuite.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
#include <examples/server/server.h>
4646
#include <examples/client/client.h>
4747

48-
#define WOLFSSL_TEST_UTILS_INCLUDED
49-
#include "tests/utils.c"
48+
#include "tests/utils.h"
5049

5150
#ifndef NO_SHA256
5251
void file_test(const char* file, byte* check);

0 commit comments

Comments
 (0)