use of org.eclipse.n4js.ts.scoping.builtin.BuiltInTypeScope in project n4js by eclipse.
the class BuiltInTypeScopeTest method testResolveSuperTypeOfBuiltInType.
@SuppressWarnings("javadoc")
@Test
public void testResolveSuperTypeOfBuiltInType() {
BuiltInTypeScope scope = BuiltInTypeScope.get(resourceSet);
// trigger loading
IEObjectDescription intDescription = scope.getSingleElement(QualifiedName.create("i18nKey"));
PrimitiveType intType = (PrimitiveType) intDescription.getEObjectOrProxy();
PrimitiveType assCompatType = intType.getAssignmentCompatible();
Assert.assertFalse(assCompatType.eIsProxy());
Assert.assertEquals("string", assCompatType.getName());
}
use of org.eclipse.n4js.ts.scoping.builtin.BuiltInTypeScope in project n4js by eclipse.
the class BuiltInTypeScopeTest method testResolveAllBuiltInTypes.
@SuppressWarnings("javadoc")
@Test
public void testResolveAllBuiltInTypes() {
BuiltInTypeScope scope = BuiltInTypeScope.get(resourceSet);
// trigger loading
scope.getSingleElement(QualifiedName.create("any"));
Assert.assertEquals(5, resourceSet.getResources().size());
EcoreUtil.resolveAll(resourceSet);
Assert.assertEquals(5, resourceSet.getResources().size());
Map<EObject, Collection<Setting>> unresolvedProxies = EcoreUtil.UnresolvedProxyCrossReferencer.find(resourceSet);
Assert.assertTrue(unresolvedProxies.toString(), unresolvedProxies.isEmpty());
}
Aggregations