1 // $G $D/$F.go && $L $F.$A && ./$A.out
3 // Copyright 2010 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
10 m(a, b, c, d, e, f, g, h byte)
15 func (x Int8) m(a, b, c, d, e, f, g, h byte) {
16 check("Int8", int64(x), 0x01, a, b, c, d, e, f, g, h)
21 func (x Uint8) m(a, b, c, d, e, f, g, h byte) {
22 check("Uint8", int64(x), 0x01, a, b, c, d, e, f, g, h)
27 func (x Int16) m(a, b, c, d, e, f, g, h byte) {
28 check("Int16", int64(x), 0x0102, a, b, c, d, e, f, g, h)
33 func (x Uint16) m(a, b, c, d, e, f, g, h byte) {
34 check("Uint16", int64(x), 0x0102, a, b, c, d, e, f, g, h)
39 func (x Int32) m(a, b, c, d, e, f, g, h byte) {
40 check("Int32", int64(x), 0x01020304, a, b, c, d, e, f, g, h)
45 func (x Uint32) m(a, b, c, d, e, f, g, h byte) {
46 check("Uint32", int64(x), 0x01020304, a, b, c, d, e, f, g, h)
51 func (x Int64) m(a, b, c, d, e, f, g, h byte) {
52 check("Int64", int64(x), 0x0102030405060708, a, b, c, d, e, f, g, h)
57 func (x Uint64) m(a, b, c, d, e, f, g, h byte) {
58 check("Uint64", int64(x), 0x0102030405060708, a, b, c, d, e, f, g, h)
68 Int64(0x0102030405060708),
69 Uint64(0x0102030405060708),
73 for _, t := range test {
74 t.m(0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)
80 func check(desc string, have, want int64, a, b, c, d, e, f, g, h byte) {
81 if have != want || a != 0x10 || b != 0x11 || c != 0x12 || d != 0x13 || e != 0x14 || f != 0x15 || g != 0x16 || h != 0x17 {
86 println(desc, "check", have, want, a, b, c, d, e, f, g, h)