mirror of https://github.com/tinygo-org/tinygo.git
wasmstm32webassemblymicrocontrollerarmavrspiwasiadafruitarduinocircuitplayground-expressgpioi2cllvmmicrobitnrf51nrf52nrf52840samd21tinygo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
763 B
42 lines
763 B
package main
|
|
|
|
// TODO: also test the verbose version.
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestFoo(t *testing.T) {
|
|
t.Log("log Foo.a")
|
|
t.Log("log Foo.b")
|
|
}
|
|
|
|
func TestBar(t *testing.T) {
|
|
t.Log("log Bar")
|
|
t.Log("log g\nh\ni\n")
|
|
t.Run("Bar1", func(t *testing.T) {})
|
|
t.Run("Bar2", func(t *testing.T) {
|
|
t.Log("log Bar2\na\nb\nc")
|
|
t.Error("failed")
|
|
t.Log("after failed")
|
|
})
|
|
t.Run("Bar3", func(t *testing.T) {})
|
|
t.Log("log Bar end")
|
|
}
|
|
|
|
var tests = []testing.InternalTest{
|
|
{"TestFoo", TestFoo},
|
|
{"TestBar", TestBar},
|
|
}
|
|
|
|
var benchmarks = []testing.InternalBenchmark{}
|
|
|
|
var examples = []testing.InternalExample{}
|
|
|
|
func main() {
|
|
m := testing.MainStart(nil, tests, benchmarks, examples)
|
|
exitcode := m.Run()
|
|
if exitcode != 0 {
|
|
println("exitcode:", exitcode)
|
|
}
|
|
}
|
|
|