main (test): add tests to tinygo test

This commit is contained in:
Nia Waldvogel
2022-01-02 12:13:32 -05:00
committed by Nia
parent 21b89ef327
commit d86dd642b3
6 changed files with 234 additions and 46 deletions
+10
View File
@@ -0,0 +1,10 @@
package builderr
import _ "unsafe"
//go:linkname x notARealFunction
func x()
func Thing() {
x()
}
+11
View File
@@ -0,0 +1,11 @@
package builderr_test
import (
"testing"
"github.com/tinygo-org/tinygo/tests/testing/builderr"
)
func TestThing(t *testing.T) {
builderr.Thing()
}
+7
View File
@@ -0,0 +1,7 @@
package fail_test
import "testing"
func TestFail(t *testing.T) {
t.Error("fail")
}
+3
View File
@@ -0,0 +1,3 @@
package nothing
// This package has no tests.
+7
View File
@@ -0,0 +1,7 @@
package pass_test
import "testing"
func TestPass(t *testing.T) {
// This test passes.
}