diff --git a/exercises/practice/hello-world/.meta/template.j2 b/exercises/practice/hello-world/.meta/template.j2 new file mode 100644 index 0000000..61345d7 --- /dev/null +++ b/exercises/practice/hello-world/.meta/template.j2 @@ -0,0 +1,7 @@ +{% for case in cases %} +func test_{{ case.func_name }}(solution_script): + var expected = {{ case.expected | togdscript }} + var got = solution_script.{{ case.property | camel_to_snake }}() + return [got, expected] + +{% endfor %} diff --git a/exercises/practice/hello-world/hello_world_test.gd b/exercises/practice/hello-world/hello_world_test.gd index 0950165..556dcc8 100644 --- a/exercises/practice/hello-world/hello_world_test.gd +++ b/exercises/practice/hello-world/hello_world_test.gd @@ -1,2 +1,4 @@ -func test_hello_world(solution_script): - return [solution_script.hello(), "Hello, World!"] +func test_say_hi_(solution_script): + var expected = "Hello, World!" + var got = solution_script.hello() + return [got, expected]