diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/go/testdata/script/test_fuzz.txt | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/src/cmd/go/testdata/script/test_fuzz.txt b/src/cmd/go/testdata/script/test_fuzz.txt index 3f825c1bc3..b1a02f46eb 100644 --- a/src/cmd/go/testdata/script/test_fuzz.txt +++ b/src/cmd/go/testdata/script/test_fuzz.txt @@ -131,23 +131,11 @@ stdout FAIL ! stdout ^ok stdout FAIL -# Test that converting compatible value from f.Add successful runs cleanly. -go test -run FuzzConvertType fuzz_add_test.go -stdout ^ok -! stdout FAIL - -# Test that converting incompatible value from f.Add fails. -! go test -run FuzzConvertIncompatibleType fuzz_add_test.go +# Test that the wrong type given with f.Add will fail. +! go test -run FuzzWrongType fuzz_add_test.go ! stdout ^ok stdout FAIL -# Test that converts value which would lose precision from f.Add. -# Consider making a test like this fail, as it may have unexpected -# consequences for the developer. -go test -v -run FuzzConvertLosePrecision fuzz_add_test.go -stdout ok -! stdout FAIL - # Test fatal with testdata seed corpus ! go test -run FuzzFail corpustesting/fuzz_testdata_corpus_test.go ! stdout ^ok @@ -391,19 +379,9 @@ func FuzzAddDifferentType(f *testing.F) { f.Fuzz(func(*testing.T, []byte) {}) } -func FuzzConvertIncompatibleType(f *testing.F) { - f.Add("abcde") - f.Fuzz(func(*testing.T, int64) {}) -} - -func FuzzConvertLosePrecision(f *testing.F) { - f.Add(-1) - f.Fuzz(func(*testing.T, uint) {}) -} - -func FuzzConvertType(f *testing.F) { - f.Add(1, "hello") - f.Fuzz(func(*testing.T, uint, []byte) {}) +func FuzzWrongType(f *testing.F) { + f.Add("hello") + f.Fuzz(func(*testing.T, []byte) {}) } -- corpustesting/fuzz_testdata_corpus_test.go -- |