Combination of Personal Knowledge Management and Learning Management System. This is a study project aimed at creating relatively big codebase for object-oriented programming and similar courses.
MIT License
2
stars
4
forks
source link
TextNote::creation_time() getter is not implemented #20
There is declaration in header, but no definition in .cpp
As this getter is never called, it produces no compile error (because C++)
While this immediate bug is easy to fix, there are additional steps that may help with its root cause, and also help avoid similar bugs in future:
When writing some code, also implement unit tests. Please try to at least call each method (if not aiming for complete code coverage). If there were some unit test that tried to call this method - compilation would fail, and the issue would have been detected earlier.
Currently we have code duplication issue between TextNote and TextNoteCollection - and soon between other knowledge item classes. In this case, creation_time() getter was implemented in TextNoteCollection, but not in TextNote. We need to resolve this code duplication issue, possibly by creating a base class that would implement such functionality
There is declaration in header, but no definition in .cpp As this getter is never called, it produces no compile error (because C++)
While this immediate bug is easy to fix, there are additional steps that may help with its root cause, and also help avoid similar bugs in future: