You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
libcxx_old/test/libcxx/fuzzing/regex_ECMAScript.cpp

37 lines
897 B
C++

// -*- C++ -*-
//===--------------------- regex_ECMAScript.cpp ---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// XFAIL
#include "fuzzing.h"
#include <cassert>
#include <cstring> // for strlen
const char * test_cases[] = {
"",
"s",
"b*c",
"ba?sf"
"lka*ea",
"adsf*kas;lnc441[0-9]1r34525234"
};
const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]);
int main(int, char**)
{
for (size_t i = 0; i < k_num_tests; ++i)
{
const size_t size = std::strlen(test_cases[i]);
const uint8_t *data = (const uint8_t *) test_cases[i];
assert(0 == fuzzing::regex_ECMAScript(data, size));
}
return 0;
}