| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
| 3 * | 3 * |
| 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
| 5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
| 6 * | 6 * |
| 7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
| 8 * | 8 * |
| 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
| 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 assertResolvedIdentifier("ctrl", "MyController"); | 746 assertResolvedIdentifier("ctrl", "MyController"); |
| 747 } | 747 } |
| 748 | 748 |
| 749 public void test_resolveExpression_withFilter() throws Exception { | 749 public void test_resolveExpression_withFilter() throws Exception { |
| 750 addMyController(); | 750 addMyController(); |
| 751 resolveIndexNoErrors(createHtmlWithMyController("{{ctrl.field | uppercase}}"
)); | 751 resolveIndexNoErrors(createHtmlWithMyController("{{ctrl.field | uppercase}}"
)); |
| 752 assertResolvedIdentifier("ctrl", "MyController"); | 752 assertResolvedIdentifier("ctrl", "MyController"); |
| 753 assertResolvedIdentifier("uppercase"); | 753 assertResolvedIdentifier("uppercase"); |
| 754 } | 754 } |
| 755 | 755 |
| 756 public void test_resolveExpression_withFilter_missingColon() throws Exception
{ |
| 757 addMyController(); |
| 758 resolveIndex(createHtmlWithMyController("{{ctrl.field | uppercase, lowercase
}}")); |
| 759 assertErrors(indexSource, AngularCode.MISSING_FORMATTER_COLON); |
| 760 } |
| 761 |
| 756 public void test_resolveExpression_withFilter_notSimpleIdentifier() throws Exc
eption { | 762 public void test_resolveExpression_withFilter_notSimpleIdentifier() throws Exc
eption { |
| 757 addMyController(); | 763 addMyController(); |
| 758 resolveIndex(createHtmlWithMyController("{{ctrl.field | not.supported}}")); | 764 resolveIndex(createHtmlWithMyController("{{ctrl.field | not.supported}}")); |
| 759 assertErrors(indexSource, AngularCode.INVALID_FORMATTER_NAME); | 765 assertErrors(indexSource, AngularCode.INVALID_FORMATTER_NAME); |
| 760 } | 766 } |
| 761 | 767 |
| 762 public void test_scopeProperties() throws Exception { | 768 public void test_scopeProperties() throws Exception { |
| 763 addMainSource(createSource("",// | 769 addMainSource(createSource("",// |
| 764 "import 'angular.dart';", | 770 "import 'angular.dart';", |
| 765 "", | 771 "", |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 private String getSourceContent(Source source) throws Exception { | 858 private String getSourceContent(Source source) throws Exception { |
| 853 return context.getContents(source).getData().toString(); | 859 return context.getContents(source).getData().toString(); |
| 854 } | 860 } |
| 855 | 861 |
| 856 private void resolveIndexNoErrors(String content) throws Exception { | 862 private void resolveIndexNoErrors(String content) throws Exception { |
| 857 resolveIndex(content); | 863 resolveIndex(content); |
| 858 assertNoErrors(); | 864 assertNoErrors(); |
| 859 verify(indexSource); | 865 verify(indexSource); |
| 860 } | 866 } |
| 861 } | 867 } |
| OLD | NEW |