summaryrefslogtreecommitdiffstats
path: root/modules/policy/lua-aho-corasick/tests/test_main.cxx
blob: b4f5225467e2d4d9bb68bef6978b784d667c5832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>

#include <stdio.h>
#include <string.h>
#include <vector>
#include <string>
#include "ac.h"
#include "ac_util.hpp"
#include "test_base.hpp"

using namespace std;


/////////////////////////////////////////////////////////////////////////
//
//          Simple (yet maybe tricky) testings
//
/////////////////////////////////////////////////////////////////////////
//
int
main (int argc, char** argv) {
    bool succ = Run_AC_Simple_Test();

    vector<const char*> files;
    for (int i = 1; i < argc; i++) { files.push_back(argv[i]); }
    succ = Run_AC_Aggressive_Test(files) && succ;

    return succ ? 0 : -1;
};