From 3ce70323e451c526c17289f3a2053579e7e1f406 Mon Sep 17 00:00:00 2001 From: jmjac Date: Sat, 21 Oct 2023 18:47:30 -0400 Subject: [PATCH] Fix camelCase --- pkg/hintrunner/hint.go | 10 +++++----- pkg/hintrunner/hint_test.go | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/hintrunner/hint.go b/pkg/hintrunner/hint.go index ee823020c..b3d8ca8ff 100644 --- a/pkg/hintrunner/hint.go +++ b/pkg/hintrunner/hint.go @@ -145,7 +145,7 @@ func (hint TestLessThanOrEqual) Execute(vm *VM.VirtualMachine) error { type LinearSplit struct { value ResOperander scalar ResOperander - max_x ResOperander + maxX ResOperander x CellRefer y CellRefer } @@ -168,11 +168,11 @@ func (hint LinearSplit) Execute(vm *VM.VirtualMachine) error { return err } - max_x, err := hint.max_x.Resolve(vm) + maxX, err := hint.maxX.Resolve(vm) if err != nil { - return fmt.Errorf("resolve max_x operand %s: %w", hint.max_x, err) + return fmt.Errorf("resolve max_x operand %s: %w", hint.maxX, err) } - max_xField, err := max_x.FieldElement() + maxXField, err := maxX.FieldElement() if err != nil { return err } @@ -181,7 +181,7 @@ func (hint LinearSplit) Execute(vm *VM.VirtualMachine) error { maxBig := &big.Int{} scalarField.BigInt(scalarBig) valueField.BigInt(valueBig) - max_xField.BigInt(maxBig) + maxXField.BigInt(maxBig) x := (&big.Int{}).Div(valueBig, scalarBig) diff --git a/pkg/hintrunner/hint_test.go b/pkg/hintrunner/hint_test.go index 9912bf452..575d50843 100644 --- a/pkg/hintrunner/hint_test.go +++ b/pkg/hintrunner/hint_test.go @@ -181,14 +181,14 @@ func TestLinearSplit(t *testing.T) { value := Immediate(*big.NewInt(42*223344 + 14)) scalar := Immediate(*big.NewInt(42)) - max_x := Immediate(*big.NewInt(9999999999)) + maxX := Immediate(*big.NewInt(9999999999)) var x ApCellRef = 0 var y ApCellRef = 1 hint := LinearSplit{ value: value, scalar: scalar, - max_x: max_x, + maxX: maxX, x: x, y: y, } @@ -205,11 +205,11 @@ func TestLinearSplit(t *testing.T) { vm.Context.Fp = 0 //Lower max_x - max_x = Immediate(*big.NewInt(223343)) + maxX = Immediate(*big.NewInt(223343)) hint = LinearSplit{ value: value, scalar: scalar, - max_x: max_x, + maxX: maxX, x: x, y: y, }