Skip to content

Commit

Permalink
Fix EBCDIC1047 prefixer description (#333)
Browse files Browse the repository at this point in the history
* fix EBCDIC1047 prefixer description

* update EBCDIC1047 tests to new Inspect string
  • Loading branch information
Inuart authored Oct 27, 2024
1 parent 4f68b04 commit 8c09e82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions prefix/ebcdic1047.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (p *ebcdic1047Prefixer) DecodeLength(maxLen int, data []byte) (int, int, er
}

func (p *ebcdic1047Prefixer) Inspect() string {
return fmt.Sprintf("EBCDIC.%s", strings.Repeat("L", p.digits))
return fmt.Sprintf("EBCDIC1047.%s", strings.Repeat("L", p.digits))
}

type ebcdic1047FixedPrefixer struct{}
Expand All @@ -80,5 +80,5 @@ func (p *ebcdic1047FixedPrefixer) DecodeLength(fixLen int, data []byte) (int, in
}

func (p *ebcdic1047FixedPrefixer) Inspect() string {
return "EBCDIC.Fixed"
return "EBCDIC1047.Fixed"
}
10 changes: 5 additions & 5 deletions prefix/ebcdic1047_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ func TestEBCDIC1047PrefixersDecodeErrors(t *testing.T) {

func TestEBCDIC1047PrefixersInspect(t *testing.T) {
t.Parallel()
require.Equal(t, "EBCDIC.Fixed", EBCDIC1047.Fixed.Inspect())
require.Equal(t, "EBCDIC.L", EBCDIC1047.L.Inspect())
require.Equal(t, "EBCDIC.LL", EBCDIC1047.LL.Inspect())
require.Equal(t, "EBCDIC.LLL", EBCDIC1047.LLL.Inspect())
require.Equal(t, "EBCDIC.LLLL", EBCDIC1047.LLLL.Inspect())
require.Equal(t, "EBCDIC1047.Fixed", EBCDIC1047.Fixed.Inspect())
require.Equal(t, "EBCDIC1047.L", EBCDIC1047.L.Inspect())
require.Equal(t, "EBCDIC1047.LL", EBCDIC1047.LL.Inspect())
require.Equal(t, "EBCDIC1047.LLL", EBCDIC1047.LLL.Inspect())
require.Equal(t, "EBCDIC1047.LLLL", EBCDIC1047.LLLL.Inspect())
}

0 comments on commit 8c09e82

Please sign in to comment.