Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testReverseBytes (0.14 sec)

  1. src/math/bits/bits_test.go

    		{0x0123456789ab, 0xab8967452301 << 16},
    		{0x0123456789abcd, 0xcdab8967452301 << 8},
    		{0x0123456789abcdef, 0xefcdab8967452301 << 0},
    	} {
    		testReverseBytes(t, test.x, test.r)
    		testReverseBytes(t, test.r, test.x)
    	}
    }
    
    func testReverseBytes(t *testing.T, x64, want64 uint64) {
    	x16 := uint16(x64)
    	got16 := ReverseBytes16(x16)
    	want16 := uint16(want64 >> (64 - 16))
    	if got16 != want16 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 22 20:11:06 UTC 2020
    - 32.5K bytes
    - Viewed (0)
Back to top