// Code generated by golang-fuzz; DO NOT EDIT.

package my_golang_fuzz

import (
	"os"
	"path/filepath"
	"testing"
)

func Fuzz_(f *testing.F) {
	loadTestCases(f)
	f.Fuzz(func(_ *testing.T, input []byte) { Fuzz(input) })
}

func loadTestCases(f *testing.F) {
	dir, err := os.ReadDir(`corpus`)
	if err != nil {
		f.Logf(`Running without adding corpus: %s`, err)
		return
	}

	if len(dir) == 0 {
		f.Log(`Running without adding corpus: directory is empty`)
	}

	for _, corpus := range dir {
		if corpus.IsDir() {
			continue
		}

		input, err := os.ReadFile(filepath.Join(`corpus`, corpus.Name()))
		if err != nil {
			f.Logf(`Could not read corpus input %s: %s`, corpus.Name(), err)
		}
		f.Add(input)
	}
}
