Skip to content

Commit

Permalink
Merge pull request #861 from wavesplatform/node-424-better-invalid-al…
Browse files Browse the repository at this point in the history
…ias-gen

Generator of invalid alias characters was added
  • Loading branch information
ismagin authored Feb 21, 2018
2 parents 0415b08 + 8722c93 commit 8321898
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/scala/com/wavesplatform/TransactionGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ trait TransactionGen extends ScriptGen {

val aliasSymbolChar: Gen[Char] = Gen.oneOf('.', '@', '_', '-')

val invalidAliasSymbolChar: Gen[Char] = Gen.oneOf('~', '`', '!', '#', '$', '%', '^', '&', '*', '=', '+')

val aliasAlphabetGen: Gen[Char] = frequency((1, numChar), (1, aliasSymbolChar), (9, alphaLowerChar))

val invalidAliasAlphabetGen: Gen[Char] = frequency((1, numChar), (1, aliasSymbolChar), (9, alphaUpperChar))
val invalidAliasAlphabetGen: Gen[Char] = frequency((1, numChar), (3, invalidAliasSymbolChar), (9, alphaUpperChar))

val validAliasStringGen: Gen[String] = for {
length <- Gen.chooseNum(Alias.MinLength, Alias.MaxLength)
Expand Down

0 comments on commit 8321898

Please sign in to comment.