Compare commits

...

2 Commits

Author SHA1 Message Date
Eduard S
bffc894c62 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")
	}
}
```
2020-04-09 16:59:02 +02:00
Eduard S
3d81ae3d8b Test break in 386 2020-04-09 16:38:21 +02:00
2 changed files with 23 additions and 2 deletions

View File

@@ -4,12 +4,22 @@ language: go
go:
- "1.12"
# Travis overrides the GOARCH env var probably in its `travis_setup_go`
# function, so we need a work around...
jobs:
include:
- name: "Unit Tests 64 bit arch"
env: GOARCH="amd64"
env:
- XGOARCH="amd64"
- name: "Unit Test 32 bit arch"
env: GOARCH="386"
env:
- XGOARCH="386"
env:
- GO111MODULE=on
before_install:
- export GOARCH=$XGOARCH
script:
- go test -v ./...

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)
}