mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
testing: add Testing function
This is new in Go 1.21.
This commit is contained in:
committed by
Ron Evans
parent
215dd3f0be
commit
c25dd0a972
Vendored
+3
@@ -73,6 +73,9 @@ func fakeMatchString(pat, str string) (bool, error) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
if testing.Testing() {
|
||||
println("not running a test at the moment, testing.Testing() should return false")
|
||||
}
|
||||
testing.Init()
|
||||
flag.Set("test.run", ".*/B")
|
||||
m := testing.MainStart(matchStringOnly(fakeMatchString /*regexp.MatchString*/), tests, benchmarks, fuzzes, examples)
|
||||
|
||||
Reference in New Issue
Block a user