Upload Tizen:Base source
[framework/base/util-linux-ng.git] / tests / expected / bitops / swapbytes
1 Testing swab16
2 swab16(0x0001) = 0x0100
3 swab16(0x1234) = 0x3412
4 swab16(0xff00) = 0x00ff
5 swab16(0x4000) = 0x0040
6 swab16(0xfeff) = 0xfffe
7 Testing swab32
8 swab32(0x00000001) = 0x01000000
9 swab32(0x80000000) = 0x00000080
10 swab32(0x12345678) = 0x78563412
11 swab32(0xffff0000) = 0x0000ffff
12 swab32(0x00ff0000) = 0x0000ff00
13 swab32(0xff000000) = 0x000000ff
14 Testing swab64
15 swab64(0x0000000000000001) = 0x0100000000000000
16 swab64(0x8000000000000000) = 0x0000000000000080
17 swab64(0x1234567812345678) = 0x7856341278563412
18 swab64(0xffffffff00000000) = 0x00000000ffffffff
19 swab64(0x00ff000000000000) = 0x000000000000ff00
20 swab64(0xff00000000000000) = 0x00000000000000ff
21 No errors found in the byteswap implementation