Fix VM memory allocation optimizations by reducing what we allocate on the heap
This commit is contained in:
@@ -3,10 +3,10 @@ package object
|
||||
import "testing"
|
||||
|
||||
func TestStringHashKey(t *testing.T) {
|
||||
hello1 := &String{Value: "Hello World"}
|
||||
hello2 := &String{Value: "Hello World"}
|
||||
diff1 := &String{Value: "My name is johnny"}
|
||||
diff2 := &String{Value: "My name is johnny"}
|
||||
hello1 := String{Value: "Hello World"}
|
||||
hello2 := String{Value: "Hello World"}
|
||||
diff1 := String{Value: "My name is johnny"}
|
||||
diff2 := String{Value: "My name is johnny"}
|
||||
|
||||
if hello1.HashKey() != hello2.HashKey() {
|
||||
t.Errorf("string with same content have different hash keys")
|
||||
|
||||
Reference in New Issue
Block a user