Skip to content

Commit

Permalink
Updated coding standard to explain unit testing
Browse files Browse the repository at this point in the history
Moved the sharing map test into the appropriate folder
  • Loading branch information
thk123 committed May 4, 2017
1 parent a0b0683 commit 3001529
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CODING_STANDARD
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,23 @@ Output:
(status(), error(), debug(), etc)
- Use '\n' instead of std::endl

Unit tests:
- Unit tests are written using Catch: https://github.com/philsquared/Catch/
- For large classes:
- Create a separate file that contains the tests for each method of each
class
- The file should be put inside unit/class/path/class_name/function_name.cpp
- For small classes:
- Create a separate file that contains the tests for all methods of each
class
- The file should be put inside unit/class/path/class_name.cpp
- Catch supports tagging, tests should be tagged with:
- [core] should be used for all tests unless the test takes more than 1
second to run, then it should be tagged with [long]
- [folder_name] of the file being tested
- [class_name] of the class being tested
- [function_name] of the function being tested

You are allowed to break rules if you have a good reason to do so.

Pre-commit hook to run cpplint locally
Expand Down

0 comments on commit 3001529

Please sign in to comment.