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

Add unit tests for method dispatch #355

Open
cyrille-artho opened this issue May 26, 2023 · 1 comment
Open

Add unit tests for method dispatch #355

cyrille-artho opened this issue May 26, 2023 · 1 comment

Comments

@cyrille-artho
Copy link
Member

cyrille-artho commented May 26, 2023

We currently do not exhaustively test all possible configurations of method calls. It would be advantageous to have an overview of which tests are already there and which cases are covered:

  1. Method call within the same class or to a superclass or inner class. (Three options)
  2. Method call from/to instance/static method. (Four options)
  3. Access modifiers. (Four options for caller and callee: 4^2).

Theoretically, 3 * 4 * 4^2 = 192 options are possible, but some are not allowed (a public superclass method must remain public).
A first step here is to model which combinations are possible and then write a table to see which cases are already tested. We want to test key cases of the remaining combinations, achieving at least pairwise coverage.

@cyrille-artho
Copy link
Member Author

As a first step, let's look at what options are possible (including perhaps anonymous inner classes) and what the combinatorial complexity is. We can use PICT to model this: https://github.com/microsoft/pict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant