-
Notifications
You must be signed in to change notification settings - Fork 755
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
[IDEA Plugin] Test Implementation - Milestone #1 #9639
[IDEA Plugin] Test Implementation - Milestone #1 #9639
Conversation
feaefe5
to
caa4d3a
Compare
//This flag is used to include/filter BBE testerina files for the formatting testing | ||
boolean includeTests = false; | ||
Path path = Paths.get(getTestDataPath()); | ||
doTestBBEDirectory(path, includeTests); |
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.
Remove the unnecessary variable includeTests
since it is always true
.
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.
Removed
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.
See the comments inline.
*/ | ||
public class BallerinaLexerTest extends LexerTestCase { | ||
|
||
private final String testDataPath = "../../composer/modules/integration-tests/src/test/resources/ballerina" |
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.
Final variables should be capitalized.
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.
Fixed
if (!path.toFile().exists()) { | ||
throw new FileNotFoundException(path.toString()); | ||
} | ||
doTestDirectory(path, includeTests); |
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.
Remove unnecessary variable includeTests
.
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.
Fixed
return "src/test/resources/testData/formatting/BBE"; | ||
} | ||
|
||
//this test validates the formatting for the ballerina-by-examples |
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.
Capitalize the first letter and add a space after that.
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.
Done
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.
Where exactly you have done this?
File resource = path.toFile(); | ||
if (resource.exists()) { | ||
if (resource.isFile() && resource.getName().endsWith(myFileExt)) { | ||
doTest(resource, true); |
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.
Remove the 2nd parameter since it is always true
.
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.
Removed
@@ -0,0 +1,6 @@ | |||
#To run this sample, navigate to the directory that contains the |
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.
Why do we need this file?
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.
Removed the file
@@ -0,0 +1,6 @@ | |||
#To run this sample, navigate to the directory that contains the |
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.
Why do we need this file?
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.
Removed the file
Purpose
This PR provides test implementation related to