Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java CG: improve pattern handling for value definitions
- Loading branch information
Showing
5 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
core/codegen/javagen/src/test/resources/pattern_specs/ValueDefIgnorePattern.vdmpp
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class Entry | ||
|
||
values | ||
|
||
- = 2; | ||
|
||
operations | ||
|
||
public static Run : () ==> ? | ||
Run () == return 52; | ||
|
||
end Entry |
6 changes: 6 additions & 0 deletions
6
.../codegen/javagen/src/test/resources/pattern_specs/ValueDefIgnorePattern.vdmpp.eval.result
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<testResult type="org.overture.codegen.tests.exec.PatternJavaGenTest"> | ||
<result> | ||
<output object="rO0ABXNyAC9vcmcub3ZlcnR1cmUuaW50ZXJwcmV0ZXIudmFsdWVzLk5hdHVyYWxPbmVWYWx1ZQAAAAAAAAABAgAAeHIALG9yZy5vdmVydHVyZS5pbnRlcnByZXRlci52YWx1ZXMuTmF0dXJhbFZhbHVlAAAAAAAAAAECAAB4cgAsb3JnLm92ZXJ0dXJlLmludGVycHJldGVyLnZhbHVlcy5JbnRlZ2VyVmFsdWUAAAAAAAAAAQIAAUoAB2xvbmdWYWx4cgAtb3JnLm92ZXJ0dXJlLmludGVycHJldGVyLnZhbHVlcy5SYXRpb25hbFZhbHVlAAAAAAAAAAECAAB4cgApb3JnLm92ZXJ0dXJlLmludGVycHJldGVyLnZhbHVlcy5SZWFsVmFsdWUAAAAAAAAAAQIAAHhyACxvcmcub3ZlcnR1cmUuaW50ZXJwcmV0ZXIudmFsdWVzLk51bWVyaWNWYWx1ZQAAAAAAAAABAgABRAAFdmFsdWV4cgAlb3JnLm92ZXJ0dXJlLmludGVycHJldGVyLnZhbHVlcy5WYWx1ZQAAAAAAAAABAgAAeHBASgAAAAAAAAAAAAAAAAA0" resource="ValueDefIgnorePattern.vdmpp" value="52"/> | ||
</result> | ||
</testResult> |
22 changes: 22 additions & 0 deletions
22
core/codegen/javagen/src/test/resources/pattern_specs/ValueDefIgnorePattern.vdmpp.result
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
import java.util.*; | ||
import org.overture.codegen.runtime.*; | ||
|
||
@SuppressWarnings("all") | ||
public class Entry { | ||
private static final Number ignorePattern_1 = 2L; | ||
|
||
public static Object Run() { | ||
|
||
return 52L; | ||
} | ||
|
||
public Entry() {} | ||
|
||
public String toString() { | ||
|
||
return "Entry{" + "ignorePattern_1 = " + Utils.toString(ignorePattern_1) + "}"; | ||
} | ||
} | ||
|
||
########## |
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
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