Skip to content

Instantly share code, notes, and snippets.

@nickgrim
Created March 19, 2020 18:29
Show Gist options
  • Select an option

  • Save nickgrim/249ca5844f530f1a012d1251cc7651d6 to your computer and use it in GitHub Desktop.

Select an option

Save nickgrim/249ca5844f530f1a012d1251cc7651d6 to your computer and use it in GitHub Desktop.
$ go vet main_test.go
# command-line-arguments
./main_test.go:12:1: Testsomething has malformed name: first letter after 'Test' must not be lowercase
$ go test -v
=== RUN TestSomething
upper case
--- PASS: TestSomething (0.00s)
=== RUN Test_something
underscore
--- PASS: Test_something (0.00s)
PASS
ok something 0.002s
package main
import (
"fmt"
"testing"
)
func TestSomething(t *testing.T) {
fmt.Println("upper case")
}
func Testsomething(t *testing.T) {
fmt.Println("lower case")
}
func Test_something(t *testing.T) {
fmt.Println("underscore")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment