Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.all_the_rest_test; | 8 library engine.all_the_rest_test; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 7366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7377 FileBasedSource source = new FileBasedSource.con1(file); | 7377 FileBasedSource source = new FileBasedSource.con1(file); |
| 7378 expect(source.fullName, file.getAbsolutePath()); | 7378 expect(source.fullName, file.getAbsolutePath()); |
| 7379 } | 7379 } |
| 7380 | 7380 |
| 7381 void test_getShortName() { | 7381 void test_getShortName() { |
| 7382 JavaFile file = FileUtilities2.createFile("/does/not/exist.dart"); | 7382 JavaFile file = FileUtilities2.createFile("/does/not/exist.dart"); |
| 7383 FileBasedSource source = new FileBasedSource.con1(file); | 7383 FileBasedSource source = new FileBasedSource.con1(file); |
| 7384 expect(source.shortName, "exist.dart"); | 7384 expect(source.shortName, "exist.dart"); |
| 7385 } | 7385 } |
| 7386 | 7386 |
| 7387 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.
| |
| 7388 expect(FileBasedSource.fileReadMode('a'), 'a'); | |
| 7389 expect(FileBasedSource.fileReadMode('a\n'), 'a\n'); | |
| 7390 expect(FileBasedSource.fileReadMode('ab'), 'ab'); | |
| 7391 expect(FileBasedSource.fileReadMode('abc'), 'abc'); | |
| 7392 expect(FileBasedSource.fileReadMode('abcd'), 'abcd'); | |
| 7393 } | |
| 7394 | |
| 7395 void test_fileReadMode_changed() { | |
| 7396 FileBasedSource.fileReadMode = (String s) => s + 'xyz'; | |
| 7397 expect(FileBasedSource.fileReadMode('a'), 'axyz'); | |
| 7398 expect(FileBasedSource.fileReadMode('a\n'), 'a\nxyz'); | |
| 7399 expect(FileBasedSource.fileReadMode('ab'), 'abxyz'); | |
| 7400 expect(FileBasedSource.fileReadMode('abc'), 'abcxyz'); | |
| 7401 expect(FileBasedSource.fileReadMode('abcd'), 'abcdxyz'); | |
| 7402 FileBasedSource.fileReadMode = (String s) => s; | |
| 7403 } | |
| 7404 | |
| 7387 void test_hashCode() { | 7405 void test_hashCode() { |
| 7388 JavaFile file1 = FileUtilities2.createFile("/does/not/exist.dart"); | 7406 JavaFile file1 = FileUtilities2.createFile("/does/not/exist.dart"); |
| 7389 JavaFile file2 = FileUtilities2.createFile("/does/not/exist.dart"); | 7407 JavaFile file2 = FileUtilities2.createFile("/does/not/exist.dart"); |
| 7390 FileBasedSource source1 = new FileBasedSource.con1(file1); | 7408 FileBasedSource source1 = new FileBasedSource.con1(file1); |
| 7391 FileBasedSource source2 = new FileBasedSource.con1(file2); | 7409 FileBasedSource source2 = new FileBasedSource.con1(file2); |
| 7392 expect(source2.hashCode, source1.hashCode); | 7410 expect(source2.hashCode, source1.hashCode); |
| 7393 } | 7411 } |
| 7394 | 7412 |
| 7395 void test_isInSystemLibrary_contagious() { | 7413 void test_isInSystemLibrary_contagious() { |
| 7396 JavaFile sdkDirectory = DirectoryBasedDartSdk.defaultSdkDirectory; | 7414 JavaFile sdkDirectory = DirectoryBasedDartSdk.defaultSdkDirectory; |
| (...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8826 } else { | 8844 } else { |
| 8827 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); | 8845 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); |
| 8828 String actualExternalScriptName = scriptSource.shortName; | 8846 String actualExternalScriptName = scriptSource.shortName; |
| 8829 expect( | 8847 expect( |
| 8830 actualExternalScriptName, | 8848 actualExternalScriptName, |
| 8831 _expectedExternalScriptName, | 8849 _expectedExternalScriptName, |
| 8832 reason: "script $scriptIndex"); | 8850 reason: "script $scriptIndex"); |
| 8833 } | 8851 } |
| 8834 } | 8852 } |
| 8835 } | 8853 } |
| OLD | NEW |