From 6dd014e824765a3f16c9ee40280590d568c6dbbc Mon Sep 17 00:00:00 2001 From: nisstyre56 Date: Fri, 28 Mar 2014 14:59:27 -0400 Subject: [PATCH] more testing code --- test.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test.js b/test.js index 201c329..6b3f1db 100755 --- a/test.js +++ b/test.js @@ -29,12 +29,23 @@ function arbIdentifier(construct) { } } +function randomInt(min, max) { + return Math.floor(Math.random() * (max - min + 1)) + min; +} + +function arbCapital() { + return String.fromCharCode(randomInt(65, 90)); +} + function arbName() { return arbIdentifier(representation.Name); } function arbTypeOp() { - return arbIdentifier(representation.TypeOp); + var result = arbIdentifier(representation.TypeOp); + result.name = arbCapital()+result.name; + result.val = result.name; + return result; } function arbArray(gen) {