tests/alloc/gp8: allocator test using all 8-bit registers (#102)
Updates #43
This commit is contained in:
committed by
GitHub
parent
15d6a9a17e
commit
cfc6ecac41
15
tests/alloc/gp8/gp8_test.go
Normal file
15
tests/alloc/gp8/gp8_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package gp8
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
//go:generate go run asm.go -out gp8.s -stubs stub.go
|
||||
|
||||
func TestGP8(t *testing.T) {
|
||||
const n = 19
|
||||
expect := uint8(n * (n + 1) / 2)
|
||||
if got := GP8(); got != expect {
|
||||
t.Fatalf("GP8() = %d; expect %d", got, expect)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user