1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From 125f3e0ddaa0548ead38eda365ad7e7d84bbe096 Mon Sep 17 00:00:00 2001
From https://github.com/Knetic/govaluate/pull/147
From: Pascal Terjan <pterjan@gmail.com>
Date: Tue, 29 Dec 2020 17:58:01 +0000
Subject: [PATCH] Fix evaluation_test on 32 bit architectures
Before this patch this is the result on i586:
# github.com/Knetic/govaluate [github.com/Knetic/govaluate.test]
./evaluation_test.go:1166:6: constant 2887057409 overflows int
./evaluation_test.go:1178:6: constant 2887057409 overflows int
FAIL github.com/Knetic/govaluate [build failed]
---
evaluation_test.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/evaluation_test.go b/evaluation_test.go
index d2a5fad..a9e43a9 100644
--- a/evaluation_test.go
+++ b/evaluation_test.go
@@ -1054,7 +1054,7 @@ func TestParameterizedEvaluation(test *testing.T) {
Parameters: []EvaluationParameter{
{
Name: "foo",
- Value: 2887057409,
+ Value: int64(2887057409),
},
},
Expected: true,
@@ -1065,7 +1065,7 @@ func TestParameterizedEvaluation(test *testing.T) {
Parameters: []EvaluationParameter{
{
Name: "foo",
- Value: 2887057409,
+ Value: int64(2887057409),
},
},
Expected: true,
|