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

Edit UnitConverterTestUnitTypeSwitching (Edit UnitConverterTest.cpp) #2263

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FallJock
Copy link

@FallJock FallJock commented Dec 7, 2024

The test has been improved in the code.

Fixes #.

Edit UnitConverterTestUnitTypeSwitching in UnitConverterTest.cpp

Description of the changes:

  • Now UnitConverterTestUnitTypeSwitching checks for changes after the function of SwitchActive and fits a new value separately into the to field after the function of SwitchActive.
  • When I tried to edit the SwitchActive function, I removed the swap of fromType and toType.

2024-12-07_16-06-38

And I ran all the tests. And only UnitConverterTestScientificInputs detected a value error when using the SwitchActive function.

2024-12-07_13-03-36

Without changing the SwitchActive function code
Without changing

With changes in the SwitchActive function code (deleting swap(m_fromType, m_toType);)
With changes

How changes were validated:

  • Previously, the test of the SwitchActive function worked before the specified category - Weight, now the SwitchActive function works after the specified category and changes in the field selection are taken into account.

The test has been improved in the code, now it checks for changes after the function of SwitchActive and fits a new value separately into the to field after the function of SwitchActive
When I tried to edit the SwitchActive function, I removed the swap of fromType and toType. And I ran all the tests.
And only UnitConverterTestScientificInputs detected a value error when using the SwitchActive function.
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