Formatting Testing¶
Formatting tests are data-driven instead of being specified explicitly. This document explains how to add a new formatting test.
Adding a formatting test¶
-
Create a new file with the extension
.sdsdev
in thetests/resources/formatting
directory or any subdirectory. Give the file a descriptive name, since the file name becomes part of the test name.Skipping a test
If you want to skip a test, add the prefix
skip-
to the file name. -
Add the original unformatted Safe-DS code to the top of the file. The code must be syntactically valid.
- Add the following separator to the file:
- Add the expected formatted Safe-DS code to the file below the separator.
- Run the tests. The test runner will automatically pick up the new test.