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.
39 lines
886 B
C++
39 lines
886 B
C++
// -*- C++ -*-
|
|
//===--------------------------- partition.cpp ----------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// XFAIL
|
|
|
|
#include "fuzzing.h"
|
|
#include <cassert>
|
|
#include <cstring> // for strlen
|
|
|
|
const char * test_cases[] = {
|
|
"",
|
|
"s",
|
|
"bac",
|
|
"bacasf"
|
|
"lkajseravea",
|
|
"adsfkajdsfjkas;lnc441324513,34535r34525234"
|
|
};
|
|
|
|
const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]);
|
|
|
|
|
|
int main ()
|
|
{
|
|
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::partition(data, size));
|
|
}
|
|
return 0;
|
|
}
|