Load texts for input from specified file of designed text or file of fuzzing text
| 658 | |
| 659 | ///Load texts for input from specified file of designed text or file of fuzzing text |
| 660 | void Preference::loadInputTexts() { |
| 661 | // load specified designed text by tester |
| 662 | std::string content = fastbotx::Preference::loadFileContent(InputTextConfigFilePath); |
| 663 | if (!content.empty()) { |
| 664 | std::vector<std::string> texts; |
| 665 | splitString(content, texts, '\n'); |
| 666 | this->_inputTexts.assign(texts.begin(), texts.end()); |
| 667 | } |
| 668 | // load fuzzing texts |
| 669 | std::string fuzzContent = fastbotx::Preference::loadFileContent(FuzzingTextsFilePath); |
| 670 | if (!fuzzContent.empty()) { |
| 671 | std::vector<std::string> fuzzTexts; |
| 672 | splitString(fuzzContent, fuzzTexts, '\n'); |
| 673 | for (auto &line: fuzzTexts) { |
| 674 | if (line.empty() || line[0] == |
| 675 | '#') // if a new line starts with #, means it is a comment. Overlook this line. |
| 676 | continue; |
| 677 | this->_fuzzingTexts.push_back(line); |
| 678 | } |
| 679 | } |
| 680 | } |
| 681 | |
| 682 | void Preference::loadTreePruning() { |
| 683 | std::string fileContent = fastbotx::Preference::loadFileContent(TreePruningFilePath); |
nothing calls this directly
no test coverage detected