Browse Source

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")
	}
}
```
feature/travis386
Eduard S 4 years ago
parent
commit
bffc894c62
3 changed files with 12 additions and 13 deletions
  1. +1
    -1
      .travis.yml
  2. +0
    -12
      utils/break_test.go
  3. +11
    -0
      utils/showarchbits_test.go

+ 1
- 1
.travis.yml

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

+ 0
- 12
utils/break_test.go

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

+ 11
- 0
utils/showarchbits_test.go

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

Loading…
Cancel
Save