From 7d72bd7baed3f774ef2ba19f86f4003b354bfc5e Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Wed, 22 Jul 2020 16:01:10 +0200 Subject: [PATCH] Update test.pl to use is_whole() instead of is_count() --- tools/test.pl | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/test.pl b/tools/test.pl index 5eb47e8d2..8d6042700 100755 --- a/tools/test.pl +++ b/tools/test.pl @@ -8,7 +8,7 @@ use strict; use warnings; -use Data::Types qw (is_count is_int is_whole); +use Data::Types qw (is_count is_whole); use File::Basename; use FindBin; use List::Util 'shuffle'; @@ -484,9 +484,9 @@ sub random_hex_string # length in characters my $count = shift; - return if ! is_count ($count); + return if ! is_whole ($count); - my $string; + my $string = ""; $string .= sprintf ("%x", rand 16) for (1 .. $count); @@ -497,11 +497,11 @@ sub random_lowercase_string { my $count = shift; - return if ! is_count ($count); + return if ! is_whole ($count); my @chars = ('a'..'z'); - my $string; + my $string = ""; $string .= $chars[rand @chars] for (1 .. $count); @@ -512,11 +512,11 @@ sub random_uppercase_string { my $count = shift; - return if ! is_count ($count); + return if ! is_whole ($count); my @chars = ('A'..'Z'); - my $string; + my $string = ""; $string .= $chars[rand @chars] for (1 .. $count); @@ -527,11 +527,11 @@ sub random_mixedcase_string { my $count = shift; - return if ! is_count ($count); + return if ! is_whole ($count); my @chars = ('A'..'Z', 'a'..'z'); - my $string; + my $string = ""; $string .= $chars[rand @chars] for (1 .. $count); @@ -542,11 +542,11 @@ sub random_numeric_string { my $count = shift; - return if ! is_count ($count); + return if ! is_whole ($count); my @chars = ('0'..'9'); - my $string; + my $string = ""; $string .= $chars[rand @chars] for (1 .. $count); @@ -557,11 +557,11 @@ sub random_string { my $count = shift; - return if ! is_count ($count); + return if ! is_whole ($count); my @chars = ('A'..'Z', 'a'..'z', '0'..'9'); - my $string; + my $string = ""; $string .= $chars[rand @chars] for (1 .. $count);