1// -*- C++ -*- 2//===--------------------------- unique.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 17const char * test_cases[] = { 18 "", 19 "s", 20 "bac", 21 "bacasf" 22 "lkajseravea", 23 "adsfkajdsfjkas;lnc441324513,34535r34525234" 24 }; 25 26const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); 27 28 29int main () 30{ 31 for (size_t i = 0; i < k_num_tests; ++i) 32 { 33 const size_t size = std::strlen(test_cases[i]); 34 const uint8_t *data = (const uint8_t *) test_cases[i]; 35 assert(0 == fuzzing::unique(data, size)); 36 } 37 return 0; 38} 39