Closed AtomCrafty closed 1 year ago
Update: Added the option to specify the line number an issue is expected on and made the console output a bit nicer to look at.
========================================
duplicateIsaStateElement1 2
========================================
1| InstructionSet A {
2| architectural_state {
3| int x;
4| }
5| }
6| InstructionSet B extends A {
7| architectural_state {
8| int x;
9| }
10| }
Issues:
WARNING: com.minres.coredsl.DuplicateIsaStateElement [line 6] (ISA parameter x has been declared multiple times (in A, B))
ERROR: com.minres.coredsl.DuplicateIsaStateElement [line 8] (An identifier with the name x has already been declared)
Expected:
WARNING: com.minres.coredsl.DuplicateIsaStateElement [line 6]
ERROR: com.minres.coredsl.DuplicateIsaStateElement [line 8]
Implements a set of new test helpers and rewrites one of the existing test classes to use them. A test case using this framework looks like this:
Notes:
.testProgram()
you can also use.testFunction()
,.testStatements()
, and.testInstruction()
. Those will add the necessary code context so you can focus on just writing the relevant parts of the test case..diagnosticsOnly()
call is optional and disables semantic analysis, meaning that only diagnostics issues reported by XText will be checked (just syntax errors and maybe some linker issues, not sure about the latter).