summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/gtest_dlt_user.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/gtest_dlt_user.cpp b/tests/gtest_dlt_user.cpp
index 777e459..48be5ef 100644
--- a/tests/gtest_dlt_user.cpp
+++ b/tests/gtest_dlt_user.cpp
@@ -452,6 +452,26 @@ TEST(t_dlt_user_log_write_finish, finish)
}
/*/////////////////////////////////////// */
+/* t_dlt_user_log_write_finish */
+TEST(t_dlt_user_log_write_finish, finish_with_timestamp)
+{
+ DltContext context;
+ DltContextData contextData;
+
+ EXPECT_LE(DLT_RETURN_OK, dlt_register_app("TUSR", "dlt_user.c tests"));
+ EXPECT_LE(DLT_RETURN_OK, dlt_register_context(&context, "TEST", "dlt_user.c t_dlt_user_log_write_finish finish"));
+
+ /* finish with start and initialized context */
+ EXPECT_LE(DLT_RETURN_OK, dlt_user_log_write_start(&context, &contextData, DLT_LOG_DEFAULT));
+ contextData.use_timestamp = DLT_USER_TIMESTAMP;
+ contextData.user_timestamp = UINT32_MAX;
+ EXPECT_LE(DLT_RETURN_OK, dlt_user_log_write_finish(&contextData));
+
+ EXPECT_LE(DLT_RETURN_OK, dlt_unregister_context(&context));
+ EXPECT_LE(DLT_RETURN_OK, dlt_unregister_app());
+}
+
+/*/////////////////////////////////////// */
/* t_dlt_user_log_write_bool */
TEST(t_dlt_user_log_write_bool, normal)
{