Skip to content

Removed redundant switch-case in mocks in case of only one branch #1954

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

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

Damtev
Copy link
Member

@Damtev Damtev commented Mar 15, 2023

Description

If we have only one branch in mocking new instances - i.e., we consider only the first invocation of executables - we do not need a switch-case and corresponding counter for labels.

Fixes #1878.

How to test

Automated tests

Common pipeline.

Manual tests

Mentioned in the corresponding issue.

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@Damtev Damtev added comp-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug labels Mar 15, 2023
@Damtev Damtev requested a review from EgorkaKulikov March 15, 2023 12:39
@Damtev Damtev force-pushed the damtev/mock_redundant_switch branch from b5df285 to 1d889c4 Compare March 15, 2023 12:40
@Damtev Damtev force-pushed the damtev/mock_redundant_switch branch from 1d889c4 to fb6b3bc Compare March 15, 2023 13:38
@EgorkaKulikov EgorkaKulikov self-requested a review March 15, 2023 13:43
@Damtev Damtev enabled auto-merge (squash) March 15, 2023 13:46
@Damtev Damtev merged commit 7230073 into main Mar 15, 2023
@Damtev Damtev deleted the damtev/mock_redundant_switch branch March 15, 2023 14:13
denis-fokin pushed a commit that referenced this pull request Mar 16, 2023
@alisevych alisevych added this to the 2023.03 Release milestone Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove switch and mockClassCounter in mockConstruction in simple mockConstruction cases
3 participants