OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014, the Dart project authors. | 2 * Copyright (c) 2014, 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 when(element.getLocation()).thenReturn(location); | 132 when(element.getLocation()).thenReturn(location); |
133 when(context.getElement(location)).thenReturn(element); | 133 when(context.getElement(location)).thenReturn(element); |
134 int id = codec.encode(element); | 134 int id = codec.encode(element); |
135 assertEquals(element, codec.decode(context, id)); | 135 assertEquals(element, codec.decode(context, id)); |
136 // check strings | 136 // check strings |
137 assertThat(stringCodec.getNameToIndex()).hasSize(3).includes( | 137 assertThat(stringCodec.getNameToIndex()).hasSize(3).includes( |
138 entry(LIB, 0), | 138 entry(LIB, 0), |
139 entry(UNIT, 1), | 139 entry(UNIT, 1), |
140 entry("bar", 2)); | 140 entry("bar", 2)); |
141 } | 141 } |
| 142 |
| 143 @Override |
| 144 protected void tearDown() throws Exception { |
| 145 stringCodec = null; |
| 146 codec = null; |
| 147 super.tearDown(); |
| 148 } |
142 } | 149 } |
OLD | NEW |