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

Unified Diff: pkg/analysis_server/test/domain_context_test.dart

Issue 288013003: allow client to specify any combination of add/modified/removed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge and address comments Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | pkg/analysis_server/test/protocol_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/domain_context_test.dart
diff --git a/pkg/analysis_server/test/domain_context_test.dart b/pkg/analysis_server/test/domain_context_test.dart
index b9f84ef79567fb6f288d10d63bbb640e5efe3653..3908ad8f5d892824cedda23136d14c2a3ca22d5e 100644
--- a/pkg/analysis_server/test/domain_context_test.dart
+++ b/pkg/analysis_server/test/domain_context_test.dart
@@ -19,6 +19,7 @@ main() {
group('ContextDomainHandlerTest', () {
test('applyChanges', ContextDomainHandlerTest.applyChanges);
test('createChangeSet', ContextDomainHandlerTest.createChangeSet);
+ test('createChangeSet_onlyAdded', ContextDomainHandlerTest.createChangeSet_onlyAdded);
test('setOptions', ContextDomainHandlerTest.setOptions);
test('setPrioritySources_empty', ContextDomainHandlerTest.setPrioritySources_empty);
test('setPrioritySources_nonEmpty', ContextDomainHandlerTest.setPrioritySources_nonEmpty);
@@ -67,6 +68,20 @@ class ContextDomainHandlerTest {
expect(changeSet.removedSources, hasLength(equals(2)));
}
+ static void createChangeSet_onlyAdded() {
+ AnalysisServer server = new AnalysisServer(new MockServerChannel());
+ Request request = new Request('0', ContextDomainHandler.APPLY_CHANGES_NAME);
+ ContextDomainHandler handler = new ContextDomainHandler(server);
+ SourceFactory sourceFactory = new SourceFactory([new FileUriResolver()]);
+ ChangeSet changeSet = handler.createChangeSet(request, sourceFactory,
+ new RequestDatum(request, ContextDomainHandler.CHANGES_PARAM, {
+ ContextDomainHandler.ADDED_PARAM: ['ffile:/one.dart'],
+ }));
+ expect(changeSet.addedSources, hasLength(equals(1)));
+ expect(changeSet.changedSources, hasLength(equals(0)));
+ expect(changeSet.removedSources, hasLength(equals(0)));
+ }
+
static void setOptions() {
AnalysisServer server = new AnalysisServer(new MockServerChannel());
String contextId = _createContext(server);
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | pkg/analysis_server/test/protocol_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698