mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[xtext.xtext][serializer] Updated several test expectations.
the new serializer... - doesn't loose optional parenthesis anymore - produces text replacements starting at node.getTotalOffset() (the PTC produced them for node.getOffset()). Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
This commit is contained in:
parent
88f88178f4
commit
1b6a71b2e6
2 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ terminal ID2:
|
|||
'^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*;
|
||||
|
||||
terminal INT2 returns ecore::EInt:
|
||||
'0'..'9'+;
|
||||
('0'..'9')+;
|
||||
|
||||
terminal STRING2:
|
||||
'"' ('\\' ('b' | 't' | 'n' | 'f' | 'r' | '"' | "'" | '\\') | !('\\' | '"'))* '"' |
|
||||
|
|
|
@ -47,7 +47,7 @@ public class XtextGrammarSerializationTest extends AbstractXtextTests {
|
|||
final String model = "grammar foo with org.eclipse.xtext.common.Terminals\n"
|
||||
+ "generate mm \"http://bar\" as fooMM\n" + "StartRule returns fooMM::T: (name+=ID?)+;";
|
||||
final String expectedModel = "grammar foo with org.eclipse.xtext.common.Terminals\n\ngenerate "
|
||||
+ "mm \"http://bar\" as fooMM\n\nStartRule returns fooMM::T:\n name+=ID*;";
|
||||
+ "mm \"http://bar\" as fooMM\n\nStartRule returns fooMM::T:\n (name+=ID)*;";
|
||||
doTestSerialization(model, expectedModel);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ public class XtextGrammarSerializationTest extends AbstractXtextTests {
|
|||
+ "MyRule returns xtext::ParserRule : name=ID;";
|
||||
final String expectedModel = "grammar foo with org.eclipse.xtext.common.Terminals\n\n"
|
||||
+ "import \"http://www.eclipse.org/2008/Xtext\" as xtext\n" + "generate mm \"http://bar\" as fooMM\n\n"
|
||||
+ "Foo returns fooMM::Foo:\n name=ID nameRefs+=NameRef*;\n\n"
|
||||
+ "Foo returns fooMM::Foo:\n name=ID (nameRefs+=NameRef)*;\n\n"
|
||||
+ "NameRef returns xtext::RuleCall:\n rule=[xtext::ParserRule];\n\n"
|
||||
+ "MyRule returns xtext::ParserRule:\n name=ID;";
|
||||
doTestSerialization(model, expectedModel);
|
||||
|
|
Loading…
Reference in a new issue