Created
April 23, 2014 13:49
-
-
Save sajoku/11215877 to your computer and use it in GitHub Desktop.
Failing go tests
This file contains 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
### 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