mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
const-ify some references in test folder
This commit is contained in:
parent
de2d053d6e
commit
a9edee3dbe
@ -96,7 +96,6 @@ cstyleCast
|
|||||||
functionStatic
|
functionStatic
|
||||||
shadowFunction
|
shadowFunction
|
||||||
|
|
||||||
constVariable
|
|
||||||
stlcstrConstructor
|
stlcstrConstructor
|
||||||
stlcstrStream
|
stlcstrStream
|
||||||
uselessCallsSubstr
|
uselessCallsSubstr
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ModSecurity, http://www.modsecurity.org/
|
* ModSecurity, http://www.modsecurity.org/
|
||||||
* Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
* Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||||
*
|
*
|
||||||
* You may not use this file except in compliance with
|
* You may not use this file except in compliance with
|
||||||
* the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
@ -114,8 +114,8 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::cout << " Operators" << std::endl;
|
std::cout << " Operators" << std::endl;
|
||||||
for (auto &z : operators) {
|
for (const auto &z : operators) {
|
||||||
auto &s = z.second;
|
const auto &s = z.second;
|
||||||
std::cout << " " << std::left << std::setw(20) << z.first;
|
std::cout << " " << std::left << std::setw(20) << z.first;
|
||||||
std::cout << std::right << std::setw(4) << s;
|
std::cout << std::right << std::setw(4) << s;
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ModSecurity, http://www.modsecurity.org/
|
* ModSecurity, http://www.modsecurity.org/
|
||||||
* Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
* Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||||
*
|
*
|
||||||
* You may not use this file except in compliance with
|
* You may not use this file except in compliance with
|
||||||
* the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
@ -540,7 +540,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ModSecurityTestResults<RegressionTestResult> res;
|
ModSecurityTestResults<RegressionTestResult> res;
|
||||||
for (std::string &a : keyList) {
|
for (const std::string &a : keyList) {
|
||||||
test_number++;
|
test_number++;
|
||||||
if ((test.m_test_number == 0)
|
if ((test.m_test_number == 0)
|
||||||
|| (test_number == test.m_test_number)) {
|
|| (test_number == test.m_test_number)) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ModSecurity, http://www.modsecurity.org/
|
* ModSecurity, http://www.modsecurity.org/
|
||||||
* Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
* Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||||
*
|
*
|
||||||
* You may not use this file except in compliance with
|
* You may not use this file except in compliance with
|
||||||
* the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
@ -168,7 +168,7 @@ int main(int argc, char **argv) {
|
|||||||
if (r.size() == 0) {
|
if (r.size() == 0) {
|
||||||
std::cout << KGRN << "0 tests failed.";
|
std::cout << KGRN << "0 tests failed.";
|
||||||
} else {
|
} else {
|
||||||
for (auto &i : r) {
|
for (const auto &i : r) {
|
||||||
if (i->skipped == true) {
|
if (i->skipped == true) {
|
||||||
skp++;
|
skp++;
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ int main(int argc, char **argv) {
|
|||||||
std::cout << KGRN << "All tests passed" << RESET << std::endl;
|
std::cout << KGRN << "All tests passed" << RESET << std::endl;
|
||||||
} else {
|
} else {
|
||||||
int skp = 0;
|
int skp = 0;
|
||||||
for (auto &i : results) {
|
for (const auto &i : results) {
|
||||||
if (i->skipped == true) {
|
if (i->skipped == true) {
|
||||||
skp++;
|
skp++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user