Skip to content

Commit

Permalink
Moved identicalByteArray back to where it was
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobht committed Oct 31, 2024
1 parent e30187e commit 7c171a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions common/types/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ package types

import (
"testing"
"unsafe"

"github.com/stretchr/testify/assert"
)
Expand Down Expand Up @@ -619,8 +618,3 @@ func TestGetWorkflowExecutionRawHistoryV2Response_GetVersionHistory(t *testing.T
func ptrInt64(i int64) *int64 {
return &i
}

// identicalByteArray returns true if a and b are the same slice, false otherwise.
func identicalByteArray(a, b []byte) bool {
return len(a) == len(b) && unsafe.SliceData(a) == unsafe.SliceData(b)
}
6 changes: 6 additions & 0 deletions common/types/shared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ package types

import (
"testing"
"unsafe"

"github.com/stretchr/testify/assert"
)
Expand Down Expand Up @@ -68,3 +69,8 @@ func TestDataBlobDeepCopy(t *testing.T) {
})
}
}

// identicalByteArray returns true if a and b are the same slice, false otherwise.
func identicalByteArray(a, b []byte) bool {
return len(a) == len(b) && unsafe.SliceData(a) == unsafe.SliceData(b)
}

0 comments on commit 7c171a9

Please sign in to comment.