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 |
11 * or implied. See the License for the specific language governing permissions a
nd limitations under | 11 * or implied. See the License for the specific language governing permissions a
nd limitations under |
12 * the License. | 12 * the License. |
13 */ | 13 */ |
14 package com.google.dart.engine.ast; | 14 package com.google.dart.engine.ast; |
15 | 15 |
16 import com.google.dart.engine.parser.ParserTestCase; | 16 import com.google.dart.engine.parser.ParserTestCase; |
| 17 import com.google.dart.engine.scanner.Keyword; |
17 | 18 |
18 import static com.google.dart.engine.ast.AstFactory.classDeclaration; | 19 import static com.google.dart.engine.ast.AstFactory.classDeclaration; |
19 import static com.google.dart.engine.ast.AstFactory.constructorDeclaration; | 20 import static com.google.dart.engine.ast.AstFactory.constructorDeclaration; |
20 import static com.google.dart.engine.ast.AstFactory.fieldDeclaration; | 21 import static com.google.dart.engine.ast.AstFactory.fieldDeclaration; |
21 import static com.google.dart.engine.ast.AstFactory.formalParameterList; | 22 import static com.google.dart.engine.ast.AstFactory.formalParameterList; |
22 import static com.google.dart.engine.ast.AstFactory.identifier; | 23 import static com.google.dart.engine.ast.AstFactory.identifier; |
23 import static com.google.dart.engine.ast.AstFactory.methodDeclaration; | 24 import static com.google.dart.engine.ast.AstFactory.methodDeclaration; |
24 import static com.google.dart.engine.ast.AstFactory.variableDeclaration; | 25 import static com.google.dart.engine.ast.AstFactory.variableDeclaration; |
25 | 26 |
26 import java.util.ArrayList; | 27 import java.util.ArrayList; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 null, | 100 null, |
100 null, | 101 null, |
101 null, | 102 null, |
102 null, | 103 null, |
103 aMethod, | 104 aMethod, |
104 bMethod); | 105 bMethod); |
105 assertSame(aMethod, clazz.getMethod("a")); | 106 assertSame(aMethod, clazz.getMethod("a")); |
106 assertSame(bMethod, clazz.getMethod("b")); | 107 assertSame(bMethod, clazz.getMethod("b")); |
107 assertSame(null, clazz.getMethod("noSuchMethod")); | 108 assertSame(null, clazz.getMethod("noSuchMethod")); |
108 } | 109 } |
| 110 |
| 111 public void test_isAbstract() throws Exception { |
| 112 assertFalse(classDeclaration(null, "A", null, null, null, null).isAbstract()
); |
| 113 assertTrue(classDeclaration(Keyword.ABSTRACT, "B", null, null, null, null).i
sAbstract()); |
| 114 } |
109 } | 115 } |
OLD | NEW |