diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gtest_dlt_common.cpp | 24 | ||||
-rw-r--r-- | tests/gtest_dlt_daemon_common.cpp | 40 | ||||
-rw-r--r-- | tests/gtest_dlt_user.cpp | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/testfile.dlt | bin | 4474 -> 4474 bytes |
4 files changed, 34 insertions, 34 deletions
diff --git a/tests/gtest_dlt_common.cpp b/tests/gtest_dlt_common.cpp index b4de20b..095f444 100644 --- a/tests/gtest_dlt_common.cpp +++ b/tests/gtest_dlt_common.cpp @@ -54,7 +54,7 @@ void dlt_buffer_info(DltBuffer *); } -/* Beginn Method: dlt_common::dlt_buffer_init_dynamic */ +/* Begin Method: dlt_common::dlt_buffer_init_dynamic */ TEST(t_dlt_buffer_init_dynamic, normal) { DltBuffer init_dynamic; @@ -118,7 +118,7 @@ TEST(t_dlt_buffer_init_dynamic, nullpointer) -/* Beginn Method: dlt_common::dlt_buffer_free_dynamic */ +/* Begin Method: dlt_common::dlt_buffer_free_dynamic */ TEST(t_dlt_buffer_free_dynamic, normal) { DltBuffer buf; @@ -154,7 +154,7 @@ TEST(t_dlt_buffer_free_dynamic, nullpointer) -/* Beginn Method: dlt_common::dlt_buffer_increase_size */ +/* Begin Method: dlt_common::dlt_buffer_increase_size */ TEST(t_dlt_buffer_increase_size, normal) { DltBuffer buf; @@ -204,7 +204,7 @@ TEST(t_dlt_buffer_increase_size, nullpointer) -/* Beginn Method: dlt_common::dlt_buffer_minimize_size */ +/* Begin Method: dlt_common::dlt_buffer_minimize_size */ TEST(t_dlt_buffer_minimize_size, normal) { DltBuffer buf; @@ -254,7 +254,7 @@ TEST(t_dlt_buffer_minimize_size, nullpointer) -/* Beginn Method: dlt_common::dlt_buffer_reset */ +/* Begin Method: dlt_common::dlt_buffer_reset */ TEST(t_dlt_buffer_reset, normal) { DltBuffer buf; @@ -281,7 +281,7 @@ TEST(t_dlt_buffer_reset, nullpointer) -/* Beginn Method: dlt_common::dlt_buffer_push*/ +/* Begin Method: dlt_common::dlt_buffer_push*/ TEST(t_dlt_buffer_push, normal) { DltBuffer buf; @@ -295,7 +295,7 @@ TEST(t_dlt_buffer_push, normal) // Push till buffer is full, expected 0 EXPECT_LE(0,dlt_buffer_init_dynamic(&buf, DLT_USER_RINGBUFFER_MIN_SIZE, DLT_USER_RINGBUFFER_MAX_SIZE, DLT_USER_RINGBUFFER_STEP_SIZE)); - for(int i=0; i<= (DLT_USER_RINGBUFFER_MIN_SIZE/size); i++) + for(unsigned int i=0; i<= (DLT_USER_RINGBUFFER_MIN_SIZE/size); i++) { EXPECT_LE(0, dlt_buffer_push(&buf,(unsigned char *)&test,size)); } @@ -343,7 +343,7 @@ TEST(t_dlt_buffer_push, abnormal) } TEST(t_dlt_buffer_push, nullpointer) { - DltBuffer buf; +// DltBuffer buf; char * test; int size = sizeof(test); @@ -587,7 +587,7 @@ TEST(t_dlt_buffer_push3, abnormal) } TEST(t_dlt_buffer_push3, nullpointer) { - DltBuffer buf; +// DltBuffer buf; char * test; int size = sizeof(test); @@ -1097,7 +1097,7 @@ TEST(t_dlt_buffer_get_used_size, nullpointer) TEST(t_dlt_buffer_write_block, normal) { DltBuffer buf; - unsigned char * data; + unsigned char * data = NULL; int write; int size1 = 516; int size2 = 1024; @@ -1169,7 +1169,7 @@ TEST(t_dlt_buffer_write_block, nullpointer) TEST(t_dlt_buffer_read_block, normal) { DltBuffer buf; - unsigned char * data; + unsigned char * data = NULL; int write, read; int size1 = 516; int size2 = 1024; @@ -3002,7 +3002,7 @@ TEST(t_dlt_message_read, normal) /*---------------------------------------*/ DltBuffer buf; - char *buffer; + char *buffer = NULL; EXPECT_LE(0, dlt_buffer_init_dynamic(&buf, DLT_USER_RINGBUFFER_MIN_SIZE, DLT_USER_RINGBUFFER_MAX_SIZE, DLT_USER_RINGBUFFER_STEP_SIZE)); EXPECT_LE(0, dlt_file_init(&file, 0)); diff --git a/tests/gtest_dlt_daemon_common.cpp b/tests/gtest_dlt_daemon_common.cpp index 915a860..8049965 100644 --- a/tests/gtest_dlt_daemon_common.cpp +++ b/tests/gtest_dlt_daemon_common.cpp @@ -155,7 +155,7 @@ TEST(t_dlt_daemon_application_del, normal) } TEST(t_dlt_daemon_application_del, abnormal) { - DltDaemon daemon; +// DltDaemon daemon; // const char * apid = "TEST"; // pid_t pid = 0; // const char * desc = "HELLO_TEST"; @@ -182,11 +182,11 @@ TEST(t_dlt_daemon_application_del, abnormal) TEST(t_dlt_daemon_application_del, nullpointer) { DltDaemon daemon; - DltDaemonApplication *app; + DltDaemonApplication app; // NULL-Pointer EXPECT_GE(-1, dlt_daemon_application_del(NULL,NULL, 0)); - EXPECT_GE(-1, dlt_daemon_application_del(NULL, app , 0)); + EXPECT_GE(-1, dlt_daemon_application_del(NULL, &app , 0)); EXPECT_GE(-1, dlt_daemon_application_del(&daemon,NULL, 0)); } /* End Method: dlt_daemon_common::dlt_daemon_application_del */ @@ -654,12 +654,12 @@ TEST(t_dlt_daemon_context_del, normal) } TEST(t_dlt_daemon_context_del, abnormal) { - DltDaemon daemon; - ID4 apid = "TES"; - ID4 ctid = "CON"; - char desc[255] = "TEST dlt_daemon_context_add"; - DltDaemonContext *daecontext; - DltDaemonApplication *app; +// DltDaemon daemon; +// ID4 apid = "TES"; +// ID4 ctid = "CON"; +// char desc[255] = "TEST dlt_daemon_context_add"; +// DltDaemonContext *daecontext; +// DltDaemonApplication *app; // Context uninitialized // EXPECT_EQ(0, dlt_daemon_init(&daemon, DLT_DAEMON_RINGBUFFER_MIN_SIZE, DLT_DAEMON_RINGBUFFER_MAX_SIZE, DLT_DAEMON_RINGBUFFER_STEP_SIZE, DLT_RUNTIME_DEFAULT_DIRECTORY,0)); @@ -691,11 +691,11 @@ TEST(t_dlt_daemon_context_del, abnormal) TEST(t_dlt_daemon_context_del, nullpointer) { DltDaemon daemon; - DltDaemonContext *daecontext; + DltDaemonContext daecontext; //NULL-Pointer EXPECT_GE(-1, dlt_daemon_context_del(NULL, NULL, 0)); - EXPECT_GE(-1, dlt_daemon_context_del(NULL, daecontext, 0)); + EXPECT_GE(-1, dlt_daemon_context_del(NULL, &daecontext, 0)); EXPECT_GE(-1, dlt_daemon_context_del(&daemon, NULL, 0)); } /* End Method: dlt_daemon_common::dlt_daemon_context_del */ @@ -1155,11 +1155,11 @@ TEST(t_dlt_daemon_user_send_log_level, abnormal) TEST(t_dlt_daemon_user_send_log_level, nullpointer) { DltDaemon daemon; - DltDaemonContext *daecontext; + DltDaemonContext daecontext; // NULL-Pointer EXPECT_GE(-1, dlt_daemon_user_send_log_level(NULL, NULL, 0)); - EXPECT_GE(-1, dlt_daemon_user_send_log_level(NULL, daecontext, 0)); + EXPECT_GE(-1, dlt_daemon_user_send_log_level(NULL, &daecontext, 0)); EXPECT_GE(-1, dlt_daemon_user_send_log_level(&daemon, NULL, 0)); } /* End Method: dlt_daemon_common::dlt_daemon_user_send_log_level */ @@ -1171,11 +1171,11 @@ TEST(t_dlt_daemon_user_send_log_level, nullpointer) TEST(t_dlt_daemon_user_send_log_state, normal) { DltDaemon daemon; - ID4 apid = "TES"; - ID4 ctid = "CON"; - char desc[255] = "TEST dlt_daemon_context_add"; - DltDaemonContext *daecontext; - DltDaemonApplication *app; +// ID4 apid = "TES"; +// ID4 ctid = "CON"; +// char desc[255] = "TEST dlt_daemon_context_add"; +// DltDaemonContext *daecontext; +// DltDaemonApplication *app; pid_t pid = 18166; char filename[DLT_DAEMON_COMMON_TEXTBUFSIZE+1]; snprintf(filename,DLT_DAEMON_COMMON_TEXTBUFSIZE,"%s/dlt%d",DLT_USER_DIR,pid); @@ -1241,10 +1241,10 @@ TEST(t_dlt_daemon_user_send_log_state, abnormal) TEST(t_dlt_daemon_user_send_log_state, nullpointer) { DltDaemon daemon; - DltDaemonApplication *app; + DltDaemonApplication app; EXPECT_GE(0, dlt_daemon_user_send_log_state(NULL, NULL, 0)); - EXPECT_GE(0, dlt_daemon_user_send_log_state(NULL, app, 0)); + EXPECT_GE(0, dlt_daemon_user_send_log_state(NULL, &app, 0)); EXPECT_GE(0, dlt_daemon_user_send_log_state(&daemon, NULL, 0)); } /* End Method: dlt_daemon_common::dlt_daemon_user_send_log_state */ diff --git a/tests/gtest_dlt_user.cpp b/tests/gtest_dlt_user.cpp index a64541c..e58a648 100644 --- a/tests/gtest_dlt_user.cpp +++ b/tests/gtest_dlt_user.cpp @@ -141,7 +141,7 @@ int dlt_nonverbose_mode(void); #endif #ifndef UINT64_MAX -#define UINT64_MAX 18446744073709551615 +#define UINT64_MAX 18446744073709551615UL #endif #ifndef INT8_MIN @@ -157,7 +157,7 @@ int dlt_nonverbose_mode(void); #endif #ifndef INT64_MIN -#define INT64_MIN -9223372036854775808 +#define INT64_MIN -9223372036854775807 #endif #ifndef INT8_MAX diff --git a/tests/testfile.dlt b/tests/testfile.dlt Binary files differindex f77621c..f77621c 100755..100644 --- a/tests/testfile.dlt +++ b/tests/testfile.dlt |