Chromium Code Reviews| 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"); |