blob: 5b887c4936e1f3f57784bfb580c8fb0306d43966 [file] [edit]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#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);
}
} // namespace
FUZZ_TEST(PdfInkReaderFuzzer, CreateMeshFromPolylineDoesntCrash)
.WithDomains(fuzztest::VectorOf(FiniteInkPoint()));
} // namespace chrome_pdf