Skip to content

Commit

Permalink
test: validate files after create/read
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Nov 28, 2023
1 parent 22ef465 commit e9daf6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Go workspace file
go.work


/bin/
coverage.txt
gitleaks.tar.gz
lint-project.sh
lint-project.sh
2 changes: 2 additions & 0 deletions file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Z0000000040000000001000100000000000000000000000000000000000000000000000000000000
t.Run(name, func(t *testing.T) {
s, err := tc.file.Create()
r.NoError(err)
r.NoError(tc.file.Validate())
r.Equal(tc.expectedOutput, s)
})
}
Expand Down Expand Up @@ -245,6 +246,7 @@ Z0000000060000000001000100000000014000000000070000000001400000000007000000000000
freader := NewReader(strings.NewReader(tc.in))
f, err := freader.ReadFile()
r.NoError(err)
r.NoError(f.Validate())
r.Equal(tc.file.Header, f.Header)
r.Equal(tc.file.Footer, f.Footer)
for i := 0; i < len(tc.file.Txns); i++ {
Expand Down

0 comments on commit e9daf6d

Please sign in to comment.