Skip to content

Missing Test Case for negative offset value#41

Closed
ileontiuc wants to merge 1 commit into
apache:masterfrom
ileontiuc:patch-1
Closed

Missing Test Case for negative offset value#41
ileontiuc wants to merge 1 commit into
apache:masterfrom
ileontiuc:patch-1

Conversation

@ileontiuc

Copy link
Copy Markdown
Contributor

The method copyLarge(InputStream input, InputStream output, int offset, buffer) copies the content of input into output. If offset is a positive number, it will skip a number of bytes from input equal to offset value. By performing mutation testing analysis we noticed that the copyLarge method was never tested for a negative value for offset. The added test call copyLarge with a negative value and check that the behavior is the same as for offset = 0, where no bytes are skipped from input.

The method copyLarge(InputStream input, InputStream output, int offset, buffer) copies the content of input into output. If offset is a positive number, it will skip a number of bytes from input equal to offset value. By performing mutation testing analysis we noticed that the copyLarge method was never tested for a negative value for offset. The added test call copyLarge with a negative value and check that the behavior is the same as for offset = 0, where no bytes are skipped from input.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 90.238% when pulling 86fb8a1 on ileontiuc:patch-1 into 9990c66 on apache:master.

@PascalSchumacher

Copy link
Copy Markdown
Contributor

Thanks! 👍

@asfgit asfgit closed this in 92a07f9 Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants