This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/509-remove-deprecated-version
in repository https://gitbox.apache.org/repos/asf/celix.git

commit ce00d0dfb6e312f1fb72f3251ff191935508ee77
Author: Pepijn Noltes <pnol...@apache.org>
AuthorDate: Thu Feb 8 19:24:48 2024 +0100

    #509 Replace version with celix_version usage a dfi test
---
 libs/dfi/gtest/src/dyn_message_tests.cpp | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/libs/dfi/gtest/src/dyn_message_tests.cpp 
b/libs/dfi/gtest/src/dyn_message_tests.cpp
index 85e5578b..851320ef 100644
--- a/libs/dfi/gtest/src/dyn_message_tests.cpp
+++ b/libs/dfi/gtest/src/dyn_message_tests.cpp
@@ -19,8 +19,7 @@
 
 #include "gtest/gtest.h"
 
-#include <stdarg.h>
-#include "version.h"
+#include "celix_version.h"
 
 
 extern "C" {
@@ -37,24 +36,21 @@ extern "C" {
 #include "celix_err.h"
 #include "celix_version.h"
 
-static void checkMessageVersion(dyn_message_type* dynMsg, const char* v){
-       int status = 0;
+static void checkMessageVersion(dyn_message_type* dynMsg, const char* v) {
+    int status = 0;
 
-       const char* version = dynMessage_getVersionString(dynMsg);
-       ASSERT_STREQ(v, version);
+    const char* version = dynMessage_getVersionString(dynMsg);
+    ASSERT_STREQ(v, version);
     const celix_version_t* msgVersion = nullptr;
-    celix_version_t* localMsgVersion = nullptr;
-       int cmpVersion = -1;
-       version_createVersionFromString(version,&localMsgVersion);
+    celix_version_t* localMsgVersion = 
celix_version_createVersionFromString(version);
+    int cmpVersion = -1;
     msgVersion = dynMessage_getVersion(dynMsg);
-       ASSERT_EQ(0, status);
+    ASSERT_EQ(0, status);
     cmpVersion = celix_version_compareTo(msgVersion, localMsgVersion);
-       ASSERT_EQ(cmpVersion,0);
-       version_destroy(localMsgVersion);
-
+    ASSERT_EQ(cmpVersion, 0);
+    celix_version_destroy(localMsgVersion);
 }
 
-
 static void msg_test1(void) {
        int status = 0;
        dyn_message_type *dynMsg = NULL;

Reply via email to