| /ide/tools/previewer/test/fuzztest/jsonparse_fuzzer/ |
| H A D | GetHspAceModuleBuildFuzzer.cpp | 45 std::string filePath = "buildConfig.json"; in TEST() local 47 ChangeJsonUtil::WriteFile(filePath, "aaa"); in TEST() 48 OHOS::Ide::StageContext::GetInstance().GetHspAceModuleBuild(filePath); in TEST() 49 ChangeJsonUtil::WriteFile(filePath, g_buildConfigJson2); in TEST() 50 OHOS::Ide::StageContext::GetInstance().GetHspAceModuleBuild(filePath); in TEST() 56 ChangeJsonUtil::WriteFile(filePath, jsonArgs); in TEST() 59 OHOS::Ide::StageContext::GetInstance().GetHspAceModuleBuild(filePath); in TEST()
|
| H A D | ParseMockJsonFileFuzzer.cpp | 46 std::string filePath = "mock-config.json"; in TEST() local 47 ChangeJsonUtil::WriteFile(filePath, jsonArgs); in TEST() 51 OHOS::Ide::StageContext::GetInstance().ParseMockJsonFile(filePath); in TEST() 52 ChangeJsonUtil::WriteFile(filePath, "aaa"); in TEST() 53 OHOS::Ide::StageContext::GetInstance().ParseMockJsonFile(filePath); in TEST()
|
| H A D | ReadFileContentsFuzzer.cpp | 65 std::string filePath = "testFile.json"; in TEST() local 66 ChangeJsonUtil::WriteFile(filePath, jsonArgs); in TEST() 70 MockFile::SimulateFileLock(filePath); in TEST() 71 OHOS::Ide::StageContext::GetInstance().ReadFileContents(filePath); in TEST() 72 MockFile::ReleaseFileLock(filePath); in TEST() 73 OHOS::Ide::StageContext::GetInstance().ReadFileContents(filePath); in TEST()
|
| H A D | GetModulePathMapFuzzer.cpp | 67 std::string filePath = "loader.json"; in TEST() local 68 ChangeJsonUtil::WriteFile(filePath, jsonArgs); in TEST() 73 OHOS::Ide::StageContext::GetInstance().SetLoaderJsonPath(filePath); in TEST() 75 ChangeJsonUtil::WriteFile(filePath, g_moduleJson2); in TEST() 77 ChangeJsonUtil::WriteFile(filePath, "aaa"); in TEST()
|
| H A D | DeviceConfigParseFuzzer.cpp | 67 std::string filePath = "phoneSettingConfig_Phone.json"; in TEST() local 68 ChangeJsonUtil::WriteFile(filePath, jsonArgs); in TEST() 71 CommandLineInterface::GetInstance().ReadAndApplyConfig(filePath); in TEST()
|
| H A D | SetPkgContextInfoFuzzer.cpp | 99 std::string filePath = "module.json"; in TEST() local 100 ChangeJsonUtil::WriteFile(filePath, g_moduleJsonNoModule); in TEST() 102 ChangeJsonUtil::WriteFile(filePath, g_moduleJsonNoModuleName); in TEST() 104 ChangeJsonUtil::WriteFile(filePath, g_moduleJsonNoModulePackageName); in TEST() 109 ChangeJsonUtil::WriteFile(filePath, moduleJsonArgs); in TEST()
|
| /ide/tools/previewer/test/mock/ |
| H A D | MockFile.h | 27 static bool SimulateFileLock(const std::string& filePath); 28 static bool ReleaseFileLock(const std::string& filePath); 30 static bool AddFileToZip(zipFile zip, const std::string& filePath,
|
| H A D | MockFile.cpp | 29 bool MockFile::SimulateFileLock(const std::string& filePath) in SimulateFileLock() argument 31 int fd = open(filePath.c_str(), O_RDWR | O_CREAT); in SimulateFileLock() 56 bool MockFile::ReleaseFileLock(const std::string& filePath) in ReleaseFileLock() argument 58 int fd = open(filePath.c_str(), O_RDWR | O_CREAT); in ReleaseFileLock() 82 bool MockFile::AddFileToZip(zipFile zip, const std::string& filePath, const std::string& entryName) in AddFileToZip() argument 86 std::cerr << "Failed to create entry in zip file for " << filePath << std::endl; in AddFileToZip() 90 FILE* file = fopen(filePath.c_str(), "rb"); in AddFileToZip() 92 std::cerr << "Failed to open file " << filePath << std::endl; in AddFileToZip() 102 std::cerr << "Failed to write to zip for " << filePath << std::endl; in AddFileToZip() 183 void WriteToFile(const std::string& filePath, cons argument [all...] |
| /ide/tools/previewer/util/unix/ |
| H A D | NativeFileSystem.cpp | 33 std::string filePath = parentFolderPath + "/" + dirEntry->d_name; in FindSubfolderByName() local 34 if (stat(filePath.c_str(), &entryStat) != -1 && S_ISDIR(entryStat.st_mode)) { in FindSubfolderByName() 38 return filePath; in FindSubfolderByName()
|
| /ide/tools/previewer/test/fuzztest/ |
| H A D | ChangeJsonUtil.cpp | 125 void ChangeJsonUtil::WriteFile(std::string filePath, cJSON *object) in WriteFile() argument 134 std::ofstream outFile(filePath); in WriteFile() 136 std::cerr << "Error opening file: " << filePath << std::endl; in WriteFile() 155 std::cout << "JSON content successfully written to file: " << filePath << std::endl; in WriteFile() 158 void ChangeJsonUtil::WriteFile(std::string filePath, std::string str) in WriteFile() argument 160 std::ofstream outFile(filePath); in WriteFile() 162 std::cerr << "Error opening file: " << filePath << std::endl; in WriteFile() 166 std::cout << "Str content successfully written to file: " << filePath << std::endl; in WriteFile()
|
| H A D | ChangeJsonUtil.h | 30 static void WriteFile(std::string filePath, cJSON *object); 31 static void WriteFile(std::string filePath, std::string str);
|
| /ide/tools/previewer/test/unittest/util/ |
| H A D | NativeFileSystemTest.cpp | 59 std::string filePath = OHOS::Ide::NativeFileSystem::FindSubfolderByName(currDir, "mytestdirname"); in TEST_F() local 60 EXPECT_EQ(filePath, childDir); in TEST_F()
|
| /ide/tools/previewer/util/windows/ |
| H A D | NativeFileSystem.cpp | 41 std::string filePath = parentFolderPath + "\\" + dir; in FindSubfolderByName() local 42 return filePath; in FindSubfolderByName()
|
| /ide/tools/previewer/automock/ |
| H A D | build_jsmock_system_plugin.js | 90 function countSize(filePath) { 91 const file = path.relative(__dirname, filePath); 92 fs.stat(filePath, function (error, stats) {
|
| /ide/tools/previewer/mock/ |
| H A D | SystemCapability.cpp | 48 std::string filePath = FileSystem::GetApplicationPath() + separator + ".." + separator + "config" + separator + in ReadCapability() local 50 std::ifstream inFile(filePath); in ReadCapability()
|
| /ide/tools/previewer/jsapp/rich/external/ |
| H A D | StageContext.cpp | 35 const std::optional<std::vector<uint8_t>> StageContext::ReadFileContents(const std::string& filePath) const in ReadFileContents() 37 if (!FileSystem::IsFileExists(filePath)) { in ReadFileContents() 38 ELOG("file %s is not exist.", filePath.c_str()); in ReadFileContents() 41 std::ifstream file(filePath, std::ios::binary | std::ios::ate); in ReadFileContents() 43 ELOG("open file %s failed.", filePath.c_str()); in ReadFileContents() 52 ELOG("read file %s failed.", filePath.c_str()); in ReadFileContents()
|
| H A D | StageContext.h | 32 const std::optional<std::vector<uint8_t>> ReadFileContents(const std::string& filePath) const;
|
| /ide/tools/previewer/test/mock/jsapp/ |
| H A D | MockJsAppImpl.cpp | 68 void JsAppImpl::LoadDocument(const std::string filePath, const std::string componentName, in LoadDocument() argument
|
| /ide/tools/previewer/jsapp/rich/ |
| H A D | JsAppImpl.cpp | 799 void JsAppImpl::LoadDocument(const std::string filePath, in LoadDocument() argument 821 ability->LoadDocument(filePath, componentName, params); in LoadDocument() 900 std::string filePath = commandInfo.appResourcePath + FileSystem::GetSeparator() + "mock-config.json"; in SetMockJsonInfo() local 903 simulator->SetMockList(Ide::StageContext::GetInstance().ParseMockJsonFile(filePath)); in SetMockJsonInfo() 906 ability->SetMockModuleList(Ide::StageContext::GetInstance().ParseMockJsonFile(filePath)); in SetMockJsonInfo()
|
| /ide/tools/previewer/test/unittest/jsapp/ |
| H A D | StageContextTest.cpp | 32 static void WriteFile(const std::string& filePath, const std::string& content) in WriteFile() argument 34 std::ofstream file(filePath, std::ios_base::trunc); in WriteFile()
|