diff --git a/distributed_schedule_lite/dmsfwk_lite_posix/src/MsgParserFuncTest.cpp b/distributed_schedule_lite/dmsfwk_lite_posix/src/MsgParserFuncTest.cpp index 9677b6da948eb92f62a419a418575ff0c7e079b3..b822f6aa54c27425e943d299b8b5f340367e8eb8 100755 --- a/distributed_schedule_lite/dmsfwk_lite_posix/src/MsgParserFuncTest.cpp +++ b/distributed_schedule_lite/dmsfwk_lite_posix/src/MsgParserFuncTest.cpp @@ -67,12 +67,11 @@ protected: */ HWTEST_F(MsgParserFuncTest, testMsgParserFunc0010, Function | MediumTest | Level1) { uint8_t buffer[] = { - 0x01, 0x01, 0x01, 0x02, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x68, - 0x75, 0x61, 0x77, 0x65, 0x69, 0x2e, 0x6c, 0x61, 0x75, 0x6e, - 0x63, 0x68, 0x65, 0x72, 0x00, 0x03, 0x0d, 0x4d, 0x61, 0x69, - 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x00, - 0x04, 0x0a, 0x70, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x6B, 0x65, - 0x79, 0x00 + 0x01, 0x01, 0x01, 0x02, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, + 0x68, 0x6f, 0x73, 0x2e, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, + 0x65, 0x72, 0x00, 0x03, 0x0d, 0x4d, 0x61, 0x69, 0x6e, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x00, 0x04, 0x0a, + 0x70, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x6B, 0x65, 0x79, 0x00 }; handleFlag = FALSE; @@ -81,7 +80,7 @@ HWTEST_F(MsgParserFuncTest, testMsgParserFunc0010, Function | MediumTest | Level const TlvDmsMsgInfo *msg = reinterpret_cast(dmsMsg); EXPECT_EQ(errCode, DMS_TLV_SUCCESS); EXPECT_EQ(msg->commandId, 1); - EXPECT_EQ(string(msg->calleeBundleName), "com.huawei.launcher"); + EXPECT_EQ(string(msg->calleeBundleName), "com.ohos.launcher"); EXPECT_EQ(string(msg->calleeAbilityName), "MainActivity"); EXPECT_EQ(string(msg->callerSignature), "publickey"); }; @@ -730,10 +729,10 @@ HWTEST_F(MsgParserFuncTest, testMsgParserFunc0300, Function | MediumTest | Level 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, - 0x4a, 0x2e, 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x00, 0x03, 0x0d, - 0x4d, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, - 0x79, 0x00, 0x04, 0x0a, 0x70, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x6B, - 0x65, 0x79, 0x00 + 0x4a, 0x2e, 0x6f, 0x68, 0x6f, 0x73, 0x00, 0x03, 0x0d, 0x4d, 0x61, + 0x69, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x00, + 0x04, 0x0a, 0x70, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x6B, 0x65, 0x79, + 0x00 }; handleFlag = FALSE; @@ -747,7 +746,7 @@ HWTEST_F(MsgParserFuncTest, testMsgParserFunc0300, Function | MediumTest | Level ss << "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; } ss << "abcdefghijklmnopqrstuvwxyzABCDEFGHIJ"; - ss << ".huawei"; + ss << ".ohos"; EXPECT_EQ(msg->commandId, 1); EXPECT_EQ(string(msg->calleeBundleName), ss.str()); EXPECT_EQ(string(msg->calleeAbilityName), "MainActivity"); diff --git a/distributed_schedule_lite/dmsfwk_lite_posix/src/utils/DMSTestBase.cpp b/distributed_schedule_lite/dmsfwk_lite_posix/src/utils/DMSTestBase.cpp index 0a0a88af226ed75bdefa29fa88c5c04dada7435d..abedd0a72afc776046c9101acae1db93e89ed82b 100755 --- a/distributed_schedule_lite/dmsfwk_lite_posix/src/utils/DMSTestBase.cpp +++ b/distributed_schedule_lite/dmsfwk_lite_posix/src/utils/DMSTestBase.cpp @@ -87,6 +87,6 @@ BOOL InstallHap() BOOL UninstallHap() { sem_init(&g_sem, 0, 0); - Uninstall("com.huawei.helloworld", nullptr, TestBundleStateCallback); + Uninstall("com.ohos.helloworld", nullptr, TestBundleStateCallback); sem_wait(&g_sem); } diff --git a/utils_lite/file_hal/src/utils_file_func_test.c b/utils_lite/file_hal/src/utils_file_func_test.c index 758a3338d7c3dc4b78124570fd907d3cef8a34d1..2414452ced289f64cb2adcc0ccac2b9d7e676865 100755 --- a/utils_lite/file_hal/src/utils_file_func_test.c +++ b/utils_lite/file_hal/src/utils_file_func_test.c @@ -334,20 +334,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testCreatLongNameFile, Function | MediumT UtilsFileDelete(fileName); }; -/** - * @tc.number : SUB_UTILS_FILE_OPERATION_1700 - * @tc.name : Creat file with special characters - * @tc.desc : [C- SOFTWARE -0200] - */ -LITE_TEST_CASE(UtilsFileFuncTestSuite, testCreatFileWithSpecChar, Function | MediumTest | Level1) -{ - char* fileName = "case117-~!@#$%^&*()+_/:?<;>|\\"; - int fd = UtilsFileOpen(fileName, O_RDONLY_FS | O_CREAT_FS, 0); - TEST_ASSERT_GREATER_THAN_INT(0, fd); - UtilsFileClose(fd); - UtilsFileDelete(fileName); -}; - /** * @tc.number : SUB_UTILS_FILE_OPERATION_1800 * @tc.name : Open none exist file @@ -692,23 +678,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testObtainLongNameFileSize, Function | Me UtilsFileDelete(fileName); }; -/** - * @tc.number : SUB_UTILS_FILE_OPERATION_3900 - * @tc.name : Obtaining size for file with special characters - * @tc.desc : [C- SOFTWARE -0200] - */ -LITE_TEST_CASE(UtilsFileFuncTestSuite, testObtainSizeForFileWithSpecChar, Function | MediumTest | Level1) -{ - char* fileName = "case307-~!@#$%^&*()+_/:?<;>|\\"; - int fd0 = UtilsFileOpen(fileName, O_RDWR_FS | O_CREAT_FS, 0); - UtilsFileWrite(fd0, g_def, strlen(g_def)); - UtilsFileClose(fd0); - unsigned int fileLen = 0; - int ret = UtilsFileStat(fileName, &fileLen); - TEST_ASSERT_EQUAL_INT(0, ret); - UtilsFileDelete(fileName); -}; - /** * @tc.number : SUB_UTILS_FILE_OPERATION_4000 * @tc.name : File operation for file copy @@ -758,24 +727,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testCopyLongNameFile, Function | MediumTe UtilsFileDelete(fileNameCopy); }; -/** - * @tc.number : SUB_UTILS_FILE_OPERATION_4300 - * @tc.name : Copy file with special characters - * @tc.desc : [C- SOFTWARE -0200] - */ -LITE_TEST_CASE(UtilsFileFuncTestSuite, testCopyFileWithSpecChar, Function | MediumTest | Level1) -{ - char* fileName = "case404-~!@#$%^&*()+_/:?<;>|\\"; - int fd0 = UtilsFileOpen(fileName, O_RDWR_FS | O_CREAT_FS, 0); - UtilsFileWrite(fd0, g_def, strlen(g_def)); - UtilsFileClose(fd0); - char* fileNameCopy = "copy404-~!@#$%^&*()+_/:?<;>|\\"; - int ret = UtilsFileCopy(fileName, fileNameCopy); - TEST_ASSERT_EQUAL_INT(0, ret); - UtilsFileDelete(fileName); - UtilsFileDelete(fileNameCopy); -}; - /** * @tc.number : SUB_UTILS_FILE_OPERATION_4400 * @tc.name : File operation for file move @@ -823,23 +774,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testMoveLongNameFile, Function | MediumTe UtilsFileDelete(fileNameMove); }; -/** - * @tc.number : SUB_UTILS_FILE_OPERATION_4700 - * @tc.name : Move file with special characters - * @tc.desc : [C- SOFTWARE -0200] - */ -LITE_TEST_CASE(UtilsFileFuncTestSuite, testMoveFileWithSpecChar, Function | MediumTest | Level1) -{ - char* fileName = "case504-~!@#$%^&*()+_/:?<;>|\\"; - int fd0 = UtilsFileOpen(fileName, O_RDWR_FS | O_CREAT_FS, 0); - UtilsFileWrite(fd0, g_def, strlen(g_def)); - UtilsFileClose(fd0); - char* fileNameMove = "move504-~!@#$%^&*()+_/:?<;>|\\"; - int ret = UtilsFileMove(fileName, fileNameMove); - TEST_ASSERT_EQUAL_INT(0, ret); - UtilsFileDelete(fileNameMove); -}; - /** * @tc.number : SUB_UTILS_FILE_OPERATION_4800 * @tc.name : File operation for file delete @@ -882,19 +816,4 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testDeleteLongNameFile, Function | Medium TEST_ASSERT_EQUAL_INT(0, ret); }; -/** - * @tc.number : SUB_UTILS_FILE_OPERATION_5100 - * @tc.name : Delete file with special characters - * @tc.desc : [C- SOFTWARE -0200] - */ -LITE_TEST_CASE(UtilsFileFuncTestSuite, testDeleteFileWithSpecChar, Function | MediumTest | Level1) -{ - char* fileName = "delete604-~!@#$%^&*()+_/:?<;>|\\"; - int fd0 = UtilsFileOpen(fileName, O_RDWR_FS | O_CREAT_FS, 0); - UtilsFileWrite(fd0, g_def, strlen(g_def)); - UtilsFileClose(fd0); - int ret = UtilsFileDelete(fileName); - TEST_ASSERT_EQUAL_INT(0, ret); -}; - RUN_TEST_SUITE(UtilsFileFuncTestSuite);