pkg/vm/stack: s,testPeakInteger,testPeakInteger,

Fix obvious typo.
This commit is contained in:
Roman Khimov 2019-08-12 17:16:47 +03:00
parent 1fb66d6b73
commit 6be27ad4b0
2 changed files with 3 additions and 3 deletions

View file

@ -97,7 +97,7 @@ func TestStackPeekMutability(t *testing.T) {
testStack.Push(a).Push(b) testStack.Push(a).Push(b)
peekedItem := testPeakInteger(t, testStack, 0) peekedItem := testPeekInteger(t, testStack, 0)
assert.Equal(t, true, peekedItem.Equal(b)) assert.Equal(t, true, peekedItem.Equal(b))
// Check that by modifying the peeked value, // Check that by modifying the peeked value,
@ -122,7 +122,7 @@ func TestStackPeek(t *testing.T) {
// i starts at 0, j starts at len(values)-1 // i starts at 0, j starts at len(values)-1
for i, j := 0, len(values)-1; j >= 0; i, j = i+1, j-1 { for i, j := 0, len(values)-1; j >= 0; i, j = i+1, j-1 {
peekedItem := testPeakInteger(t, testStack, uint16(i)) peekedItem := testPeekInteger(t, testStack, uint16(i))
a := testMakeStackInt(t, values[j]) a := testMakeStackInt(t, values[j])
fmt.Printf("%#v\n", peekedItem.val.Int64()) fmt.Printf("%#v\n", peekedItem.val.Int64())

View file

@ -10,7 +10,7 @@ import (
) )
// helper functions // helper functions
func testPeakInteger(t *testing.T, tStack *RandomAccess, n uint16) *Int { func testPeekInteger(t *testing.T, tStack *RandomAccess, n uint16) *Int {
stackElement, err := tStack.Peek(n) stackElement, err := tStack.Peek(n)
assert.Nil(t, err) assert.Nil(t, err)
item, err := stackElement.Integer() item, err := stackElement.Integer()