Skip to content

Commit

Permalink
Improve Scope Usage Consistence in all Tests (#387)
Browse files Browse the repository at this point in the history
* improve tests scope consistence

* address comment

* missing tfatal
  • Loading branch information
TAdev0 committed May 7, 2024
1 parent bc4b012 commit d8467f6
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 166 deletions.
10 changes: 8 additions & 2 deletions pkg/hintrunner/zero/zerohint_dictionaries_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ func TestZeroHintDictionaries(t *testing.T) {
{
operanders: []*hintOperander{},
ctxInit: func(ctx *hinter.HintRunnerContext) {
ctx.ScopeManager.EnterScope(map[string]any{"keys": []fp.Element{}})
err := ctx.ScopeManager.AssignVariable("keys", []fp.Element{})
if err != nil {
t.Fatal(err)
}
},
makeHinter: func(ctx *hintTestContext) hinter.Hinter {
return newSquashDictInnerAssertLenKeysHint()
Expand All @@ -23,7 +26,10 @@ func TestZeroHintDictionaries(t *testing.T) {
{
operanders: []*hintOperander{},
ctxInit: func(ctx *hinter.HintRunnerContext) {
ctx.ScopeManager.EnterScope(map[string]any{"keys": []fp.Element{*feltUint64(1), *feltUint64(2)}})
err := ctx.ScopeManager.AssignVariable("keys", []fp.Element{*feltUint64(1), *feltUint64(2)})
if err != nil {
t.Fatal(err)
}
},
makeHinter: func(ctx *hintTestContext) hinter.Hinter {
return newSquashDictInnerAssertLenKeysHint()
Expand Down
Loading

0 comments on commit d8467f6

Please sign in to comment.