Commit eae23874 by sikang

bug fix

parent 5b547dfd
...@@ -19,7 +19,7 @@ class ClassBuilder: ...@@ -19,7 +19,7 @@ class ClassBuilder:
def __generate_variable(self): def __generate_variable(self):
var_scope = ["public", "private", "protected"] var_scope = ["public", "private", "protected"]
var_types = ["String", "int", "double", "float"] var_types = ["String", "int", "double", "float"]
var_count = random.randint(3, 15) var_count = random.randint(3, 20)
for i in range(0, var_count): for i in range(0, var_count):
code = "%s %s %s = " % ( code = "%s %s %s = " % (
var_scope[random.randint(0, 2)], var_scope[random.randint(0, 2)],
...@@ -95,7 +95,7 @@ class ClassBuilder: ...@@ -95,7 +95,7 @@ class ClassBuilder:
"${func_content}", log_code + return_value) "${func_content}", log_code + return_value)
self.__functions.append(fun_content) self.__functions.append(fun_content)
if len(self.__functions) < random.randint(3, 15): if len(self.__functions) < random.randint(3, 20):
self.__generate_function(model_path) self.__generate_function(model_path)
# 生成类 # 生成类
......
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