Chromium Code Reviews| Index: pkg/analyzer/test/src/dart/analysis/byte_store_test.dart |
| diff --git a/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart b/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart |
| index 9da3f0b6a9ebba19c30f059bd1b0e5b36cf29115..484a99fe10773105554a8e7af32d4fd1e217d661 100644 |
| --- a/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart |
| +++ b/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart |
| @@ -10,9 +10,14 @@ import 'package:typed_mock/typed_mock.dart'; |
| main() { |
| defineReflectiveSuite(() { |
| defineReflectiveTests(MemoryCachingByteStoreTest); |
| + defineReflectiveTests(NullByteStoreTest); |
| }); |
| } |
| +List<int> _b(int length) { |
|
Brian Wilkerson
2017/01/26 14:51:18
This is only used in one place. Please consider in
|
| + return new List<int>(length); |
| +} |
| + |
| @reflectiveTest |
| class MemoryCachingByteStoreTest { |
| test_get_notFound_evict() { |
| @@ -99,9 +104,17 @@ class MemoryCachingByteStoreTest { |
| expect(cachingStore.get('2'), isNull); |
| expect(cachingStore.get('3'), hasLength(30)); |
| } |
| +} |
| + |
| +@reflectiveTest |
| +class NullByteStoreTest { |
| + test_get() { |
| + var store = new NullByteStore(); |
| + |
| + expect(store.get('1'), isNull); |
| - static List<int> _b(int length) { |
| - return new List<int>(length); |
| + store.put('1', _b(10)); |
| + expect(store.get('1'), isNull); |
| } |
| } |