Work on function value lower
This commit is contained in:
21
stress_generator.py
Normal file
21
stress_generator.py
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
func_base = "main"
|
||||
var_base = "var"
|
||||
|
||||
numlines = 20
|
||||
numfuncs = 5
|
||||
|
||||
def genFunc():
|
||||
stress_test = open("stress_test.krak",'w')
|
||||
for i in range(numfuncs):
|
||||
stress_test.write('fun '+func_base+(str(i) if i != 0 else "")+'() : int {\n')
|
||||
for j in range(numlines):
|
||||
stress_test.write("var " + var_base+str(j)+' : int = (5*4+3-2)+1; \n')
|
||||
stress_test.write("return 0;\n")
|
||||
stress_test.write('}')
|
||||
stress_test.write("\n\n")
|
||||
|
||||
stress_test.close()
|
||||
|
||||
|
||||
genFunc()
|
||||
Reference in New Issue
Block a user