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/src/generated/element.dart'; | 7 import 'package:analyzer/src/generated/element.dart'; |
8 import 'package:analyzer/src/generated/source.dart'; | 8 import 'package:analyzer/src/generated/source.dart'; |
9 import 'package:analyzer/src/summary/builder.dart'; | 9 import 'package:analyzer/src/summary/builder.dart'; |
10 import 'package:analyzer/src/summary/format.dart'; | 10 import 'package:analyzer/src/summary/format.dart'; |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 } | 759 } |
760 | 760 |
761 test_method_parameter_return_type() { | 761 test_method_parameter_return_type() { |
762 checkLibrary('class C { f(int g()) {} }'); | 762 checkLibrary('class C { f(int g()) {} }'); |
763 } | 763 } |
764 | 764 |
765 test_method_parameter_return_type_void() { | 765 test_method_parameter_return_type_void() { |
766 checkLibrary('class C { f(void g()) {} }'); | 766 checkLibrary('class C { f(void g()) {} }'); |
767 } | 767 } |
768 | 768 |
| 769 test_operator_index() { |
| 770 checkLibrary('class C { bool operator[](int i) => null; }'); |
| 771 } |
| 772 |
| 773 test_operator_index_set() { |
| 774 checkLibrary('class C { void operator[]=(int i, bool v) {} }'); |
| 775 } |
| 776 |
769 test_parts() { | 777 test_parts() { |
770 addNamedSource('/a.dart', 'part of my.lib;'); | 778 addNamedSource('/a.dart', 'part of my.lib;'); |
771 addNamedSource('/b.dart', 'part of my.lib;'); | 779 addNamedSource('/b.dart', 'part of my.lib;'); |
772 checkLibrary('library my.lib; part "a.dart"; part "b.dart";'); | 780 checkLibrary('library my.lib; part "a.dart"; part "b.dart";'); |
773 } | 781 } |
774 | 782 |
775 test_setters() { | 783 test_setters() { |
776 checkLibrary('void set x(int value) {} set y(value) {}'); | 784 checkLibrary('void set x(int value) {} set y(value) {}'); |
777 } | 785 } |
778 | 786 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 } | 968 } |
961 | 969 |
962 test_variable_const() { | 970 test_variable_const() { |
963 checkLibrary('const int i = 0;'); | 971 checkLibrary('const int i = 0;'); |
964 } | 972 } |
965 | 973 |
966 test_variables() { | 974 test_variables() { |
967 checkLibrary('int i; int j;'); | 975 checkLibrary('int i; int j;'); |
968 } | 976 } |
969 } | 977 } |
OLD | NEW |