refactor(tests): Include stdlib.h where open62541 no longer does it

This commit is contained in:
Julius Pfrommer 2023-07-27 23:43:26 +02:00 committed by Julius Pfrommer
parent 8439c500aa
commit 390c092c05
49 changed files with 83 additions and 20 deletions

View File

@ -7,6 +7,7 @@
#include "ua_securechannel.h"
#include "ua_types_encoding_binary.h"
#include <stdlib.h>
#include <check.h>
UA_ByteString *buffers;

View File

@ -6,6 +6,7 @@
#include <check.h>
#include "cj5.h"
#include <stdlib.h>
#include <math.h>
#include <float.h>

View File

@ -6,6 +6,8 @@
#include "testing_clock.h"
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <check.h>
#define N_EVENTS 10000

View File

@ -9,6 +9,7 @@
#include "testing_clock.h"
#include <time.h>
#include <stdlib.h>
#include <check.h>
static UA_EventLoop *el;

View File

@ -10,6 +10,7 @@
#include "testing_clock.h"
#include <signal.h>
#include <stdlib.h>
#include <check.h>
#ifndef _WIN32

View File

@ -11,6 +11,7 @@
#include "testing_clock.h"
#include <time.h>
#include <stdlib.h>
#include <check.h>
unsigned int messageCount = 0;

View File

@ -9,6 +9,7 @@
#include "testing_clock.h"
#include <time.h>
#include <stdlib.h>
#include <check.h>
static UA_EventLoop *el;

View File

@ -9,6 +9,7 @@
#include "testing_clock.h"
#include <time.h>
#include <stdlib.h>
#include <check.h>
static UA_EventLoop *el;

View File

@ -11,10 +11,12 @@
#include "ua_types_encoding_binary.h"
#include "ua_util_internal.h"
#include "check.h"
#include "testing_networklayers.h"
#include "testing_policy.h"
#include <stdlib.h>
#include <check.h>
#define UA_BYTESTRING_STATIC(s) {sizeof(s)-1, (UA_Byte*)(s)}
// Some default testing sizes. Can be overwritten in testing functions.

View File

@ -3,8 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ua_timer.h"
#include "check.h"
#include <check.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>

View File

@ -9,6 +9,7 @@
#include "ua_util_internal.h"
#include <stdlib.h>
#include <check.h>
#include <float.h>
#include <math.h>

View File

@ -7,7 +7,8 @@
#include "ua_types_encoding_binary.h"
#include "check.h"
#include <stdlib.h>
#include <check.h>
#include <math.h>
#ifdef __clang__

View File

