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

Code and test improvement by analyzing the test coverage #6

Merged
merged 23 commits into from
Jan 18, 2024
Merged

Code and test improvement by analyzing the test coverage #6

merged 23 commits into from
Jan 18, 2024

Conversation

yukal
Copy link
Owner

@yukal yukal commented Jan 18, 2024

v0.21.0 – 2024-01-18

New Features

Refactors

  • core: remove unnecessary check
  • core: func IsYearEqual became a private filterYearEqual (ee9f1d0a)
  • test: remove returns that have the same default value (3573d9c0)
  • test: combine logical blocks (8f061876)

Tests

  • core: add benchmark tests (6d739899)
  • core: check invalidity within missed tests (a83bed3a)
  • core: validate optional fields (cf7011af)
  • coverage: improve coverage indicators (b861f45c)
  • skip test files of private methods (5ac2547c)
  • compare: remove duplicate tests (8b681185)

Build System

Continuous Integration

  • job-action: turn on benchmark tests (05f4dc94)

Docs

Alexander Yukal added 23 commits January 18, 2024 09:35
these tests have a lot of duplicates and private method coverage
combine logical blocks that have the same realization
return "has invalid rule" if any invalid rule is passed
return MsgInvalidValue if any invalid value is passed
return MsgInvalidValue if any invalid value is passed
return MsgInvalidValue if any invalid value is passed
return MsgInvalidValue if any invalid value is passed
use reflectValue.String() to avoid errors if any invalid value passed
use reflectValue.String() to avoid errors if any invalid value passed
values should not be checked inside the compare function, they should be checked inside each filter
and modifier functions
the prototype filters should be checked inside the compare function before each filter and modifier
function execution, thus, only values should be checked inside filters and modifiers
optional fields should be passed without validation if they are empty
these tests are intended to improve the indicators of the test coverage, which has a minor role at
the time of writing, given the predicted state of the behavior of the main code, since this file
tests behavior that should never be executed but is only an insurance against a change in the future
@yukal yukal merged commit 93641c9 into main Jan 18, 2024
2 checks passed
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.

1 participant