Closed ggaaooppeenngg closed 9 years ago
@ggaaooppeenngg We know that, that's why objectsAreEqual
function tries many different ways to check if the two parameters supplied return true.
If you run the following code it will print "Are Equal".
package main
import (
"fmt"
"github.com/franela/goblin"
)
func main() {
g := goblin.G{}
g.Assert(1).Equal(1)
fmt.Println("Are Equal")
}
@marcosnils I think that line is a redundant.
@ggaaooppeenngg you're right. Thanks for the catch. I'll remove that line.
about https://github.com/franela/goblin/blob/master/assertions.go#L23
I am finding some snippets about reflect ,I tried
it shows "FALSE", reflect.Value underlying structure is pointer,even they get same value,it points to different address.