...

Source file src/github.com/cespare/xxhash/xxhash_amd64_test.go

Documentation: github.com/cespare/xxhash

     1  // +build !appengine
     2  // +build gc
     3  // +build !purego
     4  
     5  package xxhash
     6  
     7  // TODO(caleb): Fix and re-enable with any ideas I get from
     8  // https://groups.google.com/d/msg/golang-nuts/wb5I2tjrwoc/xCzk6uchBgAJ
     9  
    10  //func TestSum64ASM(t *testing.T) {
    11  //        for i := 0; i < 500; i++ {
    12  //                b := make([]byte, i)
    13  //                for j := range b {
    14  //                        b[j] = byte(j)
    15  //                }
    16  //                pureGo := sum64Go(b)
    17  //                asm := Sum64(b)
    18  //                if pureGo != asm {
    19  //                        t.Fatalf("[i=%d] pure go gave 0x%x; asm gave 0x%x", i, pureGo, asm)
    20  //                }
    21  //        }
    22  //}
    23  
    24  //func TestWriteBlocksASM(t *testing.T) {
    25  //        x0 := New().(*xxh)
    26  //        x1 := New().(*xxh)
    27  //        for i := 32; i < 500; i++ {
    28  //                b := make([]byte, i)
    29  //                for j := range b {
    30  //                        b[j] = byte(j)
    31  //                }
    32  //                pureGo := writeBlocksGo(x0, b)
    33  //                asm := writeBlocks(x1, b)
    34  //                if !reflect.DeepEqual(pureGo, asm) {
    35  //                        t.Fatalf("[i=%d] pure go gave %v; asm gave %v", i, pureGo, asm)
    36  //                }
    37  //                if !reflect.DeepEqual(x0, x1) {
    38  //                        t.Fatalf("[i=%d] pure go had state %v; asm had state %v", i, x0, x1)
    39  //                }
    40  //        }
    41  //}
    42  

View as plain text