refactor objects
Some checks failed
Publish Image / publish (push) Waiting to run
Test / build (push) Waiting to run
Build / build (push) Has been cancelled

This commit is contained in:
2024-04-01 17:34:10 -04:00
parent 803f330e82
commit 99f7553d67
15 changed files with 101 additions and 94 deletions

View File

@@ -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) {