mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Moves string related functions from utils' to
utils/string'
This commit is contained in:
@@ -29,7 +29,9 @@
|
||||
#include "common/colors.h"
|
||||
#include "unit/unit_test.h"
|
||||
#include "src/utils.h"
|
||||
#include "utils/msc_string.h"
|
||||
|
||||
using modsecurity::utils::String;
|
||||
using modsecurity_test::UnitTest;
|
||||
using modsecurity_test::ModSecurityTest;
|
||||
using modsecurity_test::ModSecurityTestResults;
|
||||
@@ -89,7 +91,7 @@ void perform_unit_test(ModSecurityTest<UnitTest> *test, UnitTest *t,
|
||||
|
||||
if (test->m_automake_output) {
|
||||
std::cout << t->name << " "
|
||||
<< modsecurity::toHexIfNeeded(t->input) << std::endl;
|
||||
<< String::toHexIfNeeded(t->input) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -25,6 +25,9 @@
|
||||
#include "common/colors.h"
|
||||
#include "src/utils.h"
|
||||
#include "src/utils/regex.h"
|
||||
#include "utils/msc_string.h"
|
||||
|
||||
using modsecurity::utils::String;
|
||||
|
||||
namespace modsecurity_test {
|
||||
|
||||
@@ -108,9 +111,9 @@ std::string UnitTest::print() {
|
||||
i << this->obtained << "\"" << std::endl;
|
||||
}
|
||||
if (this->output != this->obtainedOutput) {
|
||||
i << "Expecting: \"" << modsecurity::toHexIfNeeded(this->output);
|
||||
i << "Expecting: \"" << String::toHexIfNeeded(this->output);
|
||||
i << "\" - returned: \"";
|
||||
i << modsecurity::toHexIfNeeded(this->obtainedOutput) << "\"";
|
||||
i << String::toHexIfNeeded(this->obtainedOutput) << "\"";
|
||||
i << std::endl;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user