Commit 2e9b9dcb by sikang

update script

parent 9da25089
......@@ -3,6 +3,7 @@ import json
import string
import random
import glob, os
import sys
used_names = []
activity_mangle_setting = {}
......@@ -24,12 +25,13 @@ def get_rand_code():
if num == 0:
code += ";\nString " + gen_rand_str() + "=\"" + gen_rand_str() + "\";\n"
elif num == 1:
code += ";\nint " + gen_rand_str() + "=\"" + random.randint(0, 100000) + "\";\n"
code += ";\nint " + gen_rand_str() + "=\"" + str(random.randint(0, 100000)) + "\";\n"
elif num == 3:
code += ";\nif(\"" + gen_rand_str() + "\".equals(\"" + gen_rand_str() + "\")){}\n"
elif num == 4:
index = gen_rand_str()
code += ";\nfor(int " + index + "="+random.randint(0,10)+";"+index+"<"+random.randint(11,20)+";"+index+"++){}\n"
code += ";\nfor(int " + index + "="+str(random.randint(0,10))+";"+index+"<"+str(random.randint(11,20))+";"+index+"++){}\n"
return code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment