Search in sources :

Example 1 with AbstractString

use of org.eclipse.xtext.parser.terminalrules.unicode.AbstractString in project xtext-core by eclipse.

the class UnicodeTest method testParseSTRING.

@Test
public void testParseSTRING() throws Exception {
    XtextResource resource = getResource("'" + UMLAUTS + "' '" + QUOTED_UMLAUTS + "' '" + MIXED_UMLAUTS + "'", "test.mydsl");
    Model model = (Model) resource.getContents().get(0);
    for (AbstractString s : model.getStrings()) {
        assertEquals(UMLAUTS, s.getName());
    }
}
Also used : Model(org.eclipse.xtext.parser.terminalrules.unicode.Model) AbstractString(org.eclipse.xtext.parser.terminalrules.unicode.AbstractString) XtextResource(org.eclipse.xtext.resource.XtextResource) Test(org.junit.Test)

Example 2 with AbstractString

use of org.eclipse.xtext.parser.terminalrules.unicode.AbstractString in project xtext-core by eclipse.

the class UnicodeTest method testParse.

@Test
public void testParse() throws Exception {
    XtextResource resource = getResource(UMLAUTS, "test.mydsl");
    Model model = (Model) resource.getContents().get(0);
    for (AbstractString s : model.getStrings()) {
        assertEquals(UMLAUTS, s.getName());
    }
}
Also used : Model(org.eclipse.xtext.parser.terminalrules.unicode.Model) AbstractString(org.eclipse.xtext.parser.terminalrules.unicode.AbstractString) XtextResource(org.eclipse.xtext.resource.XtextResource) Test(org.junit.Test)

Aggregations

AbstractString (org.eclipse.xtext.parser.terminalrules.unicode.AbstractString)2 Model (org.eclipse.xtext.parser.terminalrules.unicode.Model)2 XtextResource (org.eclipse.xtext.resource.XtextResource)2 Test (org.junit.Test)2