areg-sdk icon indicating copy to clipboard operation
areg-sdk copied to clipboard

Extend unit tests

Open aregtech opened this issue 3 years ago • 6 comments

Problem The demonstration of features are in the example folder of AREG SDK. But still there are many objects and many methods that are never tested. In order to test, there is a need to increase amount of unit tests.

Actions The unit tests are integrated and should be implemented in the tests/units. Each .cpp file should contain one test name. The tests are added in the CMakeFiles.txt by calling addTest() method, which automatically includes the tests in the compilation. The testing module is the AREG engine / framework.

Note This ticket cannot be assigned to one person since the topic of unit tests is huge. Please inform for which object / topic you want to create unit test and I'll create a separate ticket and branch, and assign to you.

aregtech avatar Jan 02 '23 16:01 aregtech

@aregtech I am interested in working on this issue. Could you assign it to me?

harshit496 avatar Feb 12 '23 20:02 harshit496

@harshit496, thank you very much. Since this topic is very huge, i suggest to select 1-3 classes that you'd like to test, so that I'll create a separate issue and you can work on that.

aregtech avatar Feb 12 '23 20:02 aregtech

How about if I write tests for the all the classes in appbase dir?

harshit496 avatar Feb 13 '23 01:02 harshit496

@harshit496 , I would suggest classes in base. Classes like string or containers, DateTime, etc. In appbase the main class is Application, which most probably should be mocked to be able to test. And the Console class I'll soon move out of areg framework.

aregtech avatar Feb 13 '23 01:02 aregtech

Sounds good. I can take the three classes you mentioned then

  • Containers
  • DateTime
  • Strings

harshit496 avatar Feb 13 '23 01:02 harshit496

OK. Let's start with strings. They are big enough :)

aregtech avatar Feb 13 '23 02:02 aregtech