fix(stream): fix syntax error in unit test.

This commit is contained in:
Haojun Liao 2024-09-19 09:04:29 +08:00
parent ddce0e5386
commit 47a2a8528c
2 changed files with 5 additions and 3 deletions

View File

@ -478,11 +478,13 @@ TEST_F(BackendEnv, oldBackendInit) {
ASSERT(code == 0); 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); 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); streamBackendCleanup((void *)p);
} }

View File

@ -12,7 +12,7 @@ class StreamStateEnv : public ::testing::Test {
protected: protected:
virtual void SetUp() { virtual void SetUp() {
streamMetaInit(); streamMetaInit();
backend = streamBackendInit(path, 0, 0); int32_t code = streamBackendInit(path, 0, 0, &backend);
} }
virtual void TearDown() { streamMetaCleanup(); } virtual void TearDown() { streamMetaCleanup(); }