destiny team mailing list archive
-
destiny team
-
Mailing list archive
-
Message #00131
Notebook Unit Tests
...are finished. They are in src/Sleuths/SleuthsGUI/notebook/unittest
To build and run:
- qmake
- make
- ./NBUnitTest
Feel free to check them out, test them, and use some of my testing
techniques to assist you in writing yours. Also, you'll notice I made some
modifications to NotebookWidget.h simply for the use of unit testing. I was
essentially "forced" to make the slots public. Other than that, I added 2
functions:
- QListWidget* getListWidget() { return this->lw; }
- void setNoteFile(QString& noteFile) { m_sNoteFile = noteFile; }
These assist in the unit testing process. You should note I've added
comments around those functions and instructed that their use is strictly
for unit testing purposes only. I encourage (expect) this behavior if you
find that you need to do something similar. Otherwise, it becomes confusing
what the function is for, or why/when/how it should be used.
Bed time.
Zach J. Elko
Ball State University Unified Technology Support
Certified Hardware & Software Technician