Check Your Submission
After all of the work you’ve done, it’s important to make sure that your submission is in good shape and that you won’t lose points for silly things.
Testing
Remember: the autograder will alert you about big problems, like if your submission won't compile and/or run.
It won't tell you whether your implementation is correct or whether your tests are thorough. That's your job!
You have a chance before your submission to take a critical eye to your tests and improve them both to improve your chances of a good score for testing and to see if you can catch any bugs in your implementation. For each operation, brainstorm as many publicly observable consequences of that operation that you can. Make a test case for each one!
Formatting your code
Remember that we now allow you to use the clang-format
command:
clang-format -i *.cpp *.hpp
It will try to change your .cpp
and .hpp
files to better match our Google-based coding style convention (with settings taken from the provided .clang-format
file).
clang-format
won’t fix all cpplint
errors, but it does handle lots of common cases such as missing or extra curly braces or too much/not enough whitespace.
Note: Don’t take having this tool available as an excuse to write ugly code, and then hope that clang-format
will make it readable! Nobody writes perfect code even when trying to match a particular convention; clang-format
just helps you catch some of the small oversights that inevitably arise.
(When logged in, completion status appears here.)