go/src/testing
Emmanuel T Odeke ac56baa09f testing: enable examples on js/wasm with non os.Pipe runExample
os.Pipe is not implemented on wasm/js so for that purpose use
a temporary file for js/wasm. This change creates two versions
of runExample:

* runExample verbatim that still uses os.Pipe for non js/wasm
* runExample that uses a temporary file

Also added a TODO to re-unify these function versions back into
example.go wasm/js gets an os.Pipe implementation.

Change-Id: I9f418a49b2c397e1667724c7442b7bbe8942225e
Reviewed-on: https://go-review.googlesource.com/c/go/+/165357
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-11 18:59:53 +00:00
..
internal/testdeps runtime/pprof: introduce "allocs" profile 2018-04-24 16:11:41 +00:00
iotest testing/iotest: fix NewReadLogger documentation typo 2017-10-19 15:59:21 +00:00
quick doc: mention testing/quick RNG seeding change in Go 1.9 notes 2017-06-27 22:41:49 +00:00
allocs.go
allocs_test.go
benchmark.go testing: fix missing verb in StartTimer doc 2019-03-04 23:07:12 +00:00
benchmark_test.go
cover.go testing/cover: improve comments on CoverBlock 2018-07-01 08:07:47 +00:00
example.go testing: enable examples on js/wasm with non os.Pipe runExample 2019-03-11 18:59:53 +00:00
export_test.go
helper_test.go testing: allow marking subtest and subbenchmark functions as Helpers 2018-05-14 17:59:59 +00:00
helperfuncs_test.go testing: allow marking subtest and subbenchmark functions as Helpers 2018-05-14 17:59:59 +00:00
match.go testing: fix typo mistake 2018-04-27 13:29:12 +00:00
match_test.go testing: harmonize handling of prefix-matched benchmarks 2017-06-20 14:19:05 +00:00
run_example.go testing: enable examples on js/wasm with non os.Pipe runExample 2019-03-11 18:59:53 +00:00
run_example_js.go testing: enable examples on js/wasm with non os.Pipe runExample 2019-03-11 18:59:53 +00:00
sub_test.go testing: report the failing test in a late log panic 2019-01-17 01:28:22 +00:00
testing.go all: join a few chained ifs 2019-03-05 20:31:32 +00:00
testing_test.go Revert "testing: add T.Context method" 2016-12-09 04:04:11 +00:00