提交 41476310 编写于 作者: O openharmony_ci 提交者: Gitee

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

Merge pull request !82 from zhouhouxin/N/A
...@@ -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"
...@@ -357,7 +357,7 @@ LITE_TEST_SUIT(test, samgr, SendSharedRequestTestSuite); ...@@ -357,7 +357,7 @@ LITE_TEST_SUIT(test, samgr, SendSharedRequestTestSuite);
static BOOL SendSharedRequestTestSuiteSetUp(void) static BOOL SendSharedRequestTestSuiteSetUp(void)
{ {
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
return TRUE; return TRUE;
} }
...@@ -396,7 +396,7 @@ LITE_TEST_CASE(SendSharedRequestTestSuite, testSendSharedRequest0010, Function | ...@@ -396,7 +396,7 @@ LITE_TEST_CASE(SendSharedRequestTestSuite, testSendSharedRequest0010, Function |
uint32 *token = NULL; uint32 *token = NULL;
token = demoApi->SAMGR_SendSharedRequestProxy(&feature->identity, &request, token, DemoHandlerAndCheck); token = demoApi->SAMGR_SendSharedRequestProxy(&feature->identity, &request, token, DemoHandlerAndCheck);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureCalledCount, 1); TEST_ASSERT_EQUAL_INT(feature->featureCalledCount, 1);
TEST_ASSERT_EQUAL_INT(strcmp(feature->latestRequest, body), 0); TEST_ASSERT_EQUAL_INT(strcmp(feature->latestRequest, body), 0);
...@@ -439,7 +439,7 @@ LITE_TEST_CASE(SendSharedRequestTestSuite, testSendSharedDirectRequest0010, Func ...@@ -439,7 +439,7 @@ LITE_TEST_CASE(SendSharedRequestTestSuite, testSendSharedDirectRequest0010, Func
&token, DemoHandlerAndCheck); &token, DemoHandlerAndCheck);
TEST_ASSERT_EQUAL_INT(result, 0); TEST_ASSERT_EQUAL_INT(result, 0);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(feature->featureCalledCount, 0); TEST_ASSERT_EQUAL_INT(feature->featureCalledCount, 0);
ReleaseIUnknown(demoApi); ReleaseIUnknown(demoApi);
......
...@@ -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"
...@@ -119,7 +119,7 @@ LITE_TEST_SUIT(test, samgr, ServiceTestSuite); ...@@ -119,7 +119,7 @@ LITE_TEST_SUIT(test, samgr, ServiceTestSuite);
static BOOL ServiceTestSuiteSetUp(void) static BOOL ServiceTestSuiteSetUp(void)
{ {
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
return TRUE; return TRUE;
} }
...@@ -263,7 +263,7 @@ LITE_TEST_CASE(ServiceTestSuite, testUnregisterService0060, Function | MediumTes ...@@ -263,7 +263,7 @@ LITE_TEST_CASE(ServiceTestSuite, testUnregisterService0060, Function | MediumTes
LITE_TEST_CASE(ServiceTestSuite, testBootstrap0010, Function | MediumTest | Level2) LITE_TEST_CASE(ServiceTestSuite, testBootstrap0010, Function | MediumTest | Level2)
{ {
SAMGR_Bootstrap(); SAMGR_Bootstrap();
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
SamgrLite *samgrLite = SAMGR_GetInstance(); SamgrLite *samgrLite = SAMGR_GetInstance();
TEST_ASSERT_EQUAL_INT(TRUE, samgrLite != NULL); TEST_ASSERT_EQUAL_INT(TRUE, samgrLite != NULL);
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* Create : 2020/04/19 * Create : 2020/04/19
*/ */
#include <los_base.h> #include "cmsis_os.h"
#include "hctest.h" #include "hctest.h"
#include "samgr_lite.h" #include "samgr_lite.h"
...@@ -203,7 +203,7 @@ LITE_TEST_SUIT(distributedschedule, samgr, TaskPoolNoTaskFuncTestSuite); ...@@ -203,7 +203,7 @@ LITE_TEST_SUIT(distributedschedule, samgr, TaskPoolNoTaskFuncTestSuite);
static BOOL TaskPoolNoTaskFuncTestSuiteSetUp(void) static BOOL TaskPoolNoTaskFuncTestSuiteSetUp(void)
{ {
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
return TRUE; return TRUE;
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <los_base.h> #include "cmsis_os.h"
#include "securec.h" #include "securec.h"
#include "cmsis_os2.h" #include "cmsis_os2.h"
#include "hctest.h" #include "hctest.h"
...@@ -281,7 +281,7 @@ LITE_TEST_SUIT(distributedschedule, taskpool, ShareTaskFuncTestSuite); ...@@ -281,7 +281,7 @@ LITE_TEST_SUIT(distributedschedule, taskpool, ShareTaskFuncTestSuite);
static BOOL ShareTaskFuncTestSuiteSetUp(void) static BOOL ShareTaskFuncTestSuiteSetUp(void)
{ {
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
return TRUE; return TRUE;
} }
...@@ -315,7 +315,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0010, Function | MediumTest ...@@ -315,7 +315,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0010, Function | MediumTest
strcpy_s(request.data, request.len, body); strcpy_s(request.data, request.len, body);
int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature[0].identity), &request, NULL); int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature[0].identity), &request, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_createFeature[0].featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_createFeature[0].featureCalledCount == 1, TRUE);
// *************************** // // *************************** //
...@@ -337,7 +337,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0010, Function | MediumTest ...@@ -337,7 +337,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0010, Function | MediumTest
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
result2 = defaultApi->SendRequestProxyDF(&(g_service[0].identity), &request2, NULL); result2 = defaultApi->SendRequestProxyDF(&(g_service[0].identity), &request2, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_service[0].serviceCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_service[0].serviceCalledCount == 1, TRUE);
}; };
...@@ -366,7 +366,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0020, Function | MediumTest ...@@ -366,7 +366,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0020, Function | MediumTest
strcpy_s(request.data, request.len, body); strcpy_s(request.data, request.len, body);
int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature[1].identity), &request, NULL); int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature[1].identity), &request, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_createFeature[1].featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_createFeature[1].featureCalledCount == 1, TRUE);
// *************************** // // *************************** //
...@@ -388,7 +388,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0020, Function | MediumTest ...@@ -388,7 +388,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0020, Function | MediumTest
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
result2 = defaultApi->SendRequestProxyDF(&(g_service[1].identity), &request2, NULL); result2 = defaultApi->SendRequestProxyDF(&(g_service[1].identity), &request2, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_service[1].serviceCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_service[1].serviceCalledCount == 1, TRUE);
}; };
...@@ -426,7 +426,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0030, Function | MediumTest ...@@ -426,7 +426,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0030, Function | MediumTest
strcpy_s(request2.data, request2.len, body); strcpy_s(request2.data, request2.len, body);
defaultApi2->SendRequestProxyDF(&(g_service[1].identity), &request2, NULL); defaultApi2->SendRequestProxyDF(&(g_service[1].identity), &request2, NULL);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_threadID11 == g_threadID21, TRUE); TEST_ASSERT_EQUAL_INT(g_threadID11 == g_threadID21, TRUE);
}; };
...@@ -464,7 +464,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0040, Function | MediumTest ...@@ -464,7 +464,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0040, Function | MediumTest
strcpy_s(request2.data, request2.len, body); strcpy_s(request2.data, request2.len, body);
demoApi2->SendRequestProxyF(&(g_createFeature[1].identity), &request2, NULL); demoApi2->SendRequestProxyF(&(g_createFeature[1].identity), &request2, NULL);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_threadID12 == g_threadID22, TRUE); TEST_ASSERT_EQUAL_INT(g_threadID12 == g_threadID22, TRUE);
}; };
RUN_TEST_SUITE(ShareTaskFuncTestSuite); RUN_TEST_SUITE(ShareTaskFuncTestSuite);
\ No newline at end of file
...@@ -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"
...@@ -323,7 +323,7 @@ LITE_TEST_SUIT(distributedschedule, samgr, SingleTaskFuncTestSuite); ...@@ -323,7 +323,7 @@ LITE_TEST_SUIT(distributedschedule, samgr, SingleTaskFuncTestSuite);
static BOOL SingleTaskFuncTestSuiteSetUp(void) static BOOL SingleTaskFuncTestSuiteSetUp(void)
{ {
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
return TRUE; return TRUE;
} }
...@@ -361,7 +361,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0010, Function | MediumTes ...@@ -361,7 +361,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0010, Function | MediumTes
strcpy_s(request.data, request.len, body); strcpy_s(request.data, request.len, body);
int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL); int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE);
// test defaultFeatureApi function // test defaultFeatureApi function
...@@ -385,7 +385,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0010, Function | MediumTes ...@@ -385,7 +385,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0010, Function | MediumTes
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
result2 = defaultApi->SendRequestProxyDF(&(g_service[0].identity), &request2, NULL); result2 = defaultApi->SendRequestProxyDF(&(g_service[0].identity), &request2, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_service[0].serviceCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_service[0].serviceCalledCount == 1, TRUE);
}; };
...@@ -417,7 +417,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0020, Function | MediumTes ...@@ -417,7 +417,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0020, Function | MediumTes
strcpy_s(request.data, request.len, body); strcpy_s(request.data, request.len, body);
int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL); int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE);
DefaultFeatureApi *defaultApi = GetDefaultIUnknown("SingleTS02"); DefaultFeatureApi *defaultApi = GetDefaultIUnknown("SingleTS02");
...@@ -440,7 +440,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0020, Function | MediumTes ...@@ -440,7 +440,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0020, Function | MediumTes
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
result2 = defaultApi->SendRequestProxyDF(&(g_service[1].identity), &request2, NULL); result2 = defaultApi->SendRequestProxyDF(&(g_service[1].identity), &request2, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_service[1].serviceCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_service[1].serviceCalledCount == 1, TRUE);
}; };
...@@ -472,7 +472,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0030, Function | MediumTes ...@@ -472,7 +472,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0030, Function | MediumTes
strcpy_s(request.data, request.len, body); strcpy_s(request.data, request.len, body);
int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL); int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE);
DefaultFeatureApi *defaultApi = GetDefaultIUnknown("SingleTS03"); DefaultFeatureApi *defaultApi = GetDefaultIUnknown("SingleTS03");
...@@ -495,7 +495,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0030, Function | MediumTes ...@@ -495,7 +495,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0030, Function | MediumTes
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
result2 = defaultApi->SendRequestProxyDF(&(g_service[INDEX2].identity), &request2, NULL); result2 = defaultApi->SendRequestProxyDF(&(g_service[INDEX2].identity), &request2, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_service[INDEX2].serviceCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_service[INDEX2].serviceCalledCount == 1, TRUE);
}; };
...@@ -527,7 +527,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0040, Function | MediumTes ...@@ -527,7 +527,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0040, Function | MediumTes
strcpy_s(request.data, request.len, body); strcpy_s(request.data, request.len, body);
int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL); int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE);
DefaultFeatureApi *defaultApi = GetDefaultIUnknown("SingleTS04"); DefaultFeatureApi *defaultApi = GetDefaultIUnknown("SingleTS04");
...@@ -550,7 +550,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0040, Function | MediumTes ...@@ -550,7 +550,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0040, Function | MediumTes
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
result2 = defaultApi->SendRequestProxyDF(&(g_service[INDEX3].identity), &request2, NULL); result2 = defaultApi->SendRequestProxyDF(&(g_service[INDEX3].identity), &request2, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_service[INDEX3].serviceCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_service[INDEX3].serviceCalledCount == 1, TRUE);
}; };
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <los_base.h> #include "cmsis_os.h"
#include "securec.h" #include "securec.h"
#include "cmsis_os2.h" #include "cmsis_os2.h"
#include "hctest.h" #include "hctest.h"
...@@ -251,7 +251,7 @@ LITE_TEST_SUIT(distributedschedule, taskpool, SpecifiedTaskFuncTestSuite); ...@@ -251,7 +251,7 @@ LITE_TEST_SUIT(distributedschedule, taskpool, SpecifiedTaskFuncTestSuite);
static BOOL SpecifiedTaskFuncTestSuiteSetUp(void) static BOOL SpecifiedTaskFuncTestSuiteSetUp(void)
{ {
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
return TRUE; return TRUE;
} }
...@@ -285,7 +285,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0010, Function | Med ...@@ -285,7 +285,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0010, Function | Med
strcpy_s(request.data, request.len, body); strcpy_s(request.data, request.len, body);
int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL); int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE);
// *************************** // // *************************** //
...@@ -307,7 +307,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0010, Function | Med ...@@ -307,7 +307,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0010, Function | Med
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
result2 = defaultApi->SendRequestProxyDF(&(g_service[0].identity), &request2, NULL); result2 = defaultApi->SendRequestProxyDF(&(g_service[0].identity), &request2, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_service[0].serviceCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_service[0].serviceCalledCount == 1, TRUE);
}; };
...@@ -336,7 +336,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0020, Function | Med ...@@ -336,7 +336,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0020, Function | Med
strcpy_s(request.data, request.len, body); strcpy_s(request.data, request.len, body);
int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL); int32 result2 = demoApi->SendRequestProxyF(&(g_createFeature.identity), &request, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_createFeature.featureCalledCount == 1, TRUE);
// *************************** // // *************************** //
...@@ -358,7 +358,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0020, Function | Med ...@@ -358,7 +358,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0020, Function | Med
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
result2 = defaultApi->SendRequestProxyDF(&(g_service[0].identity), &request2, NULL); result2 = defaultApi->SendRequestProxyDF(&(g_service[0].identity), &request2, NULL);
TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE); TEST_ASSERT_EQUAL_INT(result2 == 0, TRUE);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_service[0].serviceCalledCount == 1, TRUE); TEST_ASSERT_EQUAL_INT(g_service[0].serviceCalledCount == 1, TRUE);
}; };
...@@ -397,7 +397,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0030, Function | Med ...@@ -397,7 +397,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0030, Function | Med
strcpy_s(request2.data, request2.len, body2); strcpy_s(request2.data, request2.len, body2);
defaultApi2->SendRequestProxyDF(&(g_service[1].identity), &request2, NULL); defaultApi2->SendRequestProxyDF(&(g_service[1].identity), &request2, NULL);
LOS_Msleep(OPER_INTERVAL); osDelay(OPER_INTERVAL);
TEST_ASSERT_EQUAL_INT(g_servicePoint1 == g_servicePoint2, TRUE); TEST_ASSERT_EQUAL_INT(g_servicePoint1 == g_servicePoint2, TRUE);
}; };
RUN_TEST_SUITE(SpecifiedTaskFuncTestSuite); RUN_TEST_SUITE(SpecifiedTaskFuncTestSuite);
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册