Commit 6a38036
authored
Fix integer overflows in test when run on 32bit systems (#1479)
## Fixes Or Enhances
While 32bit systems are becoming rarer, Debian still fully supports
`armhf`. On such systems, `TestLuhnChecksumValidation` fails because
some of the integer values overflow without an explicit cast to `int64`.
```
# github.com/go-playground/validator/v10 [github.com/go-playground/validator/v10.test]
./validator_test.go:13914:4: cannot use 586824160825533338 (untyped int constant) as int value in struct literal (overflows)
./validator_test.go:13917:4: cannot use 586824160825533328 (untyped int constant) as int value in struct literal (overflows)
./validator_test.go:13919:4: cannot use 10000000116 (untyped int constant) as int value in struct literal (overflows)
./validator_test.go:13921:4: cannot use 10000000117 (untyped int constant) as int value in struct literal (overflows)
```
**Make sure that you've checked the boxes below before you submit PR:**
- [x] Tests exist or have been written that cover this particular
change.
@go-playground/validator-maintainers
Signed-off-by: Mathias Gibbens <gibmat@debian.org>1 parent 2d3af3d commit 6a38036
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13911 | 13911 | | |
13912 | 13912 | | |
13913 | 13913 | | |
13914 | | - | |
| 13914 | + | |
13915 | 13915 | | |
13916 | 13916 | | |
13917 | | - | |
| 13917 | + | |
13918 | 13918 | | |
13919 | | - | |
| 13919 | + | |
13920 | 13920 | | |
13921 | | - | |
| 13921 | + | |
13922 | 13922 | | |
13923 | 13923 | | |
13924 | 13924 | | |
| |||
0 commit comments