Skip to content

Sort tests by estimated size and exception type #2590

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 2 commits into from
Sep 15, 2023
Merged

Conversation

IlyaMuravjov
Copy link
Collaborator

Description

Non-parametrized tests are now sorted within the cluster by their estimated size (the smaller the earlier).

Additionally, regardless of their size NPE tests are always placed after non-NPE tests.

How to test

Manual tests

Generate tests for the following class, tests should be properly sorted.

public class Lists {
    public static int sum(List<Integer> list) {
        int sum = 0;
        for (int i: list) sum += i;
        return sum;
    }

    public static <T> T getFirst(List<T> list) {
        return list.get(0);
    }
}

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.

@IlyaMuravjov IlyaMuravjov added ctg-enhancement New feature, improvement or change request comp-codegen Issue is related to code generator labels Sep 11, 2023
@IlyaMuravjov IlyaMuravjov merged commit baea252 into main Sep 15, 2023
@IlyaMuravjov IlyaMuravjov deleted the ilya_m/sort-tests branch September 15, 2023 07:42
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-enhancement New feature, improvement or change request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants