diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 14:26:22 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 14:26:22 +0000 |
commit | 847647ad699251a369034056579d48e8201214d3 (patch) | |
tree | 36f0edfa42b442c4b528eaaba8bfe8d5400f4328 /third_party/re2/testinstall.cc | |
parent | 82b994f1239327fd7b51fc9b288d6040e0456052 (diff) | |
download | chromium_src-847647ad699251a369034056579d48e8201214d3.zip chromium_src-847647ad699251a369034056579d48e8201214d3.tar.gz chromium_src-847647ad699251a369034056579d48e8201214d3.tar.bz2 |
Include RE2 library
BUG=112155
TEST=no
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10575037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149180 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/re2/testinstall.cc')
-rw-r--r-- | third_party/re2/testinstall.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/third_party/re2/testinstall.cc b/third_party/re2/testinstall.cc new file mode 100644 index 0000000..40b7a8a --- /dev/null +++ b/third_party/re2/testinstall.cc @@ -0,0 +1,20 @@ +#include <re2/re2.h> +#include <re2/filtered_re2.h> +#include <stdio.h> + +using namespace re2; + +int main(void) { + FilteredRE2 f; + int id; + f.Add("a.*b.*c", RE2::DefaultOptions, &id); + vector<string> v; + f.Compile(&v); + + if(RE2::FullMatch("axbyc", "a.*b.*c")) { + printf("PASS\n"); + return 0; + } + printf("FAIL\n"); + return 2; +} |