Search in sources :

Example 1 with TypeParserException

use of com.redhat.ceylon.model.loader.TypeParserException in project ceylon-compiler by ceylon.

the class TypeParserTests method testIterableAbbrev.

@Test
public void testIterableAbbrev() {
    try {
        new TypeParser(MockLoader.instance).decodeType("{a}", null, mockDefaultModule, mockPkgUnit);
        Assert.fail();
    } catch (TypeParserException e) {
        Assert.assertEquals("com.redhat.ceylon.model.loader.TypeParserException: Expected multiplicity in abbreviated Iterable type: 2", e.toString());
    }
}
Also used : TypeParser(com.redhat.ceylon.model.loader.TypeParser) TypeParserException(com.redhat.ceylon.model.loader.TypeParserException) Test(org.junit.Test)

Aggregations

TypeParser (com.redhat.ceylon.model.loader.TypeParser)1 TypeParserException (com.redhat.ceylon.model.loader.TypeParserException)1 Test (org.junit.Test)1