Skip to content

Commit

Permalink
Fix a typo in the codec interface test. The dummy used to test the re…
Browse files Browse the repository at this point in the history
…lay didn't care, but real implmentations will have a decoding error (#224)
  • Loading branch information
nolag authored and reductionista committed Dec 1, 2023
1 parent 0c278da commit 6a7a6e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/loop/internal/test/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (c staticChainReader) Decode(ctx context.Context, raw []byte, into any, ite
return errors.New("not used for these test")
}

func (f staticChainReader) GetLatestValue(ctx context.Context, bc types.BoundContract, method string, params, returnVal any) error {
func (c staticChainReader) GetLatestValue(ctx context.Context, bc types.BoundContract, method string, params, returnVal any) error {
if !assert.ObjectsAreEqual(bc, boundContract) {
return fmt.Errorf("expected report context %v but got %v", boundContract, bc)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/interfacetests/codec_interface_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func RunChainReaderInterfaceTests(t *testing.T, tester ChainReaderInterfaceTeste
assert.Equal(t, resp, actualEncoding)

var into [1]TestStruct
require.NoError(t, codec.Decode(ctx, actualEncoding, &into, TestItemArray2Type))
require.NoError(t, codec.Decode(ctx, actualEncoding, &into, TestItemArray1Type))
assert.Equal(t, items, into)
},
"Returns an error if type is undefined": func(t *testing.T) {
Expand Down

0 comments on commit 6a7a6e8

Please sign in to comment.