Beautify TestDriver

This commit is contained in:
Magdalena Kalin 2019-10-17 09:56:33 +02:00
parent d3e22bafd1
commit 3bafc92f47
2 changed files with 29 additions and 32 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea/

12
lol.rb
View File

@ -90,16 +90,14 @@ def construct_driver(class_name, parameters, methods, container_class, container
methods_to_print = ""
maggie = methods.map do |x|
if x[:print]
"
System.out.println(lol.#{x[:name]}(#{args x[:parameters]}));
"
"System.out.println(lol.#{x[:name]}(#{args x[:parameters]}));"
else
"lol.#{x[:name]}(#{args x[:parameters]});"
end
end
driver_string = "
public class TestDriver {
public class TestDriver {
public TestDriver(){}
@ -125,15 +123,13 @@ def construct_driver(class_name, parameters, methods, container_class, container
lol.add#{class_name}(tmp5);
System.out.println(\"\");
System.out.println(\"Some checkpoint\");
#{maggie.join "\n\n System.out.println(\"Some Checkpoint\"); \n\n"}
#{maggie.join "\n\n\tSystem.out.println(\"Some Checkpoint\"); \n\t"}
}
public static void main(String[] args) {
TestDriver.test();
}
}
}
"
end