Fix Travis to really test 32 bits

To make sure 32 bits arch is being tested, try the following test which should
fail in 32 bits mode:
```go
package utils

import (
	"math/bits"
	"testing"
)

func TestBreak(t *testing.T) {
	if bits.UintSize != 64 {
		panic("bits.UintSize != 64")
	}
}
```
This commit is contained in:
Eduard S
2020-04-09 16:42:18 +02:00
parent 3d81ae3d8b
commit bffc894c62
3 changed files with 12 additions and 13 deletions

View File

@@ -22,4 +22,4 @@ before_install:
- export GOARCH=$XGOARCH
script:
- GOARCH=$XGOARCH go test -v ./...
- go test -v ./...

View File

@@ -1,12 +0,0 @@
package utils
import (
"math/bits"
"testing"
)
func TestBreak(t *testing.T) {
if bits.UintSize != 64 {
panic("bits.UintSize != 64")
}
}

View File

@@ -0,0 +1,11 @@
package utils
import (
"fmt"
"math/bits"
"testing"
)
func TestShowArchBits(t *testing.T) {
fmt.Printf("Architecture is %v bits\n", bits.UintSize)
}