|
@@ -464,6 +464,7 @@ START_TEST(Client_subscription_async_sub) {
|
|
|
}
|
|
|
END_TEST
|
|
|
|
|
|
+#ifdef UA_ENABLE_METHODCALLS
|
|
|
START_TEST(Client_methodcall) {
|
|
|
UA_Client *client = UA_Client_new(UA_ClientConfig_default);
|
|
|
UA_StatusCode retval = UA_Client_connect(client, "opc.tcp://localhost:4840");
|
|
@@ -521,30 +522,32 @@ START_TEST(Client_methodcall) {
|
|
|
UA_Client_delete(client);
|
|
|
}
|
|
|
END_TEST
|
|
|
+#endif /* UA_ENABLE_METHODCALLS */
|
|
|
|
|
|
#endif /* UA_ENABLE_SUBSCRIPTIONS */
|
|
|
|
|
|
static Suite* testSuite_Client(void) {
|
|
|
+ Suite *s = suite_create("Client Subscription");
|
|
|
+
|
|
|
+#ifdef UA_ENABLE_SUBSCRIPTIONS
|
|
|
TCase *tc_client = tcase_create("Client Subscription Basic");
|
|
|
tcase_add_checked_fixture(tc_client, setup, teardown);
|
|
|
-#ifdef UA_ENABLE_SUBSCRIPTIONS
|
|
|
tcase_add_test(tc_client, Client_subscription);
|
|
|
tcase_add_test(tc_client, Client_subscription_connectionClose);
|
|
|
tcase_add_test(tc_client, Client_subscription_createDataChanges);
|
|
|
tcase_add_test(tc_client, Client_subscription_keepAlive);
|
|
|
tcase_add_test(tc_client, Client_subscription_without_notification);
|
|
|
tcase_add_test(tc_client, Client_subscription_async_sub);
|
|
|
+ suite_add_tcase(s,tc_client);
|
|
|
#endif /* UA_ENABLE_SUBSCRIPTIONS */
|
|
|
|
|
|
+#if defined(UA_ENABLE_SUBSCRIPTIONS) && defined(UA_ENABLE_METHODCALLS)
|
|
|
TCase *tc_client2 = tcase_create("Client Subscription + Method Call of GetMonitoredItmes");
|
|
|
tcase_add_checked_fixture(tc_client2, setup, teardown);
|
|
|
-#ifdef UA_ENABLE_SUBSCRIPTIONS
|
|
|
tcase_add_test(tc_client2, Client_methodcall);
|
|
|
-#endif /* UA_ENABLE_SUBSCRIPTIONS */
|
|
|
-
|
|
|
- Suite *s = suite_create("Client Subscription");
|
|
|
- suite_add_tcase(s,tc_client);
|
|
|
suite_add_tcase(s,tc_client2);
|
|
|
+#endif
|
|
|
+
|
|
|
return s;
|
|
|
}
|
|
|
|