I would like to add more unit testing to the EbsdLib library. Can we put together a TODO.md file stored in the "Code_Review" directory that lists all the candidate classes to create unit tests for?
I would also like to write documentation for this library
I would also like to write more example code that shows how to use the library
How should we get stated with these tasks?
Source/Ebsdlib/- Core librarySource/Apps/- various test applicationssrc/Test/- Test filescmake/- CMake configuration
scripts/- Build/utility scriptsconda/- Conda packaging
- C++20 standard
- Allman brace style (braces on new lines for classes, control statements, enums, functions, namespaces, structs, before else)
- 200 column limit
- 2-space indentation, no tabs
- Pointer alignment left (
int* ptrnotint *ptr) - No space before parentheses
- Sort includes alphabetically
- No short functions on single line
- Always break template declarations
- Constructor initializers break before comma
- C++ header files:
.hppextension - C++ source files:
.cppextension - Namespaces:
lower_case - Classes:
CamelCase - Structs:
CamelCase - Class methods:
camelBack - Functions:
camelBack - Variables:
camelBack - Private members:
m_prefix +CamelCase(e.g.,m_MemberVariable) - Global variables:
CamelCase - Global constants:
k_prefix +CamelCase(e.g.,k_DefaultValue) - Local pointers:
camelBack+Ptrsuffix (e.g.,dataPtr) - Type aliases:
CamelCase+Typesuffix (e.g.,ValueType) - Macros:
UPPER_CASE
- vcpkg for dependency management
- CMake-based build system
Example configuring the project
cd /Users/mjackson/Workspace1/EbsdLib && cmake --preset EbsdLib-Release- Build directory is located at "/Users/mjackson/Workspace1/DREAM3D-Build/EbsdLib-Release"
Example building the project
cd /Users/mjackson/Workspace5/DREAM3D-Build/EbsdLib-Release && cmake --build . --target all- Python anaconda environment 'dream3d' can be used if needed
- Unit tests use the Catch2 framework.
- Use the
ctestto run unit tests
- Always use
ctestto run unit tests, NOT the test binary directly - The
ctestcommand handles test data extraction and cleanup automatically - Use the
-Rflag to run specific tests by name pattern
Example - Running a specific test:
cd /Users/mjackson/Workspace5/DREAM3D-Build/EbsdLib-Release && ctest -R "EbsdLib::FillBadData" --verboseExample - Running all SimplnxCore tests:
cd /Users/mjackson/Workspace5/DREAM3D-Build/EbsdLib-Release && ctest -R "EbsdLib::" --verbose