You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2018/05/17 17:59:26 UTC
[text] RandomStringGeneratorTest#testWithinMultipleRanges: Remove
loop because loop variable is not used
Repository: commons-text
Updated Branches:
refs/heads/master 01c1e1adf -> f370438c6
RandomStringGeneratorTest#testWithinMultipleRanges: Remove loop because loop variable is not used
Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/f370438c
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/f370438c
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/f370438c
Branch: refs/heads/master
Commit: f370438c6ffa032a84d072d1d63eff8d08c5ae24
Parents: 01c1e1a
Author: Pascal Schumacher <pa...@gmx.net>
Authored: Thu May 17 19:59:14 2018 +0200
Committer: Pascal Schumacher <pa...@gmx.net>
Committed: Thu May 17 19:59:14 2018 +0200
----------------------------------------------------------------------
.../commons/text/RandomStringGeneratorTest.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-text/blob/f370438c/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
index 7805b89..bc343be 100644
--- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
+++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
@@ -133,14 +133,12 @@ public class RandomStringGeneratorTest {
maximumCodePoint = Math.max(maximumCodePoint, pair[1]);
}
- for (final char[] pair : pairs) {
- int i = 0;
- do {
- final int codePoint = str.codePointAt(i);
- assertThat(codePoint >= minimumCodePoint && codePoint <= maximumCodePoint).isTrue();
- i += Character.charCount(codePoint);
- } while (i < str.length());
- }
+ int i = 0;
+ do {
+ final int codePoint = str.codePointAt(i);
+ assertThat(codePoint >= minimumCodePoint && codePoint <= maximumCodePoint).isTrue();
+ i += Character.charCount(codePoint);
+ } while (i < str.length());
}
@Test