-
Notifications
You must be signed in to change notification settings - Fork 0
If e1 Then s1 'Else skip' adaptation #21
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
Conversation
CatarinaGamboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests to our testsuit
|
Are there any news in this PR? @Pichers |
CatarinaGamboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some more test cases for using values after the if condition like:
this.value = n;
if (x){
this.value = k;
}
return this.value;
CatarinaGamboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are better but still do not test what I tried to mention last time, see the comments in the PR
| this.next = next; | ||
| } | ||
|
|
||
| public Object test(@Free Object v1, boolean c1){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create at least one more separate test where we check if the return type has the permission required after the if conditions.
For the previous example check if the return is still @Unique for example (might need changes):
public @Unique Object test(@Free Object v1, boolean c1){
Object n;
n = new Object(); // n is free
this.value = n; // should be fine
if (c1){
this.value = v1; // should be fine
}
return this.value; // is this.value still Unique?
}This way we can check if the information in the context is the expected one.
Description
Simulated an "Else { skip; }" when no else expression is present in the original code.
Related Issue
Closes #11
Type of change
How Has This Been Tested?
Some simple feature tests were ran locally, with no found bugs