提交 4f70d1b7 编写于 作者: O openharmony_ci 提交者: Gitee

!81 【轻量级 PR】:解除对内核的依赖_part3

Merge pull request !81 from zhouhouxin/N/A
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
#include <string.h> #include <string.h>
#include <los_base.h> #include "cmsis_os.h"
#include "hctest.h" #include "hctest.h"
#include "samgr_lite.h" #include "samgr_lite.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include <los_base.h> #include "cmsis_os.h"
#include "hctest.h" #include "hctest.h"
#include "samgr_lite.h" #include "samgr_lite.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include <los_base.h> #include "cmsis_os.h"
#include <ohos_errno.h> #include <ohos_errno.h>
#include "hctest.h" #include "hctest.h"
#include "samgr_lite.h" #include "samgr_lite.h"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <los_base.h> #include "cmsis_os.h"
#include "securec.h" #include "securec.h"
#include "hctest.h" #include "hctest.h"
#include "samgr_lite.h" #include "samgr_lite.h"
...@@ -396,7 +396,7 @@ LITE_TEST_SUIT(test, samgr, SendRequestTestSuite); ...@@ -396,7 +396,7 @@ LITE_TEST_SUIT(test, samgr, SendRequestTestSuite);
static BOOL SendRequestTestSuiteSetUp(void) static BOOL SendRequestTestSuiteSetUp(void)
{ {
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
return TRUE; return TRUE;
} }
...@@ -463,7 +463,7 @@ LITE_TEST_CASE(SendRequestTestSuite, testSendRequest0010, Function | MediumTest ...@@ -463,7 +463,7 @@ LITE_TEST_CASE(SendRequestTestSuite, testSendRequest0010, Function | MediumTest
int32 result = demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL); int32 result = demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL);
TEST_ASSERT_EQUAL_INT(result == 0, TRUE); TEST_ASSERT_EQUAL_INT(result == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(feature->featureCalledCount == 1, TRUE);
TEST_ASSERT_EQUAL_INT(strcmp(feature->latestRequest, body), 0); TEST_ASSERT_EQUAL_INT(strcmp(feature->latestRequest, body), 0);
...@@ -500,7 +500,7 @@ LITE_TEST_CASE(SendRequestTestSuite, testSendRequest0020, Function | MediumTest ...@@ -500,7 +500,7 @@ LITE_TEST_CASE(SendRequestTestSuite, testSendRequest0020, Function | MediumTest
int32 result = demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL); int32 result = demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL);
TEST_ASSERT_EQUAL_INT(result == 0, TRUE); TEST_ASSERT_EQUAL_INT(result == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(feature->featureCalledCount == 1, TRUE);
TEST_ASSERT_EQUAL_INT(strcmp(feature->latestRequest, body), 0); TEST_ASSERT_EQUAL_INT(strcmp(feature->latestRequest, body), 0);
...@@ -558,7 +558,7 @@ LITE_TEST_CASE(SendRequestTestSuite, testSendRequest0040, Function | MediumTest ...@@ -558,7 +558,7 @@ LITE_TEST_CASE(SendRequestTestSuite, testSendRequest0040, Function | MediumTest
int32 result = demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL); int32 result = demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL);
TEST_ASSERT_EQUAL_INT(result == 0, TRUE); TEST_ASSERT_EQUAL_INT(result == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(feature->featureCalledCount == 1, TRUE);
ReleaseIUnknown(demoApi); ReleaseIUnknown(demoApi);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <los_base.h> #include "cmsis_os.h"
#include "securec.h" #include "securec.h"
#include "hctest.h" #include "hctest.h"
#include "samgr_lite.h" #include "samgr_lite.h"
...@@ -338,7 +338,7 @@ LITE_TEST_SUIT(test, samgr, SendResponseTestSuite); ...@@ -338,7 +338,7 @@ LITE_TEST_SUIT(test, samgr, SendResponseTestSuite);
static BOOL SendResponseTestSuiteSetUp(void) static BOOL SendResponseTestSuiteSetUp(void)
{ {
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
return TRUE; return TRUE;
} }
...@@ -374,7 +374,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponse0010, Function | MediumTes ...@@ -374,7 +374,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponse0010, Function | MediumTes
DemoFeature *feature = GET_OBJECT(iUnknown, DemoFeature, iUnknown); DemoFeature *feature = GET_OBJECT(iUnknown, DemoFeature, iUnknown);
demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, DemoHandlerAndCheck); demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, DemoHandlerAndCheck);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureStatus == TRUE, TRUE); TEST_ASSERT_EQUAL_INT(feature->featureStatus == TRUE, TRUE);
ReleaseIUnknown(demoApi); ReleaseIUnknown(demoApi);
} }
...@@ -406,7 +406,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponse0020, Function | MediumTes ...@@ -406,7 +406,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponse0020, Function | MediumTes
DemoFeature *feature = GET_OBJECT(iUnknown, DemoFeature, iUnknown); DemoFeature *feature = GET_OBJECT(iUnknown, DemoFeature, iUnknown);
demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL); demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureStatus == FALSE, TRUE); TEST_ASSERT_EQUAL_INT(feature->featureStatus == FALSE, TRUE);
ReleaseIUnknown(demoApi); ReleaseIUnknown(demoApi);
} }
...@@ -438,7 +438,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponse0030, Function | MediumTes ...@@ -438,7 +438,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponse0030, Function | MediumTes
DemoFeature *feature = GET_OBJECT(iUnknown, DemoFeature, iUnknown); DemoFeature *feature = GET_OBJECT(iUnknown, DemoFeature, iUnknown);
demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, DemoHandler); demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, DemoHandler);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureStatus == TRUE, TRUE); TEST_ASSERT_EQUAL_INT(feature->featureStatus == TRUE, TRUE);
ReleaseIUnknown(demoApi); ReleaseIUnknown(demoApi);
} }
...@@ -471,7 +471,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponseByIdentity0010, Function | ...@@ -471,7 +471,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponseByIdentity0010, Function |
feature->featureStatus = FALSE; feature->featureStatus = FALSE;
demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, DemoHandlerAndCheck); demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, DemoHandlerAndCheck);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureStatus == TRUE, TRUE); TEST_ASSERT_EQUAL_INT(feature->featureStatus == TRUE, TRUE);
ReleaseIUnknown(demoApi); ReleaseIUnknown(demoApi);
...@@ -504,7 +504,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponseByIdentity0020, Function | ...@@ -504,7 +504,7 @@ LITE_TEST_CASE(SendResponseTestSuite, testSendResponseByIdentity0020, Function |
DemoFeature *feature = GET_OBJECT(iUnknown, DemoFeature, iUnknown); DemoFeature *feature = GET_OBJECT(iUnknown, DemoFeature, iUnknown);
demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL); demoApi->SAMGR_SendRequestProxy(&feature->identity, &request, NULL);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureStatus == FALSE, TRUE); TEST_ASSERT_EQUAL_INT(feature->featureStatus == FALSE, TRUE);
ReleaseIUnknown(demoApi); ReleaseIUnknown(demoApi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册