mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 16:03:41 +00:00
main (test): add tests to tinygo test
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package builderr
|
||||
|
||||
import _ "unsafe"
|
||||
|
||||
//go:linkname x notARealFunction
|
||||
func x()
|
||||
|
||||
func Thing() {
|
||||
x()
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package builderr_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/tinygo-org/tinygo/tests/testing/builderr"
|
||||
)
|
||||
|
||||
func TestThing(t *testing.T) {
|
||||
builderr.Thing()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package fail_test
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestFail(t *testing.T) {
|
||||
t.Error("fail")
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package nothing
|
||||
|
||||
// This package has no tests.
|
||||
@@ -0,0 +1,7 @@
|
||||
package pass_test
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestPass(t *testing.T) {
|
||||
// This test passes.
|
||||
}
|
||||
Reference in New Issue
Block a user