chore(transform): Move registrations tests to modules_dart

This moves tests which were created in 104302a958
and were not moved in 88a5b8da0f.
This commit is contained in:
Tim Blasi
2015-08-26 09:35:05 -07:00
parent 8536df16d9
commit 02d9e18279
4 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,98 @@
{
"DependencyCmp": {
"kind": "type",
"value": {
"id": "DependencyCmp",
"selector": "dependency",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": null,
"readAttributes": null,
"type": null,
"exportAs": null,
"callOnDestroy": null,
"callOnCheck": null,
"callOnInit": null,
"callOnChange": null,
"callOnAllChangesDone": null,
"events": ["dependencyEventName"],
"changeDetection": null,
"version": 1
}
},
"DirectiveProps": {
"kind": "type",
"value": {
"id": "DirectiveProps",
"selector": "[dir-props]",
"compileChildren": true,
"hostProperties": {"hprop": "hprop"},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": ["prop"],
"readAttributes": null,
"type": null,
"exportAs": null,
"callOnDestroy": null,
"callOnCheck": null,
"callOnInit": null,
"callOnChange": null,
"callOnAllChangesDone": null,
"events": null,
"changeDetection": null,
"version": 1
}
},
"DirectiveEvents": {
"kind": "type",
"value": {
"id": "DirectiveEvents",
"selector": "[dir-events]",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {"subevent": "doAThing()"},
"hostActions": {},
"hostAttributes": {},
"properties": [],
"readAttributes": null,
"type": null,
"exportAs": null,
"callOnDestroy": null,
"callOnCheck": null,
"callOnInit": null,
"callOnChange": null,
"callOnAllChangesDone": null,
"events": null,
"changeDetection": null,
"version": 1
}
},
"NgFor": {
"kind": "type",
"value": {
"id": "NgFor",
"selector": "[ng-for][ng-for-of]",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": ["ngForOf"],
"readAttributes": null,
"type": null,
"exportAs": null,
"callOnDestroy": null,
"callOnCheck": true,
"callOnInit": null,
"callOnChange": null,
"callOnAllChangesDone": null,
"events": null,
"changeDetection": null,
"version": 1
}
}
}

View File

@ -0,0 +1,108 @@
library examples.hello_world.index_common_dart.ng_deps.dart;
import 'dependency.dart';
import 'dependency.ng_deps.dart' as i0;
import 'hello.dart';
import 'package:angular2/angular2.dart'
show Component, Directive, View, NgElement;
var _visited = false;
void initReflector(reflector) {
if (_visited) return;
_visited = true;
reflector
..registerType(
TextBindingsCmp,
new ReflectionInfo(const [
const Component(selector: 'text'),
const View(template: '{{textBindings}}')
], const [
const []
], () => new TextBindingsCmp()))
..registerType(
PropertyBindingsCmp,
new ReflectionInfo(const [
const Component(selector: 'props'),
const View(template: '<div [prop-name]="propValue"></div>')
], const [
const []
], () => new PropertyBindingsCmp()))
..registerType(
EventsCmp,
new ReflectionInfo(const [
const Component(selector: 'events', events: const ['eventName']),
const View(template: 'Hi')
], const [
const []
], () => new EventsCmp()))
..registerType(
SubEventsCmp,
new ReflectionInfo(const [
const Component(selector: 'sub-events'),
const View(
template: '<dependency></dependency>',
directives: const [DependencyCmp])
], const [
const []
], () => new SubEventsCmp()))
..registerType(
TemplateEventsCmp,
new ReflectionInfo(const [
const Component(selector: 'template-events'),
const View(template: '<div (mouseover)="onMouseOver()"></div>')
], const [
const []
], () => new TemplateEventsCmp()))
..registerType(
DirectivePropsCmp,
new ReflectionInfo(const [
const Component(selector: 'directive-props-cmp'),
const View(
template: '<div dir-props prop="somevalue">',
directives: const [DirectiveProps])
], const [
const []
], () => new DirectivePropsCmp()))
..registerType(
DirectiveEventsCmp,
new ReflectionInfo(const [
const Component(selector: 'directive-events-cmp'),
const View(
template: '<div dir-events (subevent)="field = 10;">',
directives: const [DirectiveEvents])
], const [
const []
], () => new DirectiveEventsCmp()))
..registerType(
RecursiveCmp,
new ReflectionInfo(const [
const Component(selector: 'recursive-cmp'),
const View(
template:
'<li *ng-for="#thing of things" [recursive-prop]="thing"><div>test</div></li>',
directives: const [NgFor])
], const [
const []
], () => new RecursiveCmp()))
..registerGetters({
'eventName': (o) => o.eventName,
'hprop': (o) => o.hprop,
'propValue': (o) => o.propValue,
'textBindings': (o) => o.textBindings,
'thing': (o) => o.thing,
'things': (o) => o.things
})
..registerSetters({
'field': (o, v) => o.field = v,
'hprop': (o, v) => o.hprop = v,
'ngForOf': (o, v) => o.ngForOf = v,
'prop': (o, v) => o.prop = v,
'propName': (o, v) => o.propName = v,
'recursiveProp': (o, v) => o.recursiveProp = v
})
..registerMethods({
'doAThing': (o, List args) => Function.apply(o.doAThing, args),
'onMouseOver': (o, List args) => Function.apply(o.onMouseOver, args)
});
i0.initReflector();
}

View File

@ -0,0 +1,88 @@
library examples.hello_world.index_common_dart.ng_deps.dart;
import 'dependency.dart';
import 'dependency.ng_deps.dart' as i0;
import 'hello.dart';
import 'package:angular2/angular2.dart'
show Component, Directive, View, NgElement;
var _visited = false;
void initReflector(reflector) {
if (_visited) return;
_visited = true;
reflector
..registerType(
TextBindingsCmp,
new ReflectionInfo(const [
const Component(selector: 'text'),
const View(template: '{{textBindings}}')
], const [
const []
], () => new TextBindingsCmp()))
..registerType(
PropertyBindingsCmp,
new ReflectionInfo(const [
const Component(selector: 'props'),
const View(template: '<div [prop-name]="propValue"></div>')
], const [
const []
], () => new PropertyBindingsCmp()))
..registerType(
EventsCmp,
new ReflectionInfo(const [
const Component(selector: 'events', events: const ['eventName']),
const View(template: 'Hi')
], const [
const []
], () => new EventsCmp()))
..registerType(
SubEventsCmp,
new ReflectionInfo(const [
const Component(selector: 'sub-events'),
const View(
template: '<dependency></dependency>',
directives: const [DependencyCmp])
], const [
const []
], () => new SubEventsCmp()))
..registerType(
TemplateEventsCmp,
new ReflectionInfo(const [
const Component(selector: 'template-events'),
const View(template: '<div (mouseover)="onMouseOver()"></div>')
], const [
const []
], () => new TemplateEventsCmp()))
..registerType(
DirectivePropsCmp,
new ReflectionInfo(const [
const Component(selector: 'directive-props-cmp'),
const View(
template: '<div dir-props prop="somevalue">',
directives: const [DirectiveProps])
], const [
const []
], () => new DirectivePropsCmp()))
..registerType(
DirectiveEventsCmp,
new ReflectionInfo(const [
const Component(selector: 'directive-events-cmp'),
const View(
template: '<div dir-events (subevent)="field = 10;">',
directives: const [DirectiveEvents])
], const [
const []
], () => new DirectiveEventsCmp()))
..registerType(
RecursiveCmp,
new ReflectionInfo(const [
const Component(selector: 'recursive-cmp'),
const View(
template:
'<li *ng-for="#thing of things" [recursive-prop]="thing"><div>test</div></li>',
directives: const [NgFor])
], const [
const []
], () => new RecursiveCmp()));
i0.initReflector();
}

View File

@ -0,0 +1,194 @@
{
"TextBindingsCmp": {
"kind": "type",
"value": {
"id": "TextBindingsCmp",
"selector": "text",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": null,
"readAttributes": null,
"type": null,
"exportAs": null,
"callOnDestroy": null,
"callOnCheck": null,
"callOnInit": null,
"callOnChange": null,
"callOnAllChangesDone": null,
"events": null,
"changeDetection": null,
"version": 1
}
},
"PropertyBindingsCmp": {
"kind": "type",
"value": {
"id": "PropertyBindingsCmp",
"selector": "props",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": [],
"readAttributes": [],
"type": 0,
"exportAs": null,
"callOnDestroy": false,
"callOnCheck": false,
"callOnInit": false,
"callOnChange": false,
"callOnAllChangesDone": false,
"events": [],
"changeDetection": null,
"version": 1
}
},
"EventsCmp": {
"kind": "type",
"value": {
"id": "EventsCmp",
"selector": "events",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": [],
"readAttributes": [],
"type": 1,
"exportAs": null,
"callOnDestroy": false,
"callOnCheck": false,
"callOnInit": false,
"callOnChange": false,
"callOnAllChangesDone": false,
"events": ["eventName"],
"changeDetection": null,
"version": 1
}
},
"SubEventsCmp": {
"kind": "type",
"value": {
"id": "SubEventsCmp",
"selector": "events",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": [],
"readAttributes": [],
"type": 1,
"exportAs": null,
"callOnDestroy": false,
"callOnCheck": false,
"callOnInit": false,
"callOnChange": false,
"callOnAllChangesDone": false,
"events": [],
"changeDetection": null,
"version": 1
}
},
"TemplateEventsCmp": {
"kind": "type",
"value": {
"id": "TemplateEventsCmp",
"selector": "template-events",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": [],
"readAttributes": [],
"type": 1,
"exportAs": null,
"callOnDestroy": false,
"callOnCheck": false,
"callOnInit": false,
"callOnChange": false,
"callOnAllChangesDone": false,
"events": [],
"changeDetection": null,
"version": 1
}
},
"DirectivePropsCmp": {
"kind": "type",
"value": {
"id": "DirectivePropsCmp",
"selector": "directive-props-cmp",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": [],
"readAttributes": [],
"type": 1,
"exportAs": null,
"callOnDestroy": false,
"callOnCheck": false,
"callOnInit": false,
"callOnChange": false,
"callOnAllChangesDone": false,
"events": [],
"changeDetection": null,
"version": 1
}
},
"DirectiveEventsCmp": {
"kind": "type",
"value": {
"id": "DirectiveEventsCmp",
"selector": "directive-events-cmp",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": [],
"readAttributes": [],
"type": 1,
"exportAs": null,
"callOnDestroy": false,
"callOnCheck": false,
"callOnInit": false,
"callOnChange": false,
"callOnAllChangesDone": false,
"events": [],
"changeDetection": null,
"version": 1
}
},
"RecursiveCmp": {
"kind": "type",
"value": {
"id": "RecursiveCmp",
"selector": "recursive-cmp",
"compileChildren": true,
"hostProperties": {},
"hostListeners": {},
"hostActions": {},
"hostAttributes": {},
"properties": [],
"readAttributes": [],
"type": 1,
"exportAs": null,
"callOnDestroy": false,
"callOnCheck": false,
"callOnInit": false,
"callOnChange": false,
"callOnAllChangesDone": false,
"events": [],
"changeDetection": null,
"version": 1
}
}
}