aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime_test.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2015-01-08 13:34:05 -0800
committerKeith Randall <khr@golang.org>2015-01-08 21:39:57 +0000
commit7b2524217e1128e8d8a7b9f9c253bf5b86dc301e (patch)
tree826f351d75eb6c8b59dc99b8b1bfa7db18b91e61 /src/runtime/runtime_test.go
parentfbe2845cdda98e5327ab6dc3ba29b3650414464d (diff)
downloadgo-7b2524217e1128e8d8a7b9f9c253bf5b86dc301e.tar.xz
runtime: fix 32-bit build
In 32-bit worlds, 8-byte objects are only aligned to 4-byte boundaries. Change-Id: I91469a9a67b1ee31dd508a4e105c39c815ecde58 Reviewed-on: https://go-review.googlesource.com/2581 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/runtime_test.go')
-rw-r--r--src/runtime/runtime_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/runtime_test.go b/src/runtime/runtime_test.go
index c4de3e247b..229d7e27ee 100644
--- a/src/runtime/runtime_test.go
+++ b/src/runtime/runtime_test.go
@@ -261,8 +261,8 @@ func TestTrailingZero(t *testing.T) {
n int64
z struct{}
}
- if unsafe.Sizeof(T2{}) != 16 {
- t.Errorf("sizeof(%#v)==%d, want 16", T2{}, unsafe.Sizeof(T2{}))
+ if unsafe.Sizeof(T2{}) != 8 + unsafe.Sizeof(Uintreg(0)) {
+ t.Errorf("sizeof(%#v)==%d, want %d", T2{}, unsafe.Sizeof(T2{}), 8 + unsafe.Sizeof(Uintreg(0)))
}
type T3 struct {
n byte