The name of 'list' has been changed to 'array'; from now on, 'list' will refer to the linked list.
This commit is contained in:
+9
-9
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func TestNewListIterator(t *testing.T) {
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it := NewListIterator(a, []any{1, 3, 1})
|
||||
if item, err := it.Next(); err != nil {
|
||||
t.Errorf("error: %v", err)
|
||||
@@ -24,7 +24,7 @@ func TestNewListIterator(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNewListIterator2(t *testing.T) {
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it := NewListIterator(a, []any{3, 1, -1})
|
||||
if item, err := it.Next(); err != nil {
|
||||
t.Errorf("error: %v", err)
|
||||
@@ -36,7 +36,7 @@ func TestNewListIterator2(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNewListIterator3(t *testing.T) {
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it := NewListIterator(a, []any{1, -1, 1})
|
||||
if item, err := it.Next(); err != nil {
|
||||
t.Errorf("error: %v", err)
|
||||
@@ -93,7 +93,7 @@ func TestNewIterList5(t *testing.T) {
|
||||
|
||||
func TestNewIterList6(t *testing.T) {
|
||||
ctx := NewSimpleStore()
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it1, _ := NewIterator(ctx, a, nil)
|
||||
it, _ := NewIterator(ctx, it1, nil)
|
||||
if item, err := it.Next(); err != nil {
|
||||
@@ -115,7 +115,7 @@ func TestNewString(t *testing.T) {
|
||||
|
||||
func TestHasOperation(t *testing.T) {
|
||||
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it := NewListIterator(a, []any{1, 3, 1})
|
||||
hasOp := it.HasOperation("reset")
|
||||
if !hasOp {
|
||||
@@ -125,7 +125,7 @@ func TestHasOperation(t *testing.T) {
|
||||
|
||||
func TestCallOperationReset(t *testing.T) {
|
||||
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it := NewListIterator(a, []any{1, 3, 1})
|
||||
if v, err := it.CallOperation("reset", nil); err != nil {
|
||||
t.Errorf("Error on CallOperation(reset): %v", err)
|
||||
@@ -136,7 +136,7 @@ func TestCallOperationReset(t *testing.T) {
|
||||
|
||||
func TestCallOperationIndex(t *testing.T) {
|
||||
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it := NewListIterator(a, []any{1, 3, 1})
|
||||
if v, err := it.CallOperation("index", nil); err != nil {
|
||||
t.Errorf("Error on CallOperation(index): %v", err)
|
||||
@@ -147,7 +147,7 @@ func TestCallOperationIndex(t *testing.T) {
|
||||
|
||||
func TestCallOperationCount(t *testing.T) {
|
||||
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it := NewListIterator(a, []any{1, 3, 1})
|
||||
if v, err := it.CallOperation("count", nil); err != nil {
|
||||
t.Errorf("Error on CallOperation(count): %v", err)
|
||||
@@ -158,7 +158,7 @@ func TestCallOperationCount(t *testing.T) {
|
||||
|
||||
func TestCallOperationUnknown(t *testing.T) {
|
||||
|
||||
a := array.NewListA("a", "b", "c", "d")
|
||||
a := array.NewArrayA("a", "b", "c", "d")
|
||||
it := NewListIterator(a, []any{1, 3, 1})
|
||||
if v, err := it.CallOperation("unknown", nil); err == nil {
|
||||
t.Errorf("Expected error on CallOperation(unknown), got %v", v)
|
||||
|
||||
Reference in New Issue
Block a user