mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: add tests bruteforcing limit complement
Change-Id: I9d8bd78a06738a8a242b6965382e61568e93dea7 Reviewed-on: https://go-review.googlesource.com/c/go/+/724620 Auto-Submit: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
parent
437d2362ce
commit
37ce4adcd4
1 changed files with 7 additions and 0 deletions
|
|
@ -67,3 +67,10 @@ func TestLimitNegSigned(t *testing.T) {
|
||||||
func TestLimitNegUnsigned(t *testing.T) {
|
func TestLimitNegUnsigned(t *testing.T) {
|
||||||
testLimitUnaryOpUnsigned8(t, "neg", limit.neg, func(x uint8) uint8 { return -x })
|
testLimitUnaryOpUnsigned8(t, "neg", limit.neg, func(x uint8) uint8 { return -x })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestLimitComSigned(t *testing.T) {
|
||||||
|
testLimitUnaryOpSigned8(t, "com", limit.com, func(x int8) int8 { return ^x })
|
||||||
|
}
|
||||||
|
func TestLimitComUnsigned(t *testing.T) {
|
||||||
|
testLimitUnaryOpUnsigned8(t, "com", limit.com, func(x uint8) uint8 { return ^x })
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue