@@ -77,7 +77,7 @@ main() {
77
77
String get twoWayStuff => null;
78
78
}
79
79
80
- @NgDirective (selector: r'[*=/{{.*}}/]')
80
+ @Decorator (selector: r'[*=/{{.*}}/]')
81
81
class InternalCombustionEngine extends Engine {
82
82
@NgOneWay('ice-expression')
83
83
String iceExpression;
@@ -91,7 +91,7 @@ main() {
91
91
],
92
92
classes: {
93
93
'import_0.InternalCombustionEngine' : [
94
- 'const import_1.NgDirective (selector: r\' [*=/{{.*}}/]\' , '
94
+ 'const import_1.Decorator (selector: r\' [*=/{{.*}}/]\' , '
95
95
'map: const {'
96
96
'\' ice-expression\' : \' =>iceExpression\' , '
97
97
'\' another-expression\' : \' =>anotherExpression\' , '
@@ -109,6 +109,7 @@ main() {
109
109
'a|web/main.dart' : '''
110
110
import 'package:angular/angular.dart';
111
111
112
+ @DummyAnnotation("parse attribute annotations")
112
113
class Engine {
113
114
@NgCallback('callback')
114
115
@NgOneWay('another-expression')
@@ -117,8 +118,17 @@ main() {
117
118
main() {}
118
119
'''
119
120
},
121
+ imports: [
122
+ 'import \' main.dart\' as import_0;' ,
123
+ 'import \' package:angular/angular.dart\' as import_1;' ,
124
+ ],
125
+ classes: {
126
+ 'import_0.Engine' : [
127
+ 'const import_1.DummyAnnotation("parse attribute annotations")' ,
128
+ ]
129
+ },
120
130
messages: ['warning: callback can only have one annotation. '
121
- '(web/main.dart 3 18)' ]);
131
+ '(web/main.dart 4 18)' ]);
122
132
});
123
133
124
134
it ('should warn on duplicated annotations' , () {
@@ -200,6 +210,7 @@ main() {
200
210
'a|web/main.dart' : '''
201
211
import 'package:angular/angular.dart';
202
212
213
+ @DummyAnnotation("parse attribute annotations")
203
214
class Engine {
204
215
@NgCallback('callback')
205
216
set callback(Function) {}
@@ -210,8 +221,17 @@ main() {
210
221
main() {}
211
222
'''
212
223
},
224
+ imports: [
225
+ 'import \' main.dart\' as import_0;' ,
226
+ 'import \' package:angular/angular.dart\' as import_1;' ,
227
+ ],
228
+ classes: {
229
+ 'import_0.Engine' : [
230
+ 'const import_1.DummyAnnotation("parse attribute annotations")' ,
231
+ ]
232
+ },
213
233
messages: ['warning: callback can only have one annotation. '
214
- '(web/main.dart 3 18)' ]);
234
+ '(web/main.dart 4 18)' ]);
215
235
});
216
236
217
237
it ('should extract map arguments' , () {
@@ -722,8 +742,9 @@ class NgCallback {
722
742
}
723
743
724
744
class NgAttr {
725
- const NgAttr();
745
+ const NgAttr(arg );
726
746
}
747
+
727
748
class NgOneWayOneTime {
728
749
const NgOneWayOneTime(arg);
729
750
}
0 commit comments