github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/utils/hash_test.go (about)

     1  /*
     2   * Copyright (c) 2020-present unTill Pro, Ltd.
     3   * @author Denis Gribanov
     4   */
     5  
     6  package coreutils
     7  
     8  import (
     9  	"fmt"
    10  	"testing"
    11  
    12  	"github.com/stretchr/testify/require"
    13  )
    14  
    15  func TestHash(t *testing.T) {
    16  	fmt.Println(HashBytes([]byte("hello world")))
    17  	require.Equal(t, HashBytes([]byte("str1")), HashBytes([]byte("str1")))
    18  	require.NotEqual(t, HashBytes([]byte("str1")), HashBytes([]byte("str2")))
    19  }