OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 package com.google.dart.compiler.resolver; | 5 package com.google.dart.compiler.resolver; |
6 | 6 |
| 7 import com.google.dart.compiler.ast.DartMetadata; |
7 import com.google.dart.compiler.ast.DartNode; | 8 import com.google.dart.compiler.ast.DartNode; |
8 import com.google.dart.compiler.ast.Modifiers; | 9 import com.google.dart.compiler.ast.Modifiers; |
9 import com.google.dart.compiler.common.SourceInfo; | 10 import com.google.dart.compiler.common.SourceInfo; |
10 import com.google.dart.compiler.type.Type; | 11 import com.google.dart.compiler.type.Type; |
11 | 12 |
12 import junit.framework.TestCase; | 13 import junit.framework.TestCase; |
13 | 14 |
14 public class ElementMapTest extends TestCase { | 15 public class ElementMapTest extends TestCase { |
15 | 16 |
16 private class MockElement implements NodeElement { | 17 private class MockElement implements NodeElement { |
(...skipping 10 matching lines...) Expand all Loading... |
27 public EnclosingElement getEnclosingElement() { | 28 public EnclosingElement getEnclosingElement() { |
28 throw new RuntimeException(); | 29 throw new RuntimeException(); |
29 } | 30 } |
30 | 31 |
31 @Override | 32 @Override |
32 public ElementKind getKind() { | 33 public ElementKind getKind() { |
33 return kind; | 34 return kind; |
34 } | 35 } |
35 | 36 |
36 @Override | 37 @Override |
| 38 public DartMetadata getMetadata() { |
| 39 throw new RuntimeException(); |
| 40 } |
| 41 |
| 42 @Override |
37 public Modifiers getModifiers() { | 43 public Modifiers getModifiers() { |
38 throw new RuntimeException(); | 44 throw new RuntimeException(); |
39 } | 45 } |
40 | 46 |
41 @Override | 47 @Override |
42 public String getName() { | 48 public String getName() { |
43 return name; | 49 return name; |
44 } | 50 } |
45 | 51 |
46 @Override | 52 @Override |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 private void assertEmpty(ElementMap map) { | 190 private void assertEmpty(ElementMap map) { |
185 assertTrue(map.isEmpty()); | 191 assertTrue(map.isEmpty()); |
186 assertEquals(0, map.size()); | 192 assertEquals(0, map.size()); |
187 assertEquals(0, map.values().size()); | 193 assertEquals(0, map.values().size()); |
188 assertNull(map.get("foo")); | 194 assertNull(map.get("foo")); |
189 assertNull(map.get("bar")); | 195 assertNull(map.get("bar")); |
190 assertNull(map.get("foo", ElementKind.FIELD)); | 196 assertNull(map.get("foo", ElementKind.FIELD)); |
191 assertNull(map.get("foo", ElementKind.METHOD)); | 197 assertNull(map.get("foo", ElementKind.METHOD)); |
192 } | 198 } |
193 } | 199 } |
OLD | NEW |