Skip to content

Commit

Permalink
Improved test logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lflare committed Dec 26, 2021
1 parent 05908ec commit 8bd73e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ func TestRewrite(t *testing.T) {
randomString := RandStringBytesMaskImprSrcUnsafe(size)
randomBytes := []byte(randomString)

// Log attempt
t.Logf("starting test with %d - %s", size, ByteCountIEC(int64(size)))

// Create file
f, err := os.Create(path)
if err != nil {
Expand Down Expand Up @@ -124,6 +127,6 @@ func TestRewrite(t *testing.T) {
assert.Equal(t, randomBytes, writtenBytes, "[step 2] rewritten bytes != written bytes")

// Log success
t.Logf("successfully tested %s", ByteCountIEC(int64(size)))
t.Logf("successfully tested with %d - %s", size, ByteCountIEC(int64(size)))
}
}

0 comments on commit 8bd73e4

Please sign in to comment.