| 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 Source source = addSource(createSource(// | 665 Source source = addSource(createSource(// |
| 666 "class A {}", | 666 "class A {}", |
| 667 "class B {}", | 667 "class B {}", |
| 668 "class G<E extends A> {}", | 668 "class G<E extends A> {}", |
| 669 "class C extends Object with G<B>{}")); | 669 "class C extends Object with G<B>{}")); |
| 670 resolve(source); | 670 resolve(source); |
| 671 assertErrors(StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS); | 671 assertErrors(StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS); |
| 672 verify(source); | 672 verify(source); |
| 673 } | 673 } |
| 674 | 674 |
| 675 public void test_undefinedFunction() throws Exception { | |
| 676 Source source = addSource(createSource(// | |
| 677 "void f() {", | |
| 678 " g();", | |
| 679 "}")); | |
| 680 resolve(source); | |
| 681 assertErrors(StaticTypeWarningCode.UNDEFINED_FUNCTION); | |
| 682 } | |
| 683 | |
| 684 public void test_undefinedGetter() throws Exception { | 675 public void test_undefinedGetter() throws Exception { |
| 685 Source source = addSource(createSource(// | 676 Source source = addSource(createSource(// |
| 686 "class T {}", | 677 "class T {}", |
| 687 "f(T e) { return e.m; }")); | 678 "f(T e) { return e.m; }")); |
| 688 resolve(source); | 679 resolve(source); |
| 689 assertErrors(StaticTypeWarningCode.UNDEFINED_GETTER); | 680 assertErrors(StaticTypeWarningCode.UNDEFINED_GETTER); |
| 690 // A call to verify(source) fails as 'e.m' isn't resolved. | 681 // A call to verify(source) fails as 'e.m' isn't resolved. |
| 691 } | 682 } |
| 692 | 683 |
| 693 public void test_undefinedGetter_static() throws Exception { | 684 public void test_undefinedGetter_static() throws Exception { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 "class A {}", | 824 "class A {}", |
| 834 "class C<E> {}", | 825 "class C<E> {}", |
| 835 "f(p) {", | 826 "f(p) {", |
| 836 " return p is C<A, A>;", | 827 " return p is C<A, A>;", |
| 837 "}")); | 828 "}")); |
| 838 resolve(source); | 829 resolve(source); |
| 839 assertErrors(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS); | 830 assertErrors(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS); |
| 840 verify(source); | 831 verify(source); |
| 841 } | 832 } |
| 842 } | 833 } |
| OLD | NEW |