You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Sorry by the lack of time...
I was making some tests with this PR and this is what I got: 👍
Tests
The result of the operation Equality between integers inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation Inequality between integers inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation Greater Then between integers inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation Greater Then or Equal between integers inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation Less Then between integers inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation Less Then or Equal between integers inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation Equality between integer and character inside the while condition.
Expected: Error Type.
Result: line 7:19 Operator '=' cannot be applied to 'Integer', 'Character'
The result of the operation sum between integers inside the while condition.
Expected: Error Type.
Result: line 7:25 no viable alternative at input 'var1+var2)' null
The result of the operation subraction between integers inside the while condition.
Expected: Error Type.
Result: line 7:25 no viable alternative at input 'var1-var2)' null
The result of the operation division between integers inside the while condition.
Expected: Error Type.
Result: line 7:27 no viable alternative at input 'var1divvar2)' null
The result of the operation multiplication between integers inside the while condition.
Expected: Error Type.
Result: line 7:25 no viable alternative at input 'var1*var2)' null
The result of the operation modulo between integers inside the while condition.
Expected: Error Type.
Result: null line 7:27 no viable alternative at input 'var1modvar2)'
The result of the operation AND between booleans with value true inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation OR between booleans with value true inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation XOR between booleans with value true inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
The result of the operation NOT with a boolean with value true inside the while condition.
Expected: It should be no semantic error.
Result: The code was translated without semantic errors.
Some variations of this code were used in the test:
procedimento principal
inicio
var1: inteiro;
var1 <- 1;
var2: inteiro;
var2 <- 3;
enquanto (var1 < var2) faca
var1 <- var1 + var2;
fim
fim
This file contains hidden or 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
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.
Closes #8
This pull request depends on #13 because of the unit tests. While it isn't merged, I'm setting this as a draft.