Skip to content

Instantly share code, notes, and snippets.

@sajoku
Created April 23, 2014 13:49
Show Gist options
  • Save sajoku/11215877 to your computer and use it in GitHub Desktop.
Save sajoku/11215877 to your computer and use it in GitHub Desktop.
Failing go tests
### thingy.go
package main
func main() {
}
func createLogger() string{
return "test"
}
### thingy_test.go
package main
import(
"testing"
)
func TestCreateLogger(t *testing.T) {
r := createLogger()
if r != "test"{
t.Error("Something borked")
}
}
####
This outputs:
# command-line-arguments
test/thingy_test.go:8: undefined: createLogger
FAIL command-line-arguments [build failed]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment