Please follow the Go Community Code of Conduct while posting here. https://go.dev/conduct
On Monday, May 2, 2022 at 11:00:14 AM UTC-4 psi....@gmail.com wrote: > #1 the two functions need to behave identically according to the syntax of > the language. > > #2 this is how working code operates, so testing needs to be able to > handle it. > > at a guess; 'testing' would appear to have some non-compliant reflection > going on, in this edge-case. > > but anyway; your reply has no relevance i can decern, and replying like > this can put off useful comments. please don't get huffy i don't have the > time/interest, just don't comment anymore. > > On Monday, 2 May 2022 at 03:32:46 UTC+1 peterGo wrote: > >> It looks like you have a bug in your code. >> >> "In tests, standard output is accumulated during execution and dumped to >> standard output when done." >> >> "Example functions may include a concluding line comment that begins with >> "Output:" and is compared with the standard output of the function when the >> tests are run." >> >> In ExampleMain(), you improperly used the os.Stdout variable value as of >> the testing package initialization. >> >> In ExampleMain2(), you properly used the os.Stdout variable value as of >> when the function was run. >> >> testing package >> https://pkg.go.dev/testing@latest >> >> Peter >> >> On Sunday, May 1, 2022 at 8:03:29 PM UTC-4 psi....@gmail.com wrote: >> >>> this caught me out, is it a bug? >>> >>> https://go.dev/play/p/atJb8dZHoqi >>> >> -- 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/1f11e2b4-e7e0-4aaa-9d96-f7350806b2ecn%40googlegroups.com.