refactor objects
This commit is contained in:
@@ -640,12 +640,12 @@ func TestHashLiterals(t *testing.T) {
|
||||
}
|
||||
|
||||
expected := map[object.HashKey]int64{
|
||||
(object.String{Value: "one"}).HashKey(): 1,
|
||||
(object.String{Value: "two"}).HashKey(): 2,
|
||||
(object.String{Value: "three"}).HashKey(): 3,
|
||||
(object.Integer{Value: 4}).HashKey(): 4,
|
||||
TRUE.HashKey(): 5,
|
||||
FALSE.HashKey(): 6,
|
||||
(object.String{Value: "one"}).Hash(): 1,
|
||||
(object.String{Value: "two"}).Hash(): 2,
|
||||
(object.String{Value: "three"}).Hash(): 3,
|
||||
(object.Integer{Value: 4}).Hash(): 4,
|
||||
TRUE.Hash(): 5,
|
||||
FALSE.Hash(): 6,
|
||||
}
|
||||
|
||||
if len(result.Pairs) != len(expected) {
|
||||
@@ -671,8 +671,8 @@ func TestHashMerging(t *testing.T) {
|
||||
}
|
||||
|
||||
expected := map[object.HashKey]int64{
|
||||
(object.String{Value: "a"}).HashKey(): 1,
|
||||
(object.String{Value: "b"}).HashKey(): 2,
|
||||
(object.String{Value: "a"}).Hash(): 1,
|
||||
(object.String{Value: "b"}).Hash(): 2,
|
||||
}
|
||||
|
||||
if len(result.Pairs) != len(expected) {
|
||||
|
||||
Reference in New Issue
Block a user