aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fuse.go10
-rw-r--r--test/prove.go21
2 files changed, 20 insertions, 11 deletions
diff --git a/test/fuse.go b/test/fuse.go
index f64a087965..e9205dcc23 100644
--- a/test/fuse.go
+++ b/test/fuse.go
@@ -33,7 +33,7 @@ func fEqLessU(a uint, f float64) bool {
}
func fEqLeqU(a uint64, f float64) bool {
- return a == 0 && f > Cf2 || a <= 0 && f < -Cf2 // ERROR "Redirect Leq64U based on Eq64$"
+ return a == 0 && f > Cf2 || a <= 0 && f < -Cf2 // ERROR "Redirect Eq64 based on Eq64$"
}
func fNeqEq(a int, f float64) bool {
@@ -58,7 +58,7 @@ func fNeqLessU(a uint, f float64) bool {
}
func fNeqLeqU(a uint32, f float64) bool {
- return a != 0 && f > Cf2 || a <= 0 && f < -Cf2 // ERROR "Redirect Leq32U based on Neq32$"
+ return a != 2 && f > Cf2 || a <= 2 && f < -Cf2 // ERROR "Redirect Leq32U based on Neq32$"
}
func fLessEq(a int, f float64) bool {
@@ -110,11 +110,11 @@ func fLessULeqU(a uint64, f float64) bool {
}
func fLeqUEq(a uint8, f float64) bool {
- return a <= 0 && f > Cf2 || a == 0 && f < -Cf2 // ERROR "Redirect Eq8 based on Leq8U$"
+ return a <= 2 && f > Cf2 || a == 2 && f < -Cf2 // ERROR "Redirect Eq8 based on Leq8U$"
}
func fLeqUNeq(a uint16, f float64) bool {
- return a <= 0 && f > Cf2 || a != 0 && f < -Cf2 // ERROR "Redirect Neq16 based on Leq16U$"
+ return a <= 2 && f > Cf2 || a != 2 && f < -Cf2 // ERROR "Redirect Neq16 based on Leq16U$"
}
func fLeqLessU(a uint32, f float64) bool {
@@ -122,7 +122,7 @@ func fLeqLessU(a uint32, f float64) bool {
}
func fLeqLeqU(a uint64, f float64) bool {
- return a <= 0 && f > Cf2 || a <= 0 && f < -Cf2 // ERROR "Redirect Leq64U based on Leq64U$"
+ return a <= 2 && f > Cf2 || a <= 2 && f < -Cf2 // ERROR "Redirect Leq64U based on Leq64U$"
}
// Arg tests are disabled because the op name is different on amd64 and arm64.
diff --git a/test/prove.go b/test/prove.go
index 1aea282291..0d93db905a 100644
--- a/test/prove.go
+++ b/test/prove.go
@@ -396,8 +396,11 @@ func f13e(a int) int {
return 0
}
-func f13f(a int64) int64 {
- if a > math.MaxInt64 {
+func f13f(a, b int64) int64 {
+ if b != math.MaxInt64 {
+ return 42
+ }
+ if a > b {
if a == 0 { // ERROR "Disproved Eq64$"
return 1
}
@@ -869,9 +872,12 @@ func unrollInclStepTooLarge(a []int) int {
}
// Not an induction variable (min too small, iterating down)
-func unrollDecMin(a []int) int {
+func unrollDecMin(a []int, b int) int {
+ if b != math.MinInt64 {
+ return 42
+ }
var i, x int
- for i = len(a); i >= math.MinInt64; i -= 2 {
+ for i = len(a); i >= b; i -= 2 {
x += a[i-1]
x += a[i-2]
}
@@ -882,9 +888,12 @@ func unrollDecMin(a []int) int {
}
// Not an induction variable (min too small, iterating up -- perhaps could allow, but why bother?)
-func unrollIncMin(a []int) int {
+func unrollIncMin(a []int, b int) int {
+ if b != math.MinInt64 {
+ return 42
+ }
var i, x int
- for i = len(a); i >= math.MinInt64; i += 2 {
+ for i = len(a); i >= b; i += 2 {
x += a[i-1]
x += a[i-2]
}