gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/httpsnoop/wrap_generated_lt_1.8_test.go (about)

     1  //go:build !go1.8
     2  // +build !go1.8
     3  
     4  // Code generated by "httpsnoop/codegen"; DO NOT EDIT
     5  
     6  package httpsnoop
     7  
     8  import (
     9  	http "gitee.com/ks-custle/core-gm/gmhttp"
    10  	"io"
    11  	"testing"
    12  )
    13  
    14  func TestWrap(t *testing.T) {
    15  	// combination 1/16
    16  	{
    17  		t.Log("http.ResponseWriter")
    18  		inner := struct {
    19  			http.ResponseWriter
    20  		}{}
    21  		w := Wrap(inner, Hooks{})
    22  		if _, ok := w.(http.ResponseWriter); ok != true {
    23  			t.Error("unexpected interface")
    24  		}
    25  		if _, ok := w.(http.Flusher); ok != false {
    26  			t.Error("unexpected interface")
    27  		}
    28  		if _, ok := w.(http.CloseNotifier); ok != false {
    29  			t.Error("unexpected interface")
    30  		}
    31  		if _, ok := w.(http.Hijacker); ok != false {
    32  			t.Error("unexpected interface")
    33  		}
    34  		if _, ok := w.(io.ReaderFrom); ok != false {
    35  			t.Error("unexpected interface")
    36  		}
    37  
    38  		if w, ok := w.(Unwrapper); ok {
    39  			if w.Unwrap() != inner {
    40  				t.Error("w.Unwrap() failed")
    41  			}
    42  		} else {
    43  			t.Error("Unwrapper interface not implemented")
    44  		}
    45  	}
    46  
    47  	// combination 2/16
    48  	{
    49  		t.Log("http.ResponseWriter, io.ReaderFrom")
    50  		inner := struct {
    51  			http.ResponseWriter
    52  			io.ReaderFrom
    53  		}{}
    54  		w := Wrap(inner, Hooks{})
    55  		if _, ok := w.(http.ResponseWriter); ok != true {
    56  			t.Error("unexpected interface")
    57  		}
    58  		if _, ok := w.(http.Flusher); ok != false {
    59  			t.Error("unexpected interface")
    60  		}
    61  		if _, ok := w.(http.CloseNotifier); ok != false {
    62  			t.Error("unexpected interface")
    63  		}
    64  		if _, ok := w.(http.Hijacker); ok != false {
    65  			t.Error("unexpected interface")
    66  		}
    67  		if _, ok := w.(io.ReaderFrom); ok != true {
    68  			t.Error("unexpected interface")
    69  		}
    70  
    71  		if w, ok := w.(Unwrapper); ok {
    72  			if w.Unwrap() != inner {
    73  				t.Error("w.Unwrap() failed")
    74  			}
    75  		} else {
    76  			t.Error("Unwrapper interface not implemented")
    77  		}
    78  	}
    79  
    80  	// combination 3/16
    81  	{
    82  		t.Log("http.ResponseWriter, http.Hijacker")
    83  		inner := struct {
    84  			http.ResponseWriter
    85  			http.Hijacker
    86  		}{}
    87  		w := Wrap(inner, Hooks{})
    88  		if _, ok := w.(http.ResponseWriter); ok != true {
    89  			t.Error("unexpected interface")
    90  		}
    91  		if _, ok := w.(http.Flusher); ok != false {
    92  			t.Error("unexpected interface")
    93  		}
    94  		if _, ok := w.(http.CloseNotifier); ok != false {
    95  			t.Error("unexpected interface")
    96  		}
    97  		if _, ok := w.(http.Hijacker); ok != true {
    98  			t.Error("unexpected interface")
    99  		}
   100  		if _, ok := w.(io.ReaderFrom); ok != false {
   101  			t.Error("unexpected interface")
   102  		}
   103  
   104  		if w, ok := w.(Unwrapper); ok {
   105  			if w.Unwrap() != inner {
   106  				t.Error("w.Unwrap() failed")
   107  			}
   108  		} else {
   109  			t.Error("Unwrapper interface not implemented")
   110  		}
   111  	}
   112  
   113  	// combination 4/16
   114  	{
   115  		t.Log("http.ResponseWriter, http.Hijacker, io.ReaderFrom")
   116  		inner := struct {
   117  			http.ResponseWriter
   118  			http.Hijacker
   119  			io.ReaderFrom
   120  		}{}
   121  		w := Wrap(inner, Hooks{})
   122  		if _, ok := w.(http.ResponseWriter); ok != true {
   123  			t.Error("unexpected interface")
   124  		}
   125  		if _, ok := w.(http.Flusher); ok != false {
   126  			t.Error("unexpected interface")
   127  		}
   128  		if _, ok := w.(http.CloseNotifier); ok != false {
   129  			t.Error("unexpected interface")
   130  		}
   131  		if _, ok := w.(http.Hijacker); ok != true {
   132  			t.Error("unexpected interface")
   133  		}
   134  		if _, ok := w.(io.ReaderFrom); ok != true {
   135  			t.Error("unexpected interface")
   136  		}
   137  
   138  		if w, ok := w.(Unwrapper); ok {
   139  			if w.Unwrap() != inner {
   140  				t.Error("w.Unwrap() failed")
   141  			}
   142  		} else {
   143  			t.Error("Unwrapper interface not implemented")
   144  		}
   145  	}
   146  
   147  	// combination 5/16
   148  	{
   149  		t.Log("http.ResponseWriter, http.CloseNotifier")
   150  		inner := struct {
   151  			http.ResponseWriter
   152  			http.CloseNotifier
   153  		}{}
   154  		w := Wrap(inner, Hooks{})
   155  		if _, ok := w.(http.ResponseWriter); ok != true {
   156  			t.Error("unexpected interface")
   157  		}
   158  		if _, ok := w.(http.Flusher); ok != false {
   159  			t.Error("unexpected interface")
   160  		}
   161  		if _, ok := w.(http.CloseNotifier); ok != true {
   162  			t.Error("unexpected interface")
   163  		}
   164  		if _, ok := w.(http.Hijacker); ok != false {
   165  			t.Error("unexpected interface")
   166  		}
   167  		if _, ok := w.(io.ReaderFrom); ok != false {
   168  			t.Error("unexpected interface")
   169  		}
   170  
   171  		if w, ok := w.(Unwrapper); ok {
   172  			if w.Unwrap() != inner {
   173  				t.Error("w.Unwrap() failed")
   174  			}
   175  		} else {
   176  			t.Error("Unwrapper interface not implemented")
   177  		}
   178  	}
   179  
   180  	// combination 6/16
   181  	{
   182  		t.Log("http.ResponseWriter, http.CloseNotifier, io.ReaderFrom")
   183  		inner := struct {
   184  			http.ResponseWriter
   185  			http.CloseNotifier
   186  			io.ReaderFrom
   187  		}{}
   188  		w := Wrap(inner, Hooks{})
   189  		if _, ok := w.(http.ResponseWriter); ok != true {
   190  			t.Error("unexpected interface")
   191  		}
   192  		if _, ok := w.(http.Flusher); ok != false {
   193  			t.Error("unexpected interface")
   194  		}
   195  		if _, ok := w.(http.CloseNotifier); ok != true {
   196  			t.Error("unexpected interface")
   197  		}
   198  		if _, ok := w.(http.Hijacker); ok != false {
   199  			t.Error("unexpected interface")
   200  		}
   201  		if _, ok := w.(io.ReaderFrom); ok != true {
   202  			t.Error("unexpected interface")
   203  		}
   204  
   205  		if w, ok := w.(Unwrapper); ok {
   206  			if w.Unwrap() != inner {
   207  				t.Error("w.Unwrap() failed")
   208  			}
   209  		} else {
   210  			t.Error("Unwrapper interface not implemented")
   211  		}
   212  	}
   213  
   214  	// combination 7/16
   215  	{
   216  		t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker")
   217  		inner := struct {
   218  			http.ResponseWriter
   219  			http.CloseNotifier
   220  			http.Hijacker
   221  		}{}
   222  		w := Wrap(inner, Hooks{})
   223  		if _, ok := w.(http.ResponseWriter); ok != true {
   224  			t.Error("unexpected interface")
   225  		}
   226  		if _, ok := w.(http.Flusher); ok != false {
   227  			t.Error("unexpected interface")
   228  		}
   229  		if _, ok := w.(http.CloseNotifier); ok != true {
   230  			t.Error("unexpected interface")
   231  		}
   232  		if _, ok := w.(http.Hijacker); ok != true {
   233  			t.Error("unexpected interface")
   234  		}
   235  		if _, ok := w.(io.ReaderFrom); ok != false {
   236  			t.Error("unexpected interface")
   237  		}
   238  
   239  		if w, ok := w.(Unwrapper); ok {
   240  			if w.Unwrap() != inner {
   241  				t.Error("w.Unwrap() failed")
   242  			}
   243  		} else {
   244  			t.Error("Unwrapper interface not implemented")
   245  		}
   246  	}
   247  
   248  	// combination 8/16
   249  	{
   250  		t.Log("http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom")
   251  		inner := struct {
   252  			http.ResponseWriter
   253  			http.CloseNotifier
   254  			http.Hijacker
   255  			io.ReaderFrom
   256  		}{}
   257  		w := Wrap(inner, Hooks{})
   258  		if _, ok := w.(http.ResponseWriter); ok != true {
   259  			t.Error("unexpected interface")
   260  		}
   261  		if _, ok := w.(http.Flusher); ok != false {
   262  			t.Error("unexpected interface")
   263  		}
   264  		if _, ok := w.(http.CloseNotifier); ok != true {
   265  			t.Error("unexpected interface")
   266  		}
   267  		if _, ok := w.(http.Hijacker); ok != true {
   268  			t.Error("unexpected interface")
   269  		}
   270  		if _, ok := w.(io.ReaderFrom); ok != true {
   271  			t.Error("unexpected interface")
   272  		}
   273  
   274  		if w, ok := w.(Unwrapper); ok {
   275  			if w.Unwrap() != inner {
   276  				t.Error("w.Unwrap() failed")
   277  			}
   278  		} else {
   279  			t.Error("Unwrapper interface not implemented")
   280  		}
   281  	}
   282  
   283  	// combination 9/16
   284  	{
   285  		t.Log("http.ResponseWriter, http.Flusher")
   286  		inner := struct {
   287  			http.ResponseWriter
   288  			http.Flusher
   289  		}{}
   290  		w := Wrap(inner, Hooks{})
   291  		if _, ok := w.(http.ResponseWriter); ok != true {
   292  			t.Error("unexpected interface")
   293  		}
   294  		if _, ok := w.(http.Flusher); ok != true {
   295  			t.Error("unexpected interface")
   296  		}
   297  		if _, ok := w.(http.CloseNotifier); ok != false {
   298  			t.Error("unexpected interface")
   299  		}
   300  		if _, ok := w.(http.Hijacker); ok != false {
   301  			t.Error("unexpected interface")
   302  		}
   303  		if _, ok := w.(io.ReaderFrom); ok != false {
   304  			t.Error("unexpected interface")
   305  		}
   306  
   307  		if w, ok := w.(Unwrapper); ok {
   308  			if w.Unwrap() != inner {
   309  				t.Error("w.Unwrap() failed")
   310  			}
   311  		} else {
   312  			t.Error("Unwrapper interface not implemented")
   313  		}
   314  	}
   315  
   316  	// combination 10/16
   317  	{
   318  		t.Log("http.ResponseWriter, http.Flusher, io.ReaderFrom")
   319  		inner := struct {
   320  			http.ResponseWriter
   321  			http.Flusher
   322  			io.ReaderFrom
   323  		}{}
   324  		w := Wrap(inner, Hooks{})
   325  		if _, ok := w.(http.ResponseWriter); ok != true {
   326  			t.Error("unexpected interface")
   327  		}
   328  		if _, ok := w.(http.Flusher); ok != true {
   329  			t.Error("unexpected interface")
   330  		}
   331  		if _, ok := w.(http.CloseNotifier); ok != false {
   332  			t.Error("unexpected interface")
   333  		}
   334  		if _, ok := w.(http.Hijacker); ok != false {
   335  			t.Error("unexpected interface")
   336  		}
   337  		if _, ok := w.(io.ReaderFrom); ok != true {
   338  			t.Error("unexpected interface")
   339  		}
   340  
   341  		if w, ok := w.(Unwrapper); ok {
   342  			if w.Unwrap() != inner {
   343  				t.Error("w.Unwrap() failed")
   344  			}
   345  		} else {
   346  			t.Error("Unwrapper interface not implemented")
   347  		}
   348  	}
   349  
   350  	// combination 11/16
   351  	{
   352  		t.Log("http.ResponseWriter, http.Flusher, http.Hijacker")
   353  		inner := struct {
   354  			http.ResponseWriter
   355  			http.Flusher
   356  			http.Hijacker
   357  		}{}
   358  		w := Wrap(inner, Hooks{})
   359  		if _, ok := w.(http.ResponseWriter); ok != true {
   360  			t.Error("unexpected interface")
   361  		}
   362  		if _, ok := w.(http.Flusher); ok != true {
   363  			t.Error("unexpected interface")
   364  		}
   365  		if _, ok := w.(http.CloseNotifier); ok != false {
   366  			t.Error("unexpected interface")
   367  		}
   368  		if _, ok := w.(http.Hijacker); ok != true {
   369  			t.Error("unexpected interface")
   370  		}
   371  		if _, ok := w.(io.ReaderFrom); ok != false {
   372  			t.Error("unexpected interface")
   373  		}
   374  
   375  		if w, ok := w.(Unwrapper); ok {
   376  			if w.Unwrap() != inner {
   377  				t.Error("w.Unwrap() failed")
   378  			}
   379  		} else {
   380  			t.Error("Unwrapper interface not implemented")
   381  		}
   382  	}
   383  
   384  	// combination 12/16
   385  	{
   386  		t.Log("http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom")
   387  		inner := struct {
   388  			http.ResponseWriter
   389  			http.Flusher
   390  			http.Hijacker
   391  			io.ReaderFrom
   392  		}{}
   393  		w := Wrap(inner, Hooks{})
   394  		if _, ok := w.(http.ResponseWriter); ok != true {
   395  			t.Error("unexpected interface")
   396  		}
   397  		if _, ok := w.(http.Flusher); ok != true {
   398  			t.Error("unexpected interface")
   399  		}
   400  		if _, ok := w.(http.CloseNotifier); ok != false {
   401  			t.Error("unexpected interface")
   402  		}
   403  		if _, ok := w.(http.Hijacker); ok != true {
   404  			t.Error("unexpected interface")
   405  		}
   406  		if _, ok := w.(io.ReaderFrom); ok != true {
   407  			t.Error("unexpected interface")
   408  		}
   409  
   410  		if w, ok := w.(Unwrapper); ok {
   411  			if w.Unwrap() != inner {
   412  				t.Error("w.Unwrap() failed")
   413  			}
   414  		} else {
   415  			t.Error("Unwrapper interface not implemented")
   416  		}
   417  	}
   418  
   419  	// combination 13/16
   420  	{
   421  		t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier")
   422  		inner := struct {
   423  			http.ResponseWriter
   424  			http.Flusher
   425  			http.CloseNotifier
   426  		}{}
   427  		w := Wrap(inner, Hooks{})
   428  		if _, ok := w.(http.ResponseWriter); ok != true {
   429  			t.Error("unexpected interface")
   430  		}
   431  		if _, ok := w.(http.Flusher); ok != true {
   432  			t.Error("unexpected interface")
   433  		}
   434  		if _, ok := w.(http.CloseNotifier); ok != true {
   435  			t.Error("unexpected interface")
   436  		}
   437  		if _, ok := w.(http.Hijacker); ok != false {
   438  			t.Error("unexpected interface")
   439  		}
   440  		if _, ok := w.(io.ReaderFrom); ok != false {
   441  			t.Error("unexpected interface")
   442  		}
   443  
   444  		if w, ok := w.(Unwrapper); ok {
   445  			if w.Unwrap() != inner {
   446  				t.Error("w.Unwrap() failed")
   447  			}
   448  		} else {
   449  			t.Error("Unwrapper interface not implemented")
   450  		}
   451  	}
   452  
   453  	// combination 14/16
   454  	{
   455  		t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom")
   456  		inner := struct {
   457  			http.ResponseWriter
   458  			http.Flusher
   459  			http.CloseNotifier
   460  			io.ReaderFrom
   461  		}{}
   462  		w := Wrap(inner, Hooks{})
   463  		if _, ok := w.(http.ResponseWriter); ok != true {
   464  			t.Error("unexpected interface")
   465  		}
   466  		if _, ok := w.(http.Flusher); ok != true {
   467  			t.Error("unexpected interface")
   468  		}
   469  		if _, ok := w.(http.CloseNotifier); ok != true {
   470  			t.Error("unexpected interface")
   471  		}
   472  		if _, ok := w.(http.Hijacker); ok != false {
   473  			t.Error("unexpected interface")
   474  		}
   475  		if _, ok := w.(io.ReaderFrom); ok != true {
   476  			t.Error("unexpected interface")
   477  		}
   478  
   479  		if w, ok := w.(Unwrapper); ok {
   480  			if w.Unwrap() != inner {
   481  				t.Error("w.Unwrap() failed")
   482  			}
   483  		} else {
   484  			t.Error("Unwrapper interface not implemented")
   485  		}
   486  	}
   487  
   488  	// combination 15/16
   489  	{
   490  		t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker")
   491  		inner := struct {
   492  			http.ResponseWriter
   493  			http.Flusher
   494  			http.CloseNotifier
   495  			http.Hijacker
   496  		}{}
   497  		w := Wrap(inner, Hooks{})
   498  		if _, ok := w.(http.ResponseWriter); ok != true {
   499  			t.Error("unexpected interface")
   500  		}
   501  		if _, ok := w.(http.Flusher); ok != true {
   502  			t.Error("unexpected interface")
   503  		}
   504  		if _, ok := w.(http.CloseNotifier); ok != true {
   505  			t.Error("unexpected interface")
   506  		}
   507  		if _, ok := w.(http.Hijacker); ok != true {
   508  			t.Error("unexpected interface")
   509  		}
   510  		if _, ok := w.(io.ReaderFrom); ok != false {
   511  			t.Error("unexpected interface")
   512  		}
   513  
   514  		if w, ok := w.(Unwrapper); ok {
   515  			if w.Unwrap() != inner {
   516  				t.Error("w.Unwrap() failed")
   517  			}
   518  		} else {
   519  			t.Error("Unwrapper interface not implemented")
   520  		}
   521  	}
   522  
   523  	// combination 16/16
   524  	{
   525  		t.Log("http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom")
   526  		inner := struct {
   527  			http.ResponseWriter
   528  			http.Flusher
   529  			http.CloseNotifier
   530  			http.Hijacker
   531  			io.ReaderFrom
   532  		}{}
   533  		w := Wrap(inner, Hooks{})
   534  		if _, ok := w.(http.ResponseWriter); ok != true {
   535  			t.Error("unexpected interface")
   536  		}
   537  		if _, ok := w.(http.Flusher); ok != true {
   538  			t.Error("unexpected interface")
   539  		}
   540  		if _, ok := w.(http.CloseNotifier); ok != true {
   541  			t.Error("unexpected interface")
   542  		}
   543  		if _, ok := w.(http.Hijacker); ok != true {
   544  			t.Error("unexpected interface")
   545  		}
   546  		if _, ok := w.(io.ReaderFrom); ok != true {
   547  			t.Error("unexpected interface")
   548  		}
   549  
   550  		if w, ok := w.(Unwrapper); ok {
   551  			if w.Unwrap() != inner {
   552  				t.Error("w.Unwrap() failed")
   553  			}
   554  		} else {
   555  			t.Error("Unwrapper interface not implemented")
   556  		}
   557  	}
   558  
   559  }