Skip to content

Optimising tests #1565

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 22 commits into from
May 27, 2024
Merged

Optimising tests #1565

merged 22 commits into from
May 27, 2024

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented May 22, 2024

This PR removes a lot of obsolete test function and replaces them with already existing functions of the Shortcut API. It also introduces some new shortcuts for expressions such as for-loops, which were missing.

  • Removed getDeclarationsByName
  • Removed getDeclarationAs
  • Removed DeclarationHolder.byNameOrNull
  • Removed getDeclarationsByName
  • Removed getBodyStatementAs
  • Removed getLhsAs and getRhsAs
  • Moving all asserts to dedicated de.fraunhofer.aisec.cpg.test package and making them top-level functions instead of wrapping them into TestUtils

It also switches our test instrumentation suite to Kover over from Jacobo, since Kover can also handle inline kotlin functions.

@oxisto oxisto changed the title remove obsolete functions Removing obsolete test functions May 22, 2024
@oxisto oxisto marked this pull request as ready for review May 23, 2024 11:38
@oxisto oxisto force-pushed the remove-obsolete-functions branch from 5ecfbee to fec05c9 Compare May 23, 2024 11:38
@oxisto oxisto changed the title Removing obsolete test functions Optimising tests May 25, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
66.7% Coverage on New Code (required ≥ 75%)

See analysis details on SonarCloud

@oxisto oxisto merged commit b4147f7 into main May 27, 2024
2 of 3 checks passed
@oxisto oxisto deleted the remove-obsolete-functions branch May 27, 2024 08:49
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.

None yet

2 participants