start example/test for components access
This commit is contained in:
15
examples/components/components_test.go
Normal file
15
examples/components/components_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package components
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"testing/quick"
|
||||
)
|
||||
|
||||
//go:generate go run asm.go -out components.s -stubs stub.go
|
||||
|
||||
func TestAdd(t *testing.T) {
|
||||
expect := func(x uint64, s Struct, y uint64) uint64 { return x + y }
|
||||
if err := quick.CheckEqual(Add, expect, nil); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user