Skip to content

Commit

Permalink
testsuite: fix compilation faliure on 32-bit systems
Browse files Browse the repository at this point in the history
error was:
  ./testsuite_cli_test.go:71:48: constant 2147483648 overflows int
  ./testsuite_cli_test.go:72:50: constant 4294967296 overflows int
  • Loading branch information
yangfl authored and rfjakob committed Mar 29, 2020
1 parent 137a6e4 commit 4b6ad53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testsuite_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func TestCli(t *testing.T) {
memTotal, swapTotal := parseMeminfo()
mem1percent := fmt.Sprintf("%d", memTotal*1/100)
swap2percent := fmt.Sprintf("%d", swapTotal*2/100)
tooBigInt32 := fmt.Sprintf("%d", math.MaxInt32+1)
tooBigUint32 := fmt.Sprintf("%d", math.MaxUint32+1)
tooBigInt32 := fmt.Sprintf("%d", uint64(math.MaxInt32+1))
tooBigUint32 := fmt.Sprintf("%d", uint64(math.MaxUint32+1))
// earlyoom startup looks like this:
// earlyoom v1.1-5-g74a364b-dirty
// mem total: 7836 MiB, min: 783 MiB (10 %)
Expand Down

0 comments on commit 4b6ad53

Please sign in to comment.