a partially functional web app is now partially functional
[ga4php.git] / unittests / generaterandomstrings.php
diff --git a/unittests/generaterandomstrings.php b/unittests/generaterandomstrings.php
new file mode 100644 (file)
index 0000000..fc3e38c
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+
+include("../authserver/lib/lib.php");
+
+echo "Doing 50000 string generations\n";
+for($l = 0; $l < 50000; $l++) {
+       if(($l%1000)==0) {
+               echo "At $l\n";
+       }
+       $str = generateRandomString();
+       if(strlen($str)!=128) {
+               echo "Failure at ".strlen($str)." with $str\n";
+               return false;
+       }
+}
+
+return true;
+?>