Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test for TEArrayList #196

Open
aregtech opened this issue Jul 19, 2023 · 0 comments
Open

Unit test for TEArrayList #196

aregtech opened this issue Jul 19, 2023 · 0 comments
Labels
C++ enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed unit test

Comments

@aregtech
Copy link
Owner

aregtech commented Jul 19, 2023

Description:
TEArrayList is a wrapper of std::vector adapted to areg-sdk needs. It is needed to add unit tests to test all public methods and to cover as much codes as possible.

Solution:

  1. There is a ./tests/units/ folder in the project to add unit tests.
  2. Add in that folder a new unit testing file, for example TEArrayListTests.cpp, and write unit tests.
    • The unit tests should run at least with int, unsigned int, float / double and std::string and String / WideString types.
    • The tests with the custom types, like custom structures, are welcome, but it is optional.
    • If the amount of testing methods are to large, they can be split and can be implemented either in a separate folder (for example array) or can be split to separate files like TEArraListStringTest.cpp.
    • Each created file should be added in the CMakeLists.txt and in the areg-tests MSVC project.
    • Each .cpp file should have a list of tested methods at the top
    • Each test method should have convenient name that is describing the purpose of the test, and should have short description.
  3. The tests should run. In case if a bug found, create a ticket and mention the priority in the title, like [bug]. Each created ticket should have at least 2 labels: bug and unit test.
@aregtech aregtech added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers unit test labels Jul 19, 2023
@aregtech aregtech assigned aregtech and unassigned aregtech Jul 19, 2023
@aregtech aregtech added the C++ label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed unit test
Projects
Status: No status
Development

No branches or pull requests

1 participant