Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/ClassDeclarationTest.java

Issue 244183002: Add ClassDeclaration/ClassTypeAlias.isAbstract() and use them. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: forgotten class Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698