/** Asserts that value of the top-level field "x" in given source has the given type name. */ private String assertType(String expectedTypeName, String[] lines) throws Exception { DartExpression expression = getMarkerVariableExpression(lines); String type = ExtractUtils.getTypeSource(expression); if (expectedTypeName != null) { assertNotNull(type); assertEquals(expectedTypeName, type); } else { assertNull(type); } return type; }
public void test_getType_null() throws Exception { assertSame(null, ExtractUtils.getTypeSource((DartExpression) null)); }