1 // -*- C++ -*-
2 //===----------------------- regex_POSIX.cpp ------------------------------===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 
11 // XFAIL
12 
13 #include "fuzzing.h"
14 #include <cassert>
15 #include <cstring> // for strlen
16 
17 const char * test_cases[] = {
18 	"",
19 	"s",
20 	"b*c",
21 	"ba?sf"
22 	"lka*ea",
23 	"adsf*kas;lnc441[0-9]1r34525234"
24 	};
25 
26 const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]);
27 
main()28 int main ()
29 {
30 	for (size_t i = 0; i < k_num_tests; ++i)
31 		{
32 		const size_t   size = std::strlen(test_cases[i]);
33 		const uint8_t *data = (const uint8_t *) test_cases[i];
34 		assert(0 == fuzzing::regex_POSIX(data, size));
35 		}
36 	return 0;
37 }
38