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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 } | 791 } |
792 | 792 |
793 test_method_parameter_return_type_void() { | 793 test_method_parameter_return_type_void() { |
794 checkLibrary('class C { f(void g()) {} }'); | 794 checkLibrary('class C { f(void g()) {} }'); |
795 } | 795 } |
796 | 796 |
797 test_operator() { | 797 test_operator() { |
798 checkLibrary('class C { C operator+(C other) => null; }'); | 798 checkLibrary('class C { C operator+(C other) => null; }'); |
799 } | 799 } |
800 | 800 |
| 801 test_operator_equal() { |
| 802 checkLibrary('class C { bool operator==(C other) => false; }'); |
| 803 } |
| 804 |
801 test_operator_external() { | 805 test_operator_external() { |
802 checkLibrary('class C { external C operator+(C other); }'); | 806 checkLibrary('class C { external C operator+(C other); }'); |
803 } | 807 } |
804 | 808 |
| 809 test_operator_greater_equal() { |
| 810 checkLibrary('class C { bool operator>=(C other) => false; }'); |
| 811 } |
| 812 |
805 test_operator_index() { | 813 test_operator_index() { |
806 checkLibrary('class C { bool operator[](int i) => null; }'); | 814 checkLibrary('class C { bool operator[](int i) => null; }'); |
807 } | 815 } |
808 | 816 |
809 test_operator_index_set() { | 817 test_operator_index_set() { |
810 checkLibrary('class C { void operator[]=(int i, bool v) {} }'); | 818 checkLibrary('class C { void operator[]=(int i, bool v) {} }'); |
811 } | 819 } |
812 | 820 |
| 821 test_operator_less_equal() { |
| 822 checkLibrary('class C { bool operator<=(C other) => false; }'); |
| 823 } |
| 824 |
813 test_parts() { | 825 test_parts() { |
814 addNamedSource('/a.dart', 'part of my.lib;'); | 826 addNamedSource('/a.dart', 'part of my.lib;'); |
815 addNamedSource('/b.dart', 'part of my.lib;'); | 827 addNamedSource('/b.dart', 'part of my.lib;'); |
816 checkLibrary('library my.lib; part "a.dart"; part "b.dart";'); | 828 checkLibrary('library my.lib; part "a.dart"; part "b.dart";'); |
817 } | 829 } |
818 | 830 |
819 test_setter_external() { | 831 test_setter_external() { |
820 checkLibrary('external void set x(int value);'); | 832 checkLibrary('external void set x(int value);'); |
821 } | 833 } |
822 | 834 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 } | 1020 } |
1009 | 1021 |
1010 test_variable_const() { | 1022 test_variable_const() { |
1011 checkLibrary('const int i = 0;'); | 1023 checkLibrary('const int i = 0;'); |
1012 } | 1024 } |
1013 | 1025 |
1014 test_variables() { | 1026 test_variables() { |
1015 checkLibrary('int i; int j;'); | 1027 checkLibrary('int i; int j;'); |
1016 } | 1028 } |
1017 } | 1029 } |
OLD | NEW |