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

Unified Diff: pkg/analysis_server/test/edit/fix_test.dart

Issue 447613002: Make Change implementation consistent with the server spec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/edit/fix.dart ('k') | pkg/analysis_server/test/edit/fixes_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/edit/fix_test.dart
diff --git a/pkg/analysis_server/test/edit/fix_test.dart b/pkg/analysis_server/test/edit/fix_test.dart
index 20ce5264b4d8dbddddb4be5ae754c5978a28588b..2318a11a9197e0498fe8d4c18d2b14c33902b9c7 100644
--- a/pkg/analysis_server/test/edit/fix_test.dart
+++ b/pkg/analysis_server/test/edit/fix_test.dart
@@ -41,72 +41,6 @@ class ErrorFixesTest extends AbstractSingleUnitTest {
verifyNoTestUnitErrors = false;
}
- void test_fromJson() {
- var json = {
- ERROR: {
- SEVERITY: 'ERROR',
- TYPE: 'SYNTACTIC_ERROR',
- LOCATION: {
- FILE: '/test.dart',
- OFFSET: 19,
- LENGTH: 1,
- START_LINE: 2,
- START_COLUMN: 11
- },
- MESSAGE: 'Expected to find \';\''
- },
- FIXES: [{
- MESSAGE: 'Insert \';\'',
- EDITS: [{
- FILE: '/test.dart',
- EDITS: [{
- OFFSET: 20,
- LENGTH: 0,
- REPLACEMENT: ';'
- }]
- }],
- LINKED_POSITION_GROUPS: []
- }]
- };
- ErrorFixes errorFixes = ErrorFixes.fromJson(json);
- {
- AnalysisError error = errorFixes.error;
- expect(error.severity, 'ERROR');
- expect(error.type, 'SYNTACTIC_ERROR');
- expect(error.message, "Expected to find ';'");
- {
- Location location = error.location;
- expect(location.file, testFile);
- expect(location.offset, 19);
- expect(location.length, 1);
- expect(location.startLine, 2);
- expect(location.startColumn, 11);
- }
- }
- expect(errorFixes.fixes, hasLength(1));
- {
- Change change = errorFixes.fixes[0];
- expect(change.message, "Insert ';'");
- expect(change.edits, hasLength(1));
- {
- FileEdit fileEdit = change.edits[0];
- expect(fileEdit.file, testFile);
- expect(
- fileEdit.edits.toString(),
- "[Edit(offset=20, length=0, replacement=:>;<:)]");
- }
- }
- expect(
- errorFixes.toString(),
- 'ErrorFixes(error=AnalysisError('
- 'location=Location(file=/test.dart; offset=19; length=1; '
- 'startLine=2; startColumn=11) message=Expected to find \';\'; '
- 'severity=ERROR; type=SYNTACTIC_ERROR; correction=null, '
- 'fixes=[Change(message=Insert \';\', '
- 'edits=[FileEdit(file=/test.dart, edits=[Edit(offset=20, length=0, '
- 'replacement=:>;<:)])], linkedPositionGroups=[])])');
- }
-
void test_fromService() {
verifyNoTestUnitErrors = false;
resolveTestUnit('''
@@ -145,7 +79,7 @@ main() {
REPLACEMENT: ';'
}]
}],
- LINKED_POSITION_GROUPS: []
+ LINKED_EDIT_GROUPS: []
}]
});
}
« no previous file with comments | « pkg/analysis_server/lib/src/edit/fix.dart ('k') | pkg/analysis_server/test/edit/fixes_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698