celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [05/50] celix git commit: CELIX-237: Changed intialization of test structs.
Date Tue, 27 Oct 2015 15:21:10 GMT
CELIX-237: Changed intialization of test structs.


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/22797e10
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/22797e10
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/22797e10

Branch: refs/heads/feature/CELIX-230_Refactoring_of_the_shell_command_service
Commit: 22797e1005681ade3b6a2b189a1430fffe7c3250
Parents: c5de698
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Tue Oct 13 19:27:26 2015 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Tue Oct 13 19:27:26 2015 +0200

----------------------------------------------------------------------
 .../json_serializer_tests.cpp                   | 41 ++++++++++++++++----
 1 file changed, 34 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/22797e10/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/json_serializer_tests.cpp
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/json_serializer_tests.cpp
b/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/json_serializer_tests.cpp
index db81ade..1d64ad1 100644
--- a/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/json_serializer_tests.cpp
+++ b/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/json_serializer_tests.cpp
@@ -306,7 +306,18 @@ struct write_example1 {
 };
 
 void writeTest1(void) {
-    struct write_example1 ex1 = {.a=1, .b=2, .c=3, .d=4, .e=5, .f=6, .g=7, .h=8.8f, .i=9.9,
.j=10};
+    struct write_example1 ex1;
+    ex1.a=1;
+    ex1.b=2;
+    ex1.c=3;
+    ex1.d=4;
+    ex1.e=5;
+    ex1.f=6;
+    ex1.g=7;
+    ex1.h=8.8f;
+    ex1.i=9.9;
+    ex1.j=10;
+
     dyn_type *type = NULL;
     char *result = NULL;
     int rc = dynType_parseWithStr(write_example1_descriptor, "ex1", NULL, &type);
@@ -344,8 +355,12 @@ struct write_example2 {
 };
 
 void writeTest2(void) {
-    struct write_example2_sub sub1 = { .a = 1, .b = 2 };
-    struct write_example2 ex = { .sub1 = &sub1 };
+    struct write_example2_sub sub1;
+    sub1.a = 1;
+    sub1.b = 2;
+
+    struct write_example2 ex;
+    ex.sub1=&sub1;
     ex.sub2.c = 3;
     ex.sub2.d = 4;
 
@@ -378,10 +393,22 @@ struct write_example3 {
 };
 
 void writeTest3(void) {
-    struct write_example3_person p1 = {.name = "John", .age = 33};
-    struct write_example3_person p2 = {.name = "Peter", .age = 44};
-    struct write_example3_person p3 = {.name = "Carol", .age = 55};
-    struct write_example3_person p4 = {.name = "Elton", .age = 66};
+    struct write_example3_person p1;
+    p1.name = "John";
+    p1.age = 33;
+
+    struct write_example3_person p2;
+    p2.name = "Peter";
+    p2.age = 44;
+
+    struct write_example3_person p3;
+    p3.name = "Carol";
+    p3.age = 55;
+
+    struct write_example3_person p4;
+    p4.name = "Elton";
+    p4.age = 66;
+
     struct write_example3 seq;
     seq.buf = (struct write_example3_person **) calloc(4, sizeof(void *));
     seq.len = seq.cap = 4;


Mime
View raw message