title: Test Naming Conventions in Golang
body: <p>I'm trying to unit test a Go package for the first time, and I have a couple of errors in the same file.</p>
  
  <pre><code>type FooErr int
  type BarErr int
  
  func (e *FooErr) Error () string {
      return "A Foo Error has occurred"
  }
  
  func (e *BarErr) Error () string {
      return "A Bar Error has occurred"
  }
  </code></pre>
  
  <p>However, all naming conventions seem to look like this <code>func TestXxx(*testing.T)</code> (<a href="http://golang.org/pkg/testing/" rel="noreferrer">from the <code>testing</code> package documentation</a>). This would mean my testing file would look like this:</p>
  
  <pre><code>func TestError (t *testing.T) { ... } // FooErr
  func TestError (t *testing.T) { ... } // BarErr
  </code></pre>
  
  <p>Which is obviously two functions of the same signature. What is the recommended method for handling this?</p>