#include "pdf/pdfium/pdfium_ink_reader.h"
#include "base/containers/span.h"
#include "third_party/fuzztest/src/fuzztest/fuzztest.h"
#include "third_party/ink/src/ink/geometry/point.h"
namespace chrome_pdf {
namespace {
fuzztest::Domain<ink::Point> FiniteInkPoint() {
return fuzztest::StructOf<ink::Point>(fuzztest::Finite<float>(),
fuzztest::Finite<float>());
}
void CreateMeshFromPolylineDoesntCrash(base::span<const ink::Point> polyline) {
auto mesh = CreateInkMeshFromPolylineForTesting(polyline);
}
}
FUZZ_TEST(PdfInkReaderFuzzer, CreateMeshFromPolylineDoesntCrash)
.WithDomains(fuzztest::VectorOf(FiniteInkPoint()));
}