testify icon indicating copy to clipboard operation
testify copied to clipboard

Use reflect.Value.Pointer() to compare pointers

Open AlexanderYastrebov opened this issue 3 years ago • 1 comments

Summary

Use reflect.Value.Pointer() to compare pointers

Changes

Updates samePointers implementation and adds test cases

Motivation

This is needed to check if map, slice and other built-in types point to the same value

Related issues

Fixes #1076

AlexanderYastrebov avatar Nov 08 '22 14:11 AlexanderYastrebov

@dolmen quick ping as @AlexanderYastrebov has updated based on your feedback

stevenh avatar Sep 09 '24 09:09 stevenh