Skip to content

Commit

Permalink
test: add testcase for #194
Browse files Browse the repository at this point in the history
Testcase for dvyukov/go-fuzz#194
  • Loading branch information
dvyukov committed Nov 23, 2018
1 parent 32e01b7 commit cf3c433
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (

// Test vendoring support.
vendored_foo "non.existent.com/foo"

"github.com/dvyukov/go-fuzz-corpus/test/testdep"
)

func init() {
Expand Down Expand Up @@ -179,3 +181,7 @@ func test6() {
v1 := []int{1, 2}
_ = v1[0] < v1[1]
}

func issue194(v testdep.I) testdep.I {
return testdep.B(v == testdep.V1{} || v == testdep.V2{})
}
11 changes: 11 additions & 0 deletions test/testdep/testdep.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2018 Dmitry Vyukov. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

package testdep

type (
I interface {}
B bool
V1 struct{}
V2 struct{}
)

0 comments on commit cf3c433

Please sign in to comment.