Created
March 19, 2020 18:29
-
-
Save nickgrim/249ca5844f530f1a012d1251cc7651d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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