Adds method init to Operator class

This commit is contained in:
Felipe Zimmerle
2015-07-27 22:43:45 -03:00
parent 7b4554216e
commit c2d33823f5
3 changed files with 11 additions and 2 deletions

View File

@@ -54,9 +54,11 @@ void print_help() {
void perform_unit_test(UnitTest *t, ModSecurityTestResults<UnitTest>* res) {
const char *error = NULL;
ModSecurity::operators::Operator *op =
ModSecurity::operators::Operator::instantiate("\"@" + t->name + \
" " + t->param + "\"");
op->init(&error);
int ret = op->evaluate(NULL, t->input);
if (ret != t->ret) {