I want to test some QAbstractListModels I already implemented, is it better to use ModelTest from Qt labs or make my own unit test using QTestLib. Also can someone point me what actually ModelTest do and how to use it or a good tutorial on it other than this one
I want to test some QAbstractListModels I already implemented, is it better to use
Share
Do both. ModelTest will only check that your model fulfils the basic expectations of the ModelView framework. You still need to write your own unit test cases to verify that your model operates specifically in the manner that you expect.
There are many models that may pass the ModelTest test, but you still felt the need to write your own. Obviously, there are special things about your model, or you wouldn’t have bothered to write a new one. So, test those things!