Golang testing> package load
I am having a problem with inline testing for go lang.
I keep getting this error.
> go test
> can't load package: package .: found packages main (calculator.go) and calculator (calculator_test.go) in
calculator.go
package main
func main() {
}
calculator_test.go
package calculator
import "testing"
func TestAdd(t *testing.T) {
result := Add(1, 3)
if result != 4 {
t.Fail()
}
}
+3
source to share