We strongly recommend each developer to write CPP unit tests when sending a PR.
- We use googletest as the CPP test infrastructure.
- CPP tests should be added to the
# inside build/cmake .. -DTI_BUILD_TESTS=ON # ... other regular Taichi cmake argsmake # run the CPP test./taichi_cpp_tests
taichi_cpp_tests.exe will be placed inside the
so you can directly run it after adding the directory to
PATH in Setting up Taichi for development.
Consider polishing the CPP test infrastructure:
- Separate each translation unit into its own test executable
- Have a unified script to control the execution of which set of tests