From 201475e8d8be1e3d301bcc385c3c7bc42410bff6 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Fri, 11 Mar 2016 09:00:18 -0800 Subject: [PATCH] cleanup(testing): clean up public api spec Change the old public api spec to check only the exported top-level symbols. This will make sure that Dart and JS do not diverge. The new public api spec verifies the TS api. Closes #7447 --- modules/angular2/test/public_api_spec.ts | 1553 +---------------- .../test/symbol_inspector/symbol_differ.ts | 68 - .../symbol_inspector/symbol_inspector.dart | 26 +- .../test/symbol_inspector/symbol_inspector.ts | 37 +- .../symbol_inspector/symbol_inspector_spec.ts | 77 +- 5 files changed, 120 insertions(+), 1641 deletions(-) delete mode 100644 modules/angular2/test/symbol_inspector/symbol_differ.ts diff --git a/modules/angular2/test/public_api_spec.ts b/modules/angular2/test/public_api_spec.ts index 7752520c70..356c253036 100644 --- a/modules/angular2/test/public_api_spec.ts +++ b/modules/angular2/test/public_api_spec.ts @@ -10,10 +10,9 @@ import { xdescribe, xit } from 'angular2/testing_internal'; -import {IS_DART} from 'angular2/src/facade/lang'; - +import {IS_DART, RegExpWrapper, StringWrapper} from 'angular2/src/facade/lang'; import {getSymbolsFromLibrary} from './symbol_inspector/symbol_inspector'; -import {SymbolsDiff} from './symbol_inspector/symbol_differ'; +import {ListWrapper} from 'angular2/src/facade/collection'; // ================================================================================================= // ================================================================================================= @@ -28,1421 +27,222 @@ import {SymbolsDiff} from './symbol_inspector/symbol_differ'; var NG_COMMON = [ 'AbstractControl', - 'AbstractControl.asyncValidator', - 'AbstractControl.asyncValidator=', - 'AbstractControl.dirty', - 'AbstractControl.errors', - 'AbstractControl.find()', - 'AbstractControl.getError()', - 'AbstractControl.hasError()', - 'AbstractControl.markAsDirty()', - 'AbstractControl.markAsPending()', - 'AbstractControl.markAsTouched()', - 'AbstractControl.pending', - 'AbstractControl.pristine', - 'AbstractControl.setErrors()', - 'AbstractControl.setParent()', - 'AbstractControl.status', - 'AbstractControl.statusChanges', - 'AbstractControl.touched', - 'AbstractControl.untouched', - 'AbstractControl.updateValueAndValidity()', - 'AbstractControl.valid', - 'AbstractControl.validator', - 'AbstractControl.validator=', - 'AbstractControl.value', - 'AbstractControl.root', - 'AbstractControl.valueChanges', 'AbstractControlDirective', - 'AbstractControlDirective.control', - 'AbstractControlDirective.dirty', - 'AbstractControlDirective.errors', - 'AbstractControlDirective.path', - 'AbstractControlDirective.pristine', - 'AbstractControlDirective.touched', - 'AbstractControlDirective.untouched', - 'AbstractControlDirective.valid', - 'AbstractControlDirective.value', 'AsyncPipe', - 'AsyncPipe.ngOnDestroy()', - 'AsyncPipe.transform()', 'COMMON_DIRECTIVES', 'COMMON_PIPES', 'CORE_DIRECTIVES', 'CheckboxControlValueAccessor', - 'CheckboxControlValueAccessor.onChange', - 'CheckboxControlValueAccessor.onChange=', - 'CheckboxControlValueAccessor.onTouched', - 'CheckboxControlValueAccessor.onTouched=', - 'CheckboxControlValueAccessor.registerOnChange()', - 'CheckboxControlValueAccessor.registerOnTouched()', - 'CheckboxControlValueAccessor.writeValue()', 'Control', - 'Control.asyncValidator', - 'Control.asyncValidator=', - 'Control.dirty', - 'Control.errors', - 'Control.find()', - 'Control.getError()', - 'Control.hasError()', - 'Control.markAsDirty()', - 'Control.markAsPending()', - 'Control.markAsTouched()', - 'Control.pending', - 'Control.pristine', - 'Control.registerOnChange()', - 'Control.setErrors()', - 'Control.setParent()', - 'Control.status', - 'Control.statusChanges', - 'Control.touched', - 'Control.untouched', - 'Control.updateValue()', - 'Control.updateValueAndValidity()', - 'Control.valid', - 'Control.validator', - 'Control.validator=', - 'Control.value', - 'Control.root', - 'Control.valueChanges', 'ControlArray', - 'ControlArray.asyncValidator', - 'ControlArray.asyncValidator=', - 'ControlArray.at()', - 'ControlArray.controls', - 'ControlArray.controls=', - 'ControlArray.dirty', - 'ControlArray.errors', - 'ControlArray.find()', - 'ControlArray.getError()', - 'ControlArray.hasError()', - 'ControlArray.insert()', - 'ControlArray.length', - 'ControlArray.markAsDirty()', - 'ControlArray.markAsPending()', - 'ControlArray.markAsTouched()', - 'ControlArray.pending', - 'ControlArray.pristine', - 'ControlArray.push()', - 'ControlArray.removeAt()', - 'ControlArray.setErrors()', - 'ControlArray.setParent()', - 'ControlArray.status', - 'ControlArray.statusChanges', - 'ControlArray.touched', - 'ControlArray.untouched', - 'ControlArray.updateValueAndValidity()', - 'ControlArray.valid', - 'ControlArray.validator', - 'ControlArray.validator=', - 'ControlArray.value', - 'ControlArray.root', - 'ControlArray.valueChanges', 'ControlContainer', - 'ControlContainer.control', - 'ControlContainer.dirty', - 'ControlContainer.errors', - 'ControlContainer.formDirective', - 'ControlContainer.name', - 'ControlContainer.name=', - 'ControlContainer.path', - 'ControlContainer.pristine', - 'ControlContainer.touched', - 'ControlContainer.untouched', - 'ControlContainer.valid', - 'ControlContainer.value', 'ControlGroup', - 'ControlGroup.addControl()', - 'ControlGroup.asyncValidator', - 'ControlGroup.asyncValidator=', - 'ControlGroup.contains()', - 'ControlGroup.controls', - 'ControlGroup.controls=', - 'ControlGroup.dirty', - 'ControlGroup.errors', - 'ControlGroup.exclude()', - 'ControlGroup.find()', - 'ControlGroup.getError()', - 'ControlGroup.hasError()', - 'ControlGroup.include()', - 'ControlGroup.markAsDirty()', - 'ControlGroup.markAsPending()', - 'ControlGroup.markAsTouched()', - 'ControlGroup.pending', - 'ControlGroup.pristine', - 'ControlGroup.removeControl()', - 'ControlGroup.setErrors()', - 'ControlGroup.setParent()', - 'ControlGroup.status', - 'ControlGroup.statusChanges', - 'ControlGroup.touched', - 'ControlGroup.untouched', - 'ControlGroup.updateValueAndValidity()', - 'ControlGroup.valid', - 'ControlGroup.validator', - 'ControlGroup.validator=', - 'ControlGroup.value', - 'ControlGroup.root', - 'ControlGroup.valueChanges', 'ControlValueAccessor:dart', 'CurrencyPipe', - 'CurrencyPipe.transform()', 'DatePipe', - 'DatePipe.supports()', - 'DatePipe.transform()', 'DecimalPipe', - 'DecimalPipe.transform()', 'DefaultValueAccessor', - 'DefaultValueAccessor.onChange', - 'DefaultValueAccessor.onChange=', - 'DefaultValueAccessor.onTouched', - 'DefaultValueAccessor.onTouched=', - 'DefaultValueAccessor.registerOnChange()', - 'DefaultValueAccessor.registerOnTouched()', - 'DefaultValueAccessor.writeValue()', 'FORM_BINDINGS', 'FORM_DIRECTIVES', 'FORM_PROVIDERS', 'Form:dart', 'FormBuilder', - 'FormBuilder.array()', - 'FormBuilder.control()', - 'FormBuilder.group()', 'I18nPluralPipe', - 'I18nPluralPipe.transform()', 'I18nSelectPipe', - 'I18nSelectPipe.transform()', 'JsonPipe', - 'JsonPipe.transform()', 'LowerCasePipe', - 'LowerCasePipe.transform()', 'MaxLengthValidator', - 'MaxLengthValidator.validate()', 'MinLengthValidator', - 'MinLengthValidator.validate()', 'NG_ASYNC_VALIDATORS', 'NG_VALIDATORS', 'NG_VALUE_ACCESSOR', 'NgClass', - 'NgClass.initialClasses=', - 'NgClass.ngDoCheck()', - 'NgClass.ngOnDestroy()', - 'NgClass.rawClass=', 'NgControl', - 'NgControl.asyncValidator', - 'NgControl.control', - 'NgControl.dirty', - 'NgControl.errors', - 'NgControl.name', - 'NgControl.name=', - 'NgControl.path', - 'NgControl.pristine', - 'NgControl.touched', - 'NgControl.untouched', - 'NgControl.valid', - 'NgControl.validator', - 'NgControl.value', - 'NgControl.valueAccessor', - 'NgControl.valueAccessor=', 'NgControlGroup', - 'NgControlGroup.asyncValidator', - 'NgControlGroup.control', - 'NgControlGroup.dirty', - 'NgControlGroup.errors', - 'NgControlGroup.formDirective', - 'NgControlGroup.name', - 'NgControlGroup.name=', - 'NgControlGroup.ngOnDestroy()', - 'NgControlGroup.ngOnInit()', - 'NgControlGroup.path', - 'NgControlGroup.pristine', - 'NgControlGroup.touched', - 'NgControlGroup.untouched', - 'NgControlGroup.valid', - 'NgControlGroup.validator', - 'NgControlGroup.value', 'NgControlName', - 'NgControlName.asyncValidator', - 'NgControlName.control', - 'NgControlName.dirty', - 'NgControlName.errors', - 'NgControlName.formDirective', - 'NgControlName.model', - 'NgControlName.model=', - 'NgControlName.name', - 'NgControlName.name=', - 'NgControlName.ngOnChanges()', - 'NgControlName.ngOnDestroy()', - 'NgControlName.path', - 'NgControlName.pristine', - 'NgControlName.touched', - 'NgControlName.untouched', - 'NgControlName.update', - 'NgControlName.update=', - 'NgControlName.valid', - 'NgControlName.validator', - 'NgControlName.value', - 'NgControlName.valueAccessor', - 'NgControlName.valueAccessor=', - 'NgControlName.viewModel', - 'NgControlName.viewModel=', - 'NgControlName.viewToModelUpdate()', 'NgControlStatus', - 'NgControlStatus.ngClassDirty', - 'NgControlStatus.ngClassInvalid', - 'NgControlStatus.ngClassPristine', - 'NgControlStatus.ngClassTouched', - 'NgControlStatus.ngClassUntouched', - 'NgControlStatus.ngClassValid', 'NgFor', - 'NgFor.ngDoCheck()', - 'NgFor.ngForOf=', - 'NgFor.ngForTemplate=', - 'NgFor.ngForTrackBy=', 'NgForm', - 'NgForm.addControl()', - 'NgForm.addControlGroup()', - 'NgForm.control', - 'NgForm.controls', - 'NgForm.dirty', - 'NgForm.errors', - 'NgForm.form', - 'NgForm.form=', - 'NgForm.formDirective', - 'NgForm.getControl()', - 'NgForm.getControlGroup()', - 'NgForm.name', - 'NgForm.name=', - 'NgForm.ngSubmit', - 'NgForm.ngSubmit=', - 'NgForm.onSubmit()', - 'NgForm.path', - 'NgForm.pristine', - 'NgForm.removeControl()', - 'NgForm.removeControlGroup()', - 'NgForm.touched', - 'NgForm.untouched', - 'NgForm.updateModel()', - 'NgForm.valid', - 'NgForm.value', 'NgFormControl', - 'NgFormControl.asyncValidator', - 'NgFormControl.control', - 'NgFormControl.dirty', - 'NgFormControl.errors', - 'NgFormControl.form', - 'NgFormControl.form=', - 'NgFormControl.model', - 'NgFormControl.model=', - 'NgFormControl.name', - 'NgFormControl.name=', - 'NgFormControl.ngOnChanges()', - 'NgFormControl.path', - 'NgFormControl.pristine', - 'NgFormControl.touched', - 'NgFormControl.untouched', - 'NgFormControl.update', - 'NgFormControl.update=', - 'NgFormControl.valid', - 'NgFormControl.validator', - 'NgFormControl.value', - 'NgFormControl.valueAccessor', - 'NgFormControl.valueAccessor=', - 'NgFormControl.viewModel', - 'NgFormControl.viewModel=', - 'NgFormControl.viewToModelUpdate()', 'NgFormModel', - 'NgFormModel.addControl()', - 'NgFormModel.addControlGroup()', - 'NgFormModel.control', - 'NgFormModel.directives', - 'NgFormModel.directives=', - 'NgFormModel.dirty', - 'NgFormModel.errors', - 'NgFormModel.form', - 'NgFormModel.form=', - 'NgFormModel.formDirective', - 'NgFormModel.getControl()', - 'NgFormModel.getControlGroup()', - 'NgFormModel.name', - 'NgFormModel.name=', - 'NgFormModel.ngOnChanges()', - 'NgFormModel.ngSubmit', - 'NgFormModel.ngSubmit=', - 'NgFormModel.onSubmit()', - 'NgFormModel.path', - 'NgFormModel.pristine', - 'NgFormModel.removeControl()', - 'NgFormModel.removeControlGroup()', - 'NgFormModel.touched', - 'NgFormModel.untouched', - 'NgFormModel.updateModel()', - 'NgFormModel.valid', - 'NgFormModel.value', 'NgIf', - 'NgIf.ngIf=', - 'NgLocalization', 'NgModel', - 'NgModel.asyncValidator', - 'NgModel.control', - 'NgModel.dirty', - 'NgModel.errors', - 'NgModel.model', - 'NgModel.model=', - 'NgModel.name', - 'NgModel.name=', - 'NgModel.ngOnChanges()', - 'NgModel.path', - 'NgModel.pristine', - 'NgModel.touched', - 'NgModel.untouched', - 'NgModel.update', - 'NgModel.update=', - 'NgModel.valid', - 'NgModel.validator', - 'NgModel.value', - 'NgModel.valueAccessor', - 'NgModel.valueAccessor=', - 'NgModel.viewModel', - 'NgModel.viewModel=', - 'NgModel.viewToModelUpdate()', - 'NgPlural', - 'NgPlural.cases', - 'NgPlural.cases=', - 'NgPlural.ngAfterContentInit()', - 'NgPlural.ngPlural=', - 'NgPluralCase', - 'NgPluralCase.value', - 'NgPluralCase.value=', 'NgSelectOption', 'NgStyle', - 'NgStyle.ngDoCheck()', - 'NgStyle.rawStyle=', 'NgSwitch', - 'NgSwitch.ngSwitch=', - 'NgSwitchDefault', 'NgSwitchWhen', - 'NgSwitchWhen.ngSwitchWhen=', + 'NgSwitchDefault', 'NumberPipe', - 'ObservableListDiff.check():dart', - 'ObservableListDiff.collection:dart', - 'ObservableListDiff.diff():dart', - 'ObservableListDiff.forEachAddedItem():dart', - 'ObservableListDiff.forEachItem():dart', - 'ObservableListDiff.forEachMovedItem():dart', - 'ObservableListDiff.forEachPreviousItem():dart', - 'ObservableListDiff.forEachRemovedItem():dart', - 'ObservableListDiff.forEachIdentityChange():dart', - 'ObservableListDiff.isDirty:dart', - 'ObservableListDiff.length:dart', - 'ObservableListDiff.onDestroy():dart', 'ObservableListDiff:dart', - 'ObservableListDiffFactory.create():dart', - 'ObservableListDiffFactory.supports():dart', 'ObservableListDiffFactory:dart', 'PatternValidator', - 'PatternValidator.validate()', 'PercentPipe', - 'PercentPipe.transform()', 'ReplacePipe', - 'ReplacePipe.transform()', 'RequiredValidator', 'SelectControlValueAccessor', - 'SelectControlValueAccessor.onChange', - 'SelectControlValueAccessor.onChange=', - 'SelectControlValueAccessor.onTouched', - 'SelectControlValueAccessor.onTouched=', - 'SelectControlValueAccessor.registerOnChange()', - 'SelectControlValueAccessor.registerOnTouched()', - 'SelectControlValueAccessor.value', - 'SelectControlValueAccessor.value=', - 'SelectControlValueAccessor.writeValue()', 'SlicePipe', - 'SlicePipe.supports()', - 'SlicePipe.transform()', 'UpperCasePipe', - 'UpperCasePipe.transform()', 'Validator:dart', 'Validators', - 'Validators#compose()', - 'Validators#composeAsync()', - 'Validators#maxLength()', - 'Validators#minLength()', - 'Validators#nullValidator()', - 'Validators#pattern()', - 'Validators#required()', 'RadioButtonState', - 'RadioButtonState.checked', - 'RadioButtonState.checked=', - 'RadioButtonState.value', - 'RadioButtonState.value=' + 'NgLocalization', + 'NgPlural', + 'NgPluralCase' ]; var NG_COMPILER = [ - "AttrAst.name", - "AttrAst.name=", - "AttrAst.sourceSpan", - "AttrAst.sourceSpan=", - "AttrAst.value", - "AttrAst.value=", - "BoundDirectivePropertyAst.directiveName", - "BoundDirectivePropertyAst.directiveName=", - "BoundDirectivePropertyAst.sourceSpan", - "BoundDirectivePropertyAst.sourceSpan=", - "BoundDirectivePropertyAst.templateName", - "BoundDirectivePropertyAst.templateName=", - "BoundDirectivePropertyAst.value", - "BoundDirectivePropertyAst.value=", - "BoundElementPropertyAst.name", - "BoundElementPropertyAst.name=", - "BoundElementPropertyAst.sourceSpan", - "BoundElementPropertyAst.sourceSpan=", - "BoundElementPropertyAst.type", - "BoundElementPropertyAst.type=", - "BoundElementPropertyAst.unit", - "BoundElementPropertyAst.unit=", - "BoundElementPropertyAst.value", - "BoundElementPropertyAst.value=", - "BoundEventAst.handler", - "BoundEventAst.handler=", - "BoundEventAst.name", - "BoundEventAst.name=", - "BoundEventAst.sourceSpan", - "BoundEventAst.sourceSpan=", - "BoundEventAst.target", - "BoundEventAst.target=", - "BoundTextAst.ngContentIndex", - "BoundTextAst.ngContentIndex=", - "BoundTextAst.sourceSpan", - "BoundTextAst.sourceSpan=", - "BoundTextAst.value", - "BoundTextAst.value=", - "CompileDirectiveMetadata.changeDetection", - "CompileDirectiveMetadata.changeDetection=", - "CompileDirectiveMetadata.dynamicLoadable", - "CompileDirectiveMetadata.dynamicLoadable=", - "CompileDirectiveMetadata.exportAs", - "CompileDirectiveMetadata.exportAs=", - "CompileDirectiveMetadata.hostAttributes", - "CompileDirectiveMetadata.hostAttributes=", - "CompileDirectiveMetadata.hostListeners", - "CompileDirectiveMetadata.hostListeners=", - "CompileDirectiveMetadata.hostProperties", - "CompileDirectiveMetadata.hostProperties=", - "CompileDirectiveMetadata.inputs", - "CompileDirectiveMetadata.inputs=", - "CompileDirectiveMetadata.isComponent", - "CompileDirectiveMetadata.isComponent=", - "CompileDirectiveMetadata.lifecycleHooks", - "CompileDirectiveMetadata.lifecycleHooks=", - "CompileDirectiveMetadata.outputs", - "CompileDirectiveMetadata.outputs=", - "CompileDirectiveMetadata.selector", - "CompileDirectiveMetadata.selector=", - "CompileDirectiveMetadata.template", - "CompileDirectiveMetadata.template=", - "CompileDirectiveMetadata.type", - "CompileDirectiveMetadata.type=", - "CompileDirectiveMetadata.identifier", - "CompileDirectiveMetadata.providers", - "CompileDirectiveMetadata.providers=", - "CompileDirectiveMetadata.queries", - "CompileDirectiveMetadata.queries=", - "CompileDirectiveMetadata.viewProviders", - "CompileDirectiveMetadata.viewProviders=", - "CompileDirectiveMetadata.viewQueries", - "CompileDirectiveMetadata.viewQueries=", - "CompileTemplateMetadata.encapsulation", - "CompileTemplateMetadata.encapsulation=", - "CompileTemplateMetadata.ngContentSelectors", - "CompileTemplateMetadata.ngContentSelectors=", - "CompileTemplateMetadata.styleUrls", - "CompileTemplateMetadata.styleUrls=", - "CompileTemplateMetadata.styles", - "CompileTemplateMetadata.styles=", - "CompileTemplateMetadata.template", - "CompileTemplateMetadata.template=", - "CompileTemplateMetadata.templateUrl", - "CompileTemplateMetadata.templateUrl=", - "CompileTypeMetadata.isHost", - "CompileTypeMetadata.isHost=", - "CompileTypeMetadata.moduleUrl", - "CompileTypeMetadata.moduleUrl=", - "CompileTypeMetadata.name", - "CompileTypeMetadata.name=", - "CompileTypeMetadata.runtime", - "CompileTypeMetadata.runtime=", - "CompileTypeMetadata.diDeps", - "CompileTypeMetadata.diDeps=", - "CompileTypeMetadata.type", - "CompileTypeMetadata.identifier", - "CompileTypeMetadata.prefix", - "CompileTypeMetadata.prefix=", - "CompileTypeMetadata.constConstructor", - "CompileTypeMetadata.constConstructor=", - "DirectiveAst.directive", - "DirectiveAst.directive=", - "DirectiveAst.exportAsVars", - "DirectiveAst.exportAsVars=", - "DirectiveAst.hostEvents", - "DirectiveAst.hostEvents=", - "DirectiveAst.hostProperties", - "DirectiveAst.hostProperties=", - "DirectiveAst.inputs", - "DirectiveAst.inputs=", - "DirectiveAst.sourceSpan", - "DirectiveAst.sourceSpan=", - "ElementAst.attrs", - "ElementAst.attrs=", - "ElementAst.children", - "ElementAst.children=", - "ElementAst.directives", - "ElementAst.directives=", - "ElementAst.exportAsVars", - "ElementAst.exportAsVars=", - "ElementAst.inputs", - "ElementAst.inputs=", - "ElementAst.name", - "ElementAst.name=", - "ElementAst.ngContentIndex", - "ElementAst.ngContentIndex=", - "ElementAst.outputs", - "ElementAst.outputs=", - "ElementAst.sourceSpan", - "ElementAst.sourceSpan=", - "EmbeddedTemplateAst.attrs", - "EmbeddedTemplateAst.attrs=", - "EmbeddedTemplateAst.children", - "EmbeddedTemplateAst.children=", - "EmbeddedTemplateAst.directives", - "EmbeddedTemplateAst.directives=", - "EmbeddedTemplateAst.ngContentIndex", - "EmbeddedTemplateAst.ngContentIndex=", - "EmbeddedTemplateAst.outputs", - "EmbeddedTemplateAst.outputs=", - "EmbeddedTemplateAst.sourceSpan", - "EmbeddedTemplateAst.sourceSpan=", - "EmbeddedTemplateAst.vars", - "EmbeddedTemplateAst.vars=", - "NgContentAst.index", - "NgContentAst.index=", - "NgContentAst.ngContentIndex", - "NgContentAst.ngContentIndex=", - "NgContentAst.sourceSpan", - "NgContentAst.sourceSpan=", - "PropertyBindingType#Attribute", - "PropertyBindingType#Class", - "PropertyBindingType#Property", - "PropertyBindingType#Style", - "PropertyBindingType#values", - "PropertyBindingType.index", - "SourceModule.moduleUrl", - "SourceModule.moduleUrl=", - "SourceModule.sourceWithModuleRefs", - "SourceModule.sourceWithModuleRefs=", - "SourceModule#getSourceWithoutImports()", - "SourceWithImports.imports", - "SourceWithImports.imports=", - "SourceWithImports.source", - "SourceWithImports.source=", "TemplateAst:dart", - "TemplateAst.sourceSpan", - "TemplateAst.sourceSpan=", "TemplateAstVisitor:dart", - "TextAst.ngContentIndex", - "TextAst.ngContentIndex=", - "TextAst.sourceSpan", - "TextAst.sourceSpan=", - "TextAst.value", - "TextAst.value=", - "VariableAst.name", - "VariableAst.name=", - "VariableAst.sourceSpan", - "VariableAst.sourceSpan=", - "VariableAst.value", - "VariableAst.value=", "DEFAULT_PACKAGE_URL_PROVIDER", "UrlResolver", - "UrlResolver.resolve()", - "getUrlScheme()", + "getUrlScheme", "AttrAst", - "AttrAst.visit()", "BoundDirectivePropertyAst", - "BoundDirectivePropertyAst.visit()", "BoundElementPropertyAst", - "BoundElementPropertyAst.visit()", "BoundEventAst", - "BoundEventAst.fullName", - "BoundEventAst.visit()", "BoundTextAst", - "BoundTextAst.visit()", "COMPILER_PROVIDERS", "CompileDirectiveMetadata", - "CompileDirectiveMetadata#create()", - "CompileDirectiveMetadata#fromJson()", - "CompileDirectiveMetadata.toJson()", "CompileTemplateMetadata", - "CompileTemplateMetadata#fromJson()", - "CompileTemplateMetadata.toJson()", "CompileTypeMetadata", - "CompileTypeMetadata#fromJson()", - "CompileTypeMetadata.toJson()", "DirectiveAst", - "DirectiveAst.visit()", "ElementAst", - "ElementAst.getComponent()", - "ElementAst.isBound()", - "ElementAst.visit()", "EmbeddedTemplateAst", - "EmbeddedTemplateAst.visit()", "NgContentAst", - "NgContentAst.visit()", "PLATFORM_DIRECTIVES", "PLATFORM_PIPES", "PropertyBindingType", "SourceModule", - "SourceModule.getSourceWithImports()", "SourceWithImports", "TEMPLATE_TRANSFORMS", "TemplateCompiler", - "TemplateCompiler.clearCache()", - "TemplateCompiler.compileHostComponentRuntime()", - "TemplateCompiler.compileStylesheetCodeGen()", - "TemplateCompiler.compileTemplatesCodeGen()", - "TemplateCompiler.normalizeDirectiveMetadata()", "TextAst", - "TextAst.visit()", "VariableAst", - "VariableAst.visit()", "XHR", - "XHR.get()", - "createWithoutPackagePrefix()", - "templateVisitAll()" + "createWithoutPackagePrefix", + "templateVisitAll" ]; var NG_CORE = [ 'APP_COMPONENT', 'APP_INITIALIZER', 'APP_ID', + 'AngularEntrypoint:dart', 'AbstractProviderError', - 'AbstractProviderError.addKey()', - 'AbstractProviderError.constructResolvingMessage', - 'AbstractProviderError.constructResolvingMessage=', - 'AbstractProviderError.context', - 'AbstractProviderError.injectors', - 'AbstractProviderError.injectors=', - 'AbstractProviderError.keys', - 'AbstractProviderError.keys=', - 'AbstractProviderError.message', - 'AbstractProviderError.message=', - 'AbstractProviderError.stackTrace', - 'AppViewManager:js', - /* - Abstract methods - 'AppViewManager.getHostElement()', - 'AppViewManager.attachViewInContainer()', - 'AppViewManager.createEmbeddedViewInContainer()', - 'AppViewManager.createHostViewInContainer()', - 'AppViewManager.createRootHostView()', - 'AppViewManager.destroyRootHostView()', - 'AppViewManager.destroyViewInContainer()', - 'AppViewManager.detachViewInContainer()', - 'AppViewManager.getComponent()', - 'AppViewManager.getNamedElementInComponentView()', - 'AppViewManager.getViewContainer()', - */ - 'ApplicationRef:js', - 'ApplicationRef.injector:js', - 'ApplicationRef.zone:js', - 'ApplicationRef.componentTypes:js', + 'AppViewManager', + 'ApplicationRef', 'APPLICATION_COMMON_PROVIDERS', - /* - Abstract methods - 'ApplicationRef.bootstrap()', - 'ApplicationRef.dispose()', - 'ApplicationRef.registerBootstrapListener()', - 'ApplicationRef.registerDisposeListener()', - 'ApplicationRef.tick()', - */ 'Attribute', - 'Attribute.attributeName', - 'Attribute.token', 'AttributeMetadata', - 'AttributeMetadata.attributeName', - 'AttributeMetadata.token', 'Binding', - 'Binding.dependencies', - 'Binding.multi', - 'Binding.useExisting', - 'Binding.useClass', - 'Binding.useFactory', - 'Binding.useValue', - 'Binding.token', - 'Binding.toAlias', - 'Binding.toClass', - 'Binding.toFactory', - 'Binding.toValue', 'Provider', - 'Provider.dependencies', - 'Provider.multi', - 'Provider.useExisting', - 'Provider.useClass', - 'Provider.useFactory', - 'Provider.useValue', - 'Provider.token', 'ProviderBuilder', - 'ProviderBuilder.toAlias()', - 'ProviderBuilder.toClass()', - 'ProviderBuilder.toFactory()', - 'ProviderBuilder.toValue()', - 'ProviderBuilder.token', - 'ProviderBuilder.token=', - 'PLATFORM_DIRECTIVES:js', + 'PLATFORM_DIRECTIVES', "CollectionChangeRecord", 'ChangeDetectionError', - 'ChangeDetectionError.context', - 'ChangeDetectionError.location', - 'ChangeDetectionError.location=', - 'ChangeDetectionError.message', - 'ChangeDetectionError.stackTrace', - 'ChangeDetectionError.wrapperMessage', - 'ChangeDetectionStrategy#CheckAlways', - 'ChangeDetectionStrategy#CheckOnce', - 'ChangeDetectionStrategy#Checked', - 'ChangeDetectionStrategy#Default', - 'ChangeDetectionStrategy#Detached', - 'ChangeDetectionStrategy#OnPush', - 'ChangeDetectionStrategy#values', 'ChangeDetectionStrategy', - 'ChangeDetectionStrategy.index', 'ChangeDetectorRef', - /* - Abstract methods - 'ChangeDetectorRef.detach()', - 'ChangeDetectorRef.detectChanges()', - 'ChangeDetectorRef.markForCheck()', - 'ChangeDetectorRef.reattach()',*/ 'Class:js', - 'Compiler:js', - /* - Abstract methods - 'Compiler.compileInHost()', - 'Compiler.clearCache()', - */ + 'Compiler', 'Component', - 'Component.bindings', - 'Component.providers', - 'Component.changeDetection', - 'Component.outputs', - 'Component.events', - 'Component.exportAs', - 'Component.host', - 'Component.moduleId', - 'Component.inputs', - 'Component.properties', - 'Component.queries', - 'Component.selector', - 'Component.viewBindings', - 'Component.viewProviders', - 'Component.directives', - 'Component.encapsulation', - 'Component.pipes', - 'Component.styleUrls', - 'Component.styles', - 'Component.template', - 'Component.templateUrl', 'ComponentMetadata', - 'ComponentMetadata.bindings', - 'ComponentMetadata.providers', - 'ComponentMetadata.changeDetection', - 'ComponentMetadata.outputs', - 'ComponentMetadata.events', - 'ComponentMetadata.exportAs', - 'ComponentMetadata.host', - 'ComponentMetadata.moduleId', - 'ComponentMetadata.inputs', - 'ComponentMetadata.properties', - 'ComponentMetadata.queries', - 'ComponentMetadata.selector', - 'ComponentMetadata.viewBindings', - 'ComponentMetadata.viewProviders', - 'ComponentMetadata.directives', - 'ComponentMetadata.encapsulation', - 'ComponentMetadata.pipes', - 'ComponentMetadata.styleUrls', - 'ComponentMetadata.styles', - 'ComponentMetadata.template', - 'ComponentMetadata.templateUrl', 'ComponentRef', - 'ComponentRef.componentType', - 'ComponentRef.componentType=', - 'ComponentRef.hostComponent:js', - 'ComponentRef.hostView:js', - 'ComponentRef.injector', - 'ComponentRef.injector=', - 'ComponentRef.instance', - 'ComponentRef.instance=', - 'ComponentRef.location', - 'ComponentRef.location=', - /* - Abstract method - 'ComponentRef.dispose()', - 'ComponentRef.hostComponentType', - */ 'ContentChild', - 'ContentChild.descendants', - 'ContentChild.first', - 'ContentChild.isVarBindingQuery', - 'ContentChild.isViewQuery', - 'ContentChild.selector', - 'ContentChild.token', - 'ContentChild.varBindings', 'ContentChildMetadata', - 'ContentChildMetadata.descendants', - 'ContentChildMetadata.first', - 'ContentChildMetadata.isVarBindingQuery', - 'ContentChildMetadata.isViewQuery', - 'ContentChildMetadata.selector', - 'ContentChildMetadata.token', - 'ContentChildMetadata.varBindings', 'ContentChildren', - 'ContentChildren.descendants', - 'ContentChildren.first', - 'ContentChildren.isVarBindingQuery', - 'ContentChildren.isViewQuery', - 'ContentChildren.selector', - 'ContentChildren.token', - 'ContentChildren.varBindings', 'ContentChildrenMetadata', - 'ContentChildrenMetadata.descendants', - 'ContentChildrenMetadata.first', - 'ContentChildrenMetadata.isVarBindingQuery', - 'ContentChildrenMetadata.isViewQuery', - 'ContentChildrenMetadata.selector', - 'ContentChildrenMetadata.token', - 'ContentChildrenMetadata.varBindings', 'CyclicDependencyError', - 'CyclicDependencyError.addKey()', - 'CyclicDependencyError.constructResolvingMessage', - 'CyclicDependencyError.constructResolvingMessage=', - 'CyclicDependencyError.context', - 'CyclicDependencyError.injectors', - 'CyclicDependencyError.injectors=', - 'CyclicDependencyError.keys', - 'CyclicDependencyError.keys=', - 'CyclicDependencyError.message', - 'CyclicDependencyError.message=', - 'CyclicDependencyError.stackTrace', - 'PLATFORM_PIPES:js', + 'PLATFORM_PIPES', 'DebugNode', - 'DebugNode.getLocal()', - 'DebugNode.inject()', - 'DebugNode.setDebugInfo()', - 'DebugNode.componentInstance', - 'DebugNode.componentInstance=', - 'DebugNode.injector', - 'DebugNode.injector=', - 'DebugNode.listeners', - 'DebugNode.listeners=', - 'DebugNode.locals', - 'DebugNode.locals=', - 'DebugNode.nativeNode', - 'DebugNode.nativeNode=', - 'DebugNode.parent', - 'DebugNode.parent=', - 'DebugNode.providerTokens', - 'DebugNode.providerTokens=', 'DebugElement', - 'DebugElement.children', - 'DebugElement.attributes', - 'DebugElement.attributes=', - 'DebugElement.properties', - 'DebugElement.properties=', - 'DebugElement.childNodes', - 'DebugElement.childNodes=', - 'DebugElement.injector', - 'DebugElement.injector=', - 'DebugElement.listeners', - 'DebugElement.listeners=', - 'DebugElement.locals', - 'DebugElement.locals=', - 'DebugElement.name', - 'DebugElement.name=', - 'DebugElement.parent', - 'DebugElement.parent=', - 'DebugElement.componentInstance', - 'DebugElement.componentInstance=', - 'DebugElement.getLocal()', - 'DebugElement.providerTokens', - 'DebugElement.providerTokens=', - 'DebugElement.inject()', - 'DebugElement.nativeNode', - 'DebugElement.nativeNode=', - 'DebugElement.nativeElement', - 'DebugElement.nativeElement=', - 'DebugElement.query()', - 'DebugElement.queryAll()', - 'DebugElement.queryAllNodes()', - 'DebugElement.triggerEventHandler()', - 'DebugElement.setDebugInfo()', - 'DebugElement.addChild()', - 'DebugElement.removeChild()', - 'DebugElement.insertChildrenAfter()', - 'Dependency#fromKey()', 'Dependency', - 'Dependency.key', - 'Dependency.key=', - 'Dependency.lowerBoundVisibility', - 'Dependency.lowerBoundVisibility=', - 'Dependency.optional', - 'Dependency.optional=', - 'Dependency.properties', - 'Dependency.properties=', - 'Dependency.upperBoundVisibility', - 'Dependency.upperBoundVisibility=', 'DependencyMetadata', - 'DependencyMetadata.token', 'Directive', - 'Directive.bindings', - 'Directive.providers', - 'Directive.outputs', - 'Directive.events', - 'Directive.exportAs', - 'Directive.host', - 'Directive.inputs', - 'Directive.properties', - 'Directive.queries', - 'Directive.selector', 'DirectiveMetadata', - 'DirectiveMetadata.bindings', - 'DirectiveMetadata.providers', - 'DirectiveMetadata.outputs', - 'DirectiveMetadata.events', - 'DirectiveMetadata.exportAs', - 'DirectiveMetadata.host', - 'DirectiveMetadata.inputs', - 'DirectiveMetadata.properties', - 'DirectiveMetadata.queries', - 'DirectiveMetadata.selector', 'DirectiveResolver', - 'DirectiveResolver.resolve()', 'DynamicComponentLoader', - /* - Abstract methods - 'DynamicComponentLoader.loadAsRoot()', - 'DynamicComponentLoader.loadIntoLocation()', - 'DynamicComponentLoader.loadNextToLocation()', - */ 'ElementRef', - 'ElementRef.nativeElement', 'ErrorHandlingFn:dart', 'Output', - 'Output.bindingPropertyName', - 'EmbeddedViewRef:dart', - 'EmbeddedViewRef.changeDetectorRef', - 'EmbeddedViewRef.destroyed', - 'EmbeddedViewRef.rootNodes', + 'EmbeddedViewRef', 'EventEmitter', - /* - Dart Stream/EventEmitter - */ - 'EventEmitter.add():dart', - 'EventEmitter.addError():dart', - 'EventEmitter.any():dart', - 'EventEmitter.asBroadcastStream():dart', - 'EventEmitter.asyncExpand():dart', - 'EventEmitter.asyncMap():dart', - 'EventEmitter.close():dart', - 'EventEmitter.contains():dart', - 'EventEmitter.distinct():dart', - 'EventEmitter.drain():dart', - 'EventEmitter.elementAt():dart', - 'EventEmitter.every():dart', - 'EventEmitter.expand():dart', - 'EventEmitter.first:dart', - 'EventEmitter.firstWhere():dart', - 'EventEmitter.fold():dart', - 'EventEmitter.forEach():dart', - 'EventEmitter.handleError():dart', - 'EventEmitter.isBroadcast:dart', - 'EventEmitter.isEmpty:dart', - 'EventEmitter.join():dart', - 'EventEmitter.last:dart', - 'EventEmitter.lastWhere():dart', - 'EventEmitter.length:dart', - 'EventEmitter.listen():dart', - 'EventEmitter.map():dart', - 'EventEmitter.pipe():dart', - 'EventEmitter.reduce():dart', - 'EventEmitter.single:dart', - 'EventEmitter.singleWhere():dart', - 'EventEmitter.skip():dart', - 'EventEmitter.skipWhile():dart', - 'EventEmitter.take():dart', - 'EventEmitter.takeWhile():dart', - 'EventEmitter.timeout():dart', - 'EventEmitter.toList():dart', - 'EventEmitter.toSet():dart', - 'EventEmitter.transform():dart', - 'EventEmitter.where():dart', 'ExceptionHandler', - 'ExceptionHandler#exceptionToString()', - 'ExceptionHandler.call()', - - /* - RxJS API - may need to maintain as RxJS evolves - */ - 'EventEmitter.emit():js', 'OutputMetadata', - 'OutputMetadata.bindingPropertyName', - 'enableProdMode():js', + 'enableProdMode', 'ExpressionChangedAfterItHasBeenCheckedException', - 'ExpressionChangedAfterItHasBeenCheckedException.message', - 'ExpressionChangedAfterItHasBeenCheckedException.stackTrace', 'Host', 'HostBinding', - 'HostBinding.hostPropertyName', 'HostBindingMetadata', - 'HostBindingMetadata.hostPropertyName', 'HostListener', - 'HostListener.args', - 'HostListener.eventName', 'HostListenerMetadata', - 'HostListenerMetadata.args', - 'HostListenerMetadata.eventName', 'HostMetadata', - 'HostViewFactoryRef:dart', + 'HostViewFactoryRef', 'Inject', - 'Inject.token', 'InjectMetadata', - 'InjectMetadata.token', 'Injectable', 'InjectableMetadata', - 'Injector#fromResolvedBindings()', - 'Injector#fromResolvedProviders()', - 'Injector#resolve()', - 'Injector#resolveAndCreate()', 'Injector', - 'Injector.createChildFromResolved()', - 'Injector.debugContext()', - 'Injector.displayName', - 'Injector.get()', - 'Injector.getAt()', - 'Injector.getOptional()', - 'Injector.hostBoundary', - 'Injector.instantiateResolved()', - 'Injector.internalStrategy', - 'Injector.parent', - 'Injector.resolveAndCreateChild()', - 'Injector.resolveAndInstantiate()', 'InstantiationError', - 'InstantiationError.addKey()', - 'InstantiationError.causeKey', - 'InstantiationError.context', - 'InstantiationError.injectors', - 'InstantiationError.injectors=', - 'InstantiationError.keys', - 'InstantiationError.keys=', - 'InstantiationError.message', - 'InstantiationError.stackTrace', - 'InstantiationError.wrapperMessage', 'InvalidProviderError', - 'InvalidProviderError.message', - 'InvalidProviderError.stackTrace', - 'IterableDiffers#create()', - 'IterableDiffers#extend()', 'IterableDiffers', - 'IterableDiffers.factories', - 'IterableDiffers.find()', - 'Key#get()', - 'Key#numberOfKeys', 'Key', - 'Key.displayName', - 'Key.id', - 'Key.id=', - 'Key.token', - 'Key.token=', 'KeyValueChangeRecord', - 'KeyValueChangeRecord.currentValue', - 'KeyValueChangeRecord.currentValue=', - 'KeyValueChangeRecord.key', - 'KeyValueChangeRecord.key=', - 'KeyValueChangeRecord.previousValue', - 'KeyValueChangeRecord.previousValue=', - 'KeyValueDiffers#create()', - 'KeyValueDiffers#extend()', 'KeyValueDiffers', - 'KeyValueDiffers.factories', - 'KeyValueDiffers.find()', 'NgZone', - 'NgZone.hasPendingAsyncTasks', - 'NgZone.hasPendingMicrotasks', - 'NgZone.hasPendingTimers', - 'NgZone.onError', - 'NgZone.onEventDone', - 'NgZone.onTurnDone', - 'NgZone.onTurnStart', - 'NgZone.overrideOnErrorHandler()', - 'NgZone.overrideOnEventDone()', - 'NgZone.overrideOnTurnDone()', - 'NgZone.overrideOnTurnStart()', - 'NgZone.run()', - 'NgZone.runOutsideAngular()', 'NgZoneError', - 'NgZoneError.error', - 'NgZoneError.stackTrace', 'NoAnnotationError', - 'NoAnnotationError.message', - 'NoAnnotationError.stackTrace', 'NoProviderError', - 'NoProviderError.addKey()', - 'NoProviderError.constructResolvingMessage', - 'NoProviderError.constructResolvingMessage=', - 'NoProviderError.context', - 'NoProviderError.injectors', - 'NoProviderError.injectors=', - 'NoProviderError.keys', - 'NoProviderError.keys=', - 'NoProviderError.message', - 'NoProviderError.message=', - 'NoProviderError.stackTrace', 'OpaqueToken', 'Optional', 'OptionalMetadata', 'OutOfBoundsError', - 'OutOfBoundsError.message', - 'OutOfBoundsError.stackTrace', 'Pipe', - 'Pipe.name', - 'Pipe.pure', 'PipeMetadata', - 'PipeMetadata.name', - 'PipeMetadata.pure', 'PlatformRef', - /* - Abstract methods - 'PlatformRef.application()', - 'PlatformRef.asyncApplication()', - 'PlatformRef.dispose()', - 'PlatformRef.registerDisposeListener()', - */ - 'PlatformRef.injector', 'Input', - 'Input.bindingPropertyName', 'InputMetadata', - 'InputMetadata.bindingPropertyName', 'Query', - 'Query.descendants', - 'Query.first', - 'Query.isVarBindingQuery', - 'Query.isViewQuery', - 'Query.selector', - 'Query.token', - 'Query.varBindings', 'QueryList', - 'QueryList.any():dart', - 'QueryList.contains():dart', - 'QueryList.elementAt():dart', - 'QueryList.every():dart', - 'QueryList.expand():dart', - 'QueryList.notifyOnChanges():', - 'QueryList.first', - 'QueryList.firstWhere():dart', - 'QueryList.fold():dart', - 'QueryList.forEach():dart', - 'QueryList.isEmpty', - 'QueryList.isNotEmpty', - 'QueryList.iterator', - 'QueryList.join():dart', - 'QueryList.last', - 'QueryList.lastWhere():dart', - 'QueryList.length', - 'QueryList.map()', - 'QueryList.changes', - 'QueryList.reduce():dart', - 'QueryList.reset()', - 'QueryList.single', - 'QueryList.singleWhere():dart', - 'QueryList.skip():dart', - 'QueryList.skipWhile():dart', - 'QueryList.take():dart', - 'QueryList.takeWhile():dart', - 'QueryList.toList():dart', - 'QueryList.toSet():dart', - 'QueryList.where():dart', 'QueryMetadata', - 'QueryMetadata.descendants', - 'QueryMetadata.first', - 'QueryMetadata.isVarBindingQuery', - 'QueryMetadata.isViewQuery', - 'QueryMetadata.selector', - 'QueryMetadata.token', - 'QueryMetadata.varBindings', 'Renderer', 'RootRenderer', 'RenderComponentType', - 'RenderComponentType.encapsulation', - 'RenderComponentType.encapsulation=', - 'RenderComponentType.id', - 'RenderComponentType.id=', - 'RenderComponentType.styles', - 'RenderComponentType.styles=', 'ResolvedBinding:dart', 'ResolvedProvider:dart', - 'ResolvedProvider.key:dart', - 'ResolvedProvider.key=:dart', - 'ResolvedProvider.multiProvider:dart', - 'ResolvedProvider.multiProvider=:dart', - 'ResolvedProvider.resolvedFactories:dart', - 'ResolvedProvider.resolvedFactories=:dart', 'ResolvedFactory', - 'ResolvedFactory.dependencies', - 'ResolvedFactory.dependencies=', - 'ResolvedFactory.factory', - 'ResolvedFactory.factory=', 'Self', 'SelfMetadata', 'SkipSelf', 'SkipSelfMetadata', 'SimpleChange', - 'SimpleChange.currentValue', - 'SimpleChange.currentValue=', - 'SimpleChange.previousValue', - 'SimpleChange.previousValue=', - 'SimpleChange.isFirstChange()', 'TemplateRef', - 'TemplateRef.elementRef', - /* - Abstract method - 'TemplateRef.hasLocal()', - */ 'Testability', - 'Testability.decreasePendingRequestCount()', - 'Testability.findBindings()', - 'Testability.findProviders()', - 'Testability.getPendingRequestCount()', - 'Testability.increasePendingRequestCount()', - 'Testability.isAngularEventPending()', - 'Testability.isStable()', - 'Testability.whenStable()', 'TestabilityRegistry', - 'TestabilityRegistry.findTestabilityInTree()', - 'TestabilityRegistry.getAllTestabilities()', - 'TestabilityRegistry.getAllRootElements()', - 'TestabilityRegistry.getTestability()', - 'TestabilityRegistry.registerApplication()', 'GetTestability:dart', - 'setTestabilityGetter()', - 'Type:js', + 'setTestabilityGetter', + 'Type', 'PACKAGE_ROOT_URL', 'View', - 'View.directives', - 'View.encapsulation', - 'View.pipes', - 'View.styleUrls', - 'View.styles', - 'View.template', - 'View.templateUrl', 'ViewChild', - 'ViewChild.descendants', - 'ViewChild.first', - 'ViewChild.isVarBindingQuery', - 'ViewChild.isViewQuery', - 'ViewChild.selector', - 'ViewChild.token', - 'ViewChild.varBindings', 'ViewChildMetadata', - 'ViewChildMetadata.descendants', - 'ViewChildMetadata.first', - 'ViewChildMetadata.isVarBindingQuery', - 'ViewChildMetadata.isViewQuery', - 'ViewChildMetadata.selector', - 'ViewChildMetadata.token', - 'ViewChildMetadata.varBindings', 'ViewChildren', - 'ViewChildren.descendants', - 'ViewChildren.first', - 'ViewChildren.isVarBindingQuery', - 'ViewChildren.isViewQuery', - 'ViewChildren.selector', - 'ViewChildren.token', - 'ViewChildren.varBindings', 'ViewChildrenMetadata', - 'ViewChildrenMetadata.descendants', - 'ViewChildrenMetadata.first', - 'ViewChildrenMetadata.isVarBindingQuery', - 'ViewChildrenMetadata.isViewQuery', - 'ViewChildrenMetadata.selector', - 'ViewChildrenMetadata.token', - 'ViewChildrenMetadata.varBindings', 'ViewContainerRef', - 'ViewContainerRef.clear()', - /* - Abstract methods - 'ViewContainerRef.createEmbeddedView()', - 'ViewContainerRef.createHostView()', - 'ViewContainerRef.detach()', - */ - 'ViewContainerRef.element', - /* - 'ViewContainerRef.get()', - 'ViewContainerRef.indexOf()', - 'ViewContainerRef.insert()', - */ - 'ViewContainerRef.length', - 'ViewEncapsulation#Emulated', - 'ViewEncapsulation#Native', - 'ViewEncapsulation#None', - 'ViewEncapsulation#values', 'ViewEncapsulation', - 'ViewEncapsulation.index', 'ViewMetadata', - 'ViewMetadata.directives', - 'ViewMetadata.encapsulation', - 'ViewMetadata.pipes', - 'ViewMetadata.styleUrls', - 'ViewMetadata.styles', - 'ViewMetadata.template', - 'ViewMetadata.templateUrl', 'ViewQuery', - 'ViewQuery.descendants', - 'ViewQuery.first', - 'ViewQuery.isVarBindingQuery', - 'ViewQuery.isViewQuery', - 'ViewQuery.selector', - 'ViewQuery.token', - 'ViewQuery.varBindings', 'ViewQueryMetadata', - 'ViewQueryMetadata.descendants', - 'ViewQueryMetadata.first', - 'ViewQueryMetadata.isVarBindingQuery', - 'ViewQueryMetadata.isViewQuery', - 'ViewQueryMetadata.selector', - 'ViewQueryMetadata.token', - 'ViewQueryMetadata.varBindings', - /* - Abstract method - 'ViewRef.setLocal()', - */ 'ViewResolver', - 'ViewResolver.resolve()', 'WrappedException', - 'WrappedException.context', - 'WrappedException.message', - 'WrappedException.stackTrace', - 'WrappedException.wrapperMessage', - 'WrappedValue#wrap()', 'WrappedValue', - 'WrappedValue.wrapped', - 'WrappedValue.wrapped=', 'ZeroArgFunction:dart', - 'asNativeElements()', - 'bind()', - 'provide()', - 'createNgZone()', - 'forwardRef():js', - 'platform():js', - 'resolveForwardRef():js', + 'asNativeElements', + 'bind', + 'provide', + 'createNgZone', + 'forwardRef:js', + 'platform', + 'resolveForwardRef:js', 'PLATFORM_COMMON_PROVIDERS', 'PLATFORM_INITIALIZER', 'AfterContentChecked:dart', @@ -1450,10 +250,7 @@ var NG_CORE = [ 'AfterViewChecked:dart', 'AfterViewInit:dart', 'DoCheck:dart', - 'HostViewRef:dart', - 'HostViewRef.changeDetectorRef', - 'HostViewRef.destroyed', - 'HostViewRef.rootNodes', + 'HostViewRef', 'IterableDifferFactory:dart', 'IterableDiffer:dart', 'KeyValueDifferFactory:dart', @@ -1464,254 +261,39 @@ var NG_CORE = [ 'PipeTransform:dart', 'reflector', 'Stream:dart', - 'Stream.any():dart', - 'Stream.asBroadcastStream():dart', - 'Stream.asyncExpand():dart', - 'Stream.asyncMap():dart', - 'Stream.contains():dart', - 'Stream.distinct():dart', - 'Stream.drain():dart', - 'Stream.elementAt():dart', - 'Stream.every():dart', - 'Stream.expand():dart', - 'Stream.first:dart', - 'Stream.firstWhere():dart', - 'Stream.fold():dart', - 'Stream.forEach():dart', - 'Stream.handleError():dart', - 'Stream.isBroadcast:dart', - 'Stream.isEmpty:dart', - 'Stream.join():dart', - 'Stream.last:dart', - 'Stream.lastWhere():dart', - 'Stream.length:dart', - 'Stream.map():dart', - 'Stream.pipe():dart', - 'Stream.reduce():dart', - 'Stream.single:dart', - 'Stream.singleWhere():dart', - 'Stream.skip():dart', - 'Stream.skipWhile():dart', - 'Stream.take():dart', - 'Stream.takeWhile():dart', - 'Stream.timeout():dart', - 'Stream.toList():dart', - 'Stream.toSet():dart', - 'Stream.transform():dart', - 'Stream.where():dart', 'GetterFn:dart', 'MethodFn:dart', 'NoReflectionCapabilities:dart', - 'NoReflectionCapabilities.annotations():dart', - 'NoReflectionCapabilities.factory():dart', - 'NoReflectionCapabilities.getter():dart', - 'NoReflectionCapabilities.importUri():dart', - 'NoReflectionCapabilities.interfaces():dart', - 'NoReflectionCapabilities.isReflectionEnabled():dart', - 'NoReflectionCapabilities.method():dart', - 'NoReflectionCapabilities.parameters():dart', - 'NoReflectionCapabilities.propMetadata():dart', - 'NoReflectionCapabilities.setter():dart', 'PlatformReflectionCapabilities:dart', - 'ReflectionInfo:dart', - 'ReflectionInfo.annotations:dart', - 'ReflectionInfo.annotations=:dart', - 'ReflectionInfo.factory:dart', - 'ReflectionInfo.factory=:dart', - 'ReflectionInfo.interfaces:dart', - 'ReflectionInfo.interfaces=:dart', - 'ReflectionInfo.parameters:dart', - 'ReflectionInfo.parameters=:dart', - 'ReflectionInfo.propMetadata:dart', - 'ReflectionInfo.propMetadata=:dart', - 'Reflector:dart', - 'Reflector.annotations():dart', - 'Reflector.factory():dart', - 'Reflector.getter():dart', - 'Reflector.importUri():dart', - 'Reflector.interfaces():dart', - 'Reflector.isReflectionEnabled():dart', - 'Reflector.listUnusedKeys():dart', - 'Reflector.method():dart', - 'Reflector.parameters():dart', - 'Reflector.propMetadata():dart', - 'Reflector.reflectionCapabilities:dart', - 'Reflector.reflectionCapabilities=:dart', - 'Reflector.registerFunction():dart', - 'Reflector.registerGetters():dart', - 'Reflector.registerMethods():dart', - 'Reflector.registerSetters():dart', - 'Reflector.registerType():dart', - 'Reflector.setter():dart', - 'Reflector.trackUsage():dart', + 'ReflectionInfo', + 'Reflector', 'SetterFn:dart', - 'ViewRef:dart', - 'ViewRef.changeDetectorRef', - 'ViewRef.destroyed', + 'ViewRef', + 'TrackByFn:dart' ]; -var NG_INSTRUMENTATION = [ - 'wtfCreateScope():js', - 'wtfCreateScope:dart', - 'wtfEndTimeRange():js', - 'wtfEndTimeRange:dart', - 'wtfLeave():js', - 'wtfLeave:dart', - 'WtfScopeFn:dart', - 'wtfStartTimeRange():js', - 'wtfStartTimeRange:dart' -]; +var NG_INSTRUMENTATION = + ['wtfCreateScope', 'wtfEndTimeRange', 'wtfLeave', 'WtfScopeFn:dart', 'wtfStartTimeRange']; var NG_PLATFORM_BROWSER = [ 'AngularEntrypoint', - 'AngularEntrypoint.name', - 'BROWSER_APP_PROVIDERS:js', - 'BROWSER_PROVIDERS:js', - 'BrowserDomAdapter#makeCurrent():js', - 'BrowserDomAdapter.addClass():js', - 'BrowserDomAdapter.adoptNode():js', - 'BrowserDomAdapter.appendChild():js', - 'BrowserDomAdapter.attrToPropMap:js', - 'BrowserDomAdapter.attributeMap():js', - 'BrowserDomAdapter.cancelAnimationFrame():js', - 'BrowserDomAdapter.childNodes():js', - 'BrowserDomAdapter.childNodesAsList():js', - 'BrowserDomAdapter.classList():js', - 'BrowserDomAdapter.clearNodes():js', - 'BrowserDomAdapter.clone():js', - 'BrowserDomAdapter.content():js', - 'BrowserDomAdapter.createComment():js', - 'BrowserDomAdapter.createElement():js', - 'BrowserDomAdapter.createElementNS():js', - 'BrowserDomAdapter.createEvent():js', - 'BrowserDomAdapter.createHtmlDocument():js', - 'BrowserDomAdapter.createMouseEvent():js', - 'BrowserDomAdapter.createScriptTag():js', - 'BrowserDomAdapter.createShadowRoot():js', - 'BrowserDomAdapter.createStyleElement():js', - 'BrowserDomAdapter.createTemplate():js', - 'BrowserDomAdapter.createTextNode():js', - 'BrowserDomAdapter.defaultDoc():js', - 'BrowserDomAdapter.dispatchEvent():js', - 'BrowserDomAdapter.elementMatches():js', - 'BrowserDomAdapter.firstChild():js', - 'BrowserDomAdapter.getAnimationPrefix():js', - 'BrowserDomAdapter.getAttribute():js', - 'BrowserDomAdapter.getAttributeNS():js', - 'BrowserDomAdapter.getBaseHref():js', - 'BrowserDomAdapter.getBoundingClientRect():js', - 'BrowserDomAdapter.getChecked():js', - 'BrowserDomAdapter.getComputedStyle():js', - 'BrowserDomAdapter.getData():js', - 'BrowserDomAdapter.getDistributedNodes():js', - 'BrowserDomAdapter.getElementsByClassName():js', - 'BrowserDomAdapter.getElementsByTagName():js', - 'BrowserDomAdapter.getEventKey():js', - 'BrowserDomAdapter.getGlobalEventTarget():js', - 'BrowserDomAdapter.getHistory():js', - 'BrowserDomAdapter.getHost():js', - 'BrowserDomAdapter.getHref():js', - 'BrowserDomAdapter.getInnerHTML():js', - 'BrowserDomAdapter.getLocation():js', - 'BrowserDomAdapter.getOuterHTML():js', - 'BrowserDomAdapter.getProperty():js', - 'BrowserDomAdapter.getShadowRoot():js', - 'BrowserDomAdapter.getStyle():js', - 'BrowserDomAdapter.getText():js', - 'BrowserDomAdapter.getTitle():js', - 'BrowserDomAdapter.getTransitionEnd():js', - 'BrowserDomAdapter.getUserAgent():js', - 'BrowserDomAdapter.getValue():js', - 'BrowserDomAdapter.getXHR():js', - 'BrowserDomAdapter.hasAttribute():js', - 'BrowserDomAdapter.hasAttributeNS():js', - 'BrowserDomAdapter.hasClass():js', - 'BrowserDomAdapter.hasProperty():js', - 'BrowserDomAdapter.hasShadowRoot():js', - 'BrowserDomAdapter.hasStyle():js', - 'BrowserDomAdapter.importIntoDoc():js', - 'BrowserDomAdapter.insertAfter():js', - 'BrowserDomAdapter.insertAllBefore():js', - 'BrowserDomAdapter.insertBefore():js', - 'BrowserDomAdapter.invoke():js', - 'BrowserDomAdapter.isCommentNode():js', - 'BrowserDomAdapter.isElementNode():js', - 'BrowserDomAdapter.isPrevented():js', - 'BrowserDomAdapter.isShadowRoot():js', - 'BrowserDomAdapter.isTemplateElement():js', - 'BrowserDomAdapter.isTextNode():js', - 'BrowserDomAdapter.log():js', - 'BrowserDomAdapter.logError():js', - 'BrowserDomAdapter.logGroup():js', - 'BrowserDomAdapter.logGroupEnd():js', - 'BrowserDomAdapter.nextSibling():js', - 'BrowserDomAdapter.nodeName():js', - 'BrowserDomAdapter.nodeValue():js', - 'BrowserDomAdapter.on():js', - 'BrowserDomAdapter.onAndCancel():js', - 'BrowserDomAdapter.parentElement():js', - 'BrowserDomAdapter.parse():js', - 'BrowserDomAdapter.performanceNow():js', - 'BrowserDomAdapter.preventDefault():js', - 'BrowserDomAdapter.query():js', - 'BrowserDomAdapter.querySelector():js', - 'BrowserDomAdapter.querySelectorAll():js', - 'BrowserDomAdapter.remove():js', - 'BrowserDomAdapter.removeAttribute():js', - 'BrowserDomAdapter.removeAttributeNS():js', - 'BrowserDomAdapter.removeChild():js', - 'BrowserDomAdapter.removeClass():js', - 'BrowserDomAdapter.removeStyle():js', - 'BrowserDomAdapter.replaceChild():js', - 'BrowserDomAdapter.requestAnimationFrame():js', - 'BrowserDomAdapter.resetBaseElement():js', - 'BrowserDomAdapter.resolveAndSetHref():js', - 'BrowserDomAdapter.setAttribute():js', - 'BrowserDomAdapter.setAttributeNS():js', - 'BrowserDomAdapter.setChecked():js', - 'BrowserDomAdapter.setData():js', - 'BrowserDomAdapter.setGlobalVar():js', - 'BrowserDomAdapter.setInnerHTML():js', - 'BrowserDomAdapter.setProperty():js', - 'BrowserDomAdapter.setStyle():js', - 'BrowserDomAdapter.setText():js', - 'BrowserDomAdapter.setTitle():js', - 'BrowserDomAdapter.setValue():js', - 'BrowserDomAdapter.supportsAnimation():js', - 'BrowserDomAdapter.supportsDOMEvents():js', - 'BrowserDomAdapter.supportsNativeShadowDOM():js', - 'BrowserDomAdapter.tagName():js', - 'BrowserDomAdapter.templateAwareRoot():js', - 'BrowserDomAdapter.type():js', - 'BrowserDomAdapter:js', - 'By#all():js', - 'By#css():js', - 'By#directive():js', - 'By:js', + 'BROWSER_APP_PROVIDERS', + 'BROWSER_PROVIDERS', + 'BrowserDomAdapter', + 'By', 'DOCUMENT', - 'ELEMENT_PROBE_PROVIDERS:js', - 'ELEMENT_PROBE_PROVIDERS_PROD_MODE:js', - 'Title.getTitle():js', - 'Title.setTitle():js', - 'Title:js', - 'bootstrap():js', - 'disableDebugTools():js', - 'enableDebugTools():js', - 'inspectNativeElement():js' + 'ELEMENT_PROBE_PROVIDERS', + 'ELEMENT_PROBE_PROVIDERS_PROD_MODE', + 'Title', + 'bootstrap', + 'disableDebugTools', + 'enableDebugTools', + 'inspectNativeElement' ]; var NG_UPGRADE = [ - 'UpgradeAdapter:js', - 'UpgradeAdapter.addProvider():js', - 'UpgradeAdapter.bootstrap():js', - 'UpgradeAdapter.compileNg2Components():js', - 'UpgradeAdapter.downgradeNg2Component():js', - 'UpgradeAdapter.downgradeNg2Provider():js', - 'UpgradeAdapter.upgradeNg1Component():js', - 'UpgradeAdapter.upgradeNg1Provider():js', - 'UpgradeAdapterRef:js', - 'UpgradeAdapterRef.dispose():js', - 'UpgradeAdapterRef.ready():js' + 'UpgradeAdapter', + 'UpgradeAdapterRef', ]; var NG_API = { @@ -1725,10 +307,10 @@ var NG_API = { export function main() { /** - var x = getSymbolsFromLibrary('ng'); - x.sort(); - var parts = []; - x.forEach((i) => parts.push(`'${i'`)); + var x = getSymbolsFromLibrary('ng'); + x.sort(); + var parts = []; + x.forEach((i) => parts.push(`'${i'`)); print(`[ ${parts.join(', ')} ]`); */ @@ -1736,6 +318,7 @@ export function main() { describe('public API', () => { var barrelList = ['ngCommon', 'ngCompiler', 'ngCore', 'ngInstrumentation', 'ngPlatformBrowser', 'ngUpgrade']; + if (IS_DART) { barrelList = barrelList.filter(b => b !== 'ngUpgrade'); } @@ -1744,11 +327,35 @@ export function main() { // Dom Events are merged into DomAdapter in Dart if (IS_DART && mod === 'ngPlatformDomEvent') return; it(`should fail if public API for ${mod} has changed`, () => { - - expect(new SymbolsDiff(getSymbolsFromLibrary(mod), NG_API[mod]).errors).toEqual([]); + var symbols = getSymbolsFromLibrary(mod); + expect(diff(symbols, NG_API[mod])).toEqual([]); }) }); - - }); } + +function diff(actual: string[], expected: string[]): string[] { + ListWrapper.sort(actual, compareIgnoreLang); + ListWrapper.sort(expected, compareIgnoreLang); + let mode = IS_DART ? "dart" : "js"; + let missing = actual.filter(i => expected.indexOf(i) < 0 && expected.indexOf(`${i}:${mode}`) < 0) + .map(s => `+${s}`); + let extra = expected.filter(i => shouldIgnore(i) ? false : (actual.indexOf(stripLang(i)) < 0)) + .map(s => `-${s}`); + return ListWrapper.concat(missing, extra); +} + +function shouldIgnore(expected: string): boolean { + let isDart = RegExpWrapper.create('\\:dart$'); + let isJs = RegExpWrapper.create('\\:js$'); + return IS_DART ? RegExpWrapper.test(isJs, expected) : RegExpWrapper.test(isDart, expected); +} + +function compareIgnoreLang(a: string, b: string): number { + return StringWrapper.compare(stripLang(a), stripLang(b)); +} + +function stripLang(text: string): string { + let index = text.indexOf(':'); + return (index >= 0) ? text.substring(0, index) : text; +} diff --git a/modules/angular2/test/symbol_inspector/symbol_differ.ts b/modules/angular2/test/symbol_inspector/symbol_differ.ts deleted file mode 100644 index 91c5ef672c..0000000000 --- a/modules/angular2/test/symbol_inspector/symbol_differ.ts +++ /dev/null @@ -1,68 +0,0 @@ -import {StringWrapper, RegExpWrapper, isJsObject} from 'angular2/src/facade/lang'; - -var IS_FIELD = RegExpWrapper.create('^\\w+[\\.|\\#]\\w+=?$'); -var IS_INTERFACE = RegExpWrapper.create('^\\{.+\\}'); -var IS_DART = RegExpWrapper.create('\\:dart$'); -var IS_JS = RegExpWrapper.create('\\:js$'); -var IS_OPTIONAL = RegExpWrapper.create('\\:optional$'); -var JS = 'JS'; -var DART = 'Dart'; -var MODE = isJsObject({}) ? JS : DART; - -export class SymbolsDiff { - missing: string[] = []; - extra: string[] = []; - errors: string[] = []; - - constructor(public actual: string[], public expected: string[]) { - this.actual.sort(compareIgnoreLang); - this.expected.sort(compareIgnoreLang); - this.computeDiff(); - } - - computeDiff(): void { - for (var i = 0, j = 0, length = this.expected.length + this.actual.length; i + j < length;) { - var expectedName: string = i < this.expected.length ? this.expected[i] : '~'; - var actualName: string = j < this.actual.length ? this.actual[j] : '~'; - if (stripLang(expectedName) == stripLang(actualName)) { - i++; - j++; - } else if (StringWrapper.compare(stripLang(expectedName), stripLang(actualName)) > 0) { - // JS does not see fields so ignore none method symbols - if (!this.shouldIgnore(expectedName)) { - this.extra.push(actualName); - this.errors.push('+ ' + actualName); - } - j++; - } else { - if (!this.shouldIgnore(expectedName)) { - this.missing.push(expectedName); - this.errors.push('- ' + expectedName); - } - i++; - } - } - } - - shouldIgnore(expected: string): boolean { - var ignore = false; - if (MODE == JS) { - ignore = RegExpWrapper.test(IS_FIELD, expected) || - RegExpWrapper.test(IS_INTERFACE, expected) || - RegExpWrapper.test(IS_DART, expected) || RegExpWrapper.test(IS_OPTIONAL, expected) - } else { - ignore = RegExpWrapper.test(IS_JS, expected) || RegExpWrapper.test(IS_OPTIONAL, expected) - } - return ignore; - } -} - -function stripLang(text: string): string { - var index = text.indexOf(':'); - if (index >= 0) text = text.substring(0, index); - return text; -} - -function compareIgnoreLang(a: string, b: string): number { - return StringWrapper.compare(stripLang(a), stripLang(b)); -} diff --git a/modules/angular2/test/symbol_inspector/symbol_inspector.dart b/modules/angular2/test/symbol_inspector/symbol_inspector.dart index 4e25a8587b..6510f41fc1 100644 --- a/modules/angular2/test/symbol_inspector/symbol_inspector.dart +++ b/modules/angular2/test/symbol_inspector/symbol_inspector.dart @@ -57,13 +57,11 @@ class ExportedSymbol { addTo(List names) { var name = unwrapSymbol(symbol); if (declaration is MethodMirror) { - names.add('$name()'); + names.add(name); } else if (declaration is ClassMirror) { var classMirror = declaration as ClassMirror; if (classMirror.isAbstract) name = '$name'; names.add(name); - classMirror.staticMembers.forEach(members('$name#', names)); - classMirror.instanceMembers.forEach(members('$name.', names)); } else if (declaration is TypedefMirror) { names.add(name); } else if (declaration is VariableMirror) { @@ -76,15 +74,6 @@ class ExportedSymbol { toString() => unwrapSymbol(symbol); } -members(String prefix, List names) { - return (Symbol symbol, MethodMirror method) { - var name = unwrapSymbol(symbol); - if (method.isOperator || method.isPrivate || IGNORE[name] == true) return; - var suffix = (method.isSetter || method.isGetter) ? '' : '()'; - names.add('$prefix$name$suffix'); - }; -} - class LibraryInfo { List names; Map> symbolsUsedForName; @@ -135,19 +124,6 @@ Iterable _getUsedSymbols( } }); } - - if (decl is MethodMirror) { - MethodMirror mdecl = decl; - if (mdecl.parameters != null) mdecl.parameters.forEach((p) { - used.addAll(_getUsedSymbols(p.type, seenDecls, path, true)); - }); - used.addAll(_getUsedSymbols(mdecl.returnType, seenDecls, path, true)); - } - - if (decl is VariableMirror) { - VariableMirror vdecl = decl; - used.addAll(_getUsedSymbols(vdecl.type, seenDecls, path, true)); - } } // Strip out type variables. diff --git a/modules/angular2/test/symbol_inspector/symbol_inspector.ts b/modules/angular2/test/symbol_inspector/symbol_inspector.ts index 0df98b601d..6c45540482 100644 --- a/modules/angular2/test/symbol_inspector/symbol_inspector.ts +++ b/modules/angular2/test/symbol_inspector/symbol_inspector.ts @@ -27,47 +27,12 @@ const IGNORE = wrapperStack: true, '@@observable': true } -function collectClassSymbols(symbols: string[], prefix: String, type: Function): - void { - // static - for (var name in type) { - if (IGNORE[name] || name.charAt(0) == '_') continue; - var suf = type[name] instanceof Function ? '()' : ''; - var symbol = `${prefix}#${name}${suf}`; - symbols.push(symbol); - } - - // instance - for (var name in type.prototype) { - if (IGNORE[name] || name.charAt(0) == '_') continue; - if (name == 'constructor') continue; - var suf = ''; - try { - if (type.prototype[name] instanceof Function) suf = '()'; - } catch (e) { - } - var symbol = `${prefix}.${name}${suf}`; - symbols.push(symbol); - } - } - function collectTopLevelSymbols(prefix: string, lib: any): string[] { var symbols: string[] = []; for (var name in lib) { var symbol = `${name}`; - var ref = lib[name]; - if (ref instanceof Function) { - if (symbol.charAt(0) == symbol.charAt(0).toLowerCase()) { - // assume it is top level function - symbols.push(symbol + '()'); - } else { - symbols.push(symbol); - collectClassSymbols(symbols, symbol, ref); - } - } else { - symbols.push(symbol); - } + symbols.push(symbol); } return symbols; } diff --git a/modules/angular2/test/symbol_inspector/symbol_inspector_spec.ts b/modules/angular2/test/symbol_inspector/symbol_inspector_spec.ts index 4c8c8532f9..6c9ff31fca 100644 --- a/modules/angular2/test/symbol_inspector/symbol_inspector_spec.ts +++ b/modules/angular2/test/symbol_inspector/symbol_inspector_spec.ts @@ -11,49 +11,48 @@ import { xit } from 'angular2/testing_internal'; +import {IS_DART} from 'angular2/src/facade/lang'; import {getSymbolsFromLibrary} from './symbol_inspector'; -import {SymbolsDiff} from './symbol_differ'; export function main() { describe('symbol inspector', () => { - it('should extract symbols', () => { - var symbols = getSymbolsFromLibrary("simple_library"); - - expect(new SymbolsDiff(symbols, - [ - 'A', - 'A#staticField', - 'A#staticField=', - 'A#staticMethod()', - 'A.field', - 'A.field=', - 'A.getter', - 'A.method()', - 'A.methodWithFunc()', - 'ClosureParam', - 'ClosureReturn', - 'ConsParamType', - 'FieldType', - 'Generic', - 'Generic.getter', - 'GetterType', - 'MethodReturnType', - 'ParamType', - 'StaticFieldType', - 'TypedefParam', - 'TypedefReturnType', - 'SomeInterface:dart', - ]) - .errors) - .toEqual([]); - }); - - - describe('assert', () => { - it('should assert symbol names are correct', () => { - var diffs = new SymbolsDiff(['a()', 'c()', 'd()'], ['a()', 'b()', 'd()']); - expect(diffs.errors).toEqual(['- b()', '+ c()']); + if (IS_DART) { + it('should extract symbols (dart)', () => { + var symbols = getSymbolsFromLibrary("simple_library"); + expect(symbols).toEqual([ + 'A', + 'ClosureParam', + 'ClosureReturn', + 'ConsParamType', + 'FieldType', + 'Generic', + 'GetterType', + 'MethodReturnType', + 'ParamType', + 'SomeInterface', + 'StaticFieldType', + 'TypedefParam', + 'TypedefReturnType' + ]); }); - }); + } else { + it('should extract symbols (js)', () => { + var symbols = getSymbolsFromLibrary("simple_library"); + expect(symbols).toEqual([ + 'A', + 'ClosureParam', + 'ClosureReturn', + 'ConsParamType', + 'FieldType', + 'Generic', + 'GetterType', + 'MethodReturnType', + 'ParamType', + 'StaticFieldType', + 'TypedefParam', + 'TypedefReturnType' + ]); + }); + } }); }