mirror of
https://github.com/golang/go.git
synced 2026-01-29 23:22:06 +03: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:
@@ -67,3 +67,10 @@ func TestLimitNegSigned(t *testing.T) {
|
||||
func TestLimitNegUnsigned(t *testing.T) {
|
||||
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 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user