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

Side by Side Diff: pkg/analyzer/test/file_system/memory_file_system_test.dart

Issue 632353002: Add support for cross-session storage (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library test.memory_file_system; 5 library test.memory_file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/src/generated/engine.dart' show TimestampedData; 9 import 'package:analyzer/src/generated/engine.dart' show TimestampedData;
10 import 'package:analyzer/src/generated/source.dart'; 10 import 'package:analyzer/src/generated/source.dart';
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 provider.deleteFile(path); 110 provider.deleteFile(path);
111 return delayed(() { 111 return delayed(() {
112 expect(changesReceived, hasLength(1)); 112 expect(changesReceived, hasLength(1));
113 expect(changesReceived[0].type, equals(ChangeType.REMOVE)); 113 expect(changesReceived[0].type, equals(ChangeType.REMOVE));
114 expect(changesReceived[0].path, equals(path)); 114 expect(changesReceived[0].path, equals(path));
115 }); 115 });
116 }); 116 });
117 }); 117 });
118 }); 118 });
119 119
120 group('getStateLocation', () {
121 test('uniqueness', () {
122 String idOne = 'one';
123 Folder folderOne = provider.getStateLocation(idOne);
124 expect(folderOne, isNotNull);
125 String idTwo = 'two';
126 Folder folderTwo = provider.getStateLocation(idTwo);
127 expect(folderTwo, isNotNull);
128 expect(folderTwo, isNot(equals(folderOne)));
129 expect(provider.getStateLocation(idOne), equals(folderOne));
130 });
131 });
132
120 group('newFolder', () { 133 group('newFolder', () {
121 test('empty path', () { 134 test('empty path', () {
122 expect(() { 135 expect(() {
123 provider.newFolder(''); 136 provider.newFolder('');
124 }, throwsA(new isInstanceOf<ArgumentError>())); 137 }, throwsA(new isInstanceOf<ArgumentError>()));
125 }); 138 });
126 139
127 test('not absolute', () { 140 test('not absolute', () {
128 expect(() { 141 expect(() {
129 provider.newFolder('not/absolute'); 142 provider.newFolder('not/absolute');
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 }); 503 });
491 504
492 test('resolveRelative', () { 505 test('resolveRelative', () {
493 Uri relative = source.resolveRelativeUri(new Uri.file('bar/baz.dart')) ; 506 Uri relative = source.resolveRelativeUri(new Uri.file('bar/baz.dart')) ;
494 expect(relative.path, '/foo/bar/baz.dart'); 507 expect(relative.path, '/foo/bar/baz.dart');
495 }); 508 });
496 }); 509 });
497 }); 510 });
498 }); 511 });
499 } 512 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698