summaryrefslogtreecommitdiffstatshomepage
path: root/tools/tinytest-codegen.py
diff options
context:
space:
mode:
authorDavid Lechner <david@pybricks.com>2019-12-18 12:59:48 -0600
committerDamien George <damien.p.george@gmail.com>2019-12-19 17:55:50 +1100
commitfd0ba7be0775fe804bc6c20f538d722705b8ea4a (patch)
treebf69a1dc7d8e0aae80dcd3ab345e0e02a79551d1 /tools/tinytest-codegen.py
parent1605c7e5840cf44a11a8e38150be8bb7ce6645d5 (diff)
downloadmicropython-fd0ba7be0775fe804bc6c20f538d722705b8ea4a.tar.gz
micropython-fd0ba7be0775fe804bc6c20f538d722705b8ea4a.zip
tools/tinytest-codegen.py: Add extra newline and result message.
This is an alternative to f4ed2df that adds a newline so that the output of the test starts on a new line and the result of the test is prefixed with "result: " to distinguish it from the test output. Suggested-by: @dpgeorge
Diffstat (limited to 'tools/tinytest-codegen.py')
-rwxr-xr-xtools/tinytest-codegen.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/tinytest-codegen.py b/tools/tinytest-codegen.py
index 7580522ee6..424f70a9fb 100755
--- a/tools/tinytest-codegen.py
+++ b/tools/tinytest-codegen.py
@@ -33,8 +33,10 @@ test_function = (
"void {name}(void* data) {{\n"
" static const char pystr[] = {script};\n"
" static const char exp[] = {output};\n"
+ ' printf("\\n");\n'
" upytest_set_expected_output(exp, sizeof(exp) - 1);\n"
" upytest_execute_test(pystr);\n"
+ ' printf("result: ");\n'
"}}"
)