Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revisionBoth sides next revision | ||
user_guide:extend:unit_tests [2019/11/12 23:41] – [Testing Transformation Scripts] gawrilow | user_guide:extend:unit_tests [2021/04/21 23:07] – [Testing core library C++ components] gawrilow | ||
---|---|---|---|
Line 287: | Line 287: | ||
- | ===== Testing | + | ===== Testing |
- | All tests for internal data structures | + | Unit tests for core library components |
- | 1. Implement your change/ | + | Please be aware that these tests may not involve any components depending on perl, which for the time being includes BigObjects. |
- | 2. Put a c++ file that tests your feature | + | 1. Put the unit tests in a c++ file into '' |
- | 3. Put a trivial file that calls your test function | + | 2. Change |
- | 4. Put the expected output into '' | + | 3. Add more unit tests to the same c++ file and run them exclusively: |
- | 5. Execute | + | ninja -C work/ |
+ | work/ | ||
+ | |||
+ | You can still use the script | ||
- | 6. Relax if the tests pass; else iterate. | + | 4. If you want to debug failing |
+ | |||
+ | | ||
+ | gdb -args work/ | ||
+ | |||
+ | Again, to avoid repeated full clean builds after fixing the library code or the tests, you can use '' | ||
===== Investigating Failures ===== | ===== Investigating Failures ===== |