-
Notifications
You must be signed in to change notification settings - Fork 6
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
Similarity checking tests for the new version of FirstInstance (with JavaSimilarityChecker) #14
Open
AlpTorac
wants to merge
125
commits into
CIPM-tools:build-pipeline
Choose a base branch
from
AlpTorac:fitests-newsc-pull-req
base: build-pipeline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Similarity checking tests for the new version of FirstInstance (with JavaSimilarityChecker) #14
AlpTorac
wants to merge
125
commits into
CIPM-tools:build-pipeline
from
AlpTorac:fitests-newsc-pull-req
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from SimilarityChecker and related classes
Implement requests and handlers for certain similarity checking operations used in Java similarity switches Helps centralise the said operations Helps encapsulates some parameters that would otherwise unnecessarily clutter similarity checker and similarity switches
Builds upon the ...similarity.base package, extends and complements its elements with EMFtext Provides exemplary similarity checking requests and handlers (using them is not mandatory)
For Java-related similarity switches Currently empty Can help separate Java-related similarity switches from the rest in the future
to keep the logging logic for Java-related inner switches in one place
For Java-related inner switches to not implement some mutual operations multiple times
Created for Java-related similarity checking
For PCM-related similarity switches
For PCM-related inner similarity switches
For PCM-related similarity checker Use the extracted structure
For ID-based similarity checking of PCMs A separate similarity checker implementation will no longer be necessary To be integrated in the following future commits
For Java-related similarity checking
For logging Java-related inner switches
To their own files without modifying them Non-functional commit
Rename SimilaritySwitch to JavaSimilaritySwitch to indicate its intent better Use the extracted inner switches in the JavaSimilaritySwitch Non-functional commit
To create new Java-related similarity switches Non-functional commit
For Java-related inner switches that create further switches Non-functional commit
Use extracted structure in the Java-related inner switches Use implemented interfaces in the Java-related inner switches Non-functional commit
Non-functional commit
For Java-related similarity checking Non-functional commit
Rename SimilarityChecker to JavaSimilarityChecker Use the extracted structure in the JavaSimilarityChecker Delegate similarity switch creation by using a new similarity switch request Non-functional commit
Adapt classes affected by the changes to the Java-related part of the similarity checking Non-functional commit
To their own files without modifying them Non-functional commit
Use the extracted structure in PCM-related similarity switch Use extracted inner switches in PCM-related similarity switch Non-similarity switch
For creating new PCM-related similarity switches Non-functional commit
For PCM-related inner switches that create further switches Non-functional commit
Use implemented interfaces in PCM-related inner switches Use extracted structure in PCM-related inner switches Non-functional commit
This singleton helps keep expected similarity values as well as initialiser parameters consistent across tests
for tests that work with EObject instances. This extension provides various methods that can be used in tests to perform similarity checking. It also integrates InitialiserTestSettingsProvider.
for JaMoPP-related initialisers
for JaMoPP-related similarity checking tests
for JaMoPP-related similarity checking tests
for JaMoPP-related similarity checking tests Integrates Java similarity checker Provides static methods for retrieving certain groups of initialisers in similarity checking tests. They can be used within static methods of the said tests as MethodSources.
for JaMoPP-related similarity checking tests These interfaces provide the means to quickly create certain JaMoPP objects in form of default methods. They can be implemented by the concrete tests.
Each of these tests are implicitly parameterised over certain JaMoPP objects via the initialiser parameters they take. This way, they spare large amounts of code duplication, because otherwise one would need to separately implement many test methods for each JaMoPP object. These tests isolate certain aspects of JaMoPP objects, such as certain attributes they have, and verify that similarity checker correctly assesses their similarity. Disabled null check tests in interfacetests till NPEs are fixed Use adapted initialisers in some interfacetests till NPEs are fixed
These tests isolate certain aspects of JaMoPP objects, such as certain attributes they have, and verify that similarity checker correctly assesses their similarity. Some tests are disabled till null pointer exceptions are fixed. NewConstructorCallTest is adapted till null pointer exceptions are fixed.
These tests aim to verify similarity checking of JaMoPP objects, whose construction is not as simple as those from "impltests" and "interfacetests". The cases addressed in these tests were separated from "impltests", because they each require a complicated setup, in order to cover certain branches of the similarity checking logic. IdentifierReferenceContainerTest is disabled till NPEs are fixed.
It ensures that each JaMoPP object has a test class (as a Java source file) and that the initialiser of each JaMoPP object type can be accessed from tests. Adding such a meta-test was necessary, due to the vast number of JaMoPP object types and their complicated type hierarchy.
This test class focuses on testing the control flow of the similarity checking process at a high-level. This way, it covers some edge cases that are not addressed in the "unittests". Some general tests are disabled till NPEs are fixed.
to update to the new version of similarity checker
to fix Null Pointer Exceptions in IdentifierReference tests
These tests make use of the dummy elements, in order to test various interactions between top-level similarity checking mechanisms. They also serve as a proof-of-concept for the introduced changes to similarity checking. The said dummy classes also contain insight about the purpose of what they mock for tests (in form of commentary).
Use both adapted and non-adapted versions of initialisers
Remove initialiser adaptation from NewConstructorCallTest
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is the continuation of #13 and extends it with the pull requests #8, #9 and #10.
It switches the old similarity checker (SimilarityChecker) from FirstInstance with the new one (JavaSimilarityChecker), as well as the refactoring changes to FirstInstance (#9) and null checks (#8 and #10). Afterward, it sets the similarity checker used in "fitests" plug-in to the new one, enables the disabled tests from #13 and makes parameterised tests use both adapted and non-adapted versions of initialisers. The purpose of the latter is to test the robustness of the null checks introduced in #8 and #9.
Note 1: #9 also makes minor changes to a class in the SecondInstance.
Note 2: The pull request #13 makes no changes to FirstInstance and can be used to supplement similarity checking tests till #9 and #10 are ready to merge.