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 29 matching lines...) Expand all Loading... |
40 import 'test_support.dart'; | 40 import 'test_support.dart'; |
41 | 41 |
42 | 42 |
43 main() { | 43 main() { |
44 groupSep = ' | '; | 44 groupSep = ' | '; |
45 runReflectiveTests(ConstantEvaluatorTest); | 45 runReflectiveTests(ConstantEvaluatorTest); |
46 runReflectiveTests(ConstantFinderTest); | 46 runReflectiveTests(ConstantFinderTest); |
47 runReflectiveTests(ConstantValueComputerTest); | 47 runReflectiveTests(ConstantValueComputerTest); |
48 runReflectiveTests(ConstantVisitorTest); | 48 runReflectiveTests(ConstantVisitorTest); |
49 runReflectiveTests(ContentCacheTest); | 49 runReflectiveTests(ContentCacheTest); |
| 50 runReflectiveTests(CustomUriResolverTest); |
50 runReflectiveTests(DartObjectImplTest); | 51 runReflectiveTests(DartObjectImplTest); |
51 runReflectiveTests(DartUriResolverTest); | 52 runReflectiveTests(DartUriResolverTest); |
52 runReflectiveTests(DeclaredVariablesTest); | 53 runReflectiveTests(DeclaredVariablesTest); |
53 runReflectiveTests(DirectoryBasedDartSdkTest); | 54 runReflectiveTests(DirectoryBasedDartSdkTest); |
54 runReflectiveTests(DirectoryBasedSourceContainerTest); | 55 runReflectiveTests(DirectoryBasedSourceContainerTest); |
55 runReflectiveTests(ElementBuilderTest); | 56 runReflectiveTests(ElementBuilderTest); |
56 runReflectiveTests(ElementLocatorTest); | 57 runReflectiveTests(ElementLocatorTest); |
57 runReflectiveTests(EnumMemberBuilderTest); | 58 runReflectiveTests(EnumMemberBuilderTest); |
58 runReflectiveTests(ErrorReporterTest); | 59 runReflectiveTests(ErrorReporterTest); |
59 runReflectiveTests(ErrorSeverityTest); | 60 runReflectiveTests(ErrorSeverityTest); |
(...skipping 7662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7722 void test_resolve_nonFile() { | 7723 void test_resolve_nonFile() { |
7723 UriResolver resolver = new FileUriResolver(); | 7724 UriResolver resolver = new FileUriResolver(); |
7724 Source result = | 7725 Source result = |
7725 resolver.resolveAbsolute(parseUriWithException("dart:core")); | 7726 resolver.resolveAbsolute(parseUriWithException("dart:core")); |
7726 expect(result, isNull); | 7727 expect(result, isNull); |
7727 } | 7728 } |
7728 } | 7729 } |
7729 | 7730 |
7730 | 7731 |
7731 @reflectiveTest | 7732 @reflectiveTest |
| 7733 class CustomUriResolverTest { |
| 7734 void test_creation() { |
| 7735 expect(new CustomUriResolver({}), isNotNull); |
| 7736 } |
| 7737 |
| 7738 void test_resolve_unknown_uri() { |
| 7739 UriResolver resolver = new CustomUriResolver({ |
| 7740 'custom:library': '/path/to/library.dart', |
| 7741 }); |
| 7742 Source result = resolver.resolveAbsolute( |
| 7743 parseUriWithException("custom:non_library")); |
| 7744 expect(result, isNull); |
| 7745 } |
| 7746 |
| 7747 void test_resolve_uri() { |
| 7748 String path = |
| 7749 FileUtilities2.createFile("/path/to/library.dart").getAbsolutePath(); |
| 7750 UriResolver resolver = new CustomUriResolver({ |
| 7751 'custom:library': path, |
| 7752 }); |
| 7753 Source result = resolver.resolveAbsolute( |
| 7754 parseUriWithException("custom:library")); |
| 7755 expect(result, isNotNull); |
| 7756 expect(result.fullName, path); |
| 7757 } |
| 7758 } |
| 7759 |
| 7760 |
| 7761 @reflectiveTest |
7732 class HtmlParserTest extends EngineTestCase { | 7762 class HtmlParserTest extends EngineTestCase { |
7733 /** | 7763 /** |
7734 * The name of the 'script' tag in an HTML file. | 7764 * The name of the 'script' tag in an HTML file. |
7735 */ | 7765 */ |
7736 static String _TAG_SCRIPT = "script"; | 7766 static String _TAG_SCRIPT = "script"; |
7737 void fail_parse_scriptWithComment() { | 7767 void fail_parse_scriptWithComment() { |
7738 String scriptBody = r''' | 7768 String scriptBody = r''' |
7739 /** | 7769 /** |
7740 * <editable-label bind-value="dartAsignableValue"> | 7770 * <editable-label bind-value="dartAsignableValue"> |
7741 * </editable-label> | 7771 * </editable-label> |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8973 } else { | 9003 } else { |
8974 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); | 9004 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); |
8975 String actualExternalScriptName = scriptSource.shortName; | 9005 String actualExternalScriptName = scriptSource.shortName; |
8976 expect( | 9006 expect( |
8977 actualExternalScriptName, | 9007 actualExternalScriptName, |
8978 _expectedExternalScriptName, | 9008 _expectedExternalScriptName, |
8979 reason: "script $scriptIndex"); | 9009 reason: "script $scriptIndex"); |
8980 } | 9010 } |
8981 } | 9011 } |
8982 } | 9012 } |
OLD | NEW |