OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine.all_the_rest_test; | 8 library engine.all_the_rest_test; |
9 | 9 |
10 import 'dart:collection'; | 10 import 'dart:collection'; |
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2228 <body ng-app> | 2228 <body ng-app> |
2229 <div my-controller> | 2229 <div my-controller> |
2230 {{ctrl.field}} | 2230 {{ctrl.field}} |
2231 </div> | 2231 </div> |
2232 <script type='application/dart' src='main.dart'></script> | 2232 <script type='application/dart' src='main.dart'></script> |
2233 </body> | 2233 </body> |
2234 </html>'''); | 2234 </html>'''); |
2235 assertResolvedIdentifier2("ctrl", "MyController"); | 2235 assertResolvedIdentifier2("ctrl", "MyController"); |
2236 } | 2236 } |
2237 | 2237 |
2238 void test_resolveExpression_withFilter() { | 2238 void test_resolveExpression_withFormatter() { |
2239 addMyController(); | 2239 addMyController(); |
2240 _resolveIndexNoErrors( | 2240 _resolveIndexNoErrors( |
2241 AngularTest.createHtmlWithMyController("{{ctrl.field | uppercase}}")); | 2241 AngularTest.createHtmlWithMyController("{{ctrl.field | uppercase}}")); |
2242 assertResolvedIdentifier2("ctrl", "MyController"); | 2242 assertResolvedIdentifier2("ctrl", "MyController"); |
2243 assertResolvedIdentifier("uppercase"); | 2243 assertResolvedIdentifier("uppercase"); |
2244 } | 2244 } |
2245 | 2245 |
2246 void test_resolveExpression_withFilter_notSimpleIdentifier() { | 2246 void test_resolveExpression_withFormatter_missingColon() { |
| 2247 addMyController(); |
| 2248 resolveIndex2( |
| 2249 AngularTest.createHtmlWithMyController("{{ctrl.field | uppercase, lowerc
ase}}")); |
| 2250 assertErrors(indexSource, [AngularCode.MISSING_FORMATTER_COLON]); |
| 2251 } |
| 2252 |
| 2253 void test_resolveExpression_withFormatter_notSimpleIdentifier() { |
2247 addMyController(); | 2254 addMyController(); |
2248 resolveIndex2( | 2255 resolveIndex2( |
2249 AngularTest.createHtmlWithMyController("{{ctrl.field | not.supported}}")
); | 2256 AngularTest.createHtmlWithMyController("{{ctrl.field | not.supported}}")
); |
2250 assertErrors(indexSource, [AngularCode.INVALID_FORMATTER_NAME]); | 2257 assertErrors(indexSource, [AngularCode.INVALID_FORMATTER_NAME]); |
2251 } | 2258 } |
2252 | 2259 |
2253 void test_scopeProperties() { | 2260 void test_scopeProperties() { |
2254 addMainSource(r''' | 2261 addMainSource(r''' |
2255 | 2262 |
2256 import 'angular.dart'; | 2263 import 'angular.dart'; |
(...skipping 8861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11118 Source scriptSource = externalScript.scriptSource; | 11125 Source scriptSource = externalScript.scriptSource; |
11119 if (_expectedExternalScriptName == null) { | 11126 if (_expectedExternalScriptName == null) { |
11120 expect(scriptSource, isNull, reason: "script $scriptIndex"); | 11127 expect(scriptSource, isNull, reason: "script $scriptIndex"); |
11121 } else { | 11128 } else { |
11122 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); | 11129 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); |
11123 String actualExternalScriptName = scriptSource.shortName; | 11130 String actualExternalScriptName = scriptSource.shortName; |
11124 expect(actualExternalScriptName, _expectedExternalScriptName, reason: "scr
ipt $scriptIndex"); | 11131 expect(actualExternalScriptName, _expectedExternalScriptName, reason: "scr
ipt $scriptIndex"); |
11125 } | 11132 } |
11126 } | 11133 } |
11127 } | 11134 } |
OLD | NEW |