vendor/github.com/pelletier/go-toml/fuzz.go
changeset 265 05c40b36d3b2
parent 264 8f478162d991
child 266 80973a656b81
--- a/vendor/github.com/pelletier/go-toml/fuzz.go	Thu Sep 22 16:37:07 2022 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// +build gofuzz
-
-package toml
-
-func Fuzz(data []byte) int {
-	tree, err := LoadBytes(data)
-	if err != nil {
-		if tree != nil {
-			panic("tree must be nil if there is an error")
-		}
-		return 0
-	}
-
-	str, err := tree.ToTomlString()
-	if err != nil {
-		if str != "" {
-			panic(`str must be "" if there is an error`)
-		}
-		panic(err)
-	}
-
-	tree, err = Load(str)
-	if err != nil {
-		if tree != nil {
-			panic("tree must be nil if there is an error")
-		}
-		return 0
-	}
-
-	return 1
-}