diff --git a/capture_metrics.go b/capture_metrics.go index bec7b71..5a82047 100644 --- a/capture_metrics.go +++ b/capture_metrics.go @@ -84,3 +84,17 @@ func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWri fn(Wrap(w, hooks)) m.Duration += time.Since(start) } + +// deadliner defines two methods introduced in go 1.20. The standard library +// seems not to provide an interface we can import, hence its definition here. +type deadliner interface { + SetReadDeadline(deadline time.Time) error + SetWriteDeadline(deadline time.Time) error +} + +// fullDuplexEnabler defines a method introduced in go 1.21. The standard +// library seems not to provide an interface we can import, hence its definition +// here. +type fullDuplexEnabler interface { + EnableFullDuplex() error +} diff --git a/capture_metrics_test.go b/capture_metrics_test.go index bb17c06..c7912ab 100644 --- a/capture_metrics_test.go +++ b/capture_metrics_test.go @@ -2,7 +2,6 @@ package httpsnoop import ( "io" - "io/ioutil" "log" "net/http" "net/http/httptest" @@ -16,7 +15,7 @@ func TestCaptureMetrics(t *testing.T) { // Some of the edge cases tested below cause the net/http pkg to log some // messages that add a lot of noise to the `go test -v` output, so we discard // the log here. - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) defer log.SetOutput(os.Stderr) tests := []struct { diff --git a/codegen/main.go b/codegen/main.go index 60c6212..98bae98 100644 --- a/codegen/main.go +++ b/codegen/main.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "go/format" - "io/ioutil" "os" "strings" ) @@ -44,6 +43,7 @@ func (b *Build) Implementation() *Generator { g.Printf(`"io"` + "\n") g.Printf(`"net"` + "\n") g.Printf(`"bufio"` + "\n") + g.Printf(`"time"` + "\n") g.Printf(")\n") g.Printf("\n") @@ -109,7 +109,7 @@ type Hooks struct { conditions[j] += fmt.Sprintf("i%d", j) } values := make([]string, len(fields)) - for i, _ := range fields { + for i := range fields { values[i] = "rw" } g.Printf("// combination %d/%d\n", i+1, combinations) @@ -275,11 +275,10 @@ func (g *Generator) WriteFile(name string) error { src, err := g.Format() if err != nil { return fmt.Errorf("format: %s: %s:\n\n%s\n", name, err, g.Bytes()) - } else if err := ioutil.WriteFile(name, src, 0644); err != nil { + } else if err := os.WriteFile(name, src, 0o644); err != nil { return err } return nil - } func (g *Generator) MustWriteFile(name string) { @@ -330,6 +329,19 @@ func main() { {"ReadFrom", FuncArgs{{"src", "io.Reader"}}, "int64, error"}, }, }, + { + Name: "deadliner", // Introduced in Go 1.20. + Funcs: []*InterfaceFunc{ + {"SetReadDeadline", FuncArgs{{"deadline", "time.Time"}}, "error"}, + {"SetWriteDeadline", FuncArgs{{"deadline", "time.Time"}}, "error"}, + }, + }, + { + Name: "fullDuplexEnabler", // Introduced in Go 1.21. + Funcs: []*InterfaceFunc{ + {"EnableFullDuplex", nil, "error"}, + }, + }, } builds := []Build{ { diff --git a/wrap_generated_gteq_1.8.go b/wrap_generated_gteq_1.8.go index 101cedd..54eadcf 100644 --- a/wrap_generated_gteq_1.8.go +++ b/wrap_generated_gteq_1.8.go @@ -1,4 +1,6 @@ +//go:build go1.8 // +build go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop @@ -8,6 +10,7 @@ import ( "io" "net" "net/http" + "time" ) // HeaderFunc is part of the http.ResponseWriter interface. @@ -31,6 +34,15 @@ type HijackFunc func() (net.Conn, *bufio.ReadWriter, error) // ReadFromFunc is part of the io.ReaderFrom interface. type ReadFromFunc func(src io.Reader) (int64, error) +// SetReadDeadlineFunc is part of the deadliner interface. +type SetReadDeadlineFunc func(deadline time.Time) error + +// SetWriteDeadlineFunc is part of the deadliner interface. +type SetWriteDeadlineFunc func(deadline time.Time) error + +// EnableFullDuplexFunc is part of the fullDuplexEnabler interface. +type EnableFullDuplexFunc func() error + // PushFunc is part of the http.Pusher interface. type PushFunc func(target string, opts *http.PushOptions) error @@ -38,14 +50,17 @@ type PushFunc func(target string, opts *http.PushOptions) error // http.ResponseWriter as well as some others. You can think of them as // middleware for the function calls they target. See Wrap for more details. type Hooks struct { - Header func(HeaderFunc) HeaderFunc - WriteHeader func(WriteHeaderFunc) WriteHeaderFunc - Write func(WriteFunc) WriteFunc - Flush func(FlushFunc) FlushFunc - CloseNotify func(CloseNotifyFunc) CloseNotifyFunc - Hijack func(HijackFunc) HijackFunc - ReadFrom func(ReadFromFunc) ReadFromFunc - Push func(PushFunc) PushFunc + Header func(HeaderFunc) HeaderFunc + WriteHeader func(WriteHeaderFunc) WriteHeaderFunc + Write func(WriteFunc) WriteFunc + Flush func(FlushFunc) FlushFunc + CloseNotify func(CloseNotifyFunc) CloseNotifyFunc + Hijack func(HijackFunc) HijackFunc + ReadFrom func(ReadFromFunc) ReadFromFunc + SetReadDeadline func(SetReadDeadlineFunc) SetReadDeadlineFunc + SetWriteDeadline func(SetWriteDeadlineFunc) SetWriteDeadlineFunc + EnableFullDuplex func(EnableFullDuplexFunc) EnableFullDuplexFunc + Push func(PushFunc) PushFunc } // Wrap returns a wrapped version of w that provides the exact same interface @@ -55,6 +70,8 @@ type Hooks struct { // - http.CloseNotifier // - http.Hijacker // - io.ReaderFrom +// - deadliner +// - fullDuplexEnabler // - http.Pusher // // The wrapped version will implement the exact same combination. If no hooks @@ -69,261 +86,1180 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { _, i1 := w.(http.CloseNotifier) _, i2 := w.(http.Hijacker) _, i3 := w.(io.ReaderFrom) - _, i4 := w.(http.Pusher) + _, i4 := w.(deadliner) + _, i5 := w.(fullDuplexEnabler) + _, i6 := w.(http.Pusher) switch { - // combination 1/32 - case !i0 && !i1 && !i2 && !i3 && !i4: + // combination 1/128 + case !i0 && !i1 && !i2 && !i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + }{rw, rw} + // combination 2/128 + case !i0 && !i1 && !i2 && !i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Pusher + }{rw, rw, rw} + // combination 3/128 + case !i0 && !i1 && !i2 && !i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + fullDuplexEnabler + }{rw, rw, rw} + // combination 4/128 + case !i0 && !i1 && !i2 && !i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw} + // combination 5/128 + case !i0 && !i1 && !i2 && !i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + deadliner + }{rw, rw, rw} + // combination 6/128 + case !i0 && !i1 && !i2 && !i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + deadliner + http.Pusher + }{rw, rw, rw, rw} + // combination 7/128 + case !i0 && !i1 && !i2 && !i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 8/128 + case !i0 && !i1 && !i2 && !i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 9/128 + case !i0 && !i1 && !i2 && i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + }{rw, rw, rw} + // combination 10/128 + case !i0 && !i1 && !i2 && i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw} + // combination 11/128 + case !i0 && !i1 && !i2 && i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 12/128 + case !i0 && !i1 && !i2 && i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 13/128 + case !i0 && !i1 && !i2 && i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + deadliner + }{rw, rw, rw, rw} + // combination 14/128 + case !i0 && !i1 && !i2 && i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + deadliner + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 15/128 + case !i0 && !i1 && !i2 && i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 16/128 + case !i0 && !i1 && !i2 && i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 17/128 + case !i0 && !i1 && i2 && !i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + }{rw, rw, rw} + // combination 18/128 + case !i0 && !i1 && i2 && !i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + http.Pusher + }{rw, rw, rw, rw} + // combination 19/128 + case !i0 && !i1 && i2 && !i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 20/128 + case !i0 && !i1 && i2 && !i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 21/128 + case !i0 && !i1 && i2 && !i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + deadliner + }{rw, rw, rw, rw} + // combination 22/128 + case !i0 && !i1 && i2 && !i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + deadliner + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 23/128 + case !i0 && !i1 && i2 && !i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 24/128 + case !i0 && !i1 && i2 && !i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 25/128 + case !i0 && !i1 && i2 && i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 26/128 + case !i0 && !i1 && i2 && i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 27/128 + case !i0 && !i1 && i2 && i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 28/128 + case !i0 && !i1 && i2 && i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 29/128 + case !i0 && !i1 && i2 && i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw} + // combination 30/128 + case !i0 && !i1 && i2 && i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 31/128 + case !i0 && !i1 && i2 && i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 32/128 + case !i0 && !i1 && i2 && i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 33/128 + case !i0 && i1 && !i2 && !i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + }{rw, rw, rw} + // combination 34/128 + case !i0 && i1 && !i2 && !i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Pusher + }{rw, rw, rw, rw} + // combination 35/128 + case !i0 && i1 && !i2 && !i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 36/128 + case !i0 && i1 && !i2 && !i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 37/128 + case !i0 && i1 && !i2 && !i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + deadliner + }{rw, rw, rw, rw} + // combination 38/128 + case !i0 && i1 && !i2 && !i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + deadliner + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 39/128 + case !i0 && i1 && !i2 && !i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 40/128 + case !i0 && i1 && !i2 && !i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 41/128 + case !i0 && i1 && !i2 && i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 42/128 + case !i0 && i1 && !i2 && i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 43/128 + case !i0 && i1 && !i2 && i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 44/128 + case !i0 && i1 && !i2 && i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 45/128 + case !i0 && i1 && !i2 && i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw} + // combination 46/128 + case !i0 && i1 && !i2 && i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 47/128 + case !i0 && i1 && !i2 && i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 48/128 + case !i0 && i1 && !i2 && i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 49/128 + case !i0 && i1 && i2 && !i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + }{rw, rw, rw, rw} + // combination 50/128 + case !i0 && i1 && i2 && !i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 51/128 + case !i0 && i1 && i2 && !i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 52/128 + case !i0 && i1 && i2 && !i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 53/128 + case !i0 && i1 && i2 && !i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + }{rw, rw, rw, rw, rw} + // combination 54/128 + case !i0 && i1 && i2 && !i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 55/128 + case !i0 && i1 && i2 && !i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 56/128 + case !i0 && i1 && i2 && !i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 57/128 + case !i0 && i1 && i2 && i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw, rw} + // combination 58/128 + case !i0 && i1 && i2 && i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 59/128 + case !i0 && i1 && i2 && i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 60/128 + case !i0 && i1 && i2 && i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 61/128 + case !i0 && i1 && i2 && i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw, rw} + // combination 62/128 + case !i0 && i1 && i2 && i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 63/128 + case !i0 && i1 && i2 && i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 64/128 + case !i0 && i1 && i2 && i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw, rw} + // combination 65/128 + case i0 && !i1 && !i2 && !i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + }{rw, rw, rw} + // combination 66/128 + case i0 && !i1 && !i2 && !i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Pusher + }{rw, rw, rw, rw} + // combination 67/128 + case i0 && !i1 && !i2 && !i3 && !i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 68/128 + case i0 && !i1 && !i2 && !i3 && !i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 69/128 + case i0 && !i1 && !i2 && !i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + deadliner + }{rw, rw, rw, rw} + // combination 70/128 + case i0 && !i1 && !i2 && !i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + deadliner + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 71/128 + case i0 && !i1 && !i2 && !i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 72/128 + case i0 && !i1 && !i2 && !i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 73/128 + case i0 && !i1 && !i2 && i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 74/128 + case i0 && !i1 && !i2 && i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 75/128 + case i0 && !i1 && !i2 && i3 && !i4 && i5 && !i6: return struct { Unwrapper http.ResponseWriter - }{rw, rw} - // combination 2/32 - case !i0 && !i1 && !i2 && !i3 && i4: + http.Flusher + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 76/128 + case i0 && !i1 && !i2 && i3 && !i4 && i5 && i6: return struct { Unwrapper http.ResponseWriter + http.Flusher + io.ReaderFrom + fullDuplexEnabler http.Pusher - }{rw, rw, rw} - // combination 3/32 - case !i0 && !i1 && !i2 && i3 && !i4: + }{rw, rw, rw, rw, rw, rw} + // combination 77/128 + case i0 && !i1 && !i2 && i3 && i4 && !i5 && !i6: return struct { Unwrapper http.ResponseWriter + http.Flusher io.ReaderFrom - }{rw, rw, rw} - // combination 4/32 - case !i0 && !i1 && !i2 && i3 && i4: + deadliner + }{rw, rw, rw, rw, rw} + // combination 78/128 + case i0 && !i1 && !i2 && i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 79/128 + case i0 && !i1 && !i2 && i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 80/128 + case i0 && !i1 && !i2 && i3 && i4 && i5 && i6: return struct { Unwrapper http.ResponseWriter + http.Flusher io.ReaderFrom + deadliner + fullDuplexEnabler http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 81/128 + case i0 && !i1 && i2 && !i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker }{rw, rw, rw, rw} - // combination 5/32 - case !i0 && !i1 && i2 && !i3 && !i4: + // combination 82/128 + case i0 && !i1 && i2 && !i3 && !i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 83/128 + case i0 && !i1 && i2 && !i3 && !i4 && i5 && !i6: return struct { Unwrapper http.ResponseWriter + http.Flusher http.Hijacker - }{rw, rw, rw} - // combination 6/32 - case !i0 && !i1 && i2 && !i3 && i4: + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 84/128 + case i0 && !i1 && i2 && !i3 && !i4 && i5 && i6: return struct { Unwrapper http.ResponseWriter + http.Flusher http.Hijacker + fullDuplexEnabler http.Pusher - }{rw, rw, rw, rw} - // combination 7/32 - case !i0 && !i1 && i2 && i3 && !i4: + }{rw, rw, rw, rw, rw, rw} + // combination 85/128 + case i0 && !i1 && i2 && !i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + }{rw, rw, rw, rw, rw} + // combination 86/128 + case i0 && !i1 && i2 && !i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 87/128 + case i0 && !i1 && i2 && !i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 88/128 + case i0 && !i1 && i2 && !i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 89/128 + case i0 && !i1 && i2 && i3 && !i4 && !i5 && !i6: return struct { Unwrapper http.ResponseWriter + http.Flusher http.Hijacker io.ReaderFrom - }{rw, rw, rw, rw} - // combination 8/32 - case !i0 && !i1 && i2 && i3 && i4: + }{rw, rw, rw, rw, rw} + // combination 90/128 + case i0 && !i1 && i2 && i3 && !i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter + http.Flusher http.Hijacker io.ReaderFrom http.Pusher - }{rw, rw, rw, rw, rw} - // combination 9/32 - case !i0 && i1 && !i2 && !i3 && !i4: + }{rw, rw, rw, rw, rw, rw} + // combination 91/128 + case i0 && !i1 && i2 && i3 && !i4 && i5 && !i6: return struct { Unwrapper http.ResponseWriter - http.CloseNotifier - }{rw, rw, rw} - // combination 10/32 - case !i0 && i1 && !i2 && !i3 && i4: + http.Flusher + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 92/128 + case i0 && !i1 && i2 && i3 && !i4 && i5 && i6: return struct { Unwrapper http.ResponseWriter - http.CloseNotifier + http.Flusher + http.Hijacker + io.ReaderFrom + fullDuplexEnabler http.Pusher - }{rw, rw, rw, rw} - // combination 11/32 - case !i0 && i1 && !i2 && i3 && !i4: + }{rw, rw, rw, rw, rw, rw, rw} + // combination 93/128 + case i0 && !i1 && i2 && i3 && i4 && !i5 && !i6: return struct { Unwrapper http.ResponseWriter - http.CloseNotifier + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw, rw} + // combination 94/128 + case i0 && !i1 && i2 && i3 && i4 && !i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 95/128 + case i0 && !i1 && i2 && i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 96/128 + case i0 && !i1 && i2 && i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw, rw} + // combination 97/128 + case i0 && i1 && !i2 && !i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier }{rw, rw, rw, rw} - // combination 12/32 - case !i0 && i1 && !i2 && i3 && i4: + // combination 98/128 + case i0 && i1 && !i2 && !i3 && !i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter + http.Flusher http.CloseNotifier - io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw} - // combination 13/32 - case !i0 && i1 && i2 && !i3 && !i4: + // combination 99/128 + case i0 && i1 && !i2 && !i3 && !i4 && i5 && !i6: return struct { Unwrapper http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker - }{rw, rw, rw, rw} - // combination 14/32 - case !i0 && i1 && i2 && !i3 && i4: + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 100/128 + case i0 && i1 && !i2 && !i3 && !i4 && i5 && i6: return struct { Unwrapper http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker + fullDuplexEnabler http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 101/128 + case i0 && i1 && !i2 && !i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner }{rw, rw, rw, rw, rw} - // combination 15/32 - case !i0 && i1 && i2 && i3 && !i4: + // combination 102/128 + case i0 && i1 && !i2 && !i3 && i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 103/128 + case i0 && i1 && !i2 && !i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 104/128 + case i0 && i1 && !i2 && !i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 105/128 + case i0 && i1 && !i2 && i3 && !i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw} - // combination 16/32 - case !i0 && i1 && i2 && i3 && i4: + // combination 106/128 + case i0 && i1 && !i2 && i3 && !i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw, rw} - // combination 17/32 - case i0 && !i1 && !i2 && !i3 && !i4: + // combination 107/128 + case i0 && i1 && !i2 && i3 && !i4 && i5 && !i6: return struct { Unwrapper http.ResponseWriter http.Flusher - }{rw, rw, rw} - // combination 18/32 - case i0 && !i1 && !i2 && !i3 && i4: + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 108/128 + case i0 && i1 && !i2 && i3 && !i4 && i5 && i6: return struct { Unwrapper http.ResponseWriter http.Flusher + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler http.Pusher - }{rw, rw, rw, rw} - // combination 19/32 - case i0 && !i1 && !i2 && i3 && !i4: + }{rw, rw, rw, rw, rw, rw, rw} + // combination 109/128 + case i0 && i1 && !i2 && i3 && i4 && !i5 && !i6: return struct { Unwrapper http.ResponseWriter http.Flusher + http.CloseNotifier io.ReaderFrom - }{rw, rw, rw, rw} - // combination 20/32 - case i0 && !i1 && !i2 && i3 && i4: + deadliner + }{rw, rw, rw, rw, rw, rw} + // combination 110/128 + case i0 && i1 && !i2 && i3 && i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter http.Flusher + http.CloseNotifier io.ReaderFrom + deadliner http.Pusher - }{rw, rw, rw, rw, rw} - // combination 21/32 - case i0 && !i1 && i2 && !i3 && !i4: + }{rw, rw, rw, rw, rw, rw, rw} + // combination 111/128 + case i0 && i1 && !i2 && i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 112/128 + case i0 && i1 && !i2 && i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw, rw} + // combination 113/128 + case i0 && i1 && i2 && !i3 && !i4 && !i5 && !i6: return struct { Unwrapper http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker - }{rw, rw, rw, rw} - // combination 22/32 - case i0 && !i1 && i2 && !i3 && i4: + }{rw, rw, rw, rw, rw} + // combination 114/128 + case i0 && i1 && i2 && !i3 && !i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker http.Pusher - }{rw, rw, rw, rw, rw} - // combination 23/32 - case i0 && !i1 && i2 && i3 && !i4: + }{rw, rw, rw, rw, rw, rw} + // combination 115/128 + case i0 && i1 && i2 && !i3 && !i4 && i5 && !i6: return struct { Unwrapper http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw, rw} - // combination 24/32 - case i0 && !i1 && i2 && i3 && i4: + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 116/128 + case i0 && i1 && i2 && !i3 && !i4 && i5 && i6: return struct { Unwrapper http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker - io.ReaderFrom + fullDuplexEnabler http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 117/128 + case i0 && i1 && i2 && !i3 && i4 && !i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + deadliner }{rw, rw, rw, rw, rw, rw} - // combination 25/32 - case i0 && i1 && !i2 && !i3 && !i4: + // combination 118/128 + case i0 && i1 && i2 && !i3 && i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier - }{rw, rw, rw, rw} - // combination 26/32 - case i0 && i1 && !i2 && !i3 && i4: + http.Hijacker + deadliner + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + // combination 119/128 + case i0 && i1 && i2 && !i3 && i4 && i5 && !i6: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 120/128 + case i0 && i1 && i2 && !i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler http.Pusher - }{rw, rw, rw, rw, rw} - // combination 27/32 - case i0 && i1 && !i2 && i3 && !i4: + }{rw, rw, rw, rw, rw, rw, rw, rw} + // combination 121/128 + case i0 && i1 && i2 && i3 && !i4 && !i5 && !i6: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker io.ReaderFrom - }{rw, rw, rw, rw, rw} - // combination 28/32 - case i0 && i1 && !i2 && i3 && i4: + }{rw, rw, rw, rw, rw, rw} + // combination 122/128 + case i0 && i1 && i2 && i3 && !i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker io.ReaderFrom http.Pusher - }{rw, rw, rw, rw, rw, rw} - // combination 29/32 - case i0 && i1 && i2 && !i3 && !i4: + }{rw, rw, rw, rw, rw, rw, rw} + // combination 123/128 + case i0 && i1 && i2 && i3 && !i4 && i5 && !i6: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker - }{rw, rw, rw, rw, rw} - // combination 30/32 - case i0 && i1 && i2 && !i3 && i4: + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 124/128 + case i0 && i1 && i2 && i3 && !i4 && i5 && i6: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker + io.ReaderFrom + fullDuplexEnabler http.Pusher - }{rw, rw, rw, rw, rw, rw} - // combination 31/32 - case i0 && i1 && i2 && i3 && !i4: + }{rw, rw, rw, rw, rw, rw, rw, rw} + // combination 125/128 + case i0 && i1 && i2 && i3 && i4 && !i5 && !i6: return struct { Unwrapper http.ResponseWriter @@ -331,9 +1267,10 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { http.CloseNotifier http.Hijacker io.ReaderFrom - }{rw, rw, rw, rw, rw, rw} - // combination 32/32 - case i0 && i1 && i2 && i3 && i4: + deadliner + }{rw, rw, rw, rw, rw, rw, rw} + // combination 126/128 + case i0 && i1 && i2 && i3 && i4 && !i5 && i6: return struct { Unwrapper http.ResponseWriter @@ -341,8 +1278,34 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { http.CloseNotifier http.Hijacker io.ReaderFrom + deadliner http.Pusher - }{rw, rw, rw, rw, rw, rw, rw} + }{rw, rw, rw, rw, rw, rw, rw, rw} + // combination 127/128 + case i0 && i1 && i2 && i3 && i4 && i5 && !i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw, rw} + // combination 128/128 + case i0 && i1 && i2 && i3 && i4 && i5 && i6: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw, rw, rw} } panic("unreachable") } @@ -412,6 +1375,30 @@ func (w *rw) ReadFrom(src io.Reader) (int64, error) { return f(src) } +func (w *rw) SetReadDeadline(deadline time.Time) error { + f := w.w.(deadliner).SetReadDeadline + if w.h.SetReadDeadline != nil { + f = w.h.SetReadDeadline(f) + } + return f(deadline) +} + +func (w *rw) SetWriteDeadline(deadline time.Time) error { + f := w.w.(deadliner).SetWriteDeadline + if w.h.SetWriteDeadline != nil { + f = w.h.SetWriteDeadline(f) + } + return f(deadline) +} + +func (w *rw) EnableFullDuplex() error { + f := w.w.(fullDuplexEnabler).EnableFullDuplex + if w.h.EnableFullDuplex != nil { + f = w.h.EnableFullDuplex(f) + } + return f() +} + func (w *rw) Push(target string, opts *http.PushOptions) error { f := w.w.(http.Pusher).Push if w.h.Push != nil { diff --git a/wrap_generated_gteq_1.8_test.go b/wrap_generated_gteq_1.8_test.go index 7319f85..0b4bfa5 100644 --- a/wrap_generated_gteq_1.8_test.go +++ b/wrap_generated_gteq_1.8_test.go @@ -1,4 +1,6 @@ +//go:build go1.8 // +build go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop @@ -10,7 +12,7 @@ import ( ) func TestWrap(t *testing.T) { - // combination 1/32 + // combination 1/128 { t.Log("http.ResponseWriter") inner := struct { @@ -32,6 +34,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -45,7 +53,7 @@ func TestWrap(t *testing.T) { } } - // combination 2/32 + // combination 2/128 { t.Log("http.ResponseWriter, http.Pusher") inner := struct { @@ -68,6 +76,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != true { t.Error("unexpected interface") } @@ -81,12 +95,12 @@ func TestWrap(t *testing.T) { } } - // combination 3/32 + // combination 3/128 { - t.Log("http.ResponseWriter, io.ReaderFrom") + t.Log("http.ResponseWriter, fullDuplexEnabler") inner := struct { http.ResponseWriter - io.ReaderFrom + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -101,7 +115,13 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != false { @@ -117,12 +137,12 @@ func TestWrap(t *testing.T) { } } - // combination 4/32 + // combination 4/128 { - t.Log("http.ResponseWriter, io.ReaderFrom, http.Pusher") + t.Log("http.ResponseWriter, fullDuplexEnabler, http.Pusher") inner := struct { http.ResponseWriter - io.ReaderFrom + fullDuplexEnabler http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -138,7 +158,13 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != true { @@ -154,12 +180,12 @@ func TestWrap(t *testing.T) { } } - // combination 5/32 + // combination 5/128 { - t.Log("http.ResponseWriter, http.Hijacker") + t.Log("http.ResponseWriter, deadliner") inner := struct { http.ResponseWriter - http.Hijacker + deadliner }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -171,12 +197,18 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != false { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -190,12 +222,12 @@ func TestWrap(t *testing.T) { } } - // combination 6/32 + // combination 6/128 { - t.Log("http.ResponseWriter, http.Hijacker, http.Pusher") + t.Log("http.ResponseWriter, deadliner, http.Pusher") inner := struct { http.ResponseWriter - http.Hijacker + deadliner http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -208,12 +240,18 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != false { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != true { t.Error("unexpected interface") } @@ -227,12 +265,98 @@ func TestWrap(t *testing.T) { } } - // combination 7/32 + // combination 7/128 { - t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom") + t.Log("http.ResponseWriter, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 8/128 + { + t.Log("http.ResponseWriter, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 9/128 + { + t.Log("http.ResponseWriter, io.ReaderFrom") inner := struct { http.ResponseWriter - http.Hijacker io.ReaderFrom }{} w := Wrap(inner, Hooks{}) @@ -245,12 +369,18 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != false { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -264,12 +394,11 @@ func TestWrap(t *testing.T) { } } - // combination 8/32 + // combination 10/128 { - t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, http.Pusher") + t.Log("http.ResponseWriter, io.ReaderFrom, http.Pusher") inner := struct { http.ResponseWriter - http.Hijacker io.ReaderFrom http.Pusher }{} @@ -277,16 +406,4193 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 11/128 + { + t.Log("http.ResponseWriter, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 12/128 + { + t.Log("http.ResponseWriter, io.ReaderFrom, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 13/128 + { + t.Log("http.ResponseWriter, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 14/128 + { + t.Log("http.ResponseWriter, io.ReaderFrom, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + io.ReaderFrom + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 15/128 + { + t.Log("http.ResponseWriter, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 16/128 + { + t.Log("http.ResponseWriter, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 17/128 + { + t.Log("http.ResponseWriter, http.Hijacker") + inner := struct { + http.ResponseWriter + http.Hijacker + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 18/128 + { + t.Log("http.ResponseWriter, http.Hijacker, http.Pusher") + inner := struct { + http.ResponseWriter + http.Hijacker + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 19/128 + { + t.Log("http.ResponseWriter, http.Hijacker, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Hijacker + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 20/128 + { + t.Log("http.ResponseWriter, http.Hijacker, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Hijacker + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 21/128 + { + t.Log("http.ResponseWriter, http.Hijacker, deadliner") + inner := struct { + http.ResponseWriter + http.Hijacker + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 22/128 + { + t.Log("http.ResponseWriter, http.Hijacker, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.Hijacker + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 23/128 + { + t.Log("http.ResponseWriter, http.Hijacker, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Hijacker + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 24/128 + { + t.Log("http.ResponseWriter, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Hijacker + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 25/128 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 26/128 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, http.Pusher") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 27/128 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 28/128 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 29/128 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 30/128 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 31/128 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 32/128 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 33/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier") + inner := struct { + http.ResponseWriter + http.CloseNotifier + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 34/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 35/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 36/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 37/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, deadliner") + inner := struct { + http.ResponseWriter + http.CloseNotifier + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 38/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 39/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 40/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 41/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 42/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 43/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 44/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 45/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 46/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 47/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 48/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 49/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 50/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 51/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 52/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 53/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 54/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 55/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 56/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 57/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 58/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 59/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 60/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 61/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 62/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 63/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 64/128 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 65/128 + { + t.Log("http.ResponseWriter, http.Flusher") + inner := struct { + http.ResponseWriter + http.Flusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 66/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 67/128 + { + t.Log("http.ResponseWriter, http.Flusher, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 68/128 + { + t.Log("http.ResponseWriter, http.Flusher, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 69/128 + { + t.Log("http.ResponseWriter, http.Flusher, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 70/128 + { + t.Log("http.ResponseWriter, http.Flusher, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 71/128 + { + t.Log("http.ResponseWriter, http.Flusher, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 72/128 + { + t.Log("http.ResponseWriter, http.Flusher, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 73/128 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 74/128 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 75/128 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 76/128 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 77/128 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 78/128 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 79/128 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 80/128 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 81/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 82/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 83/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 84/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 85/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 86/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 87/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 88/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 89/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 90/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 91/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 92/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 93/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 94/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 95/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 96/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 97/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 98/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 99/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 100/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 101/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 102/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 103/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Pusher); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 104/128 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + fullDuplexEnabler + http.Pusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != true { @@ -302,18 +4608,20 @@ func TestWrap(t *testing.T) { } } - // combination 9/32 + // combination 105/128 { - t.Log("http.ResponseWriter, http.CloseNotifier") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier + io.ReaderFrom }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { @@ -322,7 +4630,13 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != false { @@ -338,19 +4652,21 @@ func TestWrap(t *testing.T) { } } - // combination 10/32 + // combination 106/128 { - t.Log("http.ResponseWriter, http.CloseNotifier, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, http.Pusher") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier + io.ReaderFrom http.Pusher }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { @@ -359,7 +4675,13 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != true { @@ -375,19 +4697,21 @@ func TestWrap(t *testing.T) { } } - // combination 11/32 + // combination 107/128 { - t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier io.ReaderFrom + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { @@ -399,6 +4723,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -412,20 +4742,22 @@ func TestWrap(t *testing.T) { } } - // combination 12/32 + // combination 108/128 { - t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier io.ReaderFrom + fullDuplexEnabler http.Pusher }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { @@ -437,6 +4769,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != true { t.Error("unexpected interface") } @@ -450,28 +4788,36 @@ func TestWrap(t *testing.T) { } } - // combination 13/32 + // combination 109/128 { - t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker + io.ReaderFrom + deadliner }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != false { @@ -487,29 +4833,37 @@ func TestWrap(t *testing.T) { } } - // combination 14/32 + // combination 110/128 { - t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker + io.ReaderFrom + deadliner http.Pusher }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != true { @@ -525,31 +4879,39 @@ func TestWrap(t *testing.T) { } } - // combination 15/32 + // combination 111/128 { - t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker io.ReaderFrom + deadliner + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -563,32 +4925,40 @@ func TestWrap(t *testing.T) { } } - // combination 16/32 + // combination 112/128 { - t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker io.ReaderFrom + deadliner + fullDuplexEnabler http.Pusher }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != true { t.Error("unexpected interface") } @@ -602,12 +4972,14 @@ func TestWrap(t *testing.T) { } } - // combination 17/32 + // combination 113/128 { - t.Log("http.ResponseWriter, http.Flusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier + http.Hijacker }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -616,15 +4988,21 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -638,12 +5016,14 @@ func TestWrap(t *testing.T) { } } - // combination 18/32 + // combination 114/128 { - t.Log("http.ResponseWriter, http.Flusher, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, http.Pusher") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier + http.Hijacker http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -653,15 +5033,21 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != true { t.Error("unexpected interface") } @@ -675,13 +5061,15 @@ func TestWrap(t *testing.T) { } } - // combination 19/32 + // combination 115/128 { - t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, fullDuplexEnabler") inner := struct { http.ResponseWriter http.Flusher - io.ReaderFrom + http.CloseNotifier + http.Hijacker + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -690,13 +5078,19 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != false { @@ -712,13 +5106,15 @@ func TestWrap(t *testing.T) { } } - // combination 20/32 + // combination 116/128 { - t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher") inner := struct { http.ResponseWriter http.Flusher - io.ReaderFrom + http.CloseNotifier + http.Hijacker + fullDuplexEnabler http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -728,13 +5124,19 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != true { @@ -750,13 +5152,15 @@ func TestWrap(t *testing.T) { } } - // combination 21/32 + // combination 117/128 { - t.Log("http.ResponseWriter, http.Flusher, http.Hijacker") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker + deadliner }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -765,7 +5169,7 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Hijacker); ok != true { @@ -774,6 +5178,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -787,13 +5197,15 @@ func TestWrap(t *testing.T) { } } - // combination 22/32 + // combination 118/128 { - t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker + deadliner http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -803,7 +5215,7 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Hijacker); ok != true { @@ -812,6 +5224,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != true { t.Error("unexpected interface") } @@ -825,14 +5243,16 @@ func TestWrap(t *testing.T) { } } - // combination 23/32 + // combination 119/128 { - t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker - io.ReaderFrom + deadliner + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -841,13 +5261,19 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != false { @@ -863,14 +5289,16 @@ func TestWrap(t *testing.T) { } } - // combination 24/32 + // combination 120/128 { - t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker - io.ReaderFrom + deadliner + fullDuplexEnabler http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -880,13 +5308,19 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != true { @@ -902,13 +5336,15 @@ func TestWrap(t *testing.T) { } } - // combination 25/32 + // combination 121/128 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker + io.ReaderFrom }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -920,10 +5356,16 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != false { @@ -939,13 +5381,15 @@ func TestWrap(t *testing.T) { } } - // combination 26/32 + // combination 122/128 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker + io.ReaderFrom http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -958,10 +5402,16 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != true { @@ -977,14 +5427,16 @@ func TestWrap(t *testing.T) { } } - // combination 27/32 + // combination 123/128 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker io.ReaderFrom + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -996,12 +5448,18 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -1015,14 +5473,16 @@ func TestWrap(t *testing.T) { } } - // combination 28/32 + // combination 124/128 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker io.ReaderFrom + fullDuplexEnabler http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -1035,12 +5495,18 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != true { t.Error("unexpected interface") } @@ -1054,14 +5520,16 @@ func TestWrap(t *testing.T) { } } - // combination 29/32 + // combination 125/128 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker + io.ReaderFrom + deadliner }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -1076,7 +5544,13 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != false { @@ -1092,14 +5566,16 @@ func TestWrap(t *testing.T) { } } - // combination 30/32 + // combination 126/128 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker + io.ReaderFrom + deadliner http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -1115,7 +5591,13 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } if _, ok := w.(http.Pusher); ok != true { @@ -1131,15 +5613,17 @@ func TestWrap(t *testing.T) { } } - // combination 31/32 + // combination 127/128 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker io.ReaderFrom + deadliner + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -1157,6 +5641,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != false { t.Error("unexpected interface") } @@ -1170,15 +5660,17 @@ func TestWrap(t *testing.T) { } } - // combination 32/32 + // combination 128/128 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker io.ReaderFrom + deadliner + fullDuplexEnabler http.Pusher }{} w := Wrap(inner, Hooks{}) @@ -1197,6 +5689,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if _, ok := w.(http.Pusher); ok != true { t.Error("unexpected interface") } diff --git a/wrap_generated_lt_1.8.go b/wrap_generated_lt_1.8.go index e0951df..221a3fe 100644 --- a/wrap_generated_lt_1.8.go +++ b/wrap_generated_lt_1.8.go @@ -1,4 +1,6 @@ +//go:build !go1.8 // +build !go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop @@ -8,6 +10,7 @@ import ( "io" "net" "net/http" + "time" ) // HeaderFunc is part of the http.ResponseWriter interface. @@ -31,17 +34,29 @@ type HijackFunc func() (net.Conn, *bufio.ReadWriter, error) // ReadFromFunc is part of the io.ReaderFrom interface. type ReadFromFunc func(src io.Reader) (int64, error) +// SetReadDeadlineFunc is part of the deadliner interface. +type SetReadDeadlineFunc func(deadline time.Time) error + +// SetWriteDeadlineFunc is part of the deadliner interface. +type SetWriteDeadlineFunc func(deadline time.Time) error + +// EnableFullDuplexFunc is part of the fullDuplexEnabler interface. +type EnableFullDuplexFunc func() error + // Hooks defines a set of method interceptors for methods included in // http.ResponseWriter as well as some others. You can think of them as // middleware for the function calls they target. See Wrap for more details. type Hooks struct { - Header func(HeaderFunc) HeaderFunc - WriteHeader func(WriteHeaderFunc) WriteHeaderFunc - Write func(WriteFunc) WriteFunc - Flush func(FlushFunc) FlushFunc - CloseNotify func(CloseNotifyFunc) CloseNotifyFunc - Hijack func(HijackFunc) HijackFunc - ReadFrom func(ReadFromFunc) ReadFromFunc + Header func(HeaderFunc) HeaderFunc + WriteHeader func(WriteHeaderFunc) WriteHeaderFunc + Write func(WriteFunc) WriteFunc + Flush func(FlushFunc) FlushFunc + CloseNotify func(CloseNotifyFunc) CloseNotifyFunc + Hijack func(HijackFunc) HijackFunc + ReadFrom func(ReadFromFunc) ReadFromFunc + SetReadDeadline func(SetReadDeadlineFunc) SetReadDeadlineFunc + SetWriteDeadline func(SetWriteDeadlineFunc) SetWriteDeadlineFunc + EnableFullDuplex func(EnableFullDuplexFunc) EnableFullDuplexFunc } // Wrap returns a wrapped version of w that provides the exact same interface @@ -51,6 +66,8 @@ type Hooks struct { // - http.CloseNotifier // - http.Hijacker // - io.ReaderFrom +// - deadliner +// - fullDuplexEnabler // // The wrapped version will implement the exact same combination. If no hooks // are set, the wrapped version also behaves exactly as w. Hooks targeting @@ -64,60 +81,243 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { _, i1 := w.(http.CloseNotifier) _, i2 := w.(http.Hijacker) _, i3 := w.(io.ReaderFrom) + _, i4 := w.(deadliner) + _, i5 := w.(fullDuplexEnabler) switch { - // combination 1/16 - case !i0 && !i1 && !i2 && !i3: + // combination 1/64 + case !i0 && !i1 && !i2 && !i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter }{rw, rw} - // combination 2/16 - case !i0 && !i1 && !i2 && i3: + // combination 2/64 + case !i0 && !i1 && !i2 && !i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + fullDuplexEnabler + }{rw, rw, rw} + // combination 3/64 + case !i0 && !i1 && !i2 && !i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + deadliner + }{rw, rw, rw} + // combination 4/64 + case !i0 && !i1 && !i2 && !i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 5/64 + case !i0 && !i1 && !i2 && i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter io.ReaderFrom }{rw, rw, rw} - // combination 3/16 - case !i0 && !i1 && i2 && !i3: + // combination 6/64 + case !i0 && !i1 && !i2 && i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 7/64 + case !i0 && !i1 && !i2 && i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + deadliner + }{rw, rw, rw, rw} + // combination 8/64 + case !i0 && !i1 && !i2 && i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 9/64 + case !i0 && !i1 && i2 && !i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.Hijacker }{rw, rw, rw} - // combination 4/16 - case !i0 && !i1 && i2 && i3: + // combination 10/64 + case !i0 && !i1 && i2 && !i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 11/64 + case !i0 && !i1 && i2 && !i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + deadliner + }{rw, rw, rw, rw} + // combination 12/64 + case !i0 && !i1 && i2 && !i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 13/64 + case !i0 && !i1 && i2 && i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.Hijacker io.ReaderFrom }{rw, rw, rw, rw} - // combination 5/16 - case !i0 && i1 && !i2 && !i3: + // combination 14/64 + case !i0 && !i1 && i2 && i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 15/64 + case !i0 && !i1 && i2 && i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw} + // combination 16/64 + case !i0 && !i1 && i2 && i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 17/64 + case !i0 && i1 && !i2 && !i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.CloseNotifier }{rw, rw, rw} - // combination 6/16 - case !i0 && i1 && !i2 && i3: + // combination 18/64 + case !i0 && i1 && !i2 && !i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 19/64 + case !i0 && i1 && !i2 && !i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + deadliner + }{rw, rw, rw, rw} + // combination 20/64 + case !i0 && i1 && !i2 && !i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 21/64 + case !i0 && i1 && !i2 && i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.CloseNotifier io.ReaderFrom }{rw, rw, rw, rw} - // combination 7/16 - case !i0 && i1 && i2 && !i3: + // combination 22/64 + case !i0 && i1 && !i2 && i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 23/64 + case !i0 && i1 && !i2 && i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw} + // combination 24/64 + case !i0 && i1 && !i2 && i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 25/64 + case !i0 && i1 && i2 && !i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.CloseNotifier http.Hijacker }{rw, rw, rw, rw} - // combination 8/16 - case !i0 && i1 && i2 && i3: + // combination 26/64 + case !i0 && i1 && i2 && !i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 27/64 + case !i0 && i1 && i2 && !i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + }{rw, rw, rw, rw, rw} + // combination 28/64 + case !i0 && i1 && i2 && !i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 29/64 + case !i0 && i1 && i2 && i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter @@ -125,31 +325,143 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw} - // combination 9/16 - case i0 && !i1 && !i2 && !i3: + // combination 30/64 + case !i0 && i1 && i2 && i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 31/64 + case !i0 && i1 && i2 && i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw, rw} + // combination 32/64 + case !i0 && i1 && i2 && i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 33/64 + case i0 && !i1 && !i2 && !i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.Flusher }{rw, rw, rw} - // combination 10/16 - case i0 && !i1 && !i2 && i3: + // combination 34/64 + case i0 && !i1 && !i2 && !i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + fullDuplexEnabler + }{rw, rw, rw, rw} + // combination 35/64 + case i0 && !i1 && !i2 && !i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + deadliner + }{rw, rw, rw, rw} + // combination 36/64 + case i0 && !i1 && !i2 && !i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 37/64 + case i0 && !i1 && !i2 && i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.Flusher io.ReaderFrom }{rw, rw, rw, rw} - // combination 11/16 - case i0 && !i1 && i2 && !i3: + // combination 38/64 + case i0 && !i1 && !i2 && i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 39/64 + case i0 && !i1 && !i2 && i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw} + // combination 40/64 + case i0 && !i1 && !i2 && i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 41/64 + case i0 && !i1 && i2 && !i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.Flusher http.Hijacker }{rw, rw, rw, rw} - // combination 12/16 - case i0 && !i1 && i2 && i3: + // combination 42/64 + case i0 && !i1 && i2 && !i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 43/64 + case i0 && !i1 && i2 && !i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + }{rw, rw, rw, rw, rw} + // combination 44/64 + case i0 && !i1 && i2 && !i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 45/64 + case i0 && !i1 && i2 && i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter @@ -157,16 +469,75 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw} - // combination 13/16 - case i0 && i1 && !i2 && !i3: + // combination 46/64 + case i0 && !i1 && i2 && i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 47/64 + case i0 && !i1 && i2 && i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw, rw} + // combination 48/64 + case i0 && !i1 && i2 && i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 49/64 + case i0 && i1 && !i2 && !i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier }{rw, rw, rw, rw} - // combination 14/16 - case i0 && i1 && !i2 && i3: + // combination 50/64 + case i0 && i1 && !i2 && !i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + fullDuplexEnabler + }{rw, rw, rw, rw, rw} + // combination 51/64 + case i0 && i1 && !i2 && !i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + }{rw, rw, rw, rw, rw} + // combination 52/64 + case i0 && i1 && !i2 && !i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 53/64 + case i0 && i1 && !i2 && i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter @@ -174,8 +545,39 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { http.CloseNotifier io.ReaderFrom }{rw, rw, rw, rw, rw} - // combination 15/16 - case i0 && i1 && i2 && !i3: + // combination 54/64 + case i0 && i1 && !i2 && i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 55/64 + case i0 && i1 && !i2 && i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw, rw} + // combination 56/64 + case i0 && i1 && !i2 && i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 57/64 + case i0 && i1 && i2 && !i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter @@ -183,8 +585,39 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { http.CloseNotifier http.Hijacker }{rw, rw, rw, rw, rw} - // combination 16/16 - case i0 && i1 && i2 && i3: + // combination 58/64 + case i0 && i1 && i2 && !i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw} + // combination 59/64 + case i0 && i1 && i2 && !i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + deadliner + }{rw, rw, rw, rw, rw, rw} + // combination 60/64 + case i0 && i1 && i2 && !i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 61/64 + case i0 && i1 && i2 && i3 && !i4 && !i5: return struct { Unwrapper http.ResponseWriter @@ -193,6 +626,40 @@ func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw, rw} + // combination 62/64 + case i0 && i1 && i2 && i3 && !i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw} + // combination 63/64 + case i0 && i1 && i2 && i3 && i4 && !i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + }{rw, rw, rw, rw, rw, rw, rw} + // combination 64/64 + case i0 && i1 && i2 && i3 && i4 && i5: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{rw, rw, rw, rw, rw, rw, rw, rw} } panic("unreachable") } @@ -262,6 +729,30 @@ func (w *rw) ReadFrom(src io.Reader) (int64, error) { return f(src) } +func (w *rw) SetReadDeadline(deadline time.Time) error { + f := w.w.(deadliner).SetReadDeadline + if w.h.SetReadDeadline != nil { + f = w.h.SetReadDeadline(f) + } + return f(deadline) +} + +func (w *rw) SetWriteDeadline(deadline time.Time) error { + f := w.w.(deadliner).SetWriteDeadline + if w.h.SetWriteDeadline != nil { + f = w.h.SetWriteDeadline(f) + } + return f(deadline) +} + +func (w *rw) EnableFullDuplex() error { + f := w.w.(fullDuplexEnabler).EnableFullDuplex + if w.h.EnableFullDuplex != nil { + f = w.h.EnableFullDuplex(f) + } + return f() +} + type Unwrapper interface { Unwrap() http.ResponseWriter } diff --git a/wrap_generated_lt_1.8_test.go b/wrap_generated_lt_1.8_test.go index 49c8a45..d410190 100644 --- a/wrap_generated_lt_1.8_test.go +++ b/wrap_generated_lt_1.8_test.go @@ -1,4 +1,6 @@ +//go:build !go1.8 // +build !go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop @@ -9,27 +11,1904 @@ import ( "testing" ) -func TestWrap(t *testing.T) { - // combination 1/16 +func TestWrap(t *testing.T) { + // combination 1/64 + { + t.Log("http.ResponseWriter") + inner := struct { + http.ResponseWriter + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 2/64 + { + t.Log("http.ResponseWriter, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 3/64 + { + t.Log("http.ResponseWriter, deadliner") + inner := struct { + http.ResponseWriter + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 4/64 + { + t.Log("http.ResponseWriter, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 5/64 + { + t.Log("http.ResponseWriter, io.ReaderFrom") + inner := struct { + http.ResponseWriter + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 6/64 + { + t.Log("http.ResponseWriter, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 7/64 + { + t.Log("http.ResponseWriter, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 8/64 + { + t.Log("http.ResponseWriter, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 9/64 + { + t.Log("http.ResponseWriter, http.Hijacker") + inner := struct { + http.ResponseWriter + http.Hijacker + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 10/64 + { + t.Log("http.ResponseWriter, http.Hijacker, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Hijacker + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 11/64 + { + t.Log("http.ResponseWriter, http.Hijacker, deadliner") + inner := struct { + http.ResponseWriter + http.Hijacker + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 12/64 + { + t.Log("http.ResponseWriter, http.Hijacker, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Hijacker + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 13/64 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 14/64 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 15/64 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 16/64 + { + t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 17/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier") + inner := struct { + http.ResponseWriter + http.CloseNotifier + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 18/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 19/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, deadliner") + inner := struct { + http.ResponseWriter + http.CloseNotifier + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 20/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 21/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 22/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 23/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 24/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 25/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 26/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 27/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 28/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 29/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 30/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 31/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 32/64 + { + t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 33/64 + { + t.Log("http.ResponseWriter, http.Flusher") + inner := struct { + http.ResponseWriter + http.Flusher + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 34/64 + { + t.Log("http.ResponseWriter, http.Flusher, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 35/64 + { + t.Log("http.ResponseWriter, http.Flusher, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 36/64 + { + t.Log("http.ResponseWriter, http.Flusher, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 37/64 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 38/64 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 39/64 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 40/64 + { + t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + io.ReaderFrom + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 41/64 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 42/64 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 43/64 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 44/64 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 45/64 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 46/64 + { + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 47/64 { - t.Log("http.ResponseWriter") + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner") inner := struct { http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + deadliner }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != false { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } @@ -42,29 +1921,39 @@ func TestWrap(t *testing.T) { } } - // combination 2/16 + // combination 48/64 { - t.Log("http.ResponseWriter, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler") inner := struct { http.ResponseWriter + http.Flusher + http.Hijacker io.ReaderFrom + deadliner + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != false { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { @@ -75,29 +1964,36 @@ func TestWrap(t *testing.T) { } } - // combination 3/16 + // combination 49/64 { - t.Log("http.ResponseWriter, http.Hijacker") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier") inner := struct { http.ResponseWriter - http.Hijacker + http.Flusher + http.CloseNotifier }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { @@ -108,28 +2004,35 @@ func TestWrap(t *testing.T) { } } - // combination 4/16 + // combination 50/64 { - t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, fullDuplexEnabler") inner := struct { http.ResponseWriter - http.Hijacker - io.ReaderFrom + http.Flusher + http.CloseNotifier + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } @@ -142,18 +2045,20 @@ func TestWrap(t *testing.T) { } } - // combination 5/16 + // combination 51/64 { - t.Log("http.ResponseWriter, http.CloseNotifier") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier + deadliner }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { @@ -165,6 +2070,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { @@ -175,19 +2086,21 @@ func TestWrap(t *testing.T) { } } - // combination 6/16 + // combination 52/64 { - t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, fullDuplexEnabler") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier - io.ReaderFrom + deadliner + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { @@ -196,7 +2109,13 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } @@ -209,28 +2128,35 @@ func TestWrap(t *testing.T) { } } - // combination 7/16 + // combination 53/64 { - t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker + io.ReaderFrom }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } @@ -243,31 +2169,38 @@ func TestWrap(t *testing.T) { } } - // combination 8/16 + // combination 54/64 { - t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler") inner := struct { http.ResponseWriter + http.Flusher http.CloseNotifier - http.Hijacker io.ReaderFrom + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Flusher); ok != false { + if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != true { + if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { @@ -278,12 +2211,15 @@ func TestWrap(t *testing.T) { } } - // combination 9/16 + // combination 55/64 { - t.Log("http.ResponseWriter, http.Flusher") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier + io.ReaderFrom + deadliner }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -292,13 +2228,19 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Hijacker); ok != false { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { t.Error("unexpected interface") } @@ -311,13 +2253,16 @@ func TestWrap(t *testing.T) { } } - // combination 10/16 + // combination 56/64 { - t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier io.ReaderFrom + deadliner + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -326,7 +2271,7 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Hijacker); ok != false { @@ -335,6 +2280,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { @@ -345,12 +2296,13 @@ func TestWrap(t *testing.T) { } } - // combination 11/16 + // combination 57/64 { - t.Log("http.ResponseWriter, http.Flusher, http.Hijacker") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker }{} w := Wrap(inner, Hooks{}) @@ -360,7 +2312,7 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Hijacker); ok != true { @@ -369,6 +2321,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { @@ -379,14 +2337,15 @@ func TestWrap(t *testing.T) { } } - // combination 12/16 + // combination 58/64 { - t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, fullDuplexEnabler") inner := struct { http.ResponseWriter http.Flusher + http.CloseNotifier http.Hijacker - io.ReaderFrom + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -395,13 +2354,19 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Flusher); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.CloseNotifier); ok != false { + if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != true { + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } @@ -414,13 +2379,15 @@ func TestWrap(t *testing.T) { } } - // combination 13/16 + // combination 59/64 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker + deadliner }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -432,12 +2399,18 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != false { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { @@ -448,13 +2421,57 @@ func TestWrap(t *testing.T) { } } - // combination 14/16 + // combination 60/64 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + deadliner + fullDuplexEnabler + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 61/64 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier + http.Hijacker io.ReaderFrom }{} w := Wrap(inner, Hooks{}) @@ -467,12 +2484,18 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.CloseNotifier); ok != true { t.Error("unexpected interface") } - if _, ok := w.(http.Hijacker); ok != false { + if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { @@ -483,14 +2506,16 @@ func TestWrap(t *testing.T) { } } - // combination 15/16 + // combination 62/64 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker + io.ReaderFrom + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -505,7 +2530,13 @@ func TestWrap(t *testing.T) { if _, ok := w.(http.Hijacker); ok != true { t.Error("unexpected interface") } - if _, ok := w.(io.ReaderFrom); ok != false { + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != false { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { t.Error("unexpected interface") } @@ -518,15 +2549,60 @@ func TestWrap(t *testing.T) { } } - // combination 16/16 + // combination 63/64 { - t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom") + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner") + inner := struct { + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + deadliner + }{} + w := Wrap(inner, Hooks{}) + if _, ok := w.(http.ResponseWriter); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Flusher); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.CloseNotifier); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(http.Hijacker); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(io.ReaderFrom); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != false { + t.Error("unexpected interface") + } + + if w, ok := w.(Unwrapper); ok { + if w.Unwrap() != inner { + t.Error("w.Unwrap() failed") + } + } else { + t.Error("Unwrapper interface not implemented") + } + } + + // combination 64/64 + { + t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler") inner := struct { http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker io.ReaderFrom + deadliner + fullDuplexEnabler }{} w := Wrap(inner, Hooks{}) if _, ok := w.(http.ResponseWriter); ok != true { @@ -544,6 +2620,12 @@ func TestWrap(t *testing.T) { if _, ok := w.(io.ReaderFrom); ok != true { t.Error("unexpected interface") } + if _, ok := w.(deadliner); ok != true { + t.Error("unexpected interface") + } + if _, ok := w.(fullDuplexEnabler); ok != true { + t.Error("unexpected interface") + } if w, ok := w.(Unwrapper); ok { if w.Unwrap() != inner { diff --git a/wrap_test.go b/wrap_test.go index 4c48557..c78136e 100644 --- a/wrap_test.go +++ b/wrap_test.go @@ -3,7 +3,6 @@ package httpsnoop import ( "bytes" "io" - "io/ioutil" "net/http" "net/http/httptest" "testing" @@ -108,7 +107,10 @@ func TestWrap_integration(t *testing.T) { t.Fatal(err) } defer res.Body.Close() - gotBody, err := ioutil.ReadAll(res.Body) + gotBody, err := io.ReadAll(res.Body) + if err != nil { + t.Fatal(err) + } if res.StatusCode != test.WantCode { t.Errorf("got=%d want=%d", res.StatusCode, test.WantCode) } else if !bytes.Equal(gotBody, test.WantBody) {