Skip to content

Conversation

@sam-stajnko
Copy link

Description

According to the Thoth Tech guide for writing unit tests, you should aim to isolate functionality as much as possible when creating a test. The unit testing for bitmap functions doesn't follow this convention, as many unit tests are testing multiple functions at the same time and some functions are getting tested repeatedly by separate tests. This isn't ideal so what I have done is try to restructure the bitmap unit tests file such that each test only tests the fewest number of bitmap functions at a time and each test is mutually exclusive, meaning that they are isolated as much as possible.

Type of change

  • Code Refactor
  • Added Unit Tests

How Has This Been Tested?

This has been tested by running all unit tests in a randomized order and ensuring that all tests pass.

Tests can be run from either the terminal or directly from VS Code using Cmake Tools. For more information, please consult the Thoth Tech documentation.

Testing Checklist

  • Tested with sktest
  • Tested with skunit_tests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from ... on the Pull Request

Copy link

@JPF2209 JPF2209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • this code is good enough to approve for the 2nd peer review

Type of Change

  • This piece of code correctly identifies the changes made being a modification and adding functions

Code Readability

  • The code is very understandable and clear in what it needs to be comparing it to the other code.

Maintainability

  • As this is in the same style as the other code, it's quite maintainable being simple while doing the job.

Code Simplicity

  • This code is simple in it's execution following established design patterns and best practices .

Edge Cases

  • The code deal with edge cases well

Test Thoroughness

  • Tested in sktest and sk_unit_test and they both worked

Backward Compatibility

  • The code doesn't break existing functionality in the way it works.

Performance Considerations

  • Performance works well but it isn't usually a consideration for this type of change

Security Concerns

  • This code has no impact negatively or positively for security.

Dependencies

  • There are no new added dependencies.

Documentation

  • The documentation provided is through and simple to follow at the same time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants