mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-04 17:19:20 +00:00
!1927 FIX:修改UT无断言问题
Merge pull request !1927 from cheng_jinsong/0428_ut
This commit is contained in:
commit
97d2280067
@ -26,6 +26,7 @@
|
||||
#include "init_log.h"
|
||||
#include "init_service.h"
|
||||
#include "init_unittest.h"
|
||||
#include "init_adapter.h"
|
||||
#include "init_utils.h"
|
||||
#include "loop_event.h"
|
||||
#include "param_stub.h"
|
||||
@ -83,6 +84,8 @@ HWTEST_F(InitUnitTest, TestSystemPrepare, TestSize.Level1)
|
||||
HWTEST_F(InitUnitTest, TestSystemExecRcs, TestSize.Level1)
|
||||
{
|
||||
SystemExecuteRcs();
|
||||
int ret = KeepCapability();
|
||||
EXPECT_EQ(ret, 0);
|
||||
}
|
||||
|
||||
static void TestProcessTimer(const TimerHandle taskHandle, void *context)
|
||||
|
@ -32,8 +32,6 @@ static void ClientCheckParamValue(const char *name, const char *expectValue)
|
||||
if (expectValue != nullptr) {
|
||||
EXPECT_EQ(strcmp(tmp, expectValue), 0);
|
||||
}
|
||||
} else {
|
||||
EXPECT_NE(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +43,8 @@ static void *TestSendParamSetMsg(void *args)
|
||||
}
|
||||
std::string name = (char *)args;
|
||||
PARAM_LOGI("TestSendParamSetMsg name :\'%s\' ", name.c_str());
|
||||
SystemSetParameter(name.c_str(), name.c_str());
|
||||
int ret = SystemSetParameter(name.c_str(), name.c_str());
|
||||
EXPECT_EQ(ret, 0);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -57,7 +56,8 @@ static void *TestSendParamWaitMsg(void *args)
|
||||
std::string name = "Wati.";
|
||||
name = name + (char *)args;
|
||||
PARAM_LOGI("TestSendParamWaitMsg name :\'%s\' \n", name.c_str());
|
||||
SystemWaitParameter(name.c_str(), name.c_str(), 1);
|
||||
int ret = SystemWaitParameter(name.c_str(), name.c_str(), 1);
|
||||
EXPECT_GE(ret, 0);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user