You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
1.2 KiB

  1. // Copyright 2016 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build go1.7
  5. package nettest
  6. import "testing"
  7. func testConn(t *testing.T, mp MakePipe) {
  8. // Use subtests on Go 1.7 and above since it is better organized.
  9. t.Run("BasicIO", func(t *testing.T) { timeoutWrapper(t, mp, testBasicIO) })
  10. t.Run("PingPong", func(t *testing.T) { timeoutWrapper(t, mp, testPingPong) })
  11. t.Run("RacyRead", func(t *testing.T) { timeoutWrapper(t, mp, testRacyRead) })
  12. t.Run("RacyWrite", func(t *testing.T) { timeoutWrapper(t, mp, testRacyWrite) })
  13. t.Run("ReadTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testReadTimeout) })
  14. t.Run("WriteTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testWriteTimeout) })
  15. t.Run("PastTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testPastTimeout) })
  16. t.Run("PresentTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testPresentTimeout) })
  17. t.Run("FutureTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testFutureTimeout) })
  18. t.Run("CloseTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testCloseTimeout) })
  19. t.Run("ConcurrentMethods", func(t *testing.T) { timeoutWrapper(t, mp, testConcurrentMethods) })
  20. }