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 part of dart2js.semantics_visitor_test; | 5 part of dart2js.semantics_visitor_test; |
6 | 6 |
7 const Map<String, List<Test>> SEND_TESTS = const { | 7 const Map<String, List<Test>> SEND_TESTS = const { |
8 'Parameters': const [ | 8 'Parameters': const [ |
9 // Parameters | 9 // Parameters |
10 const Test('m(o) => o;', | 10 const Test('m(o) => o;', |
(...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3086 m() => const Class(true, 42); | 3086 m() => const Class(true, 42); |
3087 ''', | 3087 ''', |
3088 const Visit(VisitKind.VISIT_CONST_CONSTRUCTOR_INVOKE, | 3088 const Visit(VisitKind.VISIT_CONST_CONSTRUCTOR_INVOKE, |
3089 constant: 'const Class(true, 42)')), | 3089 constant: 'const Class(true, 42)')), |
3090 const Test( | 3090 const Test( |
3091 ''' | 3091 ''' |
3092 m() => const bool.fromEnvironment('foo'); | 3092 m() => const bool.fromEnvironment('foo'); |
3093 ''', | 3093 ''', |
3094 const Visit(VisitKind.VISIT_BOOL_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE, | 3094 const Visit(VisitKind.VISIT_BOOL_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE, |
3095 constant: | 3095 constant: |
3096 'const bool.fromEnvironment("foo", defaultValue: false)')), | 3096 'const bool.fromEnvironment("foo")')), |
3097 const Test( | 3097 const Test( |
3098 ''' | 3098 ''' |
3099 m() => const bool.fromEnvironment('foo', defaultValue: true); | 3099 m() => const bool.fromEnvironment('foo', defaultValue: true); |
3100 ''', | 3100 ''', |
3101 const Visit(VisitKind.VISIT_BOOL_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE, | 3101 const Visit(VisitKind.VISIT_BOOL_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE, |
3102 constant: 'const bool.fromEnvironment("foo", defaultValue: true)')), | 3102 constant: 'const bool.fromEnvironment("foo", defaultValue: true)')), |
3103 const Test( | 3103 const Test( |
3104 ''' | 3104 ''' |
3105 m() => const int.fromEnvironment('foo'); | 3105 m() => const int.fromEnvironment('foo'); |
3106 ''', | 3106 ''', |
3107 const Visit(VisitKind.VISIT_INT_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE, | 3107 const Visit(VisitKind.VISIT_INT_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE, |
3108 constant: 'const int.fromEnvironment("foo", defaultValue: null)')), | 3108 constant: 'const int.fromEnvironment("foo")')), |
3109 const Test( | 3109 const Test( |
3110 ''' | 3110 ''' |
3111 m() => const String.fromEnvironment('foo'); | 3111 m() => const String.fromEnvironment('foo'); |
3112 ''', | 3112 ''', |
3113 const Visit(VisitKind.VISIT_STRING_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE, | 3113 const Visit(VisitKind.VISIT_STRING_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE, |
3114 constant: | 3114 constant: |
3115 'const String.fromEnvironment("foo", defaultValue: null)')), | 3115 'const String.fromEnvironment("foo")')), |
3116 const Test( | 3116 const Test( |
3117 ''' | 3117 ''' |
3118 class Class { | 3118 class Class { |
3119 Class(a, b); | 3119 Class(a, b); |
3120 } | 3120 } |
3121 m() => const Class(true, 42); | 3121 m() => const Class(true, 42); |
3122 ''', | 3122 ''', |
3123 const Visit(VisitKind.ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE, | 3123 const Visit(VisitKind.ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE, |
3124 element: 'generative_constructor(Class#)', | 3124 element: 'generative_constructor(Class#)', |
3125 arguments: '(true,42)', | 3125 arguments: '(true,42)', |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3361 m() => new Class(true, 42); | 3361 m() => new Class(true, 42); |
3362 ''', | 3362 ''', |
3363 const Visit( | 3363 const Visit( |
3364 VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE, | 3364 VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE, |
3365 element: 'function(Class#)', | 3365 element: 'function(Class#)', |
3366 arguments: '(true,42)', | 3366 arguments: '(true,42)', |
3367 type: 'Class', | 3367 type: 'Class', |
3368 selector: 'CallStructure(arity=2)')), | 3368 selector: 'CallStructure(arity=2)')), |
3369 ], | 3369 ], |
3370 }; | 3370 }; |
OLD | NEW |