Re: [go-nuts] [go test] pure Test Classes.

2023-07-26 Thread Jan Mercl
On Wed, Jul 26, 2023 at 9:44 AM sumith s  wrote:

> Currently, we do not have pure Test Classes defined by us. We are using 
> Golang specific Test Class structure. Each FILENAME_test.go will have its own 
> test class under "Golang Test".
> I'm trying to define a  pure Test Classes. how can do that?

(Go does not have classes. Go has types and types may have methods attached.)

Anyway, please explain what you mean by "pure" in "pure Test Classes".

The go tool, when invoked like "go test" looks for functions in files
matching '.*_test.go', with name matching 'Test.*' and the signature
func(t *testing.T), "testing" being the stdlib package. Such functions
will be then executed automatically during the test.

It is of course possible to write any other kind of tests and invoke
them independently of the "go test" facility, using any preferred
method of doing so.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-W4PGv00tUGs7SjmDrxecDdJJDNMwhCkdFbFWO5EYNzzA%40mail.gmail.com.


[go-nuts] [go test] pure Test Classes.

2023-07-26 Thread sumith s
Currently, we do not have pure Test Classes defined by us. We are using 
Golang specific Test Class structure. Each FILENAME_test.go will have its 
own test class under "Golang Test".
I'm trying to define a  pure Test Classes. how can do that?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8f79241f-3d01-49d8-b44e-7ce7ec1e0c12n%40googlegroups.com.