Hi to everyone, I’m a newbie with go. I’m using go with eclipse.
Does anyone know how to build and run a project in Eclipse with two files? I’ve created a first file with a function for test and a second file with a definition of an array of struct. They are in the same src and in the same package.
First file:
import ( "math" "testing")
func TestData(t *testing.T) {
const precision = 0.01
for _, tc := range testExamples {
actual := DataTest(tc.FirstValue, tc.SecondValue)
if ... {
t.Fatalf("FAIL: %s\nExpected: %#v\nActual: %#v", tc.description, tc.expected, actual)
}
t.Logf("PASS: %s", tc.description)
}
}
Sorry for the late response, since I was lack of time from work.
Well, maybe this should be late, but reading again, your need is about tests. Being honest I didn’t study tests in go yet. So I’m sorry for not being able to help. I’m really sorry