-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-248: Cleaning up some confusion on RandomizedTest.randomAscii* and
RandomStrings.randomAscii* methods. These methods generated random strings based on letters from the Unicode basic latin block (C0). All these methods are now deprecated and will be removed in favor of more explicit methods that tell exactly (?) what kind of letters are involved (Ryan Ernst, Dawid Weiss). For details, see: RandomStrings.randomAsciiLettersOfLength(..) RandomStrings.randomAsciiLettersOfLengthBetween(..) RandomStrings.randomAsciiAlphanumOfLength(..) RandomStrings.randomAsciiAlphanumOfLengthBetween(..)
- Loading branch information
Showing
10 changed files
with
161 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...r/src/main/java/com/carrotsearch/randomizedtesting/generators/AsciiAlphanumGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.carrotsearch.randomizedtesting.generators; | ||
|
||
/** | ||
* A generator emitting simple ASCII alphanumeric letters and numbers | ||
* from the set (newlines not counted): | ||
* <pre> | ||
* abcdefghijklmnopqrstuvwxyz | ||
* ABCDEFGHIJKLMNOPQRSTUVWXYZ | ||
* 0123456789 | ||
* </pre> | ||
*/ | ||
public class AsciiAlphanumGenerator extends CodepointSetGenerator { | ||
private final static char [] CHARS = | ||
("abcdefghijklmnopqrstuvwxyz" + | ||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" + | ||
"0123456789").toCharArray(); | ||
|
||
public AsciiAlphanumGenerator() { | ||
super(CHARS); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...er/src/main/java/com/carrotsearch/randomizedtesting/generators/AsciiLettersGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.carrotsearch.randomizedtesting.generators; | ||
|
||
/** | ||
* A generator emitting simple ASCII characters from the set | ||
* (newlines not counted): | ||
* <pre> | ||
* abcdefghijklmnopqrstuvwxyz | ||
* ABCDEFGHIJKLMNOPQRSTUVWXYZ | ||
* </pre> | ||
*/ | ||
public class AsciiLettersGenerator extends CodepointSetGenerator { | ||
private final static char [] CHARS = | ||
("abcdefghijklmnopqrstuvwxyz" + | ||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ").toCharArray(); | ||
|
||
public AsciiLettersGenerator() { | ||
super(CHARS); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters