| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library test.src.serialization.elements_test; | 5 library test.src.serialization.elements_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| 9 import 'package:analyzer/dart/constant/value.dart'; | 9 import 'package:analyzer/dart/constant/value.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2915 } | 2915 } |
| 2916 | 2916 |
| 2917 test_enum_values() { | 2917 test_enum_values() { |
| 2918 checkLibrary('enum E { v1, v2 }'); | 2918 checkLibrary('enum E { v1, v2 }'); |
| 2919 } | 2919 } |
| 2920 | 2920 |
| 2921 test_enums() { | 2921 test_enums() { |
| 2922 checkLibrary('enum E1 { v1 } enum E2 { v2 }'); | 2922 checkLibrary('enum E1 { v1 } enum E2 { v2 }'); |
| 2923 } | 2923 } |
| 2924 | 2924 |
| 2925 test_error_extendsEnum() { |
| 2926 checkLibrary(''' |
| 2927 enum E {a, b, c} |
| 2928 |
| 2929 class M {} |
| 2930 |
| 2931 class A extends E { |
| 2932 foo() {} |
| 2933 } |
| 2934 |
| 2935 class B implements E, M { |
| 2936 foo() {} |
| 2937 } |
| 2938 |
| 2939 class C extends Object with E, M { |
| 2940 foo() {} |
| 2941 } |
| 2942 |
| 2943 class D = Object with M, E; |
| 2944 '''); |
| 2945 } |
| 2946 |
| 2925 test_executable_parameter_type_typedef() { | 2947 test_executable_parameter_type_typedef() { |
| 2926 checkLibrary(r''' | 2948 checkLibrary(r''' |
| 2927 typedef F(int p); | 2949 typedef F(int p); |
| 2928 main(F f) {} | 2950 main(F f) {} |
| 2929 '''); | 2951 '''); |
| 2930 } | 2952 } |
| 2931 | 2953 |
| 2932 test_export_class() { | 2954 test_export_class() { |
| 2933 addLibrarySource('/a.dart', 'class C {}'); | 2955 addLibrarySource('/a.dart', 'class C {}'); |
| 2934 checkLibrary('export "a.dart";'); | 2956 checkLibrary('export "a.dart";'); |
| (...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5017 fail('Unexpectedly tried to get unlinked summary for $uri'); | 5039 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 5018 } | 5040 } |
| 5019 return serializedUnit; | 5041 return serializedUnit; |
| 5020 } | 5042 } |
| 5021 | 5043 |
| 5022 @override | 5044 @override |
| 5023 bool hasLibrarySummary(String uri) { | 5045 bool hasLibrarySummary(String uri) { |
| 5024 return true; | 5046 return true; |
| 5025 } | 5047 } |
| 5026 } | 5048 } |
| OLD | NEW |