Added test dependency for official parser (issue 119)#125
Conversation
|
|
||
| // 2) Official OMG parser | ||
| String input = Files.readString(modelPath); | ||
| SysMLInteractiveResult result = official.eval(input); |
There was a problem hiding this comment.
I'm not completely sure but this method probably also checks the official context conditions. So if line 70 only tests parsing then this should also only test parsing. Otherwise you are testing two different functionalities. Extract the method that is relevant and use it there.
But first look at the other comment.
| implementation "org.apache.commons:commons-lang3:$commons_lang_version" | ||
| implementation "commons-cli:commons-cli:$commons_cli_version" | ||
|
|
||
| def omg_version = "0.18.0" |
There was a problem hiding this comment.
-
Move this definition in the gradle properties file and use the same version in both subprojects.
-
Please use an up to date official parser version... The java version may match but there were changes to the sysml specification since then. probably 0.58. My fault
| implementation "commons-cli:commons-cli:$commons_cli_version" | ||
|
|
||
| def omg_version = "0.18.0" | ||
| testImplementation(group: "org.omg.sysml", name: "org.omg.sysml.interactive", version: omg_version, classifier: "all") |
There was a problem hiding this comment.
This is a little problematic. In the pipeline we have a flag "isPipelineFullBuild" that only loads the visualization subproject only if the flag is set. This way the user can check out the projects without having a github login. This breaks that principle. This needs to be a conditional dependency and the test itself needs to be excluded from the test source sets both depending on the flag.
| "StateActions.sysml", | ||
| "ConditionalSuccessionExample-1.sysml" | ||
| }) | ||
| public void testParsingModels(String modelName) throws IOException { |
There was a problem hiding this comment.
I would also temporarely add @disabled to the test to fix the pipeline until we decide how to fix the negative parsing errors.
Changed files: root build.gradle and language/build.gradle
Added files: ParsersComparisonTest.java