From 47a2a8528c4aec69a0511aa1c08cac829554683b Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 19 Sep 2024 09:04:29 +0800 Subject: [PATCH] fix(stream): fix syntax error in unit test. --- source/libs/stream/test/backendTest.cpp | 6 ++++-- source/libs/stream/test/tstreamUpdateTest.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/libs/stream/test/backendTest.cpp b/source/libs/stream/test/backendTest.cpp index 2b21510e45..391ca66c53 100644 --- a/source/libs/stream/test/backendTest.cpp +++ b/source/libs/stream/test/backendTest.cpp @@ -478,11 +478,13 @@ TEST_F(BackendEnv, oldBackendInit) { ASSERT(code == 0); { - SBackendWrapper *p = (SBackendWrapper *)streamBackendInit(path, 10, 10); + SBackendWrapper *p = NULL; + int32_t code = (SBackendWrapper *)streamBackendInit(path, 10, 10, &p); streamBackendCleanup((void *)p); } { - SBackendWrapper *p = (SBackendWrapper *)streamBackendInit(path, 10, 10); + SBackendWrapper *p = NULL; + int32_t code = (SBackendWrapper *)streamBackendInit(path, 10, 10, &p); streamBackendCleanup((void *)p); } diff --git a/source/libs/stream/test/tstreamUpdateTest.cpp b/source/libs/stream/test/tstreamUpdateTest.cpp index 4360fc7d54..10002469d3 100644 --- a/source/libs/stream/test/tstreamUpdateTest.cpp +++ b/source/libs/stream/test/tstreamUpdateTest.cpp @@ -12,7 +12,7 @@ class StreamStateEnv : public ::testing::Test { protected: virtual void SetUp() { streamMetaInit(); - backend = streamBackendInit(path, 0, 0); + int32_t code = streamBackendInit(path, 0, 0, &backend); } virtual void TearDown() { streamMetaCleanup(); }