Fix fuzz (#199)
Fix fuzzer (LoadString does not exist), and mention it in the README.
This commit is contained in:
@@ -114,6 +114,11 @@ You have to make sure two kind of tests run:
|
|||||||
|
|
||||||
You can run both of them using `./test.sh`.
|
You can run both of them using `./test.sh`.
|
||||||
|
|
||||||
|
### Fuzzing
|
||||||
|
|
||||||
|
The script `./fuzz.sh` is available to
|
||||||
|
run [go-fuzz](https://github.com/dvyukov/go-fuzz) on go-toml.
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
Go-toml follows [Semantic Versioning](http://semver.org/). The supported version
|
Go-toml follows [Semantic Versioning](http://semver.org/). The supported version
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ func Fuzz(data []byte) int {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
tree, err = LoadString(str)
|
tree, err = Load(str)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if tree != nil {
|
if tree != nil {
|
||||||
panic("tree must be nil if there is an error")
|
panic("tree must be nil if there is an error")
|
||||||
|
|||||||
Reference in New Issue
Block a user