From c23a601cc69c594c8ae78ea5fa71240623080204 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Mon, 1 Jun 2015 09:33:08 +0200 Subject: [PATCH] Random number is too large for 32 bit archs (fixes #1894) --- cmd/syncthing/random_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/syncthing/random_test.go b/cmd/syncthing/random_test.go index 3977b2a77..05d7efd80 100644 --- a/cmd/syncthing/random_test.go +++ b/cmd/syncthing/random_test.go @@ -7,6 +7,7 @@ package main import ( + "runtime" "sync" "testing" ) @@ -14,10 +15,13 @@ import ( var predictableRandomTest sync.Once func TestPredictableRandom(t *testing.T) { + if runtime.GOARCH != "amd64" { + t.Skip("Test only for 64 bit platforms; but if it works there, it should work on 32 bit") + } predictableRandomTest.Do(func() { // predictable random sequence is predictable - e := 3440579354231278675 - if v := predictableRandom.Int(); v != e { + e := int64(3440579354231278675) + if v := int64(predictableRandom.Int()); v != e { t.Errorf("Unexpected random value %d != %d", v, e) } })