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

Unified Diff: pkg/analyzer/test/generated/all_the_rest_test.dart

Issue 857283003: Addition of the new flag "file-read-mode" into the analysis server to fix the offset bug with Intel… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
Index: pkg/analyzer/test/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index 5852a91ffe6b1a0e3457a1e70af6695cec4b59e2..8e0aee5c1656b6b16e4c50e282049559cf58b7ed 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -7384,6 +7384,24 @@ class FileBasedSourceTest {
expect(source.shortName, "exist.dart");
}
+ void test_fileReadMode() {
Brian Wilkerson 2015/01/20 18:56:14 We should also have a test like: expect(FileBas
jwren 2015/01/20 21:38:14 Done.
+ expect(FileBasedSource.fileReadMode('a'), 'a');
+ expect(FileBasedSource.fileReadMode('a\n'), 'a\n');
+ expect(FileBasedSource.fileReadMode('ab'), 'ab');
+ expect(FileBasedSource.fileReadMode('abc'), 'abc');
+ expect(FileBasedSource.fileReadMode('abcd'), 'abcd');
+ }
+
+ void test_fileReadMode_changed() {
+ FileBasedSource.fileReadMode = (String s) => s + 'xyz';
+ expect(FileBasedSource.fileReadMode('a'), 'axyz');
+ expect(FileBasedSource.fileReadMode('a\n'), 'a\nxyz');
+ expect(FileBasedSource.fileReadMode('ab'), 'abxyz');
+ expect(FileBasedSource.fileReadMode('abc'), 'abcxyz');
+ expect(FileBasedSource.fileReadMode('abcd'), 'abcdxyz');
+ FileBasedSource.fileReadMode = (String s) => s;
+ }
+
void test_hashCode() {
JavaFile file1 = FileUtilities2.createFile("/does/not/exist.dart");
JavaFile file2 = FileUtilities2.createFile("/does/not/exist.dart");

Powered by Google App Engine
This is Rietveld 408576698