@ -6,7 +6,8 @@
#include <open62541/types_generated_handling.h>
#include "open62541/util.h"
#include "check.h"
#include <stdlib.h>
#include <check.h>
START_TEST(base64) {
UA_ByteString test1 = UA_BYTESTRING("abc123\nopen62541");

View File

@ -7,7 +7,8 @@
#include "ua_server_internal.h"
#include "check.h"
#include <stdlib.h>
#include <check.h>
START_TEST(parseRange) {
UA_NumericRange range;

View File

@ -9,6 +9,7 @@
#include <open62541/server_config_default.h>
#include <check.h>
#include <stdlib.h>
#include "thread_wrapper.h"

View File

@ -18,13 +18,14 @@
#include "client/ua_client_internal.h"
#include <check.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include "testing_clock.h"
#include "testing_networklayers.h"
#include "thread_wrapper.h"
#include "historical_read_test_data.h"
#include <stddef.h>
#include <stdio.h>
static UA_Server *server;
static UA_HistoryDataGathering *gathering;

View File

@ -10,7 +10,9 @@
#include "client/ua_client_internal.h"
#include "check.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"
#include "thread_wrapper.h"

View File

@ -7,6 +7,7 @@
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <check.h>
#include <stdlib.h>
#include <stdio.h>
#include "thread_wrapper.h"
#include "deviceObjectType.h"

View File

@ -7,6 +7,7 @@
#include <open62541/client_highlevel.h>
#include <check.h>
#include <stdio.h>
#include <stdlib.h>
#include "thread_wrapper.h"
#include "deviceObjectType.h"

View File

@ -5,8 +5,11 @@
#include <open62541/plugin/log_stdout.h>
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <check.h>
#include <stdio.h>
#include <stdlib.h>
#include "thread_wrapper.h"
#include "mt_testing.h"

View File

@ -7,6 +7,7 @@
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <check.h>
#include <stdlib.h>
#include <stdio.h>
#include "thread_wrapper.h"
#include "mt_testing.h"

View File

@ -6,6 +6,7 @@
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <check.h>
#include <stdlib.h>
#include "thread_wrapper.h"
#include "mt_testing.h"

View File

@ -6,6 +6,7 @@
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <check.h>
#include <stdlib.h>
#include <testing_clock.h>
#include "thread_wrapper.h"
#include "mt_testing.h"

View File

@ -6,6 +6,7 @@
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <check.h>
#include <stdlib.h>
#include <testing_clock.h>
#include "thread_wrapper.h"
#include "mt_testing.h"

View File

@ -7,6 +7,7 @@
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <check.h>
#include <stdlib.h>
#include "thread_wrapper.h"
#include "mt_testing.h"

View File

@ -4,6 +4,8 @@
#include "ua_types_encoding_xml.h"
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#define MIN_ARGUMENTS_NUM 3

View File

@ -6,6 +6,10 @@
#include <open62541/server_config_default.h>
#include <open62541/plugin/nodesetloader.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
UA_Boolean running = true;
static void stopHandler(int sign) {
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "received ctrl-c");

View File

@ -6,7 +6,9 @@
#include <open62541/server_config_default.h>
#include <open62541/plugin/nodesetloader.h>
#include "check.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"
UA_Server *server = NULL;

View File

@ -6,7 +6,9 @@
#include <open62541/server_config_default.h>
#include <open62541/plugin/nodesetloader.h>
#include "check.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"
UA_Server *server = NULL;

View File

@ -6,7 +6,9 @@
#include <open62541/server_config_default.h>
#include <open62541/plugin/nodesetloader.h>
#include "check.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"
UA_Server *server = NULL;

View File

@ -6,7 +6,9 @@
#include <open62541/server_config_default.h>
#include <open62541/plugin/nodesetloader.h>
#include "check.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"
UA_Server *server = NULL;

View File

@ -8,6 +8,7 @@
#include <open62541/server_config_default.h>
#include <open62541/types.h>
#include <stdlib.h>
#include <check.h>
#include "thread_wrapper.h"

View File

@ -16,7 +16,9 @@
#ifndef WIN32
#include <sys/stat.h>
#endif
#include <check.h>
#include <stdlib.h>
#ifndef _WIN32
#include <sys/stat.h>

View File

@ -10,9 +10,9 @@
#include <open62541/server_config_default.h>
#include <open62541/types.h>
#include <stddef.h>
#include <check.h>
#include <stdlib.h>
#include "check.h"
#include "testing_clock.h"
#include "testing_networklayers.h"

View File

@ -14,6 +14,7 @@
#include "client/ua_client_internal.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"
#include "thread_wrapper.h"

View File

@ -7,6 +7,7 @@
#include "server/ua_server_internal.h"
#include <check.h>
#include <stdlib.h>
UA_Server *server = NULL;
UA_UInt32 valueToBeInherited = 42;

View File

@ -14,6 +14,7 @@
#include "thread_wrapper.h"
#include <check.h>
#include <stdlib.h>
UA_Boolean running;
THREAD_HANDLE server_thread;
@ -22,11 +23,11 @@ static size_t clientCounter;
static UA_StatusCode
methodCallback(UA_Server *serverArg,
const UA_NodeId *sessionId, void *sessionHandle,
const UA_NodeId *methodId, void *methodContext,
const UA_NodeId *objectId, void *objectContext,
size_t inputSize, const UA_Variant *input,
size_t outputSize, UA_Variant *output) {
const UA_NodeId *sessionId, void *sessionHandle,
const UA_NodeId *methodId, void *methodContext,
const UA_NodeId *objectId, void *objectContext,
size_t inputSize, const UA_Variant *input,
size_t outputSize, UA_Variant *output) {
return UA_STATUSCODE_GOOD;
}

View File

@ -6,9 +6,11 @@
#include <open62541/plugin/log_stdout.h>
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <check.h>
#include "thread_wrapper.h"
#include <stdlib.h>
#include <check.h>
/* While server initialization, value callbacks are called twice.
* This counter is used to ensure that the deletion of the variable is triggered by the client (not while the server initialization)*/
int counter = 0;

View File

@ -19,6 +19,7 @@
#include "server/ua_server_internal.h"
#include <check.h>
#include <stdlib.h>
#include <stdio.h>
#include "testing_clock.h"

View File

@ -17,6 +17,7 @@
#include <open62541/server_config_default.h>
#include <check.h>
#include <stdlib.h>
#include <stdio.h>
#include "server/ua_server_internal.h"

View File

@ -7,6 +7,7 @@
#include "server/ua_server_internal.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"

View File

@ -10,6 +10,7 @@
#include "ua_server_internal.h"
#include <check.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>

View File

@ -12,6 +12,7 @@
#include "ua_types_encoding_binary.h"
#include <check.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>

View File

@ -5,6 +5,7 @@
#include <open62541/server_config_default.h>
#include <check.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>

View File

@ -6,6 +6,7 @@
#include <open62541/types.h>
#include <check.h>
#include <stdlib.h>
#ifdef __clang__
//required for ck_assert_ptr_eq and const casting

View File

@ -10,6 +10,7 @@
#include "server/ua_subscription.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"

View File

@ -12,6 +12,7 @@
#include "client/ua_client_internal.h"
#include <check.h>
#include <stdlib.h>
#include "thread_wrapper.h"

View File

@ -14,6 +14,7 @@
#include <open62541/client_subscriptions.h>
#include <check.h>
#include <stdlib.h>
#include <stdio.h>
#include "testing_clock.h"

View File

@ -16,6 +16,7 @@
#include "server/ua_subscription.h"
#include <check.h>
#include <stdlib.h>
#include <stdio.h>
#include "testing_clock.h